lainchan / λ

The Beginner's General

Tank · 2022-12-29 18:41
This is the Beginner's General for beginners' questions. If with a simple question, and a suitable thread doesn't already exist, just post it here and someone will probably try to answer it. Remember to do some research before asking a question. No one wants to answer a question that a simple search can already resolve. Old thread: >>31169 (/sec/ and /Ω/ have their own Q&A threads.) Hint: You can post your source code files if you append .txt to the filename. Remember to tell us what you are trying to do and what you are trying to accomplish. For instance, a commonly asked question is about which programming language one should learn. There are multiple answers to that question (depending on what you are trying to accomplish): Do you want to learn programming to get a job? - There is a dedicated thread for that: >>30745 Do you want to make a game? - Then learning either Lua (Love 2D) or Python 3 (pygame) is probably a good option. Do you just want to learn programming for fun? - Then you can choose whatever language interest you personally (How about a Lisp, for example?) Which book is good for learning C? - C Programming: A Modern Approach, 2nd Edition by K. N. King is a popular book recommendation. >>33814 >Which programming language would you recommend for a smart 7 years old? I think a 7-years old has more important skills to learn like reading and basic arithmetic and so on. I would say s/he should start playing around with HTML+CSS (W3Fools) and later Python when s/he is about 10 years old. I think programming requires the ability for abstract thinking and I'm pretty sure that a 7 years old hasn't developed that kind of capacity, yet. I think it's challenging enough for a 10 years old.
λx.x · 2022-12-30 11:14
This is the Beginner's General for beginners' questions. If any of you have a simple question, and a suitable thread doesn't already exist, just post it here and someone will probably try to answer it. Remember to do some research before asking a question; no one wants to answer a question that a simple search can already resolve.
Bob Arctor · 2023-01-04 12:10
How to not lose my fuarrrking mind when picking things to study? I've been hired as a developer for 2 years now, but I don't know where to go after the basic stuff. I feel like my foundations(math, algorithms, computer architecture, os) are not good and these fields will take a large amount of time to learn, but I'm afraid of missing opportunities if I don't learn modern high level soykaf. What to do? How to balance my studies between essential and employable?
The Oracle · 2023-01-06 09:16
>>33869 >but I'm afraid of missing opportunities if I don't learn modern high level soykaf. >How to balance my studies You need to know the basics of algorithms and data structures. And you also need problems solving skills. But if you are in hurry, you will need to pick topics that benefit you immediately (you can later pick up other topics). Knowing basics of algorithms and data structures benefits all types of software developers (but you don't probably even need super in-depth knowledge to get by). I liked the book "Programming Pearls, 2nd ed." by Bentley (but it assumes that you know C and classes from C++ because the book uses C-style C++ for example programs). The book is also slightly outdated at some parts (look up when the book was first published). Another good book is "The Algorithm Design Manual" by Skiena (https://www3.cs.stonybrook.edu/~skiena/373/videos/). CLRS is also a good book. Before you start studying, you should make a schedule for yourself. Make sure it's realistic and reasonable (and leave enough free time for yourself). Keep your study sessions short (use some variation of the Pomodoro Technique). If you use OOP at work, you should also read "Head First Design Patterns" but do not use a design pattern, unless you know you should use it. Computer architecture and operating systems are probably the least important of the topics you listed (unless you work with embedded systems or you write system software). >Math You can get pretty far if you know precalculus. I recommend "Precalculus Mathematics in a Nutshell" by George F. Simmons. It's a short book but it contains everything you need to know (focus on algebra). If you want to watch lectures, look up TheOrganicChemistryTutor and 3brown1blue at YT. Khan academy is also pretty good for the basics. You can use WolframAlpha to check your answers. You didn't say what kind of software you have been hired to develop or what languages/technologies you are using. It would make it easier to answer you question. Also, are you looking to switch your job? If so, you should look up what technologies/languages/frameworks are used by companies that are hiring. If you are unsure, I recommend you learn Python ( >>33751 ),. Java (or C#) is also a solid choice. Learning the basics of SQL is also recommended (it's useful for webdev and enterprise programs).
Lady Jessica · 2023-01-07 06:48
>>33881 Thanks a lot for your answer, anon. I already have a study session time scheduled everyday: 4 sessions of 25 minutes of focus and 5 minutes of rest, total of 2 hours. My problem was the organization, when trying to study I kept thinking “is this really what I should be studying right now?”. >You didn't say what kind of software you have been hired to develop or what languages/technologies you are using Sorry about that. I develop web services in Java using Spring, can’t complain about it, I’m aspiring to get deeper into developing distributed systems.
Wirth · 2023-01-07 07:15
>>33889 I do the same sort of work. If you want to get better you should also pickup a functional language at some point, just the culture shift will help you write better code overall.
renames · 2023-01-10 06:30
Hello, Lain. I'm trying to install a package but the checksum fails, one comment suggests updating the file that is failing by the newest version on their github. Thing is, i don't know where to find this file in order to replace it. Can anyone help? I'm using pacman on manjaro and this is the package and comment: https://aur.archlinux.org/packages/quiterss
if · 2023-01-10 08:35
>>33904 If you use AUR, you need to read the PKGBUILD file. It contains the link to the source code (it's used by makepkg). The reason why you must read the PKGBUILD file is that it can contain anything (i.e. execute arbitrary code) and anyone can submit an AUR package (or worse, adopt an orphaned AUR package). And if you check the upstream Github, there is worry about the future of QuiteRSS: https://github.com/QuiteRSS/quiterss/issues/1566 I recommend you use Liferea instead. >Thing is, i don't know where to find this file in order to replace it. Pacman does not handle AUR (you need to download a snapshot (or use Git), less PKGBUILD and then makepkg -si. However, using a good AUR helper is recommended (this way installing AUR packages is automated). The best one that I have found is rua (https://aur.archlinux.org/packages/rua). Rua allows you to easily review and patch the PKGBUILD (and other files). I recommend you install rua and use it for installing/searching/upgrading AUR packages. To install it: #use bubblewrap-suid if you are on linux-hardened kernel. sudo pacman -S rust bubblewrap base-devel wget wget 'https://aur.archlinux.org/cgit/aur.git/snapshot/rua.tar.gz' tar -xyz rua.tar.gz cd rua # check the script, this is not optional step! less PKGBUILD makepkg -si rua --help #use "rua install pkg_name_here" to install something. When you type rua install gzdoom the AUR package/sources will be at ~/.config/rua/pkg/gzdoom/ After you type rua installl ... you can use the rua CLI to spawn a shell and you can patch (edit) the PKGBUILD very easily. Here is how to do it step-by-step: To install a package, you need to, first type rua install gzdoom (replace it with the package you want to install), then press O (okay, confirm that you really want to install the listed package(s)), Then D (diff/review changes to the AUR package) and then you need to M (merge/accept them). After merging, you can press T (to spawn a shell). After you press T, you can use nano/$EDITOR to edit the file like normally. After you are done, you can just type "exit" and you return to rua. Then you can optionally review your changes. If you are happy with your changes, you just press O (for okay) and then rua build the package and install it. This probably sounds more confusing than it really is. Just try rua. It's really good and easy to use. The default AUR helper that Manjaro uses is like kicking dead whales down the beach. Manjaro also has a lot of other problems. >https://manjarno.snorlax.sh
Elliot Alderson · 2023-01-10 08:39
>>33905 Thanks a ton for the detailed response!
Unsigned · 2023-01-10 08:45
>>33905 Do you recommend any other distro that is arch based and as low maintenance as manjaro (considering you don't run into problems often) and has frequent package updates? Not a snarky comment, i genuinely couldn't find one and arch needed too many work arounds for me to use confidently. Manjaro kinda works out of the box.
Zero Cool · 2023-01-10 09:39
>>33907 The snorlax.sh guy recommends EndeavourOS. But in my experience, it's best to run Arch (or Artix or ALARM). Nowadays, Arch is pretty easy to install because there is archinstall (but I still recommend that you go through the official installation guide and do a manual installation). After installing Arch, you can find out most of the things in the General Recommendations ArchWiki page. The tl;dr guide to Arch and Artix: https://dpaste.com/453GLQRHX
Jane Doe · 2023-01-10 10:21
>>33908 One thing i'm not clear on, using bare arch wouldn't i still have to use the AUR anyway? and face the same problem with packages? Are there any different approaches people take to installing packages besides manually checking the pkgbuild?
Wirth · 2023-01-10 12:18
>>33909 >using bare arch wouldn't i still have to use the AUR anyway? Yes. Unless, the package is available from the official Arch repos (https://archlinux.org/packages/). AUR is just an unofficial "repo" for Arch that's maintained by the community/users. >Are there any different approaches people take to installing packages besides manually checking the pkgbuild? No. There are people who blindly trust the AUR but everyone who actually knows what they are doing is checking all PKGBUILDs. Also, kind of related: even if the package is *now* benign and safe to install, someone (read "anyone") can adopt it later, if the original packager abandons the AUR package. And there won't be any kind of message that says that the maintainer has changed (you need to check the PKGBUILD to find out).
Yu-ichi · 2023-01-16 08:29
>>33869 I agree with some of what >>33881 but I disagree a lot with some of the recommendations. I believe if you really want the most applicable fields of knowledge for your job are definitely going to be system design focused areas as opposed to anything else really. Definitely look at books like clean code and design patterns for books on building scalable software systems as the other anon said. You probably don't need to study any math unless you work in more scientific/research oriented software fields, but judging from your post here >>33889 it seems your more focused on business oriented programs which math/algorithms are really not important (except for interviews of course). As for The Algorithm Design manual, I really don't like that book. It's very surface level and doesn't go into depth at all about why an algorithm works and to me the lessons don't stick unless I understand why. CLRS is really great in this regard but don't read it front to back. Take a lesson plan from a university like MIT/Stanford/UCB and adapt your reading to the lessons taught. Especially MIT with their open courseware. For math I wouldn't spend much time studying precalc, You won't need 90% of it. I would definitely study discrete math/combinatorics as these are the foundations of CS and the most directly applicable to passing interviews and understanding harder CS topics. I think with the knowledge you gained in highschool/college of precalc should be more than enough to study discrete math. But in general this is all just to pass interviews for your career or unless you are interested in it, it really won't hurt to have a good grasp on discrete math in any specialization you decide to do in CS. If you wanted to get into distributed systems this is where you will need operating system and computer architecture knowledge. Even just Linux knowledge in general is extremely useful in pretty much any software job. Most of my old professors who work in distributed systems specialized in OS and computer architecture and many OS textbooks typically will go into distributed systems after explaining OS in general.
Dujour · 2023-01-18 09:05
Are there any other websites like SQL-Zoo that teach programming in gamified way?
Nobody important · 2023-01-18 10:41
>>33962 Thanks for your answer and recommendations, anon. I think one of my main problems is that I try to force myself to study things I don’t really want to but others said “I must know”, so I end up picking topics that I just procrastinate and never study for real. Another thing is that I have interest in math related to cs but I never find any good material explaining what all this math is really representing, like how do I apply it to cs? e.g. Why linear algebra is importante to cs? Where it’s used?
progn · 2023-01-20 11:19
>>33991 Linear algebra is studying the forms of linear equations and transformations on those systems of equations. Remeber high school math of calculating slopes of one line or the intersection of two lines? Linear eqns are used everywhere because the simple straighforward idea of constant rate of change is useful. Thats the geometric view of simple linear transformations, watch the 3B1B videos for more intuitove visuals using 2 and 3 dimensions and then it can help click and beginner problems can become easier.
Nell · 2023-01-20 14:58
>>33991 >Why linear algebra is importante to cs? Besides scientific work, it's used in graphics programming and machine or deep learning.
Unnamed · 2023-01-21 06:48
>>34028 I actually really enjoy math, the only problem for me is connecting the dots between the abstraction and the real life thing/phenomena.
Eldon Tyrell · 2023-01-22 04:26
Hey lain, I habe a problem I was doing the exercise to remove comments from a C program, however, I encountered a problem on the first step, i.e., removing anything inside a block of /* */ The first solution I came up with was #include <stdio.h> int main () { int c, ic; ic = 0; while ((c = getchar()) != EOF) { if (c == '/') { if (ic == 0) ic = 1; else ic = 0; } if (ic == 0) putchar(c); } return 0; } You can see the problem though, when it encounters the second '/', it sets ic to 0 and putchars '/' which is undesired I could come up with a soykafty solution which uses a third variable 'end' #include <stdio.h> int main () { int c, ic, end; ic = end = 0; while ((c = getchar()) != EOF) { if (c == '/') { if (ic == 0) ic = 1; else end = 1; } if (ic == 0) putchar(c); else if (end == 1) { ic = 0; end = 0; } } return 0; } However I'd like to have a solution that doesn't require a third variable. pls help
Hitomi · 2023-01-22 04:37
>>34057 ah for fuggs sake tabs don't work here are two tio.run links with the two programs https://tio.run/##ZU@9DoIwEJ7hKT7jICUiOiNuurr4AuQ47SWlmBbiYHx2bGFwcPt@78tR8SCaprVYMmPLOPqhlX6nT2kqdkDXiEWm8E6TSGkLoSpgQo19AC8thpFlkT94IN24TCmsapyvl7mWyB3RrrEpN4sySzJrexX5cu9QRczG80@LG8kn/a88x2WMVEiEgONhdDbmP9N00@wY4tFYjLZlL45beNN4jdkqihPKHNR3HYe38vIL https://tio.run/##ZZDBDoIwEETP8hVjPEiNCJ4Rb3r14g@QZbVNoBgK8WD4duwWPJm0ze7rzkxTSp5E07QxluqhYpxcX5n2oM9RZGyPpjQWscInWklLexi/2Va5B4RCSn9mvn1rUzPiWOiTe9JlFyuFdYHL7RocVuYBuS6wTbczCcgElinpZ9djLjXXjgObQwIco3/Na5jTSMmEqCAjQeVlvyRaHvrzyxY/vzruh84KGafprrnzDg62hatLpxFAkpyR7kBt07D/il36BQ
Meddler · 2023-01-22 04:51
Sup, any good resources and tips for implementing UI design into code? Specifically for web development. I mostly find tools and apps that advertise themselves upon this subject when I try to make a research.
Unidentified · 2023-01-27 02:38
If I wanted to reverse engineer something what version would usually be easier: A web app, Android, or Windows desktop ? Im only aware Android is much easier than iOS. Is reverse engineering always advanced stuff or can some tools basically do the job for you in some cases?
fsociety · 2023-01-27 04:33
>>34120 windows app, android & phone stuff is a mess tho if its really simple maybe the web app, but anything complex will make the web stuff worse than the windows app to inspect, web stuff is a mess too >>34057 put an else after the c == '/' block - only putchar when not '/' and ic == 0 so just add "else" to if (ic == 0) but really you should read the whole file into memory so then you can look at the next byte have a char* c; to the current byte you're reading in the file and use c[1] to look ahead to the next char so you can do c[0] == '/' && c[1] == '*'
dictionary · 2023-01-28 06:18
>>34128 Is this one of those trick questions where you bait an answer and then you respond with "well I know Common Lisp already and have done that in CL, what can Python do that CL can't?"
dup · 2023-01-28 08:33
>>34128 In short, Python is good for system maintenance/automation/scripting, web scraping and webdev. But it can be also used for machine learning/"deep" learning, data science and for making small games/visual novels. A really good thing about Python 3 is that there a ton of libraries (packages) available for all sorts of stuff. Here are a couple of practical examples of programs written in Python: Portage (package manager), Katawa Shoujo (a VN), youtube-dl, Searx, Lutris, SCons (build system with support for multiple languages), Deluge (BitTorrent client), and R*ddit (a link sharing site that's centered around farming forum reputation points). Visit the Python 3 thread >>33751 for more info.
Junichi Fujiwara · 2023-01-28 09:07
I've been working on a script that takes a webpage, then finds all the links on that page, then goes to each of those pages and finds all the links on those pages, and so on. It also keeps track of each webpages 'parent', so "www.website.com" - > "anothersite.com" and "www.website.com" - > "someothersite.com", and so on. I wanted a way to visualize this. I first went with NetworkX, which worked without too much effort. However for larger sets, it didn't work so well. For anything more than say 500 nodes, it gets hard to read as all the labels blur together. You can zoom in and read it, but it lags a lot, and it isnt interactive if you save it as a png or whatever, so that's not ideal. An anon told me to use dot, so I tried using graphviz library for python, but now I'm also having problems with that. Notably, the output is fuarked and gives me these really short, wide pages. I was wondering if someone here had some advice? Either a different library I should use, or a different method entirely, or some way to get these working better. Pic related.
Y.T · 2023-01-28 09:37
>>34134 the internet is incredibly huge. I don't think there's any practical way to display this at any large scale, and if you want labels its worse. I have tens of millions of webpages. You could simplify the nodemap by making like, not looking at pages but at sites. You could also simplify it by only displaying a small part of the network at a time. Other than that this isnt a library problem its just that you're trying to display a giant tangled mess. It will look like a giant tangled mess if you want to show it in any semblance of honesty.
Faye Valentine · 2023-01-28 10:54
>>34135 >You could also simplify it by only displaying a small part of the network at a time. Yes, I didn't mention in my post but it is of course limited, otherwise the program would potentially never terminate. It stops after a certain number of webpages are mapped, or after it gets every webpage n degrees from the starting website, whichever comes first.
Kay · 2023-01-28 18:23
>>34131 No its not, lol >>34133 Awesome, thank you!
Bob Arctor · 2023-01-29 18:18
>>34121 >windows app, android & phone stuff is a mess tho if its really simple maybe the web app, but anything complex will make the web stuff worse than the windows app to inspect, web stuff is a mess too I will keep that in mind, thanks.
setq · 2023-02-02 08:20
Does learning C++ well enough to write useful software really require reading a 1000+ page language specification? I'm interested in C++ because every Vulkan tutorial uses C++ examples.
Drano · 2023-02-02 09:17
>>34181 No, you don't need to read Stroustrup's books. Be aware though, 1000 page reference or not, that learning C++ together with a graphics API is a massive undertaking that's also unprofitable aside from the few outliers. I'm assuming you already have a well-paying job, because it's not a smart decision career-wise compared to say learning Node/Express + React and writing web apps.
Joe Bloggs · 2023-02-02 09:56
>>34182 >you don't need to read Stroustrup's books I was referring the C++ Primer, 5th edition. >I'm assuming you already have a well-paying job I'm a third year uni student. So not a "total beginner". In my small personal projects, I've used golang almost exclusively, which I learned using the incredibly terse examples here https://gobyexample.com/ I'm also going through this book on computer graphics, which doesn't use any gpu api https://gabrielgambetta.com/computer-graphics-from-scratch/
JARGON · 2023-02-02 13:36
>>34181 >>34183 >I was referring the C++ Primer, 5th edition. You want to have a C++ book that you can also use as a reference. C++ is so huge language and the C++ standards committee is sometimes a bit too eager to add new stuff just because it's fashionable at the time. In C++ there almost always 1 old but bad way of doing xyz and 1-2 new and better ways of doing the same thing (even simple stuff like initializing variables! *). And each of the ways has their own pros and cons. When programming in C or C++, you will want to also use the compiler (GCC or Clang with -Wall -Wextra -Wformat=2 compiler options turned on) and all other tools (Valgrind, GDB, sanitizers and lints) to make your life easier. C++ Primer (Note: It's different book than C++ Primer Plus!) is one of the best books on C++. PPP2 is perfect for beginners or those who don't know OOP. The C++ Programming Language book by Bjarne Stroustrup is also very good alternative to C++ Primer but it's more like a reference book. The thing I like about C++ Primer is the fact the authors try to explain the different cons and pros for accomplishing xyz. * #include <iostream> using namespace std; int main() { // https://cplusplus.com/doc/tutorial/variables/#initialization // cppreference.com is usually the better website. cout << "each of these is subtly different!\n"; int foobar1 = 1; auto foobar2 = 2; int foobar3 = {3}; int foobar4 {4}; int foobar5 (5); cout << foobar1 << "\n" << foobar2 << "\n" << foobar3 << "\n" << foobar4 << "\n" << foobar5 << "\n" << "Hello World!" << endl; return 0; }
Koichiro · 2023-02-02 14:24
>>34187 >there almost always 1 old but bad way of doing xyz and 1-2 new and better ways of doing the same thing What about the standard library? It it filled with the "old but bad way" of doing things? Why else should I care about the old, bad way except to understand old, bad legacy code? Why else not only learn the new, better way of doing things?
Fred Nurk · 2023-02-05 23:55
does anyone have the pastas about arch/artix/gentoo/alpine that a lainon posted here some time ago? they were really good I should have backed them up this was one of the links https://pst.moe/paste/titspz
Wirth · 2023-02-06 06:02
>>34244 Sure. I will repaste them: >Alpine: https://dpaste.com/AX5C5NLLR >Arch/Artix: https://dpaste.com/69A6LNAYE >Gentoo: https://dpaste.com/7SDBRZFPG you may want to disregard the advice about using "slub_debug=P" and "page_poison=1", see https://voidlinux.org/news/2021/03/OpenSSL-hardening-updates.html t. the original author of the pasta.
progn · 2023-02-06 06:05
>>34247 thanks a lot i appreciate it
Debbie Charteris · 2023-02-07 10:32
I want to find a way of downloading wikis (some for videogames, others for other type of media) for offline use, withouth the need of an external reader (a la kiwix). basically i want a folder tree with the htmls of every page. the closest thing i can think of is singlefile, but that doesn't walk websites as far as i know. the wikis are either "wikia" (a.k.a. fandom.com) sites or mediawiki ones. always relatively "small" sites (300 pages or so at most, but in most cases it isn't over 100 pages)
Six · 2023-02-07 18:23
>>34272 What's wrkng with wget -R, or just hacking together a shell script?
Erik Johansson · 2023-02-16 10:06
>>34335 You can still use Swing
Motoko Kusanagi · 2023-02-19 23:28
How do you pick a language to learn if you are not interested in being a code monkey wage slave for some corpo soykaf and instead just want to do your own thing independently or in a team? Is it reasonable to just not care what languages are well known or popular and just focus on performance for use case? How do you even know what language would do best for something when you dont understand all the terms used in benchmarks?
Kay · 2023-02-20 14:42
>>34421 Also, do not learn assembly, C or C++ as your first language because it's like starting using Linux with Linux From Scratch. You will get hard to debug errors and the error messages aren't always very helpful.
quote · 2023-02-20 16:29
>>34422 >do not learn assembly, C or C++ as your first language because it's like starting using Linux with Linux From Scratch tfw i literally started with assembly and then C. it was fun :D but i get where you're coming from. now, i'll have to disagree a bit here, because i think, if someone starts from a very high level lang, then he/she will have less reasons to learn "what's under the hood" by using a lower level language, unless we're talking about a really curious person that won't loose that curiosity in the process of learning a new, lower level lang. also a lot of people just stays in what they learned first if it's a high level lang ala python because "it ust werks"
John Titor · 2023-02-20 16:36
>>34335 >How exactly do I create a good GUI for a Java application? exactly what >>34362 said, use swing. don't get fooled by old swing apps screenshots, you can create modern looking apps in swing, and imo it's 5 times easier to use than javaFx. I had effectively developed multiple cool Java desktop apps and they all used swing, and looked modern. check out LookAndFeel libraries that integrate with swing and just with a couple extra lines of code you'll integrate a modern "theme" into a swing GUI. but to be honest, we have a java thread for stuff like this
x<->y · 2023-02-20 16:57
>>34278 Does wget downloaded html pages hyperlinks point to the other downloaded htmls? i don't think so :/ also from my experience wget downloads a bunch of crap if the wiki happened to point to another webpage in one of the articles.
Ivan Petrov · 2023-02-20 21:55
>>34421 I had just a few things in mind I wanted to do aside from tweaking any existing programs was thinking about VR possibly with some focus on networking with security and privacy in mind, AR, and possibly AI if it doesnt seem to over my head when i try. Only simple program i had in mind was just something to calculate probability in card games like blackjack but better than advanced card counting methods. I had been considering Crystal due to it's syntax and what I assume to be relative speed and low memory usage seemed decently rounded though i dont know which benchmarks matter for the things id want to do. Problem is found there is no polished game engine or physics engines written in it yet as far as I can tell which would put a lot on me to do so i may get burnt out before anything accomplished which is a shame so not sure that's really a wise choice even though it sounds like a good language from what my unlearnt mind can tell. I will have to look into other options again more to decide. >>34422 >>34425 I did a little C++ ages ago in a high school class. Dont remember any of it though. Dont recall it being difficult to make a simple program i just remember it feeling very tedious to do even something simple like a long code just to display an animated gif in a 2d retro styled game i never completed because i lost the code and not interested in revisiting
dup · 2023-02-23 15:14
I have several questions I’d like to ask rather than individually 1) How, emphasis on how, do you learn to program? Do you binge on videos then try stuff and then try to do some hands on work? 2) What can I do to prevent forgetting things after periods of not doing anything programming related? 3) How long would it take to “know” a language like python or JavaScript in its entirety? Not basic stuff, I’m saying obscure stuff too
Von Neumann · 2023-02-25 11:18
>>34465 >How long would it take to “know” a language like python or JavaScript in its entirety? Do you know English or any of your other natural languayes in their entirety?
Just another Random Lainon · 2023-02-25 22:39
how 2 learn porgram 1. have problem 2. (optional) take extra adderall 3. dissect problem 4. imagine solution 5. dissect solution to tiniest pieces 6. choose favorite language by prettiest syntax or flip coin 7. start with first piece, look up how to do piece in favorite language 7a. browse/search lists of functions in language until you find one that does the piece or part of the piece (you should have made more pieces) 7b. don't forget to browse/search libraries too maybe 7c. if too hard then try starting with last or middle piece instead 8. repeat 9. profit
Masami Eiri · 2023-02-28 15:31
How do I make and host own Chan? I wanna do it all myself Since hosting it myself. I want it to be really simple. I don't know where to start I'm clueless at the PC....
sizeof · 2023-03-01 09:30
>>34537 >I don't know where to start I'm clueless at the PC.... 1. Learn to use GNU/Linux. Here is some distro-specific advice: >>34247 Do not use Arch Linux for your server! Use either Debian stable or Ubuntu Server (not normal Ubuntu!). Devuan is okay, if you want something that doesn't have Systemd (if you are beginner, it doesn't matter). >https://cdimage.debian.org/cdimage/unofficial/non-free/cd-including-firmware/current/amd64/iso-cd/firmware-11.6.0-amd64-netinst.iso I highly recommend you either use VirtualBox (a VM) or you dual-boot GNU/Linux. Note: you can use any distro you want for your desktop/laptop. I recommend Xubuntu or Linux Mint if you are newbie. If you are looking for cheap second computer just for messing around with Linux, get a Raspberry Pi (the Raspberry Pi 400 kit has everything you need) or buy a used business laptop. tl;dr guide to dual-booting: - First, use Windows disk management tools to shrink a partition: https://www.diskpart.com/disk-management/shrink-volume-6289.html (reserve at least 30GB or more for Linux) - Use Rufus (https://rufus.ie/en/) to create an installation USB. If you get errors, I recommend you use the "dd" mode in Rufus. - You can use PowersHell to check the integrity of the iso: Get-FileHash gentoo.iso -Algorithm SHA256 - If you want to partition the disk using GUI, you can do the partitioning using SystemRescueCD (https://www.system-rescue.org/) and gparted. But you can just point the installer to the free space you reclaimed using disk management tools. 2. Learn to use the command-line and Bash. Work through this free book: https://linuxcommand.org/tlcl.php Don't skip this step. You need this knowledge. If (when) you get trouble, check out the documentation of your distro and ArchWiki (even if you don't use Arch Linux). Here is a good place to start: https://wiki.archlinux.org/title/General_recommendations Note: you can get real-time help on IRC (install Hexchat). At minimum You need to know: basics of Bash and how to navigate (cd, ls, pwd), basic grasp of hier(7) man-page (type man 7 hier or find a site that hosts man-pages in HTML form. Also, read intro man-page for each section.), how sudo works (including how to add your user to sudoers using visudo), basics of nano text editor (easy, just press F1 key after you launch it), basics of ufw firewall, how to set up and use OpenSSH server/client (possibly also rsync (https://cheat.sh/rsync) and SFTP) and basics of tmux (so the commands don't get killed if your ssh connection is interrupted by something). Here are some recommended YouTube channels: >https://www.youtube.com/@LukeSmithxyz/videos >https://www.youtube.com/@DistroTube/videos >https://www.youtube.com/@DigitalMetal/videos But the book I linked above is very good. Do not binge watch YT vids. It's not a good way to learn. Other resources: https://docstore.mik.ua/orelly/unix/upt/index.htm (for learning vi/vim/neovim, but don't forget about the built-in tutorials!) and https://www.grymoire.com/computers.html (sed/awk tutorials that you CAN skip). 3. Get a domain, VPS and set up web server, etc. Again, you really want to use Debian stable OR Ubuntu Server. Also, set up automatic security updates. If you don't know which imageboard software to use, I recommend JSchan: https://gitgud.io/fatchan/jschan/ (Lainchan software or LynxChan are another good options, PicoChan software is good for Tor-only chan.) Here is guide on how to set up a basic server (including how to get a domain, etc): https://landchad.net Read the copypasta (written by someone?) that's attached. (idk if it's the newest version) I highly recommend you host a pastebin for a month before you start hosting a chan! (to get some experience). If you want to make moderating your chan much easier, make a text board instead (i wonder if using kareha is still acceptable?).
Moore · 2023-03-06 11:38
>>34583 >but what would be the benefits of learning awk and sed for curiosity's sake? Simply put, text editing super powers: https://www.youtube.com/watch?v=W5kr7X7EG4o You can replace AWK and Sed with Perl (or another scripting language if you like). If you want to learn AWK and Sed, I recommend you start with grep instead (grep is for selecting/extracting text using regular expressions). But I wouldn't worry about AWK/Sed/grep for now. But you may want to go back to them once you have more experience with Linux. In addition to Grymoire, there is this site: https://www.regular-expressions.info
Frank Garza · 2023-03-07 11:54
>>34625 a) it doesnt matter they all approx the same, you cant go wrong with javascript, PHP, and you'll eventually want to learn C, as well as whatever language/platform is first class on the operating system your interested in, i.e. java/kotlin and C and jvm for android, swift/obj-c and C for iOS/MacOsX and .net related libraries for Windows. b) grugq idk if there are any other related opsec guides, I like to look at rms as a guide too, he does everyuthing online with a download, file-offline, batch upload model and that helps prevent/disable many times of pervasive tracking. c) anime character
dictionary · 2023-03-08 07:40
>>34625 >a) where should i begin with programming languages Something easy and simple. Do not pick C or C++. I recommend Lua because it's simple, it has good performance (not that important as a beginner but still...) and there is a free book online: https://www.lua.org/pil/contents.html >b) where do i begin with basic opsec in my day to day Don't use same names for you online accounts. Don't use your real name as your username anywhere (not even on your own computer, if you don't know which username to use on your computer just use "lain"). Make sure to have at least 2 emails (1 for your real IRL identity and 2nd for your online identity). Do not give your phone number to anyone or any service. And stop using social media. Use Tor Browser (but don't log in to any service when you use it). Install GNU/Linux (like Xubuntu) and dual-boot Botnet 10/Botnet 11 and GNU/Linux on your computer. See §1 of >>34555 >c) who the fuarrrk is lain lol Watch Serial Experiments Lain anime.
Netrunner · 2023-03-10 02:19
>>34555 Is there a way I can make and host a mock up of a chan on my pc just to play around with the software without putting it online?
Milner · 2023-03-10 03:05
>>34555 trying to balance security and ease here because i'm a little bit of an idiot. i have a spare used laptop. are xubuntu or mint sufficiently safe or is it better to just use tails. mind you i'm not dual-booting or booting from flash i would just reformat laptop and use it. any suggestions?
Aristóteles Amadópulus · 2023-03-10 07:55
>>34657 >are xubuntu or mint sufficiently safe or is it better to just use tails. mind you i'm not dual-booting or booting from flash i would just reformat laptop and use it. any suggestions? For just using Tor, you should either use torbrowser-launcher to securely download Tor Browser (it's available on many Linux distros, including Xubuntu and Mint). Tails is good for booting into a live environment (called "LiveCD" or "LiveUSB") but it's not good as normal daily OS (you don't want to use Tor to login to accounts that are linked to your IRL identity). Xubuntu and Mint are both safe enough for regular use. >>34656 Sure, just block all incoming connections using ufw and then allow all from your LAN to port xx. The best way to test it (or any server software) is to use a spare laptop/old PC or a Raspberrry Pi.
Turner · 2023-03-11 02:24
>>34656 absolutely. install debian on an old computer or a vm (qemu/virtualbox), then follow the jschan setup guide (it is quite thorough) and make sure you understand what each step is doing. it is probably easier than you think. lain, don't fret, just do it. you will learn a lot first hand if you start right now.
drop · 2023-03-13 18:30
>>34730 DO NOT BUY SICP WTF ITS FREE
Pero popero · 2023-03-13 18:43
I'm aspiring game dev, but i wondering should i focus on game engines(i'm using godot now)? or should i focus on computer science basics and then proceed to make game engines and games from scratch?
St. IGNUcius · 2023-03-13 20:13
>>34737 > hard copy I never said this was free, I said SICP was free. You should probably save your money as SICP has much more confusing language than my post that you misinterpreted
Incognito · 2023-03-13 20:16
>>34743 >SICP has much more confusing language than my post that you misinterpreted maybe so maybe so maybe so maybe so maybe so on the other hand I think you may have misinterpreted >>34730 who said to check out a free copy before buying the thing.
Jean Dupont · 2023-03-13 20:21
>>34742 To jump off of this, even the devs that do decide to make their own engine almost always do so with the help of preexisting libraries like SDL and GLFW.
Unidentified · 2023-03-13 20:57
>>34744 and I'm in agreement with them. I don't know why you went out of your way to deliberately misinterpret my comment about not buying SICP
Masami Eiri · 2023-03-14 07:12
>>34677 Can I do this with kareha script? It's ancient so I'm not sure how to go about it and there aren't many tutorials online
Case · 2023-03-14 08:25
>>34735 >https://mitp-content-server.mit.edu/books/content/sectbyfn/books_pres_0/6515/sicp.zip/full-text/book/book.html I would buy it even when it's freely available because it's such a good book (actually I *did* buy SICP). >>34736 >gamedev If you actually want to finish your game, use an engine. Godot is really good. Be sure to learn some physics, too.
Molly Millions · 2023-03-14 10:47
i heard you shoud be experienced programmer before learning rust. I know python and javascript how much shoud i kno before learning rust?
byte · 2023-03-14 12:03
>>34754 The reason why people say this is because Rust isn't low level enough to build foundational understanding but also isn't high level enough to build conceptual understanding. It's possible - but there are languages better suited for learning for both Bottom-Up or Top-Down learners. If you're a Bottom-Up learner - learn something like 6502 ASM first. If you're a Top-Down learner having learned Python/Javascript will be fine. Rust is closer to the bottom than the top though - so you'll struggle more than someone who had learned a low level language like C or an easy ASM first. If you're coming from Python/JS you're going to have issues with the memory model because Rust will force you to be concerned with memory - something you can mostly ignore in Python/JS. You will fight with the borrow checker. Often. This is good - learn to love the borrow checker and compiler - it is making your code better and that will absolutely carry over to how you structure your Python/JS code. Knowing Python/JS is actually irrelevant - how much conceptual understanding did you learn from them? Arrays, hashmaps (dicts), variables, higher order functions, enums, error handling, etc. If you struggle to organize a large Python project - you're going to struggle to organize a large Rust project and that's going to make learning Rust even harder than it should be.
Dr. X · 2023-03-15 08:12
>>34754 People say that but I don't think it's true. Granted, I didn't learn Rust until I had over a decade of other programming experience, so maybe I'm blind to the issues beginners would have. The biggest three differences between rust vs python and js is that Rust is strongly typed, uses a trait system, and that Rust has a borrow checker that will enforce some rules that might seem odd, but are needed because enforcing them allows it to free memory for you as the variables go out of scope without needing a garbage collector. And you'll need to understand pointers, but there's no pointer arithmetic. Being strongly typed just means that unlike js, Rust will throw an error at compile time if you try to pass a variable of one type to a function that takes a different type (unless you implement some traits to make the type implicitly coerce to the argument's type). It won't take long to get used to it. Rust uses traits. They're more powerful than just interfaces, but for a beginner you can just think of them as what most languages call interfaces. The borrow checker just makes sure memory can be allocated and free automatically, that you're not doing anything that could result in using variables whose memory has been freed or modifying variables in ways that violate their consistency/ownership. That sounds easy, but like >>34755 said, you will end up fighting with the borrow checker. Whether you have 30 years of experience or 1, the borrow checker will give you a headache at some point, but don't get discouraged. It will click eventually and the compiler errors will help a lot. And fighting the borrow checker is, in my experience, much less painful than debugging a lot of the bugs that it prevents. The Rust book is really good and the Rust compiler usually gives you detailed error messages that explain exactly how you messed up. The tooling (cargo) is good, easy to use, and constantly getting better. If you're still scared, learn Go first. It's simple enough that you'll be able to learn it very quickly compared to other languages. You'll get experience with pointers, depending on interfaces, and a strongly typed language, and then you can pivot to Rust. What is your interest in learning Rust?
Hitomi · 2023-03-15 08:18
>>34555 what about actually making the chan and also establishing security and not being fixed? im not that lain but i just want to make a simple textboard
fsociety · 2023-03-15 09:05
>>34774 Modern Python (Mypy) and modern Javascript (Typescript) both introduce static typing to the languages so beginners usually aren't unfamiliar with the concept anymore even if they haven't actually used Mypy or Typescript themselves. Traits are a little weird but beginners mostly just use Serde's Serialize/Deserialize and Copy, Clone everywhere until they start to figure out the magic of traits. Rust has *just enough* magic to make it difficult to grok the memory model and *not quite enough magic* that you still have to concern yourself with the memory model. That's the problem with learning Rust as a first language. It certainly is possible - but it will be harder and more frustrating than starting with another language first. Even the developers of Rust and the vast majority of the Rust community agree with this. Either start at a lower level to understand the memory model or start at a higher level to get an understanding of programming fundamentals. It's much easier to quickly grok the fundamentals in a higher level language then transition to Rust and it's much easier to deal with the borrow checker if you understand the memory model well enough by coming from a lower level language where you have to concern yourself with memory manually. Once you've grokked the memory model and you stop fighting the borrow checker except on rare occasions (those rare occasions that would have been an eventual memory safety issue had you been writing in C) using Rust feels great. But until then, for beginners, it's a frustrating hell of trying to get your code to compile for anything more complex than trivial Hello World examples.
John Titor · 2023-03-17 10:41
how do I stop my little chan site from being flooded by CP spam bots? I've seen this be an issue on a handful of low traffic sites where there is only one mod
Bobby Newmark · 2023-03-17 11:17
>>34821 Require mkproof (proof of work verification). Add hidden fields for stupid spambots. Recruit more mods that you can trust.
() · 2023-03-17 13:53
Been writing basic programs in Python inconsitently for about a year now. Can't do much at all, I would consider myself a complete novice. Will start back from the beginning with a foundational approach that includes mathematics and a course/textbook on computer science. That's all. Wish me luck.
pop · 2023-03-17 16:10
>>34830 Don't fall into the trap of studying. Programming and internalizing knowledge is a matter of doing. Do more and you'll learn more. Programming inconsistently tells me you struggled to learn because you were not doing enough and not because you weren't studying enough. Study to learn things as you need to learn them and when you want to peak behind the magic mirror of how something works - but do not dwell on it unless you are taking action with the knowledge.
Special Agent Bob · 2023-03-18 08:02
hello lainanons, someone who isn't me recently became interested in photoscanned 3d models. They've been interested in creating photorealistic worlds using unreal engine recently, and they have had success photoscanning their own models... but this is extremely time consuming, and they aren't long for this world. They had the thought that lots of estate agents offer virtual tours of houses (like this: https://my.matterport.com/show/?m=fBkrbbUd2R6&play=1), and these virtual tours can easily be turned into 3d models; if only they could download those files. Can someone please give me some pointers on what sort of methods someone might be able to employ to extract these tour files from websites like the example I provided? There's tonnes of estate agents that upload these files, and pawing through source files looking for vulnerabilities is acceptable - but they are not certain what exactly they should be looking for; nor what the most efficient way to look might be.
protected · 2023-03-20 05:42
does anybody know where I can download a safe copy of windows xp to use in virtualbox? Also, whenever I try to install windows 98 in virtualbox, after I select run installation from CD it tells me that "windows 98 has detected that c drive does not contain a valid FAT or FAT32 partition" how do I fix this? I only wanna play retro games jammit! I'm using a AMD ryzen machine and I've heard this can cause problems, is there a work around?
protected · 2023-03-20 09:02
>>34863 what do you mean by "retro games"? which OS are you running right now?
藤原純一 · 2023-03-20 10:22
>>34863 For DOS games, I highly recommend using DOSbox (or a FreeDOS VM if you want something more authentic). There are emulators for other systems. For both old and new Windows games, there is WINE and Proton (check WINE AppDB and ProtonDB for details). Note that there are source ports (aka "engine replacements") for some games: >Morrowind : OpenMW >Doom and Doom2 : GZDoom, PrBoom-plus and Zandronum (for MP). There are also others. >Duke Nukem 3D : eduke32 etc.
Gargoyle · 2023-03-24 07:41
I am a senior student studying computer science trying to think of a project idea for graduation project. The instructor told me that the project idea has to be something new, and has to justify its existing, so i can't just develop food delivery app, or program that help the blind, they'd ask me "why would anyone pick your product instead of product X?". He told me i should make a project in AI since its all the new rage, but i don't know much statistics (which is important according to google) and i didn't have AI classes yet. Any project ideas?
↑ · 2023-03-24 08:35
>>34902 >they'd ask me "why would anyone pick your product instead of product X?". >He told me i should make a project in AI since its all the new rage But why would anyone use your AI instead of the tons of other AI products that have a much larger and much more curated data set? One student, half a semester, and presumably no budget isn't enough time to do that, unless he just wants you to integrate with some existing AI API, use a pretrained model, or make a toy model. What are your interests lain? You should come up with a project tailored to those.
Gargoyle · 2023-03-24 10:24
>>34903 i love making games in godot but probably not something i can shift into a graduation project. I'd love if i was tasked with making game for an older system, i loved assembly class, i could write a paper on how those systems work, unfortunately it was rejected since it was an older idea. I'm not very knowledgeable on web nor making native desktop gui, but im currently learning C++ (learncpp.com) to learn desktop GUI. i think you might have hit it on the nose, i think he doesn't mind me using Ai APIs like CHATGPT
Junichi Fujiwara · 2023-03-24 23:15
I'm looking for a good speed decent priced router that can run OpenWRT any recommendations for something under $100 that isn't going to mess with speeds. I also have family members who don't care about privacy all sitting around on their drone phones. Any suggestions on how I handle that going forward?
Miho Iwakura · 2023-03-25 00:58
>>34902 >>34905 maybe make something that doesn't look like a game but is kind of like a game underneath the surface like a collision / physics modelling thing something with interactions like game entities but is presented as a simulation if you still can't get them to okay anything ask them what they really mean by something new, there's nothing new under the sun, everything is variations & combinations of existing things and ideas if you can get them to further specify what they mean it'll be easier to present something you'd like to do as a new untried thing focus on what distinguishes it from other things rather than its similarities to other things when explaining it
Gargoyle · 2023-03-31 14:13
>>34903 >use a pretrained model could you tell me some keywords to google for this? google is giving me mixed bag results and im not sure which libraries are high enough levels that i could hack something around using a pretrained model.
word · 2023-04-03 11:51
So fellas, what's a good option for scripting that supports Windblows and is smaller than a full blown Python dev environment? I found these two projects here and they seem interesting? https://computoid.com/APPerl/ https://github.com/babashka/babashka
Spike Spiegel · 2023-04-04 04:33
>>35016 There's Janet, which is good for scripting and has minimal dependencies. It's also pretty good if you want to distribute a single binary to other people. https://janet-lang.org/
Case · 2023-04-04 10:53
>>35016 >>35024 I conveniently found this as well https://ahgamut.github.io/2021/07/13/ape-python/ Basically a statically compiled version of Python 3.6. It's missing a few modules but could work https://justine.lol/ftrace/python.com Probably you don't need anything but the stdlib for sysadmin tasks. Python has wonky backwards compatibility though so a few path shenaningans could be required. Personally you can't really do much better than Perl if you need backwards compatibility. Janet seems cool, however.
ilt · 2023-04-07 08:09
i initially posted this same question in the wrong thread and i'm sorry. i want to make a python program that tracks if an image contains a shiba inu or a variant of the doge meme. i have no knowledge relative to machine learning. what do i need to learn to achieve this?
Senor_Tiry · 2023-04-07 08:27
>>35054 Pretty basic image recognition model. You'd want to aquire a large dataset of pictures that are labeled as Shiba Inus, the more the better. And you probably want a dataset of other animals labeled as something other than Shibas. Then you could probably rig up a basic model in tensor flow. After that you train the model and then test it to see if it actually works. Image recognition is not really my expertise but you could probably find some examples on kaggle or something that perform a similar function to what you're trying to do.
word · 2023-04-07 16:07
>>35055 >>35054 Corgies look pretty similar to shiba inus so it would probably help to identify them to avoid false positives.
Trinity · 2023-04-08 08:18
Symbolic calculus/algebra algorithms - why it's so hard to find stuff on them? Are they so obvious to implement there is not much to write on them or it's such a niche that not many people actually work in that field hence scarce resources online?
Crazy Jake · 2023-04-10 10:28
what's good lainbrothers i've been learning python at school for about 8 months now. anyone have recommendations for what to learn next? also post books, websites etc that may be of use
swap · 2023-04-10 13:05
>>35072 whatever interests you duh if you want more details consult yourself or ask more specific question next time that mentions what are these interests of yours
Yet Another Lainon · 2023-04-10 13:08
>>35072 If you don't use Linux atm, install it and start learning to use it. I recommend trying Linux Mint and reading this free book: https://linuxcommand.org/tlcl.php After that, you might want to learn: >basic CSS+HTML ^It's very easy, just use W3Fools (but the rest of the tutorials on that site suck) and web.dev Then make a NeoCities website or something. >SQL >WebDev by using Django or Flask >Do some project in Python. Learn to use some popular libraries and frameworks. >OOP with Ruby or Smalltalk (Pharo or Squak). Racket and Common Lisp are also pretty good for this purpose. >Learn how to use Git or Fossil version control software >Learn Java (read Head First Java) or C# (read Microsoft Visual C# Step by Step, published by M$ Press), These 2 languages are okay for learning OOP, too. >Learn assembly programming by Reading Programming from the Ground Up book : https://savannah.nongnu.org/projects/pgubook >Learn C (only if you care about UNIX or embedded software). Read C: Modern Approach 2
array · 2023-04-12 13:34
I was wondering how useful following guides like this is for learning? https://viewsourcecode.org/snaptoken/kilo/index.html I'm doing the C book as well I just thought it was cool.
quote · 2023-04-12 17:39
>>35074 thanks a lot for the recs man, also been using linux for about a year and a half or so, so i'm pretty comfortable with it now. prefer it to windows 100x
Drifter · 2023-04-13 05:20
What's the best git distribution for windows? my only quarrel with the standard one is that i have to solve merge conflicts with vimdiff which i'm too lazy to learn. also it would be cool if i can somehow cheese management of complicated forks (where upstream changes are highly likely to fuarrrk your code)
Cat Mother · 2023-04-13 06:53
>>35101 The standard Git distribution + Meld as the merge tool. But I don't know how to do that on Windoze (you can try git config --global merge.tool meld but you probably need to also set mergetool.meld.path setting to the absolute path to Meld exe). TortoiseGit is pretty good alternative: https://tortoisegit.org/about/screenshots/
Von Neumann · 2023-04-16 19:26
Where do CP spam bots come from? I've seen a few of these all over the place lately, usually on dead sites or small imageboards with crappy mods. It makes me wonder, where do these things come from and what is their purpose? What interest do they serve? I've heard the feds set these things loose to entrap people or that they're created by the Chinese government or something.
Lady 3Jane.. · 2023-04-16 20:06
>>35123 Cui Bono Fuisset? It's obviously the glowniggers. Their purpose could probably be: -Work as a honeypot, collect actual pedos -Make more people too afraid/disgusted to visit this place and disturb the discussions -Somehow legally threaten the owner/admin/whatever of the site under EU law, which makes them liable for content on their sites
overriding · 2023-04-16 21:09
>>35123 It's to stop smaller image boards from taking off, they'd prefer you keep to the main honeypots.
Joe Bloggs · 2023-04-18 05:24
Which should be my first programming language when learning to code for the first time? I have a background in linguistics/languages but have no idea where to start. Do programming languages even have a grammar you can memorize right off the bat? I'm clueless.
Rick Deckard · 2023-04-18 09:11
>>35131 >Which should be my first programming language when learning to code for the first time? It depends on why you want to learn programming and what is your use-case. Nevertheless, I recommend that you choose a high-level language (instead of C, C++ or assembly). I would also recommend that you avoid PHP and JavaScript (these 2 langs just have too many ways to make hard-to-debug mistakes) and Java/C# (they are too large. Also, other languages are better for beginners, in my opinion.). If you want to learn a programming language for text manipulation and text extraction, I actually recommend Perl (see Perl Monks and try perldoc perltoc ) In addition, Perl can be also used to replace Sed and AWK. A lot of people say that "Perl code is always a mess" but that's not true, unless you are either clueless beginner or you intentionally obfuscate your code (also, no one says that about C but there is a contest called "IOCCC" for writing obfuscated C code). Also, before Python, Perl used to be "the go to" language for beginners. If you want to learn to program for practical purposes, I recommend Python ( >>33751 ) Python has a lot of libraries for pretty much everything (but it's not quite as good as Perl is for text manipulation and Ruby does OOP better than Python or Perl.). FYI, there is a free MOOC for using Python for linguistics: https://www.mooc.fi/en/#courses (search for "Applied Language Technology") but I don't know how good it is (I have never worked through that course). If you want to learn a language for learning/"pedagogical" purposes: for learning OOP, I would recommend Ruby (read the "Pickaxe Book") or Smalltalk (https://wiki.squeak.org/squeak/64). Ruby and Smalltalk have a good way of doing OOP. Common Lisp/Scheme/Racket ( >>31415 ) are also languages of interest, since Lisp dialects (= languages in Lisp family), are considered to be elegant by many, and they use almost the same grammar for everything expect the "special forms", like lambda. They are special because they work differently than other expression or ""commands"" (please, don't start using this word).. In addition, Lisps support multiple paradigms programming (OOP, functional programming, etc.). Check out the Lisp thread (linked above) for learning resources for various Lisp dialects (for learning Racket, I recommend you follow some resource for learning R5RS (Scheme) and the read the official Racket Guide (I recommend that you start with Little Schemer & Seasoned Schemer). tl;dr Just pick one of these: Ruby > Perl > Python > Common Lisp = Racket > Smalltalk/Squak/Pharo (*this is an opinionated ranking list) The reason why Smalltalk is last is that (to my knowledge) almost nobody uses it anymore. Out of these, Python has the largest community and the largest amount of libraries (but it's not like Ruby or Perl has a shortage of libraries, either!) but Pythib has some issues: for example, the package management is a mess (while CPAN and Ruby Gems just works). Python also has a syntax that's based on whitespace (spaces or Tabs), which is not good in my opinion. >Do programming languages even have a grammar you can memorize right off the bat? In my opinion, you shouldn't try to memorize the whole grammar! Instead you should mainly learn it by doing (i.e. programming).
null · 2023-06-10 15:15
What's the best version of lisp for an absolute beginner? What are the actual differences between racket, scheme and common lisp?
Lady Jessica · 2023-06-11 02:23
>>35708 I would personally start with Scheme and Little Schemer and Seasoned Schemer books. My favorite Scheme implementation is Chicken (it comes with scm => C compiler and an scheme interpreter (csi or chicken-csi), use the interpreter when learning). You can also use Racket in R5RS mode (select it from the language menu) or Guile. >What are the actual differences between racket, scheme and common lisp? Scheme is a simple and minimalistic. There are a lot of differences between the features ("batteries") that each Scheme implementation provides (in practice this means that non-trivial programs are hard to port to another Scheme implementation). Racket started out as a Scheme implementation but it evolved so much in other direction when compared to other Schemes that it's considered to be a new dialect of Lisp (it's still closely related to Scheme). Racket has raco CLI tool (and a package manager), it comes with the DrRacket IDE (designed for learning purposes) and Racket has support for creating your own programming languages easily. Common Lisp is more practical and it has a lot of features out of box. It originally was an effort to combine multiple Lisp dialects into one spec. SBCL is the most popular Common Lisp implementation (Clozure CL aka CCL is another good implementation, but start with SBCL.). If you want to learn Racket, I recommend you learn R5RS Scheme first. For learning Common Lisp, check out the "Gigamonkeys" book (https://gigamonkeys.com/book/) and The Common Lisp Cookbook (https://lispcookbook.github.io/cl-cookbook/). But I would recommend starting with Little Schemer even if you want to learn Racket or Common Lisp, since it starts from zero (Little Schemer has versions of the code for Common Lisp, too). If you use GNU Emacs, install SLY and Geiser. I know that there is a Common Lisp plugin for (Neo)Vim but I don't use Vim (check out the Common Lisp Cookbook for instructions).
John Doe · 2023-06-11 09:51
>>35131 I always recommend Lisp as a starter language because of its simplicity and flexability. After that, learn C; it's much lower-level and much more error-prone, but it's still very simple, and teaches you a lot about resource usage. Knowing both those languages will give you the fundamentals needed to teach yourself anything else.
Morpheus · 2023-06-14 07:08
>>35712 I agree with lain here. Here's the ideal learn to code list: >Lisp (Racket, Scheme or CL) >C >C++ or Java >Haskell Congratulations you're now 10 steps ahead of most "programmers".
Apoc · 2023-06-14 09:24
>>36233 Include Prolog there and the guy has all bases covered.
Anonymous · 2023-06-15 04:25
>>36234 Prolog seems like magic to me. You basically tell the computer a bunch of facts and then the computer determines the result based on those facts. But how does one learn Prolog? (help!)
Lukasiewicz · 2023-06-15 06:36
>>36245 Solve problems with it over and over
Nameless · 2023-06-15 06:59
>>36245 Read Prolog Programming for Artificial Intelligence. It's both an amazing book for AI and also one of the best Prolog books.
over · 2023-06-19 10:51
I have this issue where every so often this feeling of complete futility washes over me and tries to convince me to lay around doing nothing in a state of apathy for months on end. I suspect its just the neural pathways in my brain that want me to scroll the internet all day asserting dominance over me and nothing more than that.
Ivan Horvat · 2023-06-19 16:07
If I'm starting out with assembly, should I learn both AT&T and Intel/NASM syntax or only stick to one?
Jens Hansen · 2023-06-20 03:49
>>36275 You should know the basics of AT&T syntax because of GAS, but nasm syntax is much better. Don't actually use AT&T syntax but learn how to read it.
Nguoi La · 2023-06-23 07:21
>>36278 >Don't actually use AT&T syntax but learn how to read it. Your tools should be able to output either. They are just two different ways of displaying the same binary data.
typedef · 2023-06-23 08:03
>>36294 True if you're reverse engineering something, but not if you're contributing to the actual source code.
Unspecified · 2023-06-23 09:56
>>36295 >Don't actually use AT&T syntax but learn how to read it. >contributing to the actual source code Pick a lane nigger. What plain asm project are you contributing to anyway.
Jane Doe · 2023-06-24 15:59
what's the best intro to openbsd?
Moore · 2023-06-25 07:30
>>36301 Use VirtualBox or qemu to make a VM and read through the FAQs (they are very good and well-written). I recommend you take a snapshot of your VM after you have installed OpenBSD, so you can restore it if you break something. You need to also understand that OpenBSD utils are different than GNU utilities and the command-line switches are probably different. The OpenBSD fdisk is very different from GNU fdisk! Also, instead of sudo, OpenBSD has doas (which is actually better but it's used the same way). I recommend using doas on Linux, too. Also, see https://man.openbsd.org/amd64/doas.conf.5 (very easy, add permit persist lain as root to your config.). The default CWM is actually okay but FVWM (the other included WM in default install) is probably better (never used it.). Read the man-page of CWM to learn how to use it (but you can just pkg_add another wm). OpenBSD comes with 2 editors (by default): nvi and mg (micro emacs). I suggest you go through vimtutor or GNU Emacs tutorial (select it from the splash screen) now (but you can just pkg_add nano or something). Read these >https://man.openbsd.org/amd64/afterboot (read it now) >https://www.openbsd.org/faq/index.html (at least read first 2 now and 3rd and 4th later.) >https://man.openbsd.org/amd64/intro.1 (read the other intro pages from other sections of the manual) >https://man.openbsd.org/syspatch (run this after installing OpenBSD!) >https://man.openbsd.org/man8/fw_update.8 (... you probably want to run this, too. use the -a option.) >https://man.openbsd.org/sysupgrade >https://man.openbsd.org/ports.7 (the FAQ is better imo. Always prefer binary packages over using ports when you can.) More? >https://www.openbsdjumpstart.org (I can confirm that this is up-to-date. It's good overview of OpenBSD!) >https://www.openbsdhandbook.com/installation/ (never read it but I had it bookmarked) >https://www.c0ffee.net/blog/openbsd-on-a-laptop (this contains some helpful tips, too) Zines: >https://webzine.puffy.cafe >https://undeadly.org Hope this helps! If you got any questions, please ask ITT. I used to run OpenBSD on my laptop for a while.
Dujour · 2023-06-26 02:57
2 questions: 1) most effective way to learn django? 2) most effective way to learn C? - can program in python and bash - prefer docs and books over watching videos
Switch · 2023-06-26 04:46
>>36304 >2) most effective way to learn C? Read C Programming: A Modern Approach (Second Edition) by K. N. King. It's the best book on C. The problem with K&R is that while it's well-written (and the exercises and example programs are great), the text doesn't tell you anything about unsafe functions in the stdlib and it doesn't cover everything. This all is fixed by C Programming: A Modern Approach. >http://knking.com/books/c2/ More C tips: * Use GCC or Clang (even on Windows). On Debian and Ubuntu based distros, you can install build-essential package (Void and Arch/Artix has a similar package as well). * Check out the #c IRC channel's home page: https://www.iso-9899.info/wiki/Main_Page (if you need a IRC client, install Weechat or Irssi or Hexchat (GUI)) * Use Valgrind or (not both at the same time) -fsanitize=address (https://gcc.gnu.org/onlinedocs/gcc/Instrumentation-Options.html) * Follow a style guide: https://suckless.org/coding_style/ * Use a reference: https://en.cppreference.com/w/ * https://godbolt.org (compiler explorer) * Use the recommended compiler options (CFLAGS): -std=c99 -Wall -Wextra -Wformat=2 -fverbose-asm -masm=intel -Og -ggdb -g3 * add -pedantic when you are learning C. * Remove debug options (-Og -ggdb -g3) when you do a release build and use -O2 or -Os * For security reasons you might want to add -fstack-protector-all and -fstack-clash-protection compiler options to release builds (don't use -fstack-check). * Always use include guards: http://www.cs.kent.edu/~nmadi/CS2/Notes/include_guard.html and http://faculty.cs.niu.edu/~mcmahon/CS241/c241man/node90.html * Use makefiles: https://nullprogram.com/blog/2017/08/20/ or https://www.cs.colby.edu/maxwell/courses/tutorials/maketutor/ or https://makefiletutorial.com (Meson is another good option) More resources (read these before writing anything serious): * Read about undefined behavior: https://blog.llvm.org/2011/05/what-every-c-programmer-should-know.html && https://blog.regehr.org/archives/213 * What every programmer should know about memory: https://lwn.net/Articles/250967/ * Hacking: The Art of Exploitation, 2nd edition by Jon Erickson (it teaches you a lot of different topics, including basics of sockets programming and crypto) * Advanced Programming in the Unix Environment aka APUE or The Linux Programming Interface (get the one that's cheaper, you will need it for writing more serious programs)
dictionary · 2023-06-26 17:58
I want to have a bot detect if a filename is keyboard-smashing gibberish. What are some efficient methods of differentiating meaningless letters from meaningful ones? It is very important that this method have high confidence, as I want to use it as one of the main methods to detect a professional CP site spammer and reject them, while not blocking other users. Real examples of things I want to match: bthtdffhdgfjy.jpg casgfoighfvgf.jpg itehitgfdfhdfdg.jpg acqwqsfcsdhg.jpg fahtujtr.jpg conhjfdf.jpg bgfnfdhdf.jpg bjjiyhrd.jpg autdfbc.jpg An easy win is looking for capital letters, punctuation like spaces and hyphens, and maybe even numbers. But beyond that, what are some options? I do have non-English users, but even so, could regex checking for multiple reasonably-common bigrams be acceptable?
Sipho Nkosi · 2023-06-27 06:40
what's the best virus scanner for pirating stuff? how do you tell if you get a false positive?
Erik Johansson · 2023-06-27 14:40
>>36310 Malware Bytes but they send everything to their servers. Virustotal is another good one but they do the same thing.
word · 2023-06-28 06:37
is haskell a good "go to" language? it seems pretty damn complex and intimidating.
Lukasiewicz · 2023-06-28 20:05
>>36314 Haskell is definitely *fun*, but it's intentionally limited for the sake of functional purity. I would not use it as a main programming language unless you want to make things much more difficult for yourself. Learn it if you want to expand your understanding of programming after you learn an imperative language.
Chani · 2023-06-29 04:15
>>36321 welp can't help but agree. i asked because haskell allowed me to do some crazy things and i thought wow it's so much fun. and then i needed to do something more elaborate than tictactoe and whoosh you have to rip your ass to bring in some global state. and it's very frustrating compared to what i get in C. you have to fuarrrk with monads potentially bringing in a lot of bullshit when all you need is one goddamn global struct.
Hopper · 2023-07-01 23:12
>>36343 I'd also consider taking some time to explore some ideas before settling on something. Read the Oberon book. Play around with Genera. An OS is a big project, there's no point in making yet another UNIX clone. >9front I second this. I've found it quite easy to just plunge into the source for random parts of the system and figure out how they worked. Haiku is also nice, but It's a lot bigger, I don't know if it makes for a good case-study piece.
Aristóteles Amadópulus · 2023-07-02 12:34
I just give up computer science and the idea of becoming a developer, i too didn't take the cybersec path because i want something secure for my future and because i want to focus on music but i take the IT college and i want to be a sysadmin focused on linux and networking, maybe cloud too anyway, any recomendation for the sysadmin stuff and to learn more about cybersec as a hobby? Any recomendation for music too
Lain Iwakura · 2023-07-02 12:49
>>36361 >anyway, any recomendation for the sysadmin stuff Start with this: https://linuxcommand.org/tlcl.php and install (dual-boot) GNU/Linux, if you don't do that already. Start by downloading Rufus and Linux Mint Mate (or Xfce4) edition installation iso. Then use Windows disk management tools to shrink a partition (reserve at least 30GB or more for GNU/Linux). Also, read "Learn Windows PowerShell in a month of lunches" for Windows stuff. Read also "UNIX and Linux System Administration Handbook" 5th edition (or newer) by Trent R. Hein, Evi Nemeth, Garth Snyder, Ben Whaley, Dan Mackin. Then read about computer networking: either "Computer Networking: a Top Down Approach " by Kurose & Ross, or "Computer Networks" by AST. >cybersec Read the sysadmin stuff & computer networking book first, and start using Linux. For cybersec specific things, read Art of Exploitation by Jon Erickson and the newest edition of Gray Hat Hacking.
Mario Rossi · 2023-07-03 08:30
>>36363 Not an argument. Post a better recommendation(s). The book lists various topics that are worth knowing about: basics of C (but C programming : a modern approach is much better), x86 asm (programming from ground up is much better), sockets programming and crypto.
Zhora · 2023-07-05 04:58
>>36376 Visit the lisp thread >>31415 it contains helpful tips and interesting discussion. I highly recommend using GNU Emacs. Go through the tutorial (select it from the splash screen) and add stuff to your .emacs file over time. Be sure to run emacs in GUI mode (best used with Lucid/Athena GUI or Motif GUI). If emacs is too slow for you, enable nativecomp and/or use emacs server (and connect to it using emacs client). I recommend these video series for learning Emacs: >https://www.youtube.com/watch?v=d6iY_1aMzeg&list=PLX2044Ew-UVVv31a0-Qn3dA6Sd_-NyA1n&index=1 >https://www.youtube.com/watch?v=MRYzPWnk2mE&list=PLxj9UAX4Em-IiOfvF2Qs742LxEK4owSkr&index=1 >https://emacsrocks.com (helpful quick tips) >Scheme Learn R5RS. Read Little Schemer and Seasoned Schemer (they are short books). Then you can read parts of other books (like The SchemeProgramming Language, 4th ed. OR Teach Yourself Scheme in Fixnum Days). The Little Schemer also has the same code in Common Lisp, so it's useful for learning both. You need to open a REPL (emacs + geiser for Scheme, or emacs + SLY for CL) and play around while you read the book. You need to verify the answer given in the book, so you will actually learn. I also recommend you install rainbow-delimiters package for emacs. >SICP SICP is a hard book. You shouldn't rush through it. Also remember the lectures: https://www.youtube.com/watch?v=-J_xL4IGhJA&list=PLE18841CABEA24090&index=1
Haruyoshi · 2023-07-08 07:46
>>36392 > I miss the old XP days >Mint seems really nice and comfy, but what other alternatives should I try out before making the leap? Void Linux is also pretty nice and it doesn't have systemd (for a beginner that's not a big issue, in my honest opinion). If you want to install Void Linux, you need to be willing to read the Void Linux Handbook. If you download the Xfce4 iso and select the local iso as installation source, you will get a full DE out-of-box but you need to update your system by running sudo xbps-install -Su because the contents of the installation iso are probably a tiny bit outdated (new iso files are not generated daily or weekly). sudo command asks for your password and gives you temporary root (admin/super user) permissions for 1 command. Install the MATE or Xfce4 version of Linux Mint and then install this GTK theme: https://github.com/B00merang-Project/Windows-XP And enable RedmondXP (I can't quite remember what it was actually called) window decorations (titlebar and minimize/maximize/close buttons). If you want to learn Bash and Linux command-line read: https://linuxcommand.org/tlcl.php Also read ArchWiki when you get trouble because it's the most comprehensive Linux wiki and you can apply 99% of the knowledge on other distros, too. The list of applications is probably interesting for a new user: https://wiki.archlinux.org/title/List_of_applications Also, I recommend you read the man-pages using a web browser if you can (or use GNU Emacs), so you get hyperlinks: >https://manpages.ubuntu.com (Linux Mint is based on Ubuntu. Use the search located on upper left corner) >https://manpages.debian.org (another good source) I recommend you read these man-pages: >https://manpages.ubuntu.com/manpages/lunar/en/man1/man.1.html >https://manpages.debian.org/bookworm/manpages/intro.1.en.html >https://manpages.ubuntu.com/manpages/lunar/en/man7/man-pages.7.html >https://manpages.debian.org/bookworm/manpages/hier.7.en.html GNU programs have texinfo manuals that are more comprehensive than their man-pages. You can use info command (or GNU Emacs) for reading them, or you can use the HTML versions of their manuals (located on the homepage of some particular program). On Ubuntu/Debian based distros, I recommend using aptitude TUI for the APT package manager. Also, if you want to build programs from src or if you are interested in C or C++ programming, I recommend you install build-essential package (install "base-devel" on Void Linux). >>36396 >SerenityOS But it's just a hobby project. The only usable and practical general purpose FLOSS operating systems are GNU/Linux and *BSD (mainly OpenBSD and FreeBSD). >>36399 this! You probably want to use Proton for games. Install WineTricks and Lutris. Also, you can use VirtualBox instead of qemu (but qemu is more advanced).
Mitnick · 2023-07-08 12:57
>>36398 >what am i missing? sanity. reason. common sense. choose which you like better. no really imaging talking to people through sockat. i don't tell your idea is a complete crap (but honestly feel exactly this), but your saying >supmere really got me. how do you send anything but text? how do you distinguish between people? how do you send files?
Debbie Charteris · 2023-07-12 12:32
>>36416 >how do you send anything but text? catbox >how do you distinguish between people? good question anonymous imageboard user >how do you send files? catbox.moe supreme because everyone has socat/netcat someone gives you a few one-liners and letsgo you got any better ideas?
Cereal Killer · 2023-07-13 08:25
torsocks on doesn't work the shell doesn't remember anything about it. is there any variable i can export that says all commands have to use this address for proxy?
Koos van der Merwe · 2023-07-13 11:27
>>36455 Read `man 1 torsocks`, and `man 8 torsocks` CAVEATS section
sizeof · 2023-07-13 12:11
>>36461 >man 8 torsocks i find nothing relevant. i just wanted to run metasploit through tor. but it's always been the same soykaf with msf. i install it, feel like it's really cool, actually believe i can hackor some stuff and eventually always realize that i just can't. time to give up again
Faye Valentine · 2023-07-13 18:44
>>36463 It looks like the man pages differ — the die.net ones contain what I’m referring to, but these are said to be outdated so if you’re using the man command, that’s probably why you’re not seeing it. The bit I’m going for is attached but several useful insights can be found throughout. The “torsocks script” mentioned in the newer man pages (in the spot highlighted in the first image) sounds like it might make life easier in some way, but I’m not personally familiar.
Aristóteles Amadópulus · 2023-07-24 22:12
How do I go about determining time and space complexity of functions? I don’t know much calculus, but I am working on that.
quote · 2023-07-24 23:53
>>36557 Calculus is unnecessary. In general, note what the function does for each chunk of its input. Look at examples of the main classes and analogize from there.
Joe Bloggs · 2023-07-27 05:38
I've almost finished Bartlett's book on assembly, my first and only language so far, now where do I go from here? What should I do to improve my skills beyond beginner level in assembly? Or should I just move on to learning C?
Elliot Alderson · 2023-07-27 08:52
>>36574 >Or should I just move on to learning C? Definitely, read C Programming : A Modern Approach - Second Edition or learn some high level language like Ruby (read the "Pickaxe book"). Assembly is not practical. It's mainly used for OSdev purposes these days. Did you enjoy asm? If so, you probably like C too. But if you want to accomplish a lot more with 1 line of code, then learn Ruby instead. Ruby is better than Python for these reasons: 0. Ruby and Python are both as easy, so easiness is not a valid argument for preferring one over another 1. Package management in Python is a huge mess, whereas Ruby gems just works 2. Ruby has much better style and support for doing object-oriented programming. It teaches you OOP the right way™. Pick your poison. Toss a coin or choose yourself.
limited · 2023-07-30 02:16
>>36574 >>36576 I would argue against learning Ruby as it's not really something employers are looking for at the moment. It would still be fine to learn, just don't expect to find a RoR job. I think Go is a good language to learn as it is both practical and has some relatively easy syntax. You also learn about error handling (whether you like it or not) pretty early on.
Laina · 2023-07-30 05:36
>>36574 id definitely say C is a good option for a next option, but pretty much every thing that makes assembly stand out as a language family is abstracted a bit by C, so C wont necessarily teach you anything that makes it stand out as a language. on its own, its perfectly fine to learn, but id say trying to learn something with more higher-level exclusive concepts (OOP, FP, etc) will probably be worth more your time if your focus is efficiency of learning. personally id say your best options if [bold]that[/bold] is your goal are: Haskell Rust (inb4 troonlang) C++ Lisp
Terzibashjian · 2023-08-01 10:34
>>36576 >Did you enjoy asm? Yup! But I can see why it's tedious. My goal is to learn enough to go through Linux from scratch. So I guess I'll move on to C then. >>36597 I'm guessing C++ is easier if you already know C and vice versa?
Terzibashjian · 2023-08-01 13:02
>>36625 I'd recommend C before C++. It's easier to think of C in terms of Assembly than it is C++, and a lot of C++ features are implemented by generating C-style code.
Ivan Horvat · 2023-08-01 21:34
>>36625 If you work through LFS and end up looking at assembly language listings something's gone awry. To do LFS you would need bash skills rather than C.
Church · 2023-08-20 02:55
>>33828 How do you solve compile errors like undefined reference, I assume its some function in a library, how do you find out which function is in a missing libraries/packages? I had an error before but I added the LDFLAGS environment variable with lots of options now I get a new error. I read the libraries have to be in a certain order, how do you know which order is the right one? 0:17.46 DEBUG: configure:2525: /usr/bin/clang -std=gnu99 --target=x86_64-mingw32 -o conftest.exe -D_HAS_EXCEPTIONS=0 -Qunused-arguments -L/usr/lib/gcc/x86_64-w64-mingw32/10-posix -L/usr/x86_64-w64-mingw32/lib -L/usr/lib/gcc-cross/x86_64-linux-gnu/12 -L/usr/x86_64-w64-mingw32/lib -L/usr/lib -L/usr/x86_64-w64-mingw32/sys-root/mingw/lib -lmingw32 -lmsvcrt-os -lmsvcrt -lgcc -lgcc_eh -lmoldname -lmingwex -lpthread -ladvapi32 -lshell32 -luser32 -lkernel32 conftest.c 1>&5 0:17.46 DEBUG: /usr/bin/ld: /tmp/conftest-e92950.o:conftest.c:(.text+0x0): multiple definition of `main'; /usr/x86_64-w64-mingw32/lib/libmingw32.a(lib64_libmingw32_a-crt0_c.o):./build/x86_64-w64-mingw32-x86_64-w64-mingw32-crt/./mingw-w64-crt/crt/crt0_c.c:17: first defined here 0:17.47 DEBUG: /usr/bin/ld: /usr/x86_64-w64-mingw32/lib/libmingw32.a(lib64_libmingw32_a-crt0_c.o): in function `main': 0:17.47 DEBUG: ./build/x86_64-w64-mingw32-x86_64-w64-mingw32-crt/./mingw-w64-crt/crt/crt0_c.c:18: undefined reference to `WinMain' 0:17.47 DEBUG: clang: error: linker command failed with exit code 1 (use -v to see invocation) 0:17.47 DEBUG: configure: failed program was: 0:17.47 DEBUG: #line 2518 "configure" 0:17.47 DEBUG: #include "confdefs.h" 0:17.47 DEBUG: 0:17.47 DEBUG: int main() { 0:17.47 DEBUG: 0:17.47 DEBUG: ; return 0; } 0:17.47 DEBUG: configure: error: compiler is incompatible with sanitize options 0:17.47 ERROR: old-configure failed
Shogun · 2023-08-20 08:13
>>36595 >employers Who cares? OP was asking about to be a better programmer. Ruby + C is a great combo for learning computer science, especially because you can do WebShit in Ruby while calling C code as well.
⍕ · 2023-08-20 08:15
>>36834 >WinMain >multiple definition of `main' I'm not that familiar with Windows, but WinMain is the entry point for GUI applications, and the C runtime includes a default main that calls it; you might need to instruct your linker to output a console subsystem binary rather than a GUI one (I'd think that would have been the default, though; perhaps it's a red herring)
Miho Iwakura · 2023-08-20 09:12
How do I test computer viruses and shady software in a safe environment?
Stallman · 2023-08-20 11:27
>>36839 A VM like VirtualBox but there is a small chance that the a very advanced piece of malware might be break out of the VM. Also, some malware detect it when you run it in a VM or try to analyze it. I recommend you start with MS-DOS viruses (in a VM).
John Doe · 2023-08-22 17:36
Is SICP good for beginners or should I pick up some basic skills in a normal programming language first?
Liet Kynes · 2023-08-23 04:51
>>36859 >Is SICP good for beginners or should I pick up some basic skills in a normal programming language first? SICP is a very good book but I think you should read something else first. Scheme is the logical choice if you want to read SICP. Read either one of these books: >https://ds26gte.github.io/tyscheme/ (Teach Yourself Scheme in Fixnum Days) >https://scheme.com/tspl4/ (The Scheme Programming Language) >Little Schemer + Seasoned Schemer are also good books for learning Scheme Just roll a dice and pick a book. You also need a Scheme (R5RS) implementation like Chicken: https://www.call-cc.org/ (use the interpreter aka csi or chicken-csi binary) Another good choice (for learning purposes) is MIT/GNU Scheme: https://www.gnu.org/software/mit-scheme/ (you want to ideally use it for SICP also, but you can alternatively use Racket + sicp package.).
Koichiro · 2023-08-26 20:27
>>36919 > Java, C# This burns out the aspiring programmer before they even get started. It's hard to describe how many of my friends who went through Java courses at university as their first introduction to programming ended up hating programming in general. C# is probably fine though. As second or third language? Great! >>36859 No. It assumes you already have some kind of grounding in mathematics at least. Honestly, a random online course on Python or Javascript will have you in better straits. When you feel more confident at programming, going through SICP will change how you think about what programming is. If you just jump into SICP to learn (R4RS?) Scheme as your first programming language, unless you're some kind of savant you're going to have a miserable time without some kind of mentorship and hand-holding. You'll probably end up taking negative lessons from it if anything at all. SICP has a lot to teach you when you're ready, but don't idolize books.
Ender · 2023-08-27 17:34
>>33828 >>33828 Is it feasible to create a simple mobile app that uses NFC between two devices and is agnostic to the platform? So far I've been looking at NFC protocols on ios and android, and I've been eyeing react native, but I'm a bit lost on how react native actually interacts with the underlying platform its on top of. Has anyone had experience with this or can anyone point me towards resources/guides on using NFC /w react native? Alternatively, if this is infeasible and I'm just oblivious please also let me know.
Stallman · 2023-08-28 02:36
>>35061 Symbolic computing in general isn't 'hip' anymore. WRT symbolic CAS applications, they all tend to work /well enough/; packages like Mathematica are deeply proprietary, Maxima and Axiom are fairly arcane, written largely in Common Lisp, though powerful, they are systems that don't really attract a lot of attention for that reason. As dumb as it sounds, it's a relatively solved space that was largely explored from the 50s to the 90s. it's "old". I'm not an expert, so take this with a grain of salt. To put it short: it's not exciting, and hasn't really been in fashion since symbolic computing fell out of fashion in the 80s. You can't engage your (now languishing) Static-Type BDSM book club on it and expect anyone to respond seriously. _____ If you want an idea of where to look for information, Axiom is a treasure trove. The current(?) maintainer has made it his life's mission to go through and document the entire system as a book in the Literate Programming style. I believe the system is also at least partially translated to some c-like language, maybe C++ or Java, if Common Lisp is not appealing to you.
Mitnick · 2023-08-28 20:35
>>36937 C# has top-level statements since C# 9 and it's the default now, you don't have to do the whole using System; namespace Application { class Program { static void Main(string[] args) { } } } song and dance just to Console.WriteLine("Hello World!"); . And Java is getting https://openjdk.org/jeps/445 in version 21. Also, I wouldn't recommend Ruby to a beginner in $CURRENT_YEAR. It's not dead yet, but it's far from being "fairly popular" for anything but maintaining legacy Rails codebases at this point, let alone being anywhere close to Python, and its ecosystem has already started to decompose (again, except Rails and adjacent web stuff that supports/supplements Rails).
Terzibashjian · 2023-08-29 15:09
whats the best lightweight os to throw on an old netbook with only 15GBs of space?
Armitage · 2023-08-29 20:54
>>36958 puppy linux maybe if that's too anemic for you then just something with xfce or lxde (or i3wm) - desktop environments are a bigger impact than the distro used
protected · 2023-08-30 01:17
>>36958 Alpine Linux. It has split packages (so you don't waste space with HTML docs for example) and it uses Busybox for almost everything (but you can also install GNU utilities if you need them). I ran it as a daily driver for a couple of months last year and it was pretty good. Here are the notes that I wrote about it: https://dpaste.com/4XV63F8PD
Unspecified · 2023-09-02 17:20
Are there any go-to books for computer graphics? Similar to tanenbaum's books on computer networks.
Kay · 2023-09-03 15:17
Am I supposed to just pick a language and grind tutorials? I want to start my programming journey, but I am not sure how to actually get started.
Tomohisa "Tom" Kanezaki · 2023-09-03 15:37
>>37023 Not really. Why do you want to learn programming? Do that. If you want to get a job, look at what companies ask for and make a project using those technologies. If you want to make a game, try to make one. Learning software development is closer woodwork than mathematics, you could certainly download 50 books on how to work with wood but you would be an inept woodworker. First you try to make a table, it will probably be a soykafty table but it will allow you to raise questions about the process, and those questions can be answered with theory. Language doesn't matter, i personally think tutorials are a timesink and a great way to make you feel like you learned something when you didn't, but if it works for you, go ahead. But what defines the direction of what you should study is always practice, never theory.
queue · 2023-09-03 15:37
>>37023 No,you pick a language, maybe read one thing that explains the basics of the language, and then start doing stuff, looking it up as you go.
cdr · 2023-09-04 03:14
>>37025 I was thinking about getting some Dummies books for that. Python seems to be the universal beginner language nowadays. >>37024 >Why do you want to learn programming? I would say it's a mix of being more employable and making games. The still itself looks appealing to me. Your line about the tutorials make sense, I heard many just get stuck in the tutorial hell, where they are following all the tutorials, but don't learn much from them.
Pris · 2023-09-04 04:30
>>37029 >I was thinking Why are you thinking instead of doing? >I would say it's a mix of being more employable and making games. Pick one, if you want a job as a game developer, start making games. If you want a standard web dev job to support making your games, well, better start making standard web dev projects. Either way, thinking won't help ya much if you don't start doing. >I heard many just get stuck in the tutorial hell, where they are following all the tutorials, but don't learn much from them. You don't see top players in any game who get there by following guides for a reason. Understanding comes only from doing, for software development, sex, drawing or bomb making.
Davis · 2023-09-04 05:45
>>37029 If you have absolutely no experience at all, Python is good to learn general algorithmic principles. If you were still in high-school, I would have advised using whatever BASIC variant comes with your calculator. Once you're past that, learn a low level language (C) to better understand wtf your computer is doing. After that, you should be able to use most imperative languages, and quickly learn to use another paradigm. Choose whatever fits your project best. C if your project is simple enough and you want it to be fast, asm if you're really anal about optimization, Python if there are libraries that do what you want, C++ if you need fancy data structures,…
Debbie Charteris · 2023-09-04 07:44
>>37029 >I was thinking about getting some Dummies books for that. It's better to pick a book that respects you. Read something like Learning Python by Mark Lutz. It's a complete tutorial that explains everything you need to know but it's also very huge book. Think Python 2e is also good if you haven't programmed before (Mark Lutz book is also good for those who are new to Python and OOP but know the basics of programming). Another choice is Learning Python The Hard Way.
cond · 2023-09-04 23:44
>>37035 I'll take note of those. Thanks for the recommendations. >>37031 >Why are you thinking instead of doing? I don't have self-confidence when it comes to this, I have zero proof that I am intelligent at all. >Pick one, if you want a job as a game developer, start making games. If you want a standard web dev job to support making your games, well, better start making standard web dev projects. That makes a lot of sense, I really should narrow down my scope first. Webdev is fascinating, that's for sure. Not sure if there would be any jobs left by the time I know enough to be useful though. I always wanted to make my own website anyways. >Either way, thinking won't help ya much if you don't start doing. I will get started today. Tomorrow never really knows, I know that from experience. >You don't see top players in any game who get there by following guides for a reason. Understanding comes only from doing, for software development, sex, drawing or bomb making. That's a good point. It's just hard to do things, when you can't do the thing. >>37033 I remember around the 90s and 00s people usually recommended getting started with C. In general, I just want to try my luck at logic first, because I really don't know if I have the raw horsepower to even make Tic-Tac-Toe. I will dabble in a Python book as it was recommended and I can go from there.
Nobody important · 2023-09-05 04:26
>>37044 >I don't have self-confidence when it comes to this, I have zero proof that I am intelligent at all. I have zero self-confidence when it comes to driving a car. If i try to drive for a few hours a day, i will get confidence. Ain't rocket science. >That makes a lot of sense, I really should narrow down my scope first. Webdev is fascinating, that's for sure. Not sure if there would be any jobs left by the time I know enough to be useful though. I always wanted to make my own website anyways. Trust me, there will be. Webdev is not about making websites as much as making systems, it's the easiest entry in the field and where i make my money at least. You won't necessarily be making webpages, today i work in internal tooling and performance improvements for a giga large company. >I will get started today. Tomorrow never really knows, I know that from experience. Sure, just try to plan ahead for something consistent, spur of the moment motivation is gone as easily as it comes. >That's a good point. It's just hard to do things, when you can't do the thing. Yeah, you'll need theory for sure. But practice is what dictates what kind of theory you need, just study the bare minimum to execute whatever you want to execute, then increase complexity, which will require more theory, on and on.
Zuse · 2023-09-05 14:52
>>37047 Thanks for clearing things up. Yeah, as an outsider I can't even begin to imagine the complexity any big website/service has... Can you make it in the field without a degree? >I have zero self-confidence when it comes to driving a car. If i try to drive for a few hours a day, i will get confidence. Ain't rocket science. That's a more productive way to look at it.
Hacker · 2023-09-05 16:34
>>37053 >Can you make it in the field without a degree? Ye, i don't have a degree. Getting a job as a fresh hire is hard with or without a degree, but once you get the first one things get exponentially easier. I get job offers on a weekly basis on linkedin and haven't been without work for the past 8 ish years.
Liet Kynes · 2023-09-08 19:29
>>36392 If you like XP maybe you will like ReactOS. It’s an open source XP clone.
Hacker · 2023-09-10 05:10
Recently I have been thinking a lot about forking codes. My reason is for getting something that does what I want, but maybe with extra stuff or still not enough and modify it to my taste. Now, the problem I'm having is that if doing this still helps me learn how something works so that I can replicate it myself.
Jens Hansen · 2023-09-10 06:37
>>37088 i don´t get what the problem is fork it, see what happens, you could have forked it this morning and worked on it on the rest of the weekend and found out, why are you posting about maybe doing something when you can just do it
Stallman · 2023-09-13 16:44
What's a good Linux distro I can run from a 2TB portable storage drive? I'm only using it for web browsing, programming, and the odd retro game and need it to be secure and give me a lot of freedom to customize it and have control over the system. I really like FreeBSD but have compatibility issues with it but I'm totally new to Linux and just overwhelmed by all the different distros.
Ivan Horvat · 2023-09-13 16:50
>>37115 every distro will give you the same amount of freedom to customize, it depends on how much time you're willing to spare. If you want as little headache as possible, go with KDE and then browse for themes here: https://store.kde.org/browse?cat=104 it doesn't get much easier than that. >but I'm totally new to Linux and just overwhelmed by all the different distros. You shouldn't view distros as entirely different systems, this makes them seem a lot more overwhelming than they are. It's just a collection of tools packaged together. Most distros will share a lot of these tools. When deciding on a distro, you just need to decide which of these collections of items you want for your normal daily usage. Manjaro with kde or fedora with kde would be my recommendations to you, the deciding factor will be pretty much if you'd rather lean towards arch or towards debian-like systems. Both will offer the same level of ease of use.
Jet Black · 2023-09-14 12:08
>>37115 If you are new to Linux, you want to use either Kubuntu/Xubuntu (but not vanilla Ubuntu) or Linux Mint. If you want to learn how to use Bash and command-line tools, you can work through this free book: https://linuxcommand.org/tlcl.php >>37116 >Manjaro I would use either one of the above mentioned distros or EndeavourOS. This webpage explains it all: https://web.archive.org/web/20230505070951/https://manjarno.snorlax.sh/ EndeavourOS is just like Manjaro but more sane and more stable.
Mario Rossi · 2023-09-15 14:16
So I threw mint on a 2TB external drive and now I want to clean the thing so I can use it as a regular storage device again. But my PC won't detect it whenever I plug the thing in. What should I do?
Nemissa · 2023-09-15 14:47
>>37149 What have you tried and what system are you using?
Switch · 2023-09-15 14:57
>>37150 Windows 10. It shows up in the device manager and I've tried updating and reinstalling drivers but the rest of the system still doesn't pick it up.
Agent Smith · 2023-09-15 14:59
>>37149 It's probably formatted as ext4, which windows won't recognise. Put a live distro on some usb stick and reformat your drive from there.
Hououin Kyouma · 2023-09-15 15:06
>>37152 I formatted it to FAT32 and it still won't work
Wintermute · 2023-09-16 07:30
>>37153 Maybe it didn't assign it a drive letter automatically? Try doing an ASSIGN on the right partition from diskpart, or the equivalent in the diskmgmt.msc GUI
Frank Garza · 2023-09-16 13:31
>>37149 Blame Windows for not being smart enough. You need an empty 4GB (or larger) flash drive. Download SystemRescueCD iso (https://www.system-rescue.org/) and use Rufus to "burn" it to the flash drive (it will nuke its contents). Then you need to boot to SystemRescueCD live environment (Linux). Use startx to get gui and open a terminal. Type sudo gparted and use gparted to make a new partition table (GPT) for the external drive. It will nuke it's contents and delete all partition from it. Then you can use gparted or Windows disk management tools to add FAT32 partition to it or whatever.
Nell · 2023-09-17 09:43
>>37166 Do you think like the official docs are lacking in some way? Are you actually setting a system up or just reading? Honestly I've never felt the need for anything else other than the handbook and the wiki, and I wasn't that experienced when I first began messing around with the distro. >>37164 >Blame Windows for not being smart enough. I won't deny partition management on Windows kind of is like kicking dead whales down the beach, but I don't see how diskpart wouldn't do just as well here, without the hassle of the flash drive and whatnot. Something like LIST DISK SELECT DISK <your disk> CLEAN CONVERT GPT CREATE PARTITION PRIMARY ASSIGN FORMAT FS=FAT32 QUICK or so, to clean the disk and create a new GPT with a FAT32 partition (though given the disk size you might want something else); but I haven't tested. >>37149 and >>37166 would be more more appropriate on >>>/Ω/, I'd think.
Shogun · 2023-09-17 18:21
>>37169 I just set it up in a VM and want some extra reading material while I play with it. The official docs are pretty good aside from some minor annoyance.
Apoc · 2023-09-20 04:22
>>37166 I made this paste a while ago: >>34247 >Gentoo: https://dpaste.com/7SDBRZFPG First, use make.conf for disabling stuff you don't need (like "-telemetry" and "-gnome") but prefer package.use file/dir for enabling stuff (unless it's something like "unicode" or "ssl" or "openssl" or "X" that makes sense to be enabled system-wide in make.conf). I recommend that you mask all packages from 3rd-party overlays before you even add the overlay, and then just unmask the packages you need. This keeps your system kosher and 100% halal. Use elselect-repository for managing overlays. Finally, install gentoolkit and eix as soon as you can!
Unidentified · 2023-09-24 18:11
>>37236 android is on another level it is by far the worst api i have ever dealt with, it is flaky even when it works and no ai does not solve this, it does not magically make things unbroken and it does not have any real advice to give as soon as you do something unusual
FILLER · 2023-09-25 05:47
I have 2 questions: How can I use ChatGPT without paying money? What is the best free software Matrix client?
An AI · 2023-09-25 06:56
>>37243 >>37243 >How can I use ChatGPT without paying money? By going to chat.openai.com and signing up. Simple as.
Bobby Newmark · 2023-09-25 08:05
>>37246 it's pretty good at turning code into documentation. Hopeful google runs it through bard so the documentation is just bad instead of horrible
Hitomi · 2023-09-25 13:33
>>37245 GPT3.5 (the free model) isn't nearly as good as GPT4 for coding. In fact, it's behind Facebook's CodeLlama (which you can run locally) While I prefer to make my own qualitative evaluations of LLMs you can see it in the benchmark numbers: https://paperswithcode.com/sota/code-generation-on-humaneval
Joey · 2023-09-25 14:54
>>37248 >it's pretty good at turning code into documentation. Do you have any examples?
Undisclosed · 2023-09-25 19:09
What are some good Arch based distros to try out in a VM?
byte · 2023-09-29 00:27
>>37260 Manjaro :P Try out arco it's probably the best. Why can you not just use arch?
J.C. Denton · 2023-09-29 18:31
>>37282 Just curious. Tweaking Arch post install is boring, repetitive and time consuming and I have no free time these days.
over · 2023-09-29 19:09
I wanna learn to program with C. What’s the best way to do it? Some people tell me to get an ide and work through a textbook, some say use w3school, some tell me don’t use ide and use the k&r book in vi in freebsd. which is truth?
hash table · 2023-09-30 07:07
>>37260 >>37297 I think you can automate Arch installation with archinstall? Just add all packages you need to the additional packages field (forgot what's it's actually called). Alternatively, you could just have a Bash script that just installs stuff with pacman and installs your dotfiles. If you really want to use an Arch derivative, you should look into EndeavourOS. P.S. Manjaro is like kicking dead whales down the beach and it's unstable in my experience. >>37298 w3school is awful for everything else besides HTML+CSS+basic beginner-level JS. >I wanna learn to program with C. What’s the best way to do it? You need a textbook. Using an IDE is optional but I recommend you learn how to use gcc/clang from command-line and how makefiles work first, before starting to use IDE. Code::Blocks and Eclipse are okay IDE's. BUT you don't need an IDE for C programming, you can just use a text editor, some popular and sane choices: (Neo)Vim, Gnu Emacs or VS{Code,Codium} (VSCode has telemetry and it's proprietary software, unlike the VSCodium fork). The best text book on C is "C Programming: A Modern Approach - Second Edition" written by K. N. King. K&R has some really nice example programs and exercises that you should look into. But otherwise K&R is outdated (it doesn't even tell you which stdlib functions are insecure). Again, you want to learn how to use (GNU) Make (basic usage is very simple, just run make (or make -k) in the project dir) and how to write makefiles (basics are simple once you understand the makefile syntax). In serious projects, you probably want to use Meson instead, though, but everyone expects that all C and C++ programmers understand makefiles. Also, make sure to use GDB, Valgrind/Address Sanitizer, a lint (like cppcheck, even for C projects) and follow a coding style. Also, make sure to enable the recommended compiler flags. If you are on Windows, you should consider dual-booting Linux (Xubuntu/Linux Mint, use Rufus to burn Linux installation iso to a flash drive and use Windows disk management tools to shrink a partition). If you can't do that for some reason, you still want to use Clang compiler (GCC is also okay but getting Clang is easier on Windows). Here are links to resources: * The recommended C programming book: http://knking.com/books/c2/ * The #c IRC channel's home page: https://www.iso-9899.info/wiki/Main_Page * Follow a style guide: https://suckless.org/coding_style/ (start following this from the beginning, it will help you and others) * Use makefiles: https://nullprogram.com/blog/2017/08/20/ or https://www.cs.colby.edu/maxwell/courses/tutorials/maketutor/ (easiest) or https://makefiletutorial.com * Always use include guards: http://www.cs.kent.edu/~nmadi/CS2/Notes/include_guard.html and http://faculty.cs.niu.edu/~mcmahon/CS241/c241man/node90.html * Eventually you also want to read about undefined behavior because it's everywhere in C (this is one of the things that C++ actually improved upon a bit): https://blog.llvm.org/2011/05/what-every-c-programmer-should-know.html * Use a reference: https://en.cppreference.com/w/ (also, remember the manual for your compiler!) * Extra reading but important when you are writing serious programs: Smashing the Stack for Fun and Profit https://insecure.org/stf/smashstack.html * Ditto: CERT C Coding Standard: https://wiki.sei.cmu.edu/confluence/display/c/SEI+CERT+C+Coding+Standard (secure C coding standard) The recommended compiler flags (CFLAGS) for GCC and Clang are: -std=c99 -pedantic -Wall -Wextra -Wformat=2 -fverbose-asm -masm=intel -Og -ggdb -g3 (Disable -pedantic when you write serious projects but it's extremely useful while learning C). You really want to use these compiler flags to help you catch errors. I recommend you save this post to a .txt file. Lastly, I recommend you learn to use a version control software (Git, Mercurial or Fossil) before starting a serious programming project in any language but you don't need to use one while learning to program.
Hitomi · 2023-10-02 07:48
I've realized I do everything in python. I don't really have any opinions about programming languages, it just happened. I'm doing image manipulation in python, writing applications in python, parsing network logs in python. Should I be using something else?
Otto+Mentat · 2023-10-02 12:07
>>37309 If you haven't, I would at least try some other languages so you may pick up useful idioms. Python has the advantage of having a great amount of useful libraries ("ecosystem"), so I too find myself reaching often for it. For anything complex I do prefer Rust since it catches a lot of errors at compile time.
Davis · 2023-10-02 13:24
>>37310 The ecosystem is a big reason why I use python. I don't actually know how to do anything but that's okay with python because there's usually some library I can use so I don't actually have to implement anything myself.
Cowboy · 2023-10-03 04:52
>>37309 Knowing more than 1 language makes you much better programmer overall. I recommend picking something that's very different to Python. My recommendations: Scheme (I recommend using Chicken)/Common Lisp/Racket, Forth/Factor or C (see the post above your post).
Lain Iwakura · 2023-10-03 07:39
>>37309 >Want to do thing >Try doing in Python >If fail, learn more Python to do thing >If fail, consider better suited lang You can pretty much do anything in Python unless you want to do OS stuff. Just stick to improving at automation, web, & data sci. Most of the time, it is better to have one project than "I know how to do fizz buzz in 10 languages".
Hacker · 2023-10-03 12:10
>>37310 Does Rust have any good libraries for color management? I use coloraide in python right now because sometimes I need to convert colors from CMYK to CAM16-UCS, so I can adjust the lightness, chroma or hue, then convert them back to CMYK. This requires a lot of math and can be very slow but it seems like something Rust would be good at.
John Doe · 2023-10-03 12:22
>>37324 https://lib.rs/search?q=color has several libraries. Note that "CMYK" is actually a huge class of color spaces, usually printer-specific. You'll need, at the very least, a library that can handle .icc files to properly convert to any meaningful form of "CMYK". https://lib.rs/crates/lcms2 seems like what you'd want.
Liet Kynes · 2023-10-04 08:56
>>37325 Rust might be good for parallelism. The last time I tried to do parallel programming in python I ran out of RAM and Rust seems specifically designed to not run out of RAM.
JARGON · 2023-10-06 11:37
Is there a version of the K&R book where the code examples are modern? Is there a way I can follow along with the book without getting lost in stuff that's hopelessly outdated? I'm thinking of using it as a reference and then brush up on C with other books. Also is SICP still good?
Lain Iwakura · 2023-10-09 08:15
>>37353 >Is there a version of the K&R book where the code examples are modern? No. K&R example code and the exercises are still good but you shouldn't use it to learn C anymore. Just use it for extra example programs and extra exercises. The best book on modern C is C Programming: A Modern Approach - Second Edition: http://knking.com/books/c2/ >Also is SICP still good? Yes. But you should read it after you can program in some language. SICP book: https://mitp-content-server.mit.edu/books/content/sectbyfn/books_pres_0/6515/sicp.zip/full-text/book/book.html Video lectures: https://www.youtube.com/watch?v=-J_xL4IGhJA&list=PLE18841CABEA24090&index=1 use MIT/GNU Scheme for working through SICP: https://www.gnu.org/software/mit-scheme/
hash table · 2023-10-10 01:41
How to write a complete program? I already know the basics of programming (in Python and C) but I don't know how to solve problems or how to make a program that's actually useful. How can I learn this? I was thinking about reading Code Complete 2 since it cover a lot of practical topics related to software engineering. Is there some other book or online tutorial that you could recommend me. For example, I wouldn't know how to start writing a FTP client or a simple text editor. I don't know where to begin. I have no idea how to write programs that solve real world problems.
Dozer · 2023-10-10 06:33
>>37395 Isn't this pretty dumb for small programs. I'm not a professional but it seems absurd to store small - medium size program states in a database.
Leto Atreides I · 2023-10-10 07:39
whats the best way to encrypt my hard drive?
Anonymous · 2023-10-10 08:55
>>37396 It really depends. But knowing how to read and write to a database is very important anyway.
aliased · 2023-10-10 09:04
>>37398 That really depends on your threat model. If you're trying to hide from a nation state, they already backdoored your computer at the factory and there's nothing you can do about it. If you just want to make sure your laptop is encrypted if you forget it in a coffee shop then installing debian with encrypted lvm is pretty good. You should encrypt any data on an SSD because you can't actually delete data from an SSD.
bit · 2023-10-10 09:05
>>37391 If you want to write an FTP client, just write one? Read the FTP spec (RFC 959), and then just do it? All you need is a TCP socket and some basic functionality to encode and decode the packets.
DEBUG-CONTENTS · 2023-10-10 10:29
>>37402 >If you're trying to hide from a nation state, they already backdoored your computer at the factory and there's nothing you can do about it. Is there any way around that? What if I reuse old machines?
BloodCat · 2023-10-10 10:34
>>37405 What are you gonna do? Order it in the mail? How do you know the mail wasn't intercepted before it got to you? Honestly when it comes to national governments, just don't mess with them and they'll usually leave you alone. And if you do want to mess with them, you should probably be working with some kind of organization or agency on that level like the military or something.
kernelmodesetting · 2023-10-12 02:06
>>37408 I recommend starting with rustilings (https://github.com/rust-lang/rustlings) and then continue with the rust book. Rust introduces a lot of it's own concepts. Try approaching it without trying to do everything like you would do in C++. Helped me understanding the borrow checker better in the beginning.
Colmerauer · 2023-10-16 07:27
>>37451 >really difficult to understand things like inserting elements to an array You actually can't insert element into array.
Drifter · 2023-10-16 08:50
>>37452 > ... can't insert elements into an array I was talking about those arrays that arent entirely filled.
Lord Nikon · 2023-10-16 09:19
>>37454 Once again you can't insert anything in array, although you can change value of array elements. Array is a concept of composite data structure with fixed boundaries so no insert here is defined at all.
negativeiq-kun · 2023-10-16 09:45
>>37455 Hmm... looks like even my basics are not clear enough.
Crazy Jake · 2023-10-16 09:46
>>37456 >>37451 >I am a super noob trying to learn C++. Make sure to have the right book to teach you C++. If you have can't program in any language or if you have very little programming experience, you should read PPP2 or "Programming Principles and Practice Using C++, second edition" by the creator of C++ (Bjarne Stroustrup). It starts from zero and it's known to be excellent book.
negativeiq-kun · 2023-10-16 10:29
>>37457 Okay. I will look into it. I was using my school textbook to learn C++. It has some really bad typos and the explanation is also really really bad. Also, is C++ a right choice for beginners in the world of programming? I consider myself a noob even as a computer Also, should I use g++ to compile C++ program to use a different C/C++ compiler like Clang or LLVM? ( I do not understand what I just said)
Linda Lee · 2023-10-16 10:35
>>37455 You know what lain meant and you're just being pedantic and rude.
Crash Override · 2023-10-16 14:24
>>37459 C++ is a mess... Anything is somewhat OK to start with, though I'd recommend learning a lisp first, as it can derive most concepts found in most languages today, and if using CL, teaches you how to interact with a system properly rather than just relying on the unix Link Compile Run cycle that is like kicking dead whales down the beach for trying to figure things out
Cypher · 2023-10-16 17:04
>>37461 LISP mainly taught me that everything is a list, including an algorithm which is just a list of steps. I don't know if that was what LISP was supposed to do to my brain, but that's what it did.
Undisclosed · 2023-10-17 09:51
>>37462 Also this sentence is just a list of bytes. LISP is brain poison.
Haruyoshi · 2023-10-17 21:04
>>37462 That was pretty much the point, to just get you to deconstruct the universe into individual components so you can try to explain these revelations to people on an instant messaging service as if you're some kind of enlightened guru trying to form a cult following on your friends list.
Church · 2023-10-17 23:02
>>37462 Not really, no. Code as data is important, and realizing the syntax is just a language construct is very important. But languages like Common Lisp teach you about environmental programming (you can hot code live, change even the implementation etc), and allow you to experiment with any style of code (Functional, Object oriented, environment oriented, etc). You can even derive low level details that languages normally gatekeep from you. It's quite good what it can teach and what the system can reflect back for you.
Chan Siu Ming · 2023-10-17 23:35
>>37451 Arrays in C/C++ have a fixed size upon declaration or initialization. In C++ you can use std::vector if you want a "resizable" array. Technically in the background it allocates a new memory block to create another array copying over the old contents to it and then discarding the old array. If you're resizing (reallocating) multiple times per second you'll want to be aware this operation of reallocating new memory is relatively computationally expensive, so you'll want to use the reserve function from std::vector to reserve a certain amount of memory (in bytes) ahead of time for it, enough to cover what you estimate to be the average case scenario if not worst case scenario, in order to minimize the amount of memory reallocations it would do. You can imitate all that behavior in C with one of the memory functions in stdlib.h but you better have a damn good reason to do that instead of just using std::vector which has done all that work for you because of how easy it is to create a memory leak if you don't understand exactly what you're doing. >>37459 >Also, is C++ a right choice for beginners in the world of programming? I consider myself a noob even as a computer No. You should just learn Python and Bash (assuming you're using Linux) instead if you're a beginner, C or C++ are for low-level/performance-related purposes where Rust wouldn't work due to compatibility reasons (e.g. lacking support for a legacy API or library). You should only learn C++ if you have a specific reason you need it and are aware it'll take several months minimum if not years to become proficient in it as a beginner.
kawashima · 2023-10-18 08:08
>>37455 >>37469 I have linked below the code that I wrote. It achieves why my school textbooks ask and I haven't tested rigorously. Can you lainons take a look into it? https://rentry.org/huzvf
Donna Hawthorne · 2023-10-18 09:33
>>37470 Change `int []` and `int (&)[]` to `int*` in your function prototypes and `int arr[]` to `int *arr` in your function headers. Change `int &` to `int` in your function prototype and `int &sz` to `int sz` in your function header. You shouldn't pass integers by reference instead of by value (i.e. copying). For simple data types like `int` it's faster to pass by value, whereas larger data structures that's when it's often faster to pass by reference. You say "(max. 50)" but if I type 50 it says it's invalid array size. Not intuitive. I don't know what you're trying to do with `insertElementIntoPosition`, is `sz` supposed to represent the actual allocated size of the array or how many elements you currently have? I think you might be overcomplicating this and this seems like a problem that does not need to be solved (e.g. meaningless leetcode questions that are useless in solving real world problems), but don't let my cynicism dissuade you from solving it.
kawashima · 2023-10-18 09:58
>>37472 > change `int []` and `int (&)[]` to int * and change `int arr[]` to `int *arr` I don't know much about pointers as I haven't studied them yet. I will look into pointers today. > .... you shouldn't pass integers by reference instead of by value.. I wanted to change the value of sz (number of elements that I currently have) from the function. I didn't know it was inefficient. Should I increment the value of sz after calling the insertElementIntoPosition() function in main()? >...you might be over complicating this... I thought so. The code solution given in my books is shorter.
bit · 2023-10-18 11:31
>>37473 >I wanted to change the value of sz (number of elements that I currently have) from the function. Nevermind then, I thought it was meant to be an unchangeable value that had no relevance outside its function. Typically when someone uses the the variable name `sz` it is used to refer to the size in bytes of a data structure (like an array) allocated in memory, not the number of elements it has. You should use the variable name `len` instead to refer to the number of elements in an array. For example in C's string.h you have the function `strlen` that returns the "length" (number of characters in this case) in an array of chars (aka a "string", or in C++ lingo, a "C string"). The character array for example could have allocated 20 bytes in memory for its maximum capacity but may only have 5 characters including a null terminator with the rest empty. #include <stdio.h> #include <string.h> int main(void) { char str[20] = {'T','e','s','t','\0'}; printf("`str` =\t\t\t\t%s\n", str); printf("Size of string `str` =\t\t%u\n", sizeof(str)); printf("Length of string `str` =\t%u\n", strlen(str)); return 0; } Notice that an `int` is 4 bytes unlike a char which is 1 byte, so an array of ints that allocates memory for 4 integers will have a size of 16 bytes. #include <stdio.h> int main(void) { int nums[4] = {2,3,1,8}; printf("`nums` =\t\t\t%d,%d,%d,%d\n", nums[0], nums[1], nums[2], nums[3]); printf("Size of array `nums` =\t\t%u\n", sizeof(nums)); return 0; } >I didn't know it was inefficient. It's fine if it's deliberate, i.e. a value that you want you change. I thought you passed this int by reference for performance reasons because some tutorials say passing by reference is more efficient than passing by value, but they don't give you the full picture that that's only the case for larger data structures, not simple built-in data types. In toy programs like this one we're talking a difference in nanoseconds so it doesn't matter, and because you say you're using this variable to keep track of state outside the function then you can forget what I typed. >Should I increment the value of sz after calling the insertElementIntoPosition() function in main()? I don't really know what you're trying to do. You need to define a problem precisely before attempting to solve it. What is your motivation for learning C/C++ in the first place? Python and Bash are much more practical for typical IT-related tasks, scripts, etc., and Javascript is obviously much more useful for anything web-based.
kawashima · 2023-10-18 11:54
>>37477 >You need to define a problem precisely before attempting to solve it. I apologize for my inability to clearly define my problem. Maybe I myself haven't fully understood what I am trying to do. >What is your motivation for learning C/C++? I don't have a really have a solid reason other than that my high school text book still uses C++11 (I am a thirdie). I would like to get into systems programming some day but I am not sure. I wanted to do learn Python for web scraping but didn't start because of school.
XERXES · 2023-10-19 05:13
>>37478 >I don't have a really have a solid reason other than that my high school text book still uses C++11 (I am a thirdie). There is nothing wrong with C++11 when compared to more recent standards of C++. The problem is that C++ is a very large and complex language (in general). But you should do what you need to pass your courses. Make sure to enable all compiler warnings with -Wall -Wextra (in clang++/g++) and use cppcheck to check your code (it even has a GUI). And supplement your C++ studies with either PPP2 (or https://www.learncpp.com if you don't have access to PPP2). Also, use this site as a reference: https://en.cppreference.com/w/
Milner · 2023-10-19 12:20
>>37481 >you should do what you need to pass your courses C++ is fine (the course material isnt too hard) but would I be able to find a job if I stick with it even after completing my course? Or should I start learning some other more demanding language in parallel?
Trinity · 2023-10-19 14:31
>>36838 Thanks, it's running on Ubuntu. The linker is x86_64-linux-gnu-ld I tried again by adding '-Wl,--subsystem,console' -L/usr/lib/gcc/x86_64-w64-mingw32/10-posix -L/usr/x86_64-w64-mingw32/lib -L/usr/x86_64-w64-mingw32/lib -L/usr/x86_64-w64-mingw32/sys-root/mingw/lib -lmingw32 -lmsvcrt-os -lmsvcrt -lucrt -lgdi32 -Wl,--subsystem,console I got the same error. 0:27.58 DEBUG: configure:2525: /usr/bin/clang -std=gnu99 --target=x86_64-mingw32 -o conftest.exe -D_HAS_EXCEPTIONS=0 -Qunused-arguments --config /home/user/clang.cfg conftest.c 1>&5 0:27.58 DEBUG: /usr/bin/ld: /tmp/conftest-1a8da6.o:conftest.c:(.text+0x0): multiple definition of `main'; /usr/x86_64-w64-mingw32/lib/libmingw32.a(lib64_libmingw32_a-crt0_c.o):./build/x86_64-w64-mingw32-x86_64-w64-mingw32-crt/./mingw-w64-crt/crt/crt0_c.c:17: first defined here 0:27.58 DEBUG: /usr/bin/ld: /usr/x86_64-w64-mingw32/lib/libmingw32.a(lib64_libmingw32_a-crt0_c.o): in function `main': 0:27.58 DEBUG: ./build/x86_64-w64-mingw32-x86_64-w64-mingw32-crt/./mingw-w64-crt/crt/crt0_c.c:18: undefined reference to `WinMain' 0:27.58 DEBUG: clang: error: linker command failed with exit code 1 (use -v to see invocation) 0:27.58 DEBUG: configure: failed program was: 0:27.58 DEBUG: #line 2518 "configure" 0:27.58 DEBUG: #include "confdefs.h" 0:27.58 DEBUG: 0:27.58 DEBUG: int main() { 0:27.58 DEBUG: 0:27.58 DEBUG: ; return 0; } 0:27.58 DEBUG: configure: error: compiler is incompatible with sanitize options 0:27.58 ERROR: old-configure failed
Anonymous · 2023-10-19 18:06
hello frens. does anyone have a good alternative for github? I don't know much about gitlab but it's the only one I know. however, I'd like to hear your opinions before making any decision :)
John Titor · 2023-10-19 18:12
>>37485 Source Hut or Codeberg
Random · 2023-10-20 00:40
What pros and cons does automatic reference counting have over GC? >>37483 >should I start learning some other more demanding language in parallel? You shouldn't try learning more languages when learning something like C++ because C++ is not an easy language to learn. Python is a language that all programmers should be familiar with since there are jobs for it. But start learning it after the C++ course. Python is much easier than C or C++, so you should be able to learn it pretty quickly after you know a bit of C++. >>37485 >>37486 Also Gitgud.
over · 2023-10-20 01:53
>>37484 on llvm/clang you may need this compiler flag instead --target=x86_64-windows-gnu (haven't tested it myself) --subsystem is just for msvc & g++ i think
Splicer · 2023-10-20 09:27
>>37489 Changing the target results in the configure script failing earlier. checking for host system type... Executing: `sh /home/user/build/configure/../autoconf/config.guess` x86_64-pc-linux-gnu checking for target system type... Executing: `sh /home/user/build/configure/../autoconf/config.sub x86_64-windows-gnu` 'GNU' is not a valid value for EnumStringSubclass Error: Process completed with exit code 1.
J.C. Denton · 2025-02-22 00:58
Sorry for bumping this this 2 year old thread but I've been curious about Linux driver development and stumbled across picrel, however it's 20 years old so I'm not sure how relevant it still is and if there's better learning resources available.
Crash Override · 2025-02-22 01:29
>>41262 >Sorry for bumping this this 2 year old thread It's pinned + this board is slow anyway, so doesn't matter. (actually it isn't pinned, looks like a whole lot of posts got nuked for some reason, putting it below the bump limit again?) >20 years old Most definitely out of date https://docs.kernel.org/kbuild/modules.html is probably what you're looking for
Eldon Tyrell · 2025-02-22 02:02
>>41263 >(actually it isn't pinned, looks like a whole lot of posts got nuked for some reason, putting it below the bump limit again?) weird >https://docs.kernel.org/kbuild/modules.html is probably what you're looking for I'll take a look at that link, thanks lainanon.