[ Home ] [ wiz / dep / hob / lounge / jp / meta / games / music ] [ all ] [  Rules ] [  FAQ ] [  Search /  History ] [  Textboard ] [  Wiki ]

/hob/ - Hobbies

Video game related hobbies go on /games/
Password (For file deletion.)

  [Go to bottom]   [Catalog]   [Return]   [Archive]

File: 1514942759177.jpg (187.78 KB, 817x1000, 817:1000, 1511667641819.jpg) ImgOps iqdb

 No.41214[Last 50 Posts]


When I try to use this function I made I get the error .addEventListener

I think .addEventListener isn’t being found as a function because it is not finding the class in my html. but I added document.addEventListener(“DOMContentLoaded”, function(event) {

}); after it so the function with the addEventListener should only work after all the html is loaded. It still doesn’t work and I’m not exactly sure why. Does anyone know how I can solve this or if there is a better way to do this?

here is my javascript I will appreciate any help.

function newQuote(){
let httpRequest;
let reset = document.getElementsByClassName('reset');
reset.addEventListener('click', makeRequest);

function makeRequest(){
httpRequest = new XMLHttpRequest();

alert('giving up, can not create http instance');
return false;

httpRequest.onReadyStateChange = randomQuote;
httpRequest.open('GET', 'https://random-quote-generator.herokuapp.com/api/quotes/', true);

function randomQuote(){
if(httpRequest.readyState === XMLHtttpRequest.DONE){
if(httpRequest.status === 200){
} else {
alert('there was a problem with the request');


document.addEventListener("DOMContentLoaded", function(event) {


>let reset = document.getElementsByClassName('reset');
>reset.addEventListener('click', makeRequest);

getElementsByClassName return a nodelist object (multiple elements), so either you loop through it or choose one element like this reset[0].addEventListener('click', makeRequest);


I currently have a for loop with the var i increasing over the length of the array of objects. Console.logging it returns the entire array of objects, but I just want a random single value. I have got the for loop to return objects in random order, but how do I return just a single value from this? I will appreciate any help or if anyone can lead me to a similar problem on stack overflow that is answered.
here is my relevant code :

let colors = ['#16a085', '#27ae60', '#2c3e50', '#f39c12', '#e74c3c', '#9b59b6', '#FB6964', '#342224', "#472E32", "#BDBB99", "#77B1A9", "#73A857"];

let reset = document.querySelector('.reset');

reset.addEventListener('click', newQuote);

function newQuote(){
let httpRequest;

function makeRequest(){
httpRequest = new XMLHttpRequest();

alert('giving up, can not create http instance');
return false;

httpRequest.onreadystatechange = randomQuote;
httpRequest.open('GET', 'https://random-quote-generator.herokuapp.com/api/quotes/', true);

function randomQuote(){
if(httpRequest.readyState === XMLHttpRequest.DONE){
if(httpRequest.status === 200){
var data = JSON.parse(this.response);
var randomresponse = data.map(quote => quote.quote);
} else {
alert('there was a problem with the request');

document.addEventListener("DOMContentLoaded", function(event) {


I fixed it. Here is what I wanted and it works

if(httpRequest.readyState === XMLHttpRequest.DONE){
if(httpRequest.status === 200){
var data = JSON.parse(this.response);
var randomresponse = data[Math.floor(Math.random() * data.length) ]
} else {
alert(‘there was a problem with the request’);


Just testing the code tag.
<!DOCTYPE html>
<meta charset="UTF-8" />
<h1>Hello, world!</h1>


File: 1516058332673.png (160.4 KB, 1920x1080, 16:9, 2018-01-15-181421_1920x108….png) ImgOps iqdb

I am trying to pass my array 'url' through my XMLHttprequest GET, and I'm using .forEach to do it, I want to GET the json object of each of the strings in my url array. I had to define my httpRequest outside of my makeRequest function because the console was saying httpRequest is not defined, but now my GET request isn't working, I'm just getting 'test' from makeRequest. Been trying to solve this over 10 hours now and still nothing, will greatly appreciate any help with this.


nevermind I got it to work, I had to use this in my streams() function instead of httpRequest.


File: 1516075136949.png (264.11 KB, 1608x882, 268:147, 1428410463231.png) ImgOps iqdb


What does your post have to do with this thread? Not everyone learning/doing programing is in it for a six figure job.


File: 1516089014169.jpg (1.32 MB, 4076x1376, 1019:344, 1511127803354.jpg) ImgOps iqdb

>The problem withs programming is… Once you've learned the basic syntax of a language (which should take a month or two tops) there is nothing more you can really do.
that is simply false
>The problem withs carpentry is… Once you've learned how to cut wood (which should take a month or two tops) there is nothing more you can really do.
programming isn't just a syntax, it's the theoretical knowledge that you use to structure those basic parts into a more complex project

>Programming is basically the latest form of industrialization.

true, but the amazing part is that it's still possible to do it in an "artisanal" way

>computer science theory (based on electrical engineering circuitry)

computer science is based on math, and it's completely different from electrical engineering

>it's just a tool

true. it's just a very complex tool. again, programming is not about programming languages, it's the technique of deconstructing a complex problem into smaller sub-problems that can be solved with the language / api / tool

>bullshit sociology



>that is simply false

i'm not the guy who you reply to. there is not so much to study in programming on its own.
yes, writing safer (from memory point of view), understandable and supportable and blah blah. but what is fun in this?
anyway, if you have no idea what to do, learning programming will not give you that. you need to look somewhere else. you can learn computer science, but it is not programming.

i'm not saying you should not learn. if you do not know what to do, you need to start somewhere.

but i recall when i got my first book. i thought: now i will learn the language and will be able do anything there is possible to do. but i did not know what to do in end.


Programming is a pretty broad term, it can mean, coding (expressing arbitrary commands through syntax), software engineering (the practical art of building software) and of course, computer science (a mathematical discipline).

Programming is a tool, like a pen. You can learn how to write pretty quickly, a couple coherent sentences, draw some stick figures, but that's miles away from doing something like drawing the Mona Lisa or writing a good novel.

Yes, you can learn "coding" in a few months. But can you do anything useful with that skill unless you also understand several other disciplines?
Can you build a compiler? A web server? A ray tracer?
"Coding" in itself is pretty useless unless it's used in combination with other things to solve practical problems.


Didn't realize there was a new thread, so I'll repost here.

I just started learning ncurses using http://tldp.org/HOWTO/NCURSES-Programming-HOWTO/index.html. I am not sure how this compares to other resources since this is just the first one I clicked on, but it is easy to understand and has been informative at least in the getting started phase.

I have a few ideas about what I want to do with it, but I want to understand the library better before I get into any specific project.


I'm taking an introduction to Programming class and the required book is Programming for Dummies.
SO I GOT a couple….. of quest-ions for you, oh great and magnificent masters…


What should I expect, and not expect?
How can I impress my instructor?
Are there any tools and soft/freeware you would recommend, or do I actually have to read the info in the links graciously provided and install Gentoo and switch to Linux….?


>SO I GOT a couple….. of quest-ions for you, oh great and magnificent masters…
Why did you format that so strangely? Your ellipses even include U+2026.


In terms of the general experience, it's hard to say without knowing your background, the instructor, or the target audience for the course. Some people struggle with basic programming/CS concepts, making it difficult. Some instructors are bad. Some courses are "bootcamps", while others assume you're an idiot and move at a snail's pace. If you're in an undergraduate university, then I'd assume it's the latter, though. In terms of content, read the syllabus and the table of contents in the book.
Why do you want to? If you're looking for a reference for a letter of rec, then just use the same "good student" principles as in any course.
What does the instructor recommend? What programming language will you be using? If it's Linux or no recommendation, then I would suggest Ubuntu 16 because it's accessible to noobs and has a huge amount of stackexchange questions/answers. You can use a VM, but I'd recommend a dual boot. If the projects involve small stuff in C or C++, then I'd use Vim. I'd be surprised if you were using C, though. Same goes for Python; for small stuff, Vim is fine. If you really want an IDE, then ipython/jupyter is nice due to its cell execution. I've also used Pycharm with its vim plugin, and that was fine. For Java I usually use IntelliJ with the vim emulator plugin (same company that makes PyCharm). Vim and jupyter are open source, Pycharm and IntelliJ have free versions.
>do I actually have to read
Yes. Read everything related to what you are doing. If you are copying code for tutorials, read that and type it in manually. If you are using a function, properly read the documentation for that function. While you are getting started with Linux, type "man <program name>" before using a program that you are not familiar with.


It's a relatively large university that buys into most of the new, popular stuff that comes along… I think the latest popular meme degree is Organizational Leadership. Before that it was all Information Systems I think. Whatever. I think it'll be nice. The class doesn't count towards the CS degree, but I think it might count towards quantitative reasoning basics; so I don't think too many take the class and it might be a little more focused on each student a little more.
>Why do you want to?
Getting in good with professors can save your bacon a great deal if you find yourself in a pickle. Plus, impressing the instructor is another way of saying, "I want to do better than my best."

>What does the instructor recommend?

>>This course covers a study of the algorithmic approach in the analysis of problems and their computational solutions, we will use VBA (Visual Basic for Application) for that.

>>1. Interpret information presented in mathematical and/or statistical forms.
2. Illustrate and communicate mathematical and/or statistical information symbolically, visually and/or numerically.
3. Determine when computations are needed and execute the appropriate computations.
4. Apply an appropriate model to the problem to be solved.
5. Make inferences, evaluate assumptions, and assess limitations in estimation modeling and/or statistical analysis.


>the class doesn't count towards the CS degree
In that case, it will probably be slow-paced. I guess the best indicator for how well you might do is your competence in math classes. If those are no problem for you, then the course might feel too slow.
You will need to use Windows, then. I would recommend trying Linux on your own, though. Especially if you are in a CS/CS-related degree program.

I don't think there's much you can do to impress the instructor that is different from other classes. In the past I have done a couple of things in projects that went "above and beyond" the scope of the course because I was interested in the content, but there was never a reaction from the professors. Sit in or near the front if you can, ask questions and use office hours if you need to, be clearly attentive during class, show up a few minutes early and stay until the end. That sort of thing.


>trying Linux on your own
Would you recommend a Virtual Machine Player for playing around with Ubuntu and Linux?


I think a dual boot is better, but if you're not sure about committing the hard drive space to it yet, then a VM might be better. There's a linux thread in the catalog right now; it doesn't have much substance for beginners, but you could ask questions there if you need help.


I just got out of my Intro to Programming class. And what I'm very VERY interested in now is knowing whether or not this is the place I should come to when I have questions about my class and other things of interest that come up along the way. And is /g/ and /v/-/agdg/ any good for general, basic programming questions?


>is /g/ and /v/-/agdg/ any good for general, basic programming questions?
no. /g/ is much more about consumerism and autism than programming. you should stick to your textbook and stackoverflow. if you don't have a textbook, here is a list of recommendations


and you can download them from here




Not this wiz, but I'd like to add that /agdg/ is nothing but a bunch of attentionwhores, memes, and shitposting.



4chan is terrible if you actually want to learn anything. You may learn something there on accident, though.

I remember my intro to programming class was a complete cakewalk. It was so damn easy I don't even remember what I learned. Basic shit like difference between iteration and recursion, control structures, and OOP principles.


>/g/ is much more about consumerism and autism
It isn't even good at that. Most don't stay up-to-date on tech and rather then autistically look things up and argue with data and details they mostly just use obsolete generalizations and stale memes.


Well, it's worth adding that there's /vm/, /ideaguy/, and an actual /agdg/ board for people who want to get very specific. It's worth noting the potential for actually starting up a team that you can not only learn from, but teach at the same time - and a lot to do with coding and programming with design and brainstorming.
It's a huge shitstorm of disorganized blithering and attention whoring, yeah. But, I see it as trying to start a clan, or a Barbarian Assault team. No one ever really wants to take the initiative and carry the responsibility of helping lead a team of random guys to actually create something that might be a wate of time, nothing, illegal, whatever. And all, but what if this would just happen's aside.


I am learning algorithms currently and I'm wondering if its a good idea to try to solve the problem and then look at the solution if I can't solve it, or just look at the solution and see all the parts to understand how it works?



you can try reading the solutions and then implementing them in various programming languages (it's not a good practice although)


File: 1520050688559.webm (9.48 MB, 1152x720, 8:5, 2018-03-02 22-51-55.webm) ImgOps iqdb

Made an overwatch aimbot, which was a lot easier than I thought (made it in about 2 hours). In the video I am barely touching the mouse at all and was intentionally trying to miss when shooting the bots. It uses the healthbar to detect where the head is, which is why tracking is lost when the healthbar disappears or goes outside of the green rectangle.


Awesome!Mind sharing?



Babby's first aimbot isn't worth sharing. Overwatch detects cheats like this and makes the screen black so it no longer works. They also make the health bars darker but that is easy to bypass.

I figure the screenblock could easily be bypassed by reading directly from the framebuffer using directX, but I don't know shit about directX programming and I don't really feel like learning.

Workaround for now is to just mirror the screen using OBS's game capture, which is unaffected by the screen lock. I assume OBS is using the directx method I mentioned.


For the love of my life I cannot understand linked lists. No matter how much shit I read, videos I watch, and examples I look at it's just abstract nonsense to me. How useful/important are these things?


what don't you understand about them, they're pretty simple, do you not know how pointers work?


Do you understand pointers?
It's a pretty simple data structure, and while it's not used because of performance issues, it's important in the bigger picture.

Just imagine a bunch of cubes connected with strings.
The cube is an object/information and the "string" is a connection to the next object either in the form of a pointer or a reference (depending on the language) to the next object.
The way you traverse it, unlike a array which is accessed by an index, a linked list can only be traversed linearly one object at a time, starting either by the "head" or the "tail" (or whatever object you keep as "reference point", doesn't make much sense to keep one in the middle).

The advantage of a linked list is that you can easily add new objects at any point because the objects aren't stored in memory next to each other but in arbitrary places in memory. Adding an object in the middle of the list requires you to traverse the list until the object just before the place you want to add, change the pointer to point to the added object and set the added object to point to the next object.

Of course, this isn't very performance friendly due to how modern computers work (accessing memory is slow when it's not continuous, see "cache misses").


and to answer your question
>How useful/important are these things?
they aren't and you'll probably never use them, but if you don't understand how a linked list works you'll never understand something like a binary tree which is a very useful data structure


I understand pointers and get the concept behind what linked lists are, but seeing it implemented is just boggling to me.



Are you able to understand recursion? Concepts are similar except that linked lists do not execute code, they are just a way of keeping track of memory addresses.


No, and i doubt i ever will


template <class t> struct node {

node<t>* next;

t* data;



what's the absolute easiest way to make a game without having to code too much? i have learned java and python coding a bit and made games systems/mechanics using interactive fiction engines, but it's always too much effort making a full fledges game experience. it's like once i work out an inventory system, or make a jrpg style chat system, or work on saving/loading, user input, it is too hard to combine everything and make a game. i just want something where all the normal shit is already done and you just gotta plug in a bunch of things and make it your own flavor, anyone know anything?



UE4 was actually designed so you can do a lot of stuff without coding, using blueprints.


Depending on the type of game you want to make, just pick an engine/tool that's specialized for it.
RPG maker is good for, you guessed it, RPGs.
Monogatari.IO is good for VNs.

These tools already have the most common features implemented and you can focus on making content.
The drawback is you have less control over your game, tho.


Forth anyone?


File: 1522200769507.jpg (210.45 KB, 1319x850, 1319:850, F-15_Yaw_Control-2.jpg) ImgOps iqdb

>Depending on the type of game you want to make, just pick an engine/tool that's specialized for it.
took that advice, ended up googling for visual programming things for beginners, and i found flowlab.io, has zero typing whatsoever aside from entering values. while it's great for me now, i don't know how to use everything and the circuits you make aren't timed, as in everything fires at the same time, but some signals linger longer than others, some nodes take longer to output, some nodes need an ON output to their OFF input to stay off despite being a toggle, some values like 1 and 0 when passed through filters, even if they don't pass, will output their values, and when you are filtering for 0 and it passes 0, the 0 doesn't count as an input for some things, some things accept 0 as an on input though… many of the logic gates have a delay far greater than the speed of most other nodes so they can get choked up and stop working if the input varies too fast. despite all these confusions im making progress on my first game

tldr - you just drag and drop and connect blocks and don't gotta type or look at pages of text. why can't all suggested beginner game maker enginer include this? it reminds me more of avionics wiring diagrams like pic related, a kind of flowchart for dumb technicians to see the basics and not worry about the internals which is great for me


i'v thought of programing as a possible career path before but due to class scheduling issues (bad programing classes as well) and low motivation at home, i have gone months without any programing practice. i;ve got a pretty good knack when it comes to programing, but i have difficulty retaining information like certain aspect names in html and entire commands in python and c++. is ther a good website out there that can help me jog my memory in things like html and python, and that will teach me shit i will actually use when building a website or program cause all they taught me in c++ was how to do basic math in python and some what if shit that half the time didn't work


File: 1524158919634.png (286.92 KB, 1919x1079, 1919:1079, Capture.PNG) ImgOps iqdb

I need help wizards.

I currently need to use the computer at the library, but there is a time limit of 2 hours per user.

How would I go about increasing this time? (is it synced with windows internal clock?)

I have access to their webserver drive, C drive, task manager, CMD and system 32.

The timeclock program is called "Cybrarian" and on the webserver drive it has all the programs and administration tools, but I'm not sure what file to select for "PatronMGR.exe" to increase the time for my user. There is a file named "Patron" with my user ID in it, with the file extension of "DBA"

Screenshot provided for context.

Any help would be appreciated.


Are you absolutely sure that you can't just request an extension or something?


What, you think I'm some sort of normie or something?


this is kinda hilarious


you don't get beat up for asking


Can someone post the black-and-white picture that has beginner-level challenges for programming in C++?


File: 1531175796418.png (2.65 MB, 5288x2158, 2644:1079, Programming Challenges 4.png) ImgOps iqdb


What resources are out for free that I can read to learn to structure and design software?


You can pirate books on the subject for free, but other than that you can check out open-source projects that use your favorite language and study them.


Do you have any suggestion on books? I was thinking clean code and clean architecture would be good read
Is computer program structure and interpretation worth the read for what I am looking to learn?


>Do you have any suggestion on books?

"Design Patterns" is a good general one.
Or "Head First Design Patterns" if you like the style.

>clean code and clean architecture

Seems like exactly what you're looking for.

>computer program structure and interpretation

If you mean SICP, I haven't read much of it but it's more about computer science principles than software engineering per se.
You're much more likely to get something practical out of specific books on the subject, like the above.


I got locked out of my mysql root user and have been trying to get back in all day. I encountered this same problem as this guy https://stackoverflow.com/questions/11657829/error-2002-hy000-cant-connect-to-local-mysql-server-through-socket-var-run

Looking at the top replied comment about the /etc/mysql/my.cnf file, I have the file, but I'm not sure what to do with it. It's here.

orpheus@Roedelius:/etc/mysql$ ls
conf.d debian-start my.cnf.fallback mysql.conf.d
debian.cnf my.cnf mysql.cnf

It's not clear to me what the top answer says I should do with the my.cnf file to solve the error 2002 /var/run/mysqld/mysqld.sock problem I've been getting. I'd appreciate if anyone could help me with this.


the my .cnf file says this

!includedir /etc/mysql/conf.d/
!includedir /etc/mysql/mysql.conf.d/

what do I do from here? the top answer in stackoverflow says to do something but I don't understand what. Can anyone give me a step by step answer of what to do with this.


Hard to help you without knowing specifically what's happening. First of all, did you try restarting the mysql service (assuming you're running Ubuntu) before you start messing with config files?

sudo service mysql start





Yeah I did, but never mind my question because I managed to reset my root password somehow but now I have a different problem. My mysql server is failing to start. I worked on this shit all day so I'm going to work on it tomorrow now. Shits really makes me tear my hair out..


Is there a beginner challenge thing for Python?


You know you don't have to download another browser to test your javascript right?


>mongodb for morons
>and not mongodb for mongs
wasted opportunity tbh


ask for an extension if you need it, if you are too afraid to ask, try changing the timezone, if clock changes are locked, the timezone feature often times is not for various update reason, just tun it to a time zone behind yours

>tfw wiz changes the timezone forwards and locks himself out


How do you not go insane when debugging something? I'm a self taught noob and I just spent about two days trying to fix my simple login/registration function, and had to ask my question 7+ times on different forums, and the answer was just a few lines of code but no one could explain it to me correctly and just assumed I knew how to implement it even though I said I was a noob. I did some further research on documentation and found the answer to my problem which I got completely lucky by finding and I had no idea this function was required to fix my issue. I've had problems like this on several other projects I've done in the past, searching for days just to add a few simple lines of code or finding some typo in my code that breaks everything that I overlooked, and it drives me mad. This takes a lot of patience to do.


Take hard breaks between sessions.
It helps clear your mind of frustration and come up with new approaches.

Also, Read The Fucking Manual (RTFM).
I can't count how many times I've tried to wing a solution by stitching together pieces, ending up actually doing more work debugging simply because I was too lazy to go from zero and read the documentation.

In your case tho, I think it's a matter of both not reading the documentation and also lack of googling skills.
Login/Registration has been done to death, every question possible has been asked, and there's countless working examples.
Can't imagine why you would need to ask 7+ questions unless it's a radically different approach to the problem.

So, try this next time when encountering a problem:
(1) Re-examine the theory of the problem you're trying to solve (example: Website Authentication/Authorization)
(2) Re-examine the tools you're using, like the libraries, frameworks and language
(3) Find working examples
(4) Finally, if you're doing something truly unique, ask a question but be specific because Internet strangers are lazy
(5) Otherwise, refine your search parameters and find an already answered question or library/framework/solution

I think the problem with a lot of "noobs" are that they start learning at the wrong place.
You've started web development without first understanding the basics in a compiled language and how a computer actually works.
You probably lack the theoretical knowledge about networking, web protocols, encryption, server-client model etc.

Can't say I have a solution, considering I was the same way. Programming since I was 12, learning things I found interesting leading to big holes in my knowledge.
A foundational approach to learning would likely be faster and more effective, but that's seldom how self-taught people approach learning.


any ideas of c projects that involve linux system calls?


How would one go about creating a basic imageboard?


Well, you need to know these things:
>a server-side language
>basic SQL, database management and communicating with the db through the server-side language

It's very basic. There's isn't even any authentication.

FTP server/client perhaps?
You'd need to work with files, sockets and threads/processes possibly.


Thanks for posting this and sorry for the late reply.


I've been trying to do cool projects for some time now and have made a few but it's all so tiresome.
They're always bigger than I initially thought and take so much effort to do.

When I walked outside the other day and contemplated a house complex being built, It dawned on me that the average project would be so much easier to do with someone else.

Have you guys met someone you could count on to build stuff together? Where and how did you meet if so?


What projects are you building? I doubt anyone would want to work with me for free unless its for mutual benefit.

Whenever I got stuck on projects I just ask on stack overflow or other programming forums. I'm a beginner though so my questions are all at that level.


What's the easiest, cheapest, most secure way I can host a very simple textboard?


I'd say DigitalOcean is a popular choice for personal projects.
You get a small server instance for 5 bucks a month or at an hourly rate of $0.007.
You can turn it off at any time or create another instance, or even scale it if you need more juice.

But you have to setup all your web server stuff on your own.
Basically everything you did on your home machine except through a terminal.
There's easy to follow guides on the net, so it shouldn't be too hard.


I met a guy through wizchan and he's a good programmer but is absolutely anal about code styling and tool usage.
We tried to make a game together but he lost interest immediately and hasn't contributed at all since the first few commits where he yelled at me for using tabs instead of spaces and having Windows file endings.

It seems less of a hassle to just work alone. For a successful partnership you both need to have similar visions, work ethics and values.
On a paid job, that's not too important. But for personal projects it's always better to work alone since it's unlikely you'll find that person.

Also, thinking that adding more people to a project will get it done quicker is a common delusion in software development.
It adds complexity since you need to now get more people on the same page which requires excellent communication skills.
Unless you can reasonably divide the work into self-contained chunks, I wouldn't try to work with other people.


if you find someone who's equally as sloppy with code formatting as you are i'm sure you'll get things done much quicker


There's code formatting and then there's autistic nitpicking about completely unimportant things.
If by sloppy you mean laid back and open to compromises for the sake of working together, that person would likely focus on writing more functional code instead of playing with the formatting.

Still, I obliged his preferences and it still didn't work out because people lose interest.


tabs and spaces are not the same thing


>he yelled at me for using tabs instead of spaces
man, I haven't done any major programming in a long time, but fuck that guy, I hate spaces with a passion, I would seriously instantly delete/block/ignore anyone that told me to use spaces instead of tabs


File: 1534768787120.png (284.71 KB, 1080x1920, 9:16, KhfJjVj.jpg.png) ImgOps iqdb

Yes, 4 characters vs. just one.
I understand that tab widths can vary, but you can set the tab width in any normal editor these days.


Automatic code formatting is a must. Configure a strict linter on every project. Into the script which installs dependencies, add a command that creates a pre-commit Git hook that aborts the commit unless it passes the linting. Linters now can fix most formatting mistakes on their own, don't forget to mention in documentation for contributors how to run one.


File: 1536324368565-1.png (111.75 KB, 378x427, 54:61, sEBX4.png) ImgOps iqdb

I'm trying to make my text in this div not go beyond the width of the image width. This isn't a problem with most of the images I put here, but if the text is too long then the text goes beyond the width of the image and I don't want that.

How can I fix this problem?

<div class='post'>
<div class='post2'>
<img src='uploadedFiles/<?php echo $image->image; ?>' alt='$image->id'>
<h3><?php echo $image->user; ?></h3>
<p>"<?php echo $image->description; ?>"</p>

.post {

display: inline-grid;

border: solid 2px gray;

margin: 5px 10px;

text-align: center;


.post2 {
max-width: 19em;


.post2 > img {

max-height: 19em;

max-width: 100%;


.post2 > h3 {

padding-left : 5px;

padding-top : 5px;

color: #00ff00;


.post2 > p {

padding: 4px 4px 6px 6px;

white-space: initial;

word-wrap: break-word;



Instead of max-width, set the min-width of your image to 100%.


Thanks wiz this fixed it.


I want to make a link to go to a url that is dynamically made, but I don't know how to do this with my code. Here is my Router class `

class Router
public $routes = [
'GET' => [],
'POST' => []

public static function load($file)
$router = new static;

require $file;

return $router;

public function get($uri, $controller)
$this->routes['GET'][$uri] = $controller;

public function post($uri, $controller)
$this->routes['POST'][$uri] = $controller;

public function direct($uri, $requestType)
if (array_key_exists($uri, $this->routes[$requestType])) {
return $this->routes[$requestType][$uri];

throw new Exception('No route defined for this URI.');

and here is my routes page


$router->get('', 'controllers/index.php');

$router->get('message', 'controllers/message.php');

$router->get('loginForm', 'controllers/loginForm.php');

$router->get('register', 'controllers/register.php');

on my page with my html I put an <a>tag with a dynamic link href='displayPost<?php echo $image->id; ?> but I'm not sure how to add that $image->id; part into my router list and class to make dynamic url's.


screw it I'll just not add dynamic links to my project, all the solutions I'm finding are too hard to understand. I'm going to learn a framework like symfony or laravel before I try coding dynamic links again, coding everything in raw php is too dam difficult.


File: 1537227262337.jpg (20.57 KB, 720x533, 720:533, f43zlca1sac11.jpg) ImgOps iqdb

How do wizards get better at programming?


File: 1537586458890.jpg (94.29 KB, 1024x768, 4:3, 1448077957916.jpg) ImgOps iqdb

You need to truly want to be able to program, and have things you want to do with programming beyond just making money. You also need to have the discipline to stick with it for months, perhaps a year, but that goes for learning any marketable skill.

After that, it's just a matter of picking any project (imageboard, video game, mobile nutritional tracker, etc) that strikes your fancy and learning any modern language that can do that, following tutorials, understanding programming fundamentals, and reading the goddamn documentation. Automate the Boring Stuff with Python is good if you're the practical sort. Don't worry about what the best language is, the only time that's a relevant discussion is when you're already a good programmer that has a couple paradigms under his belt (object-oriented, functional, symbolic, etc). Understanding paradigms leads to being able to pick up the syntax of a new language of that paradigm quickly.

Don't try to understand everything, programming is far too expansive a topic to do so. Don't feel bad about using libraries to get a project rolling, don't feel bad about feeling like you're working with a black box you don't understand. You might with time. You also might not, and that's fine, as there are millions of other programmers who rely on another programmer's domain knowledge to finish their project.


Time to clock out then


Try implementing the following API, you'll be happier:

$router = new Router([
new Route('/^\/messages(?:\/([0-9]+))?$/', 'Message/MessageController')

First route parameter is a regular expression that you match $_SERVER['REQUEST_URI'] against, second is the name of a class where you keep all the POST/GET/PATCH/etc methods for that resource. In the expression, id is optional, so you can either show all messages or find one.


if (empty($router->status)) {
// Success.
echo json_encode($router->body);
} else {
// Router caught some exception.
echo $router->body;

Also delete that controllers/ folder and organize by feature, like a Message directory for MessageController, MessageService and all the helper utilities you write for your Message model. Frameworks will teach you the opposite but please try writing simply first, as simply as possible. Sorry I didn't answer earlier, not much of an attentive poster.


I don't know much about back end coding, but I don't know how to add that code into my current code and its using functions like ->run and ->status that I don't have so I'm not sure how its supposed to work. From you're showing I don't know how to match my html pages and controllers with it as well.

Why should I write as simply as possible first? I've read that frameworks will teach me a better way to code rather than learning this on my own. I started learning php 2 weeks ago and all I know is from the free courses of it on laracasts, but I don't think I can go very far with that knowledge and I don't even understand the code you have for a router.


Meant you should try coding them yourself. Okay, ignore that json_encode thing. Let's focus on just the matching and html output.


For example, start with this for your index.php:


$routes = [
'/^\/messages(?:\/([0-9]+))?$/' => 'MessageController'

$method = strtolower($_SERVER['REQUEST_METHOD']);

foreach ($routes as $path => $controllerName) {
$match = [];

if (preg_match($path, $_SERVER['REQUEST_URI'], $match)) {
$controller = new $controllerName($match);
echo $controller->$method();

echo 'No route defined for this URI.';

And Message/MessageController.php:

class MessageController {
function __construct($match) {
$this->match = $match;

function get() {
if (empty($this->match[1])) {
// …your database code to get all messages…

include __DIR__.'/MessagesView.php';
} else {
$id = $this->match[1];

// …your database code to get one message…

include __DIR__.'/MessageView.php';

function post() {
if (empty($this->match[1])) {
// …insert a message into database…
} else {
$id = $this->match[1];

// …update existing message in database…


<h1>All messages.</h1>
…probably a form here to insert a message…


<h1><?php echo $id; ?></h1>
…probably an update form here…

Save it and open /messages/123, /messages and / to verify that it works before adding other routes, methods and database code. Frameworks don't teach you how to code better, they teach you their specific way to code. But you might not need one for a little personal application, since you won't use most of its features and will likely overcomplicate your task.

Must say it's cool you got this far in 2 weeks, took me much more.


Ok, in c++ i want to make a map that takes a string and a vector pair that contains a string,int. Pretty much:

map<string,vector<pair<string,int>>> mapName.

I'm trying to add stuff to it like this. mapName.insert(string,vector.push_back(make_pair(string,int))).

And I'm stumped because I don't know how to add things to the vector since you can't name it doing this as far as I know. I've tried googling but can't find much on it.


Several hours later and I finally figured out something so simple. God I fucking hate this shit.


File: 1537930227268.png (254.83 KB, 888x900, 74:75, 1522791421118.png) ImgOps iqdb

Asked this before, but how do you all go about solving things that you're stumped by?


I created a matlab script that will aid me in my house hunting. Unfortunately crime data is fairly useless without knowing the population of area. I found some population data for every city with city borders. The borders are shapes that outline every city with latitude and longitude coordinates.

So basically all I had to do was pick points on the map, find out what city they are in, and then associate it with the population so I can get a crime per person statistic. Great! I used matlab's inpolygon() function for that.

Unfortunately this data really isn't nicely formatted and I am a lazy fuck who didn't want to do that. I have to make some ultra slow matlab calls which is causing this processing to take forever.

I dunno why I am posting this. I guess I am just bored while I wait for this slow af code to finish, and I am slightly drunk right now.


>bullshit sociology
What's even worse, he isn't even using "correct" bullshit sociology. Protestant countries are considered shame societies.


I need to learn some Javascript for web development. Any decent books you guys recommend on the subject?


you don't know javascript is free on github and its the only book that helped me the most. After that I learned by making projects. I tried eloquent javascript too but its too technical for me to understand and I dropped in midway.


why do many index start from 0? seems like languages could just refer to +1 higher without much difficulty. is it some math tradition?


What are your thoughts on Udemy?


Arrays are pointers, so the first element is at the pointer i.e. pointer+0, and the second is at pointer+1, pointer+2, pointer+3 etc.


Good courses for a very beginner. Introduce you to commonly used libraries, patterns and cloud services. Still you can just read the official docs of the libraries, with an alike result if not more up-to-date in the end.


Please don't do this kind of shit if you absolutely have to start writing anything new in Rust. Developing on a latest Rust release, fine, even a beta version is understandable, but writing your entire build process using features from a nightly branch of a compiler built for only a few chosen platforms that needs its own binary to build itself creates quite an unpleasant loop. You might be thinking that features from a nightly will move to stable some time in the next four years. They won't. I'll boldly name this as the single reason behind how Firefox got stuck in its current limbo state. Sorry for the rant.


I learned the basics of java and don't know what else to do now.


LibreOffice Easy Hacks.


create a video game


He said the basics dude
If he starts simple this is actually a good suggestion for a on going project to learn more.


Well it was over my head when I was in the thick of learning to code.

Since I so rarely use it I have forgotten nearly everything so it probably seems even harder then it really is to me now more then ever.
Occasionally I lurk the thread telling myself I will get back into it but I never do since I never have a good reason to push myself beyond extremely simple scripting within existing programs.

Maybe if I was into a game like second life again that had where you could add code to objects based on C# that you could play around with, I would be more likely to get back into it since it would be more playing around instead of feeling like doing work/studying.
Oh well.


Anyone here willing to take a beginner under his wing? Feed me little projects or something you need help with so that I could have direction on what to learn and be useful.


Simple scripting is the best, most useful kind of programs.

Can share an unfinished textboard codebase if that doesn't sound ridiculously easy to you. Posted my feature plan on /meta/ in the textboard general, and you'll be able to pick up whatever catches your interest. Unlikely to be of much help in terms of advice, support, appearing online or responding to messages though.


Exercism.io has small exercises you can complete in any language and get feedback on.


Coding a neural network, from scratch even, is MUCH easier than a video game.
If you don't do it from scratch especially, then libraries make it very easy


I start drawing control flow or objects/interactions with boxes and arrows. Sometimes I include (pseudo)code in these modules, but frequently I begin from a higher level of abstraction. A whiteboard is usually good for this, but I always have graph paper on hand just in case. A blackboard is the most comfortable, but those aren't very common and you have to be careful not to get chalk in your keyboard.

If I can't come up with a design that I like, then I walk through everything from the beginning. I ask myself: what am I starting with, and what are my desired outcomes? What are the high level components? And other similar questions. Basically, the idea is to strengthen your understanding of the problem and of your desired result; this understanding will help you form the high level building blocks for the solution and how they interact with each other. I usually speak this self-Q&A aloud while taking notes and drawing more boxes and arrows.


I keep changing variables that I guess might be related, and curse until it works.


idk if anyone else knows, but windows batch scripting is easy to pick up. it has some severe limitations compared to virtually any real programing language, or even other operating systems shell scripting languages, but if you are on windows it's still kind of cool

for example just open up up notepase and type/paste this, then save as runme.bat or runme.cmd, then double click it

@echo off
set yourvariable=wiz
echo hello %yourvariable%

any text-based game or interactive program can be made pretty quick. here's some descriptions of the commands i use often, or examples of the usage
set x=1 <assigns local temporary variable>
set /a x=y+z <same as above but allows simple artithmatic>
if %x% equ 1 (set y=2) & (set z=3) <using if. %variable% uses the value of the variable. "&" is a way to separate commands>
if %y% equ 1 if %x% equ 3 (echo ASFFDGgd) <if can just be stacked with other ifs to next them. echo prints out text>
goto example <makes the program go to :example>

:example <label, serves as jump point for goto>
if age geq 5 (set dog=blah) & (set blahblah=blahblahblah) ^ <this " ^" escapes the end of line character, lets commands be broke up over multiple lines if they get too long and hard to read>
(set asdfsdfsd=sadfasdf) <this is considered part of the above if condition>

if something equ nothing (set example=55) || (set example=99) <the "||" means if the previous thing fails, or isn't true, it runs the command. i think it means OR>

echo a - first choice
echo b - second choice
echo c - third choice
choice /c abc /n <halts the program, only continues if they press a,b, or c. the /c and /n are just some options i like with it>
set yourchoice=%errorlevel% <if they press a, that sets errorlevel to 1, b-2, c-3, etc>
if %yourchoice% equ 1 (echo first choice)

pause <pauses the script, and displays message letting you know to press something to continue
cls <clears the screen of text>

setx catdog=dogcat <this is setting a permanent variable, but you can only use it later, not in the current batch file>

there's a few variables and "cmdlets" you can use as well to do stuff, %username%, %cd%, %date%, %time%

timeout 600 /nobreak <halts script. after 600 seconds, script continues. /nobreak means you can't interrupt it>
shutdown /h <can hibernate computer>
cipher /w:c:\ <wipes the deleted/unallocated space on c: drive by overwriting with random data or something. basically after running cipher you can't recover deleted data. all windows have cipher>
taskkill /f /im openwith.exe <terminate tasks like how you normally would by using task manager>
@RD /S /Q "C:\$Recycle.bin" <effectively clears recycle bin>
net stop WaaSMedicSvc <can stop services>
title command shortcuts <renames the command line interface to "command shortcuts">
color f0 <sets the command line interface background color to white, and the text color to black. opposite of how it is normally>
@echo off <used at the start of scripts for a cleaner output>
type example.txt <prints out the contents of example.txt if example.txt is in the same directory as the batch file. otherwise you specify filename>

there's also CALL used for creating subroutines and functions, but i haven't even used it once. you can call labels or other programs i think.
also there's piping to output or input stuff, also haven't used that though.

in general you can use set, set /a, echo, choice, and goto for simple games without any problem. those have made up like 99% of the commands i use.

here's some other stuff a bit more complicated using other program's command line functions, but i'm not a programmer so it's not that hard. this series of scirpts is started by dragging a folder containg .png files onto the batch file. the location of the folder dragged is %1, %cd% is the directory of the batch file itself, and the programs with command line functions i can utilize are all in the folder 'scanmate' on the same directory as the batch file itself

%cd%\scanmate\advanced_renamer_portable\arenc.exe -e %cd%\scanmate\alphanumeric-to-numeric.aren -t files -p "%1" -msk "*.png" -o filename -m rename
>this uses the program advanced renamer to rename .png files alphanumerically counting up from 01.png

for /r "%1" %%a in (*.png) do (%cd%\scanmate\optipng\optipng.exe -force -v -o2 "%%a")
>this uses optipng to compress the .pngs

echo 1 - ZIP
echo 2 - RAR
choice /c 12 /n
set cnum=%errorlevel%
if %cnum% equ 1 (set archiveformat=ZIP)^
else (set archiveformat=RAR)
set /p archivename=%archiveformat% ARCHIVE NAME:
%cd%\scanmate\winrar\rar.exe a -r %1\%archivename%.%archiveformat% %1\*.png
>choice for zip/rar. prompt for the filename. then uses rar.exe to archive the pictures using the format and filename.


batch is pretty fun, that's how I started programming when I was 12, I'd make tons of stupid little programs in batch and show them to my parents



What? Most cheats hook into the game directly and track positions based upon looking at a memmory location.

Is yours really based upon scanning the screen directly?


File: 1553650189762-0.jpg (599.45 KB, 474x743, 474:743, 10 print.jpg) ImgOps iqdb

File: 1553650189762-1.png (123.94 KB, 1105x1080, 221:216, 10 print 2.png) ImgOps iqdb

output from what people now call a 10 print program/pattern. it was originally a single line of code in basic that would randomly print either / or \ and fill the screen. some people actually found it interesting enough to write a book about it. example are found online https://snek.dev/10print

the cool thing is that when rotates 45 degrees, it is like a maze, using only 2 characters. but because it's random it's not a very good maze and you can see using paint bucket to fill either side, there can be ver large sections that are uncrossable


Tired of having to make multiple different commandline parsers I've been programming a generic unix-style command line parser.

I know I don't have to, libs exist, but I code everything from scratch (and all libs have security vulns).

Nothing impressive. Just –xxx-xxx and/or -x added to an iterative AVL tree implementation, with doc strings to generate the –help output, and fn pointers to call upon encountering a parameter.


is command line parsing interpreting some input command and arguments to pass to some kind of function or other program?



Yes. It is easier and less intrusive to scan the screen, making the cheat impossible to detect.


File: 1554492524953.mp4 (3.83 MB, 1920x1080, 16:9, archive.mp4) ImgOps iqdb

testing something using curl, ended up returning a lot of old threads like >>>/wiz/74

would be cool to get images but the text of a post is more important anyway


CS noob here but you're programming in C right?


File: 1554651586140.jpeg (9.12 KB, 222x227, 222:227, crackpairingmirite.jpeg) ImgOps iqdb

I feel like most of my time programming is not spent…programming

Instead it’s what I would call “bullshit one-off IT problems.” I need a weird library and spend a day trying to track down the particular version I need because it’s not in any package manager, of course. Or I have to use some function that I do not understand how it works, nor can I track down the documentation for what the error code “E705” that it keeps popping out (c.f. the error codes hidden in LAPACK hidden in GSL), nor does ANYONE know how it works. Or I spend two days just figuring out how to get weird library X to work with my set of bullshit code, or how the library calls even work, or a version that doesn't require me to learn two or three other lirbaries just to call the one function I want to call. Or, my workstation is a Windows x64 distribution whereas the compiler I need to use only supports a Debian i686, but that’s O.K. because then I can cludgily call it if I manage to make an executable on the separate workstation—if I can manage to get the particular version of Debian the damn thing works on. Or my IDE breaks and gives some mysterious code (or I’ve even run across kernel faults) that I have to track down even though it doesn’t even come up on websearches, and I get sidetracked fixing my computer for a couple days. Or, I need to register some odd account on a website a client uses and take forever to figure out what should be a simple web-portal that instead has evolved 3 million widgets (imagine a screen just filled with more buttons that the cockpit of the space shuttle) over the past 30 years that all interact in the most obscure of ways.

When I actually finally get to the problem after a week, I end up only writing at most a hundred lines to solve the actual problem.


I wish I could only write a hundred lines to solve an issue, usually I end up writing a few thousand. The less code and the fewer dependencies you introduce, the more quality thing you create.

Btw, simple web-portal is an oxymoron.


Same, the second you step outside the standard and most popular libraries/frameworks you are in the middle of a gigantic minefield by yourself without an end in sight.
I loathe working with most programmers code, but reading their documentation (if it even exists) is even worse, things almost never work as they should.
Last week I spent 3 days setting up and trying to use a small library for a very specific use. The thing kept throwing all kind of errors that didn't make any sense. Found one single example of code in the documentation which was 2 years old, the only way to make this library work as intended was to use a 2 year old version in debug mode.


What language or ecosystem is that? I never have these issues when dealing with Node.js or pure C and simple focused libraries, but projects in Java and C++ and enterprise frameworks regardless of the language turn out abominable hell with conflicting dependencies every time.


Somebody in a chatroom kept pushing python as the best thing ever, I've only ever worked with C# and I think python seems like it's over-hyped and a meme.


It's never one language/ecosystem. It's whatever package/library/language that needs to be found and pulled together to get the project to work.


How can Python be overhyped when it's much less widespread? Personally I like how compact and readable it lets you script GUI and text file operations, but altogether it's huge and I don't appreciate its presence and sometimes requirement in base Linux systems in a similar way that C# is on Windows.

I don't understand, why are you pulling in those packages, libraries etc unless you're sure they work and integrate fine? Nobody should be adding languages to projects, the mention of "pulling together" such enormous third-party components clearly sounds like someone up the business chain is making disastrously incompetent decisions.


man i hated python for the mandatory indentation and case sensitivity. they really wanted every program to look the same way regardless of who wrote it. it's super popular in universities and just common usage though from what i've read


is any modern language case-insensitive? Why?

Our university had C# and x86 assembly. Python crowd here is mostly self-taught.


i can only think of ring


CS noob here again, I thought gc langauges don't allow pointer arithme


Fuck magento, what a fucking obfuscated undocumented piece of shit. And fuck this company for making an intern use it.


Has anybody here ever thought about writing their very own AI waifu?


You can probably make a program that gives the illusion of a waifu but we haven't figured out a way to make sentient AI yet. What's the point anyways? If you write the program then you know how it exactly works so it is impossible to fool yourself.


One of the main reasons why I got into science and programming was to make an AI.
Kinda like in the 1995 gits movie.
That stuff is fascinating.
I don't think anyone's close to achieving that though, although deepmind is doing interesting stuff.


If you're feeling incredibly irritated, anxious and frustrated at the start of learning how to code is it perhaps the wrong thing to try? Has anyone else started out feeling like this?

I am avoiding learning because of this but I want to do the course on Khan Academy before I completely give up on it


I started learning java when I was 13 coding runescape private servers, literally just doing trial and error coding until I understood what was going on. That felt really rewarding to me, I never got frustrated but I got excited because I was making cool stuff in runescape. I assume those khan academy exercises are boring though


They're not boring. Part of the problem is me so that's why I don't just give up yet.

What goes through my head is
>I'm starting this at 25 so what's the point?
>There's so much to go through and I'm an idiot

I can't tell if I'm having trouble because I don't like it or because of my self confidence issues


It seems unrelated to your interest in programming. You'd likely experience the same feelings towards any hobby or skill. Nothing else to do except push on and focus on the process. Perhaps once you observe your own self-efficacy, you'd gain more confidence and some relief for those pesky feelings.


File: 1556813212358.jpg (123.82 KB, 540x762, 90:127, essense.jpg) ImgOps iqdb

This is what I was thinking. Ill go through the classes and if I still don't like it Ill move on. But I gotta push through the starting pains. Thanks for the input anon.


I'm 2 weeks into a codemonkey job and starting to hate programming.
I used to like messing with the computer, writing small programs, understanding how things work behind the scenes, configuring my system etc. And now after this short period of being _forced_ to write code I'm actually adopting the idea that computers should "just work" and considering switching back to windows and using bugged, resource heavy spyware because it's too much hussle otherwise.
How to I prevent this process from going further and revert it back to normal?


File: 1565545489784.mp4 (1.38 MB, 1280x720, 16:9, game1.mp4) ImgOps iqdb

was playing with idea of a vn kind of engine yesterday, this is what i got so far using autoit. the script part looks weird like a batch script right now but it works at least


I don't know if it's qualify as programming but given the fact this is the best place to ask I'll give it a shot. Do you guys know any good places to learn html? I've done the codeacademy course but you don't learn much in there. I was looking for something a little more extensive.


There really isn't much to learn, in html you use tags to specify how a document is structured. There's a lot and even web developers don't use most of them. It's pretty much a learn as you go thing.
Best thing you can do is learn the basic structure and tags (html, head, body, a, p, div…), try to write your website/document and google whatever you don't know how to do i.e html embed audio.

The mozilla documentation is usually good for html/css/js. I haven't went over any of the tutorials but if I need to check how X thing works I check here or the first stackoverflow google result.


Thnks for the quick response wiz. I guess you're right, I'll just continue doing the css exercises from codecademy as there's lots of html in there and once that's done I'll try to build a small website.


I'm not >>49272, but I too would like to work with HTML/CSS/PHP a bit. I did it a lot as a kid. I remember being able to just open a plain HTML document and then build up a page in pure WYSIWYG realtime with Firebug but that was like 10 years ago and I can't find an equivalent now.

If anyone working with it has any tips on how to set up a seamless work environment for such things, that would be cool. What browsers/extensions/programs to use so that I can say, edit the HTML or CSS in an editor in one monitor, and the browser updates the webpage using it in realtime or with a simple refresh in the other monitor.


I need a c# project idea. I want it to be something related to security/cryptography. Any Ideas?


You might make an encrypted chat program. Would sed be a challenge


That might be a good idea. Got any pointers for where to start with encryption programs for c#?


anyone know a good way to produce a vector image using several thousands points? like for example to draw a square you'd just have 4 points and they would be connected. i'm considering just simulating mouseclick/move and drawing one point, then a line to the next point, etc with a vector image editor

would be cool if there was a program that could just accept a list of x, y values


actually just information on a simple vector image format that is easy to understand would probably help if i can just create the image directly


File: 1567025500051.png (22.05 KB, 1150x1080, 115:108, t est.png) ImgOps iqdb

uh nevermind im fucking retarded, i didn't realize how simple SVG is, it's like plaintext you just paste the fucking points in there


Ahaha, I broke the gcc in my windows. Nothing fucking works, not Eclipse, not Netbeans, not Codeblocks. I may be a beginner retard but it shouldn't be this hard to build a hello world program. I mean I can use an ide with its own compiler like devC or an online one but I am still mad at these garbage software that's different from than everyone else online. Eclipse and Netbeans won't build binary files or whatever. Codeblocks keeps telling me that some dlls is missing when it's right fucking there. I even deleted my mingw and reinstalled it directly from the codeblocks installer. Nothing online helps. Maybe it's time to try out linux. Hope it's not some epic /g/ meme and is actually useful.


>hello world program
that's a lot of work for that, just pick up an interpreted language or something if you just wanna learn how computers work


File: 1567049268533.webm (1.87 MB, 1280x720, 16:9, apu light.webm) ImgOps iqdb

I'm trying to do a rudimentary lightning system with c++ using sfml.
What I did was creating a vector of small black squares (5x5) that covers the entire screen and each frame I check distance to source (mouse in this case) and adjust the alpha accordingly.
Pretty simple, thing is, it annihilates the framerate.
How do 2d games usually do lightning?


I'm sorry, I didn't mean to reply.


File: 1567052699586.png (2.96 KB, 1000x1000, 1:1, light dark.png) ImgOps iqdb

they route computationally intensive sections of code to run on the gpu, and they also utilise multicore programming, and they use engines that have already worked out efficient implementations for stuff like lighting

most importantly though they cheat and use tricks. one trick they would use is just an overlay constantly positioned to the cursor to achieve that effect


File: 1567097075171.webm (1.12 MB, 1280x720, 16:9, apu overlay.webm) ImgOps iqdb

Yeah an overlay works great but I was trying to something for when I have more than one light source.
Now I'm trying to learn about blending. Man there's so much to learn. At this rate I'll never be able to make anything.


it's a pain to do a lot of development tasks in windows
try with vscode there might be a plugin to compile C easily without installing visual studio


Why gcc? If you're on Windows it's much better to use something that actually works natively such as DevCpp, PellesC or even Visual Studio. But in case you really want to use gcc, you can always install Linux distribution inside virtual machine.


Wow using color blending was so easy I feel retarded because someone had to actually tell me how it was done. And I struggled all afternoon with this.


I don't really just want to learn computers. I want to be kinda serious. But it really is a lot of work. I though beginner's linux would be easy but I still get errors I wasn't in the mood to deal with.

Thanks, but I already restored my system and got codeblocks to work. It's still a pain to set up some other things though. Now I finally understand why people hate windows.

All the "big name" IDE that's popular in the industry usually use gcc though. Eclipse, Netbeans,and Codeblocks use an external compiler which is usually recommended to be MinGW. Visual studio could work but I don't really want to use them unless it's for .net languages.


Been working through "Automate the Boring Stuff With Python lately. Its great so far


File: 1568128471080.png (330.26 KB, 1920x1080, 16:9, 2019-09-10-171211_1920x108….png) ImgOps iqdb

Since CSS is technically a programming language. There is a userstyle out there called "Base 16 for 8chan" that works on here that I tweaked to match my system's colours. The difference is small but it's satisfying. I also made it use variables so it can be easily ported to other themes from base-16 family.


played with inform7 today after going through the documentation. all i can say is jesus christ. i dont get these programming languages using 'natural language'. it says to be intended for programmers interested in writing, and writers interested in programming, but i dont think syntax has ever been the most difficult part of learning most languages. everything is a god damn sentence requiring. instead of briefly checking over a syntax guide, you are required to learn a completely different way of speaking english. everything has to be written very specifically. instead of making a quick game it's become more or less a prescriptivist grammar lesson. natural language processing, at least whatever they are using, i NOT developed enough for this to be anything but a chore. it still seems really cool and powerful for text based simulated interactions between things, and i'll continue, but it's not fun


Do we have any wizzies with a strong interest in security?


just wanted to say thank you for this post. different wizzie than the one you replied to and i'm reading it almost a year later but this is a great book and it's helping me a lot. thanks.


Yes. I studied different things when i was at university, so now that i'm an unemployed neet im reading about it and might try to get some certification/s


Im going to try solving advent of code thid year. I won't do it at the time the problems are opened, because it's 5 am in europe. So no worries about times and rankings. I can't promise I won't forget about it by the second day.


File: 1575506378948.gif (1.92 MB, 300x225, 4:3, ROTW thumbs up.gif) ImgOps iqdb

>advent of code

I forgot this existed, guess I'll try it too since it's something to look forward to each day. Just got caught up and solved all 4 problems released so far.


File: 1575607897871.png (1.21 MB, 1300x956, 325:239, ClipboardImage.png) ImgOps iqdb

after a long day of spaghetti coding cookin up a mastapiece


I'm going to take a test on my programming class in about 10 minutes. It's going to be GG no re since I feel unprepared overall, but I feel like I've learned a lot about python, my first language. I am going to fail though. I have a 50 in the class, so this final will not affect anything.

Calling it now. GG no re


programming classes are dumb as fuck you can learn all that shit online anyway


i didnt setup my timer to the current time on a script, it was at 0 lol. so every check for whether (timer < current time) would pass and every instance would incrememt until it caught up to the current time. it basically resulted in all the instances having the same values dependent on the timer regardless of when the instance was created

really silly mistake but i had no idea what was going on at first


File: 1577648581978.jpg (135.86 KB, 1200x635, 240:127, 3rp6plhuyj141.jpg) ImgOps iqdb

wrote a script that converts my text document that contains all the anime i watched, want to watch and dropped to json. now need to write a gui that makes it easier to add new data to that json. i'm not sure if i should use some client side shit or set up a server and modify the file remotely or something. i used to keep that document in my mega cloud and sync it across devices. i suppose i should write that thing in python (using pyside) since python is the only lang that i know really well and actually enjoy writing stuff in.


Feels weird to see this thread I created after two years (hob is slow as fuck)
Can't even recognize my posts, like, did I really ask this dumb question?

Anyway this time gonna try my hand with AI and machine learning after learning javascript, html, css, python and building some apps/extensions (had been learning C++ before those, japanese as an extra). I'm pretty good at theories but frustrated at learning their syntax, like, why do I have to memorize someone else's arbitrary naming convention, and they change all-the-time?


Honestly I've been having a blast with programming lately. As strange as it sounds I've found myself really appreciating C. People say that C is "low level" but it's really not. Everything works the same way it does in any other language. The main difference really is having to work directly with memory. You have to learn what a pointer is; How memory is managed for functions; How parameters work; and so on. People really exaggerate how difficult it is.

At most it means using pointers virtually for everything – but that's not difficult at all. Being explicit about when you're making copies or working directly with a 'variable' is a very useful property and something that can get confusing in hand-holding languages that try to hide everything. The main problem that people are going to have with C is the lack of data types.

It has no support for lists or associative arrays / dictionaries / hash maps – and those are very fundamental data structures for most engineers. A linked list is a basic data structure that's easily implemented without reference, but hash maps may require more study if a developer has no exposure to their theory. Once you've added hash maps you'll probably also want to use an arbitrary precision number library for your program.

The reason to do this is because numerical operations in C can overflow or underflow and it's not practical to write checks before each and every math operation. You'll eventually want a library. If only to be able to work with sizes larger than the standard data types provided with C which are only up to 64 bits. Some compilers support 128 bit numbers but it's a special platform and compiler specific type. I ended up writing my own safe math library with support for add, sub, mul, and div of integers and decimal numbers simulated using integers.

My code is extensively tested, detects all math operations that will go outside the bounds of a type before they occur based on number theory, and provides highly accurate results for decimal calculations by avoiding floating point errors (it uses integers instead of floats.) The target platform for all of this is 64 bit but it degrades to a simulation automatically if compiler support for the special large numeric type isn't avoid. All of this is significantly easier, faster, and less disgusting than GNUs arbitrary precision library – my code is a single file header – no includes.

I mentioned earlier that C doesn't have hash maps. What this means is a lot of C libraries have terrible interfaces. Because most programmers are used to thinking in terms of hash maps for many different problems. An example of this is JSON which is basically just a key value store with hierarchical keys. Many of the C libraries for JSON are fucking disgusting and have API interfaces that practically require writing your own parser to parse the 'results.' These aren't parsers, they're dog shit.

It's been fun fixing all these problems. The next problem that I really need to solve with C is possibly expanding how strings are built. I'm not sure how I want to go about that yet though. I might do some Googling to see how people are currently doing it or if they are. After that I'll really have everything I need to release some solid software.

Tl; dr – with only basic comp sci and good testing C is not a low level language.


Managing pointers and memory is simple in small projects. Combined with undefined behaviour and lack of features makes development painful and very error prone.
Do it in a big project with a bunch of other people working with time constraints. Each language has its own use and outside of a few cases C is a bad choice.


File: 1581636245327.jpeg (452.07 KB, 1971x1971, 1:1, terry_davis.jpeg) ImgOps iqdb

>big project with a bunch of other people working with time constraints
quiche eater

You sir are on the path to enlightenment; May the wind be always at your back and the sun shine warm upon your face. Ignore those that glow for they will envy the intrepidness of your journey.

Less than one cycle of the moon ago I perchance happened upon the need to solicit a considerable quantity in .bss - I decided to ink the scroll in the new tongue of Go for I foresaw the need to divide it's labours in the near future. Alas, aghast I was when presented with:

too much data in section SNOPTRBSS (over 2e+09 bytes)

How dare the staff spake to the magician in these ungodly magic numbers — doth it not know I am the mighty sorcerer whom has willed the mechanism with dark spells for many eons? I dusted off my tunic, sat upright and with a fierce glare, exclaimed in the ancient tongue of the sea of my desires — All was well.


I don't know how you can say C is always the wrong choice. Look at the Linux kernel. It has some of the most beautiful code out there and it's written in C and assembly. I really don't get how people think memory management is too much. It's not like you need to use the heap for everything anyway. Is writing

p = 0;

… too hard? I would dismiss claims about buffer overflows because it's also an exception to write outside of memory offsets in other languages. The bigger issue with C is if you use standard library functions and don't understand how they work 100%. Many of the default funcs are unsafe and there are subtle vulns you have to know about. But again - not exactly rocket science.




>Linux kernel
Kernel development is a niche. Also programmers working on linux are easily in the top 1-5% of income.

>It's not like you need to use the heap for everything anyway

Uhh I'd say most code requires dealing with dynamic memory such as retrieving data from a database.


There's also embedded systems where C is still a -very- popular choice. God only knows how much firmware code was written in C. A lot, I would guess


File: 1582567694098.jpg (273.28 KB, 1000x1000, 1:1, wasdagdsg.jpg) ImgOps iqdb

some funny incorrect results trying to convert .obj vertex/face values into 2d .svg images

first i tried just making lines for x/y, then x/z plus z, now i'm trying to make it single point perspective with things scaled according to z. in the beginning i also forgot to clear the vertex/face arrays in between conversions so every conversion just added a bunch of junk which was entertaining


File: 1582831661397.png (40.32 KB, 1873x960, 1873:960, ClipboardImage.png) ImgOps iqdb

trying to extract the pathmap data from wc3 custom maps, takes forever but seems to work, although it's mirrored vertically and horizontall somehow


That's really cool, what are you going to do with it?


File: 1583545850803.png (268.44 KB, 1920x1080, 16:9, ClipboardImage.png) ImgOps iqdb

i just want maps i guess. xbm is a cool format for making images from this kind of data. just have to find a way to combine the tree position data with this stuff and ill be content


You know those deceptively simple questions in math and computer science that have been open problems for like 20+ years? I had the bright idea of trying to solve one recently and I'm in deep this time. I know now why professors tell their students to stay away from them. These problems make it seem like the answer is JUST AROUND THE CORNER. So you keep going…. And going. Write more code. Try more approaches. Drink more red bull… I'm in deep this time. Deep inside witchie, and IDK if there's a light at the end of this wiz tunnel (witchie.)

If I have to throw away all this work (and most likely I will since NO ONE IN F*king 18 YEARS has solved the problem) then I'm going to be EXTREMELY butthut!!!! And yet… And yet… and yet and yet. I have made progress. I've managed to reduce the problem from intractable to exponential. I need to reduce exponential to something that a computer can actually F*[fuck]ing run! I have an algorithm that I've been working on since all of last night. It's based on 100+ lines of complex BITWISE ops that resemble a hash function. IF it works, I will be the first person to solve this problem.

AHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh sips more redbull Still writing the code and testing it. I can honestly say this is the most complex thing I've ever worked on and I've invented a lot of shit. Will see what happens. sipping stops


Holy shit. That sounds crazy.
Even if you don't solve it, the knowledge you gained so far will be worth it.


This wiz is exhausted. Tomorrow I'll write some code to generate the inputs to test the last part of the algorithm. Wish me luck wiz. If it works I'll be the first person to ever solve this problem ((((but I doubt it))))


A quick wiz update. I've been working on an unsolved problem in math and I think I may have just solved it. When I started this process the problem was intractable, meaning that it required too much computing resources to ever be solvable. Even if every compute in the world were put to use towards solving this problem an answer would never be reached before our sun burnt out.

With some careful hacking I managed to divide the problem up into a series of smaller problems, each of which eventually added up to an exponential growth curve. Such a result makes calculating an answer impossible as after a few iterations the set size growths so large that we run into the same issue that we've started with.

That's when I realised I could carve a path through the noise by creating a fuzzy sampling the answer. Exponential growth was traded away for a minimal footprint of the output size which could be compactly represented without requiring universe sized amounts of memory. After working on this idea for the last few days I managed to transform the exponential growth curve into a linear growth curve but the calculation is STILL too slow!

While I have succeeded in allowing computations to be VASTLY and almost immeasurably, more efficient, it means that after just 20 iterations or so, the growth from the previous number of cycles has already stacked up making future progress prohibitive. But I've just realised that I can create a 100% accurate offset in the computation paths by the realisation that I know the set sizes in advance and by purposefully varying the set sizes. What this means is that rather than relying on a chain of fuzzy check points to guide the computations, I can instead strategically choose points to insert a reference.

The reference will allow the algorithm to DISCARD all previous state chains that it builds up as part of the computation, essentially reducing an accrued linear growth back to zero, and turning a gradually growing linear curve into a parabolic one. Basically, my approach works. The numbers line up. The parameters are perfect. Every bug has been sorted out in the fuzzy sampling code which was the most difficult shit I've ever worked on. Tomorrow I will add the strategic check point algorithm on top of the existing algorithm which will allow it to run VERY fucking fast. We're talking about finishing what would previously take a universe sized amount of energy in what I calculate to be about 5 - 30 minutes.

That is the second part of the problem solved. The first part I have already solved as it exhibits no growth what-so-ever, is in within the range of what a modern processor can calculate, and could even be concurrently computed on a cluster or GPU. This is honestly significant.


wiz edit: meant polynomial not quadratic. silly wizza. need to try sleep now before demiurge kills me tbh. night /wizgrammers/


How'd it turn out? Did you manage as you said? I'm curious.


>need to do arithmetic on hundreds-digits-long numbers
>no native gigantic integer support
time to create a string operation monster


How long did this take you?
What language are you using?
That's impressive as fuck. Good job!


>Tomorrow I will add
Who knows if he managed wizzie. Could be an episode of mania.


I want to believe there are some autistic savants here. That would inspire me as I'm only a regular autist.


It would inspire me as I'm only regular retard.


I managed to reduce the results down to an average of around 100 - 150 candidates per set. But the way I setup filtering means having to compute: 150 * 150 * 150… etc for the entire number of sets left (128) in total. That adds up fast. The problem is that the filter I designed is primitive and doesn't allow for sorting the candidate sets on a whole. I think that potentially the solution is to use merkle trees but I haven't written enough code yet to verify this. I may end up using a combination of approaches because 150 candidates is still honestly decent for what I'm trying to do.


By the way I'll come back here and admit failure if this goes no where. So far it's been interesting though


Okay, big update for you all. My merkle tree approach is working. I'll be able to move to integrating this part with the rest of the code. I'm very surprised that it actually works. I think I'll end up being the first person to solve this problem. this is crazy


I'm rooting for you wizzie.


Coding an emulator using the technical documents that are available. Planning on using C, Visual Studio and Win32. No external libraries.

I'm sure it will be completely redundant and nobody will use it but I can maybe add it to a portfolio. I have had enough of obsessing over the usefulness or lack thereof of my projects. It gets in the way of progress.

I hope I can someday make a game, too. Just gotta hang out code. Read books. Every day, no exceptions. Don't plan, just do. It's all about mileage.


Well said.
I need to stop being all talk no action.



Buy Colt Steele's Bootcamp on Udemy for £10 which will give you a brief overview of HTML & CSS, JS & more languages. But don't watch all of it, just do the first 4/5 sections which cover HTML and CSS (Dont begin Bootstrap yet). You wont be a pro but you'll understand the underlying principles of each. Then do Academind's 'CSS - The Complete Guide' which you can find on google / torrenting sites for free, or buy it if you prefer. This will give you a much more in depth understanding of CSS, as for HTML don't worry, you'll just pick up the rest as you go on. Once you've completed Academind's course you can return to Colt Steele's course and begin the following section which will be Bootstrap 4. Buy this point I'm sure you'll be confidently progressing in HTML & CSS and have a clear path to forward onto CSS frameworks and Javascript/Python.


File: 1588194682016.pdf (4.37 MB, Structure and Interpretati….pdf)

C is the most lindy programming language. This is a fact. Long after Python is in the dustbins like fortran or basic of this era, C will still be in use. C is king…. also much faster than Python.


Here is a free book. Never stop learning fellow technomages.


My brain is officially dead after reading this post. Ouch.


File: 1589053836730.jpg (36.54 KB, 480x360, 4:3, 1507667954577.jpg) ImgOps iqdb

Writing an FTP client and server without using existing FTP libraries.
Pretty fun so far, client has most of the basic functionality implemented but needs a lot of refactoring and more robust error handling.


DO NOT learn C from " Learn C the Hard Way". Sure you can learn C from it but its somewhat notorious for being structured very poorly for beginners.

Also a very beginner friendly read thats also quick (under 300 pages) and is a great starting point is "C Programming Absolute Beginner's Guide". Uploaded the latest edition in epub formet to mega if anyone wants.

Another one I'd very much recommend is "Modern C" which is a free, open source book. Is very well structured for beginners and intermediate alike, but is longer then the prior mentioned book.


I was wrong wiz. My merkle tree approach didn't work to stop the exponential set growth like I was hoping. I believe it's still an efficient method, but I jumped too quickly in declaring I had solved the problem.

I've now failed with 8 different algorithms over a period of 3+ months. That should be the end of it; I mean everyone whose ever tried to solve this problem has failed. I decided I would give it one last shot and try a new filtering approach. See, I had an intuition about a similar algorithm that was metaphorically like the same problem… so I decided to play around with the idea, thinking it was senseless even to me.

I made a few modifications to the algorithm to make it work with what I was trying to do (set reduction)… and that's where shit gets p wild… After almost no work it was many magnitudes more efficient than my merkle tree approach. It was GOOD, but after I ran the numbers and did some experiments it still didn't solve the exponential growth problem. That was until today…

I found a way to forge a weapon to strike through the entropy. As the sets grow larger and reach a certain threshold, I forge a new sword and strike down my target, slashing the sets back down to a manageable size. It might honestly be the most beautiful thing I've seen a computer do. wtf im CRYING… WTF Best of all – it takes up no special room in the final program.

At this point the algorithm is final, but my code for it isn't. What remains is merging in my experiment code into the reconstruction algorithm. I have proven that it works now. But I won't be satisfied until the full program runs as part of a working system in the real world. Something that I can point to with certainty and say 'this was impossible before, it's not any more.'


Still rooting for you then wizzie. Finish your code and publish the solution to this problem so others can use your solution!
You'll have contributed to humanity.


How do I run an imageboard?




try searchin textboard in your favourite search engine


I’m looking into creating a small imageboard as a personal project. What software would you recommend?


File: 1591098168311.jpeg (10 KB, 188x267, 188:267, 2tanaka.jpeg) ImgOps iqdb

It feels like 90% to 95% of the time I spend “coding” is actually spent “trying to figure out how to compile a project/library/simply get it to run in the environment” as opposed to actually writing and debugging code. Ironically, every project that tells me to use a program to satisfy all the build dependencies usually takes even longer just to get that program to run correctly, despite ‘in theory’ it should not.


I've only had that issue with C/C++ because it just doesn't have great tools that will work on every platform. Even experienced programmers are frustrated with that aspect of it.

Most modern programming languages have a package/dependency manager that handles downloading and versioning which makes it really easy to set up a dev environment i.e. npm, cargo, gem, pip and so on. The only time I have an issue with those is when the "library" is a just a wrapper around a C/C++ DLL and I get linking errors for whatever reason.


File: 1591643030365.png (565.54 KB, 1164x768, 97:64, good jesus.png) ImgOps iqdb

I just wanted to be a good programmer.


I have learned Java and Python and wanted to write a monitoring tool for myself. Monitoring my PC and browsing activities, that is.

Java apparently only exists in its own box and cannot interact with the machine. How do I interact with things happening outside of the "program window"


To clarify: yes you can interact with files outside of the program. I did as far: creating and changing files. But how to detect inputs and read out data form other software (eg which site I am browsing). hmm


Well, that's complex and depends on the operating system and applications. You can easily execute a system command to list out current running processes (ps on linux, tasklist on windows), but getting data from other applications is tricky when there isn't an API or they encrypt their data files.

For instance, to get browser history, you have to know where the browser stores that information. For Firefox and Chrome it's an SQLite database file (lookup the location online). It's readable with an SQLite library and some investigation of the table structures.


File: 1594141490600.png (573.34 KB, 748x966, 374:483, ClipboardImage.png) ImgOps iqdb

brother got an IT job and emailed me a book for learning powershell. doubt im gonna read it but maybe someone else can use it. i would attach it directly but it's 42MB. https://gofile.io/d/fe9ctH


File: 1594191258982.jpg (171.72 KB, 1000x1239, 1000:1239, average perl programmer.jpg) ImgOps iqdb

perl is so cool.
joe camel is cool.
perl sounds like pearl. thats like expensive.
larry wall is a cool looking dude. hes like a rms that trims his beard.
perl used to be known as the glue that holds the internet together. then boring php and js came.
state of the onion sounds cool, like an intelligence brief.
"perl monks" sounds cool. its just like "the knights of lambda" in coolness.
and camels were the best in aoe2. they could beat knights.
i think its better than python or c or scheme as a language for newbies. "print "hello world"" is a full and valid perl program. its good at manipulating text, automating stuff, some web stuff, piecing programs together. its like bash on ritalin. perfect for people new to this.
perl books have cool names. like "The Camel Book". and "High Order Perl", that one sounds sophisticated. compare that to automate the boring stuff with python which has boring in its name.
pythons name is based on a boring english tv comedy show. might as well make a mr bean programming language. its used by people who see computers as only a means to an end.
perl can be obfuscated. python obfuscation? pfft.
i think everyone should start with bash, then perl, c++, c and assembly. it looks like theyre all that you need to get real stuff done. then if computing isnt just a means to an end you can read about APL, Prolog, scheme.


is this the superautism i keep hearing about?


>pythons name is based on a boring english tv comedy show. might as well make a mr bean programming language.


anyone know a program for 'unreflecting' or correcting reflections. assuming you know the exact geometry of an object's reflection that is being recorded, like a reflective sphere for example


What's an imageboard to demonstrate a scraper on that is palatable to normalfags? I only ever use anime imageboards so I don't know of anything else.


Honestly 420chan might be your best bet. Drug use is seen as progressive by some.


if you can limit the scraper to a section of an imageboard, the papercraft board of 4chan is pretty innocent


File: 1594618341044.jpg (20.81 KB, 748x710, 374:355, SCR_ 2020-07-13, 00_27_50.jpg) ImgOps iqdb

I wanted to learn Laravel and hone up my frontend coding skills so I'm recreating the Sublime Text interface as a dynamic personal website thing. I just didn't know what else to do.


File: 1594766786569-0.png (5.68 KB, 374x375, 374:375, ClipboardImage.png) ImgOps iqdb

File: 1594766786569-1.png (102.3 KB, 177x285, 59:95, ClipboardImage.png) ImgOps iqdb

need to connect these together to make a dungeon


File: 1595038081968-0.png (33.83 KB, 778x914, 389:457, ClipboardImage.png) ImgOps iqdb

File: 1595038081968-1.png (31.97 KB, 778x914, 389:457, ClipboardImage.png) ImgOps iqdb

File: 1595038081968-2.png (34.51 KB, 778x914, 389:457, ClipboardImage.png) ImgOps iqdb

took longer than i expected. some things aren't going as planned, like the second room sometimes doesn't connect with the first room and this can lead to two 'halves' of the map that don't ever join up

i already have ideas for improving it, in particular reducing the hallway lengths, and adding dead ends. im content for now though


Like in everything programming - there are ready algorithms for that, and they're probably more effective than what you'll produce by yourself. Use one of those.


you're right, but i'm not intelligent enough to understand them. it's also not fun just mindlessly implementing someone else's creation. it's not like this is my job i can afford to have fun and come up with my own ideas


I know right? Why try learning to do anything when you could just have money and do it the proprietary way with a team of college trained graphic artists?


File: 1595378154850.mp4 (49.06 KB, 1480x832, 185:104, g51.mp4) ImgOps iqdb

well i got it to work perfectly. but slapping on code for making dead ends reintroduced the disconnected rooms problem. so it isn't perfect anymore but still kind of cool


Anyone coding MQL5 here?


No, but I once tried to learn it. I did an extremely simple EA that was profitable in backtesting in two certain years (I can't recall which ones).
Have you done an EA?


File: 1596091317397.jpg (9.15 KB, 163x171, 163:171, 1547528563774.jpg) ImgOps iqdb

this dude might be the most retarded person i've ever seen lol… ah yes programming, the cultural artform of america that's functionally equivalent to calvinism… programming, an entire field of study in which all the subject matter is a mere facade, amd where, beyond syntax, there's nothing more to be known… it's not like there are overarching abstract concepts that permeate the actual syntax, like computational complexity, data structures, algorithms, and design methodologies and not to mention plain old engineering techniques that apply to software… no, none of these exist… and it's not like programming, as a form of activity, is directly corespondent to a linguistic theory about logical syntax and analysis developed by alonzo church which had implications beyond mere charlatanry in birthing programming as an activity… much like how the financial revolution, being largely theoretical and economics-concerned, birthed industrial society and all its tedious tasks that in reality aren't any different from that of programming as they share the same relation to their correspondent theoretical basis… no this can't possibly be the case it must be some cultural resurrection of calvinism…


Agreed. Though there's a HUGE learning curve. One that most people can't get over. It's INSANELY easy to get started. There's just so many fucking mental blocks to getting there. It's fucking boring as well. This is the same with any other industry if you learn enough. It all feels like one big scam. That's 'cause people put money on a big-ass pedestal. Money doesn't mean anything other than an exchange of value. Value is measured by attention. That's why following your passions works out and people say it's "luck." Because it felt effortless.


different things work for different people


>The problem with programming is that there is nothing to learn.

Programming is a tool, just like a pencil. While it might take some trivial amount of time to hold a pencil, the amount of things that you can learn to express with it is infinite. Talking only about "programming" doesn't make sense after the fundamentals, it's always about what you're trying to build and express through computation. Some of that is being able to express stuff through algorithms, but most of the time it's about integrating various independent systems into a coherent whole. Yes, you're rarely building stuff from scratch (unless you want to), but I think that's a good thing because it increases people's ability to express things with less code - like using Unity to build their shitty indie game or communicating with their fridge with some javascript library. You'll unlikely be able to write an operating system from scratch but you can take various individual parts of the system and integrate into something new - which is why there's a gazillion linux distros that come out every week. The point is that the rising tide lifts all ships and using other people's solutions that were built on top of other people's solutions only creates more freedom and increases what you can express computationally (it's crazy what you can put together in a weekend).

I'd have to agree about programming jobs though, especially in big companies. Working at FAANG companies is usually every CS graduates dream job, but they are increasingly soul-crushing places because of the sheer size and number of employees. You pass their meme interview by memorizing all the interview problems on the Internet and then you join some small team, building some minuscule part of some Google's pet project website, you get your code reviewed by some Tech lead and then you go eat avocado toast before some tranny holds a meeting about notifying everyone xe changed xis pronouns again.


More specifically the nth element of an array is located at the address of the first element + (n * size of type) with indices starting at zero (obviously).


File: 1596298413226.jpg (183.54 KB, 510x620, 51:62, reisen_kaguya_comfy.jpg) ImgOps iqdb

>an entire field of study in which all the subject matter is a mere facade, amd where, beyond syntax, there's nothing more to be known… it's not like there are overarching abstract concepts that permeate the actual syntax, like computational complexity, data structures, algorithms, and design methodologies and not to mention plain old engineering techniques that apply to software
Syntax itself isn't involved in those problems. Take a series of buckets, some containing a rock and some not, sorting those rocks in the minimum number of operations doesn't involve the syntax used to express that problem. Which series of high-level syntactic constructs resolve to which series of operations is a different problem.

>it's not like programming, as a form of activity, is directly corespondent to a linguistic theory about logical syntax and analysis developed by alonzo church which had implications beyond mere charlatanry in birthing programming as an activity

Most people don't write in logically coherent programming languages, though. Most people write in programming languages descended from assembler macros, e.g. while loops, assignment, etc, which is just an ad-hoc and pragmatic way to get things done.


would any of you like to work on a programming project together?


Yeah. What is your IRC room? We can colab in there. Any other means of communication is bunk.


File: 1596690988172.png (25.16 KB, 144x161, 144:161, KtFrnmc.png) ImgOps iqdb

i don't have one. i'd be willing to use irc though


ok finally made one. join ##TrueWiz on freenode


Yeah, what kinda project would you like to do?


File: 1596967889994.png (51.63 KB, 292x225, 292:225, pic4.png) ImgOps iqdb


why do you need permission?


anyone have experience with ffmpeg? i can get a list of .ts files from an .m3u8 and simply concatenate them into a single .ts video, and it plays continuously perfectly fine, but jumping and skipping to different parts causes weird lags. i was thinking converting it to mp4 might help but have never used ffmpeg


File: 1597167103827.jpg (72.23 KB, 675x379, 675:379, great-math-mystery.width-1….jpg) ImgOps iqdb

My IRC client disconnected and now I'm locked out. :/

Those .ts files is what makes skip forward/backward possible (over a network), must have if self-hosting content! Have you tried `youtube-dl –verbose -f worst https://path/to.m8u3`? It should show the sub-commands used.


sorry if i'm not understanding, what do you mean 'It should show the sub-commands used.'? that prints a whole lot of shit i don't understand on the screen. it does download all the ts files to mp4 correctly though

this is great and using your thing i'll probably find the command/s to just use ffmpeg to do accomplish the same. i wish i knew why simply concatenating the ts files together doesn't work but oh well



I'm going through Bjarne's PPP2 (first nine chapters so far) and I feel like I'm not putting in enough effort. I'm a pretty meticulous reader (not giving myself credit - this is mostly due to my autistic rereading of the same sentences over and over), but when I get to the drills, and especially the exercises, I completely run out of steam. The drills and review questions I can somewhat put up with, but when it comes to the exercises and just general code writing I feel such a sense of lethargy. Trying to formulize solutions to the problems is very taxing on my motivation, and I just feel like doing something else.

And that's my problem. I can follow along and grasp most of the material so far, but for that material that isn't as intuitive to grasp, and for any degree of mastery of the material you ultimately have to put in the work and write some code. Shouldn't that be the fun part? Why am I so dismayed by the idea of analyzing problems, designing and implementing solutions, troubleshooting and debugging, etc? Isn't that the whole point of programming? I really feel like I shouldn't continue with the book if I don't seriously up the amount of coding I do. But I'm just so lazy.

It is apparent to me that I have no passion for programming. It's been apparent for quite a while. Even so, in a month i'm starting university for a software engineering degree. I feel bad when I think about programmers like John Carmack because I realize that even without the expectation of reaching his skill level, I fundamentally don't have the proper mindset for being a programmer. I just don't care enough about solving problems.


have you only tried c++? i did some online courses for my brother and had to use that and i wanted to kill myself. people say languages don't matter and syntax doesn't matter and blah blah i say bullshit, it feels so much more enjoyable in certain languages to me


I've wanted to learn C++ (instead of plain C) for awhile but could never sit down and get into it… Actually I learned plain C from old lecture notes found on the internet.


Same thing happens to me, though in math/physics books. I've started to think it's a bit pointless to have a bunch of excercises after each chapter. It's like a little wall that kills motivation. Some books place small excercises interspersed with the main text.
But I do see the point, at least in mathematics, to have excercises. Only the drills are annoying and unmotivating.
But I think the reason is that we either fear failure, or simply hate to break continuity. I like to think that reading about programming is because one has some project in mind. I think that's a good motivator. To carry the process of writing whatever application one has in mind, at least in your head (and on paper!), instead of doing some silly tax recording drill that serves no purpose.
In the end the thing to do is to just sit down and do the thing, once you've decided that it is necessary to do it. On the other hand you could skip most excercises, and get the whole info in your head at once, then keep the book as a reference and start programming something that actually interests you. Or just read the excercises, pick one that looks challenging enough, and try to implement it, if you fail at some point nevermind, just look up the info you just read (it's easy to not see the connection right away). Honestly a lot of that shit you learn is overkill, why have to do a bunch of excercises for learning all the different datatypes if you haven't even gotten to control structures?
Do as thou willt shall be the whole of the law.
But yeah you should devote some 30 minuted to do some actual coding. This is what I always do: write the outline first:
#include &lt;stdio.h&gt;
/*I'm using C btw*/
/*Program: prime number sieve*/
int main(int argc, char** argc) {
/*check for args*/
int sieve[1000];
/*for each number, check if prime*/
for (int i=2; i++, /*???*/) {
/*print sieve*/
return 0;

Just translating to C-syntax my thought process as I start outlining what the steps are and then fill in the missing parts. even doing the int main() {return 0;} alone provides a starter.
Hope it helps.


File: 1597303146922.png (51.8 KB, 532x755, 532:755, primes.c.png) ImgOps iqdb

> armchair psychologist

[Last 50 Posts]
[Go to top] [Catalog] [Return][Post a Reply]
Delete Post [ ]
[ Home ] [ wiz / dep / hob / lounge / jp / meta / games / music ] [ all ] [  Rules ] [  FAQ ] [  Search /  History ] [  Textboard ] [  Wiki ]