[ 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/

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

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

 No.41214[Last 50 Posts]

 No.41215

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();

if(!httpRequest){
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);
httpRequest.send();
}

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

}

document.addEventListener("DOMContentLoaded", function(event) {
newQuote();
});

 No.41217

>>41215
>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);

 No.41234

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();

if(!httpRequest){
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);
httpRequest.send();
}

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

document.addEventListener("DOMContentLoaded", function(event) {
newQuote();
});

 No.41241

>>41234
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) ]
console.log(randomresponse.quote);
} else {
alert(‘there was a problem with the request’);
}
}
}

 No.41248

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

 No.41484

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.

 No.41485

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

 No.41488

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


 No.41489

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

 No.41494

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

>>41488
>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

kys

 No.41499

>>41494
>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.

 No.41500

>>41499
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.

 No.41547

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.

 No.41549

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…

>1.

What should I expect, and not expect?
>2.
How can I impress my instructor?
>3.
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….?

 No.41550

>>41549
>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.

>1

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.
>2
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.
>3
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.

 No.41551

>>41550
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.

 No.41552

>>41551
>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.
>VBA
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.

 No.41554

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

 No.41612

>>41554
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.

 No.41632

>>41612
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?

 No.41634

>>41632
>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

>https://stackoverflow.com/questions/22873/language-books-tutorials-for-popular-languages


and you can download them from here

>http://gen.lib.rus.ec/

>http://www.allitebooks.com/

 No.41635

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

 No.41640

>>41632

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.

 No.41649

>>41634
>/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.

 No.41650

>>41635
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.

 No.41668

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?

 No.41671


 No.41672

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

 No.42228

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.

 No.42235

>>42228
Awesome!Mind sharing?

 No.42238

>>42235

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.

 No.42253

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?

 No.42254

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

 No.42255

>>42253
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").

 No.42256

>>42253
>>42254
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

 No.42257

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

 No.42258

>>42257

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.42278

>>42258
No, and i doubt i ever will

 No.42283

>>42253
template <class t> struct node {

node<t>* next;

t* data;

};

 No.42575

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?

 No.42576

>>42575

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

 No.42590

>>42575
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.
etc.

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.

 No.42675

Forth anyone?

 No.42679

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

>>42590
>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

 No.42716

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

 No.43252

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.

 No.43255

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

 No.43256

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

 No.43297

>>43252
this is kinda hilarious

 No.43401

>>43256
you don't get beat up for asking

 No.44385

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

 No.44386

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


 No.44419

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

 No.44420

>>44419
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.

 No.44421

>>44420
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?

 No.44423

>>44421
>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.

 No.44704

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.

 No.44705

>>44704
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.

 No.44706

>>44704
>>44705
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

https://stackoverflow.com/a/12833455

 No.44707

>>44706
*restart

 No.44709

>>44706
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..

 No.44714

Is there a beginner challenge thing for Python?

 No.44724

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

 No.44725

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

 No.44741

>>43252
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

 No.44907

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.

 No.44908

>>44907
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.

 No.44926

any ideas of c projects that involve linux system calls?

 No.44927

How would one go about creating a basic imageboard?

 No.44928

>>44927
Well, you need to know these things:
>HTML/CSS
>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.

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

 No.44929

>>44386
Thanks for posting this and sorry for the late reply.

 No.44967

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?

 No.44968

>>44967
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.

 No.44969

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

 No.44973

>>44969
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.

 No.44974

>>44967
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.

 No.44975

>>44974
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

 No.44981

>>44975
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.

 No.44983

>>44981
tabs and spaces are not the same thing

 No.44985

>>44974
>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

 No.44986

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

>>44983
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.

 No.45097

>>44974
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.

 No.45201

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>
</div>
</div>



.post {

display: inline-grid;

border: solid 2px gray;

margin: 5px 10px;

text-align: center;

}

.post2 {
max-width: 19em;

display:inline-block;
}

.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;

}

 No.45202

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

 No.45203

>>45202
Thanks wiz this fixed it.

 No.45320

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


<?php

$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.

 No.45322

>>45320
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.

 No.45346

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

How do wizards get better at programming?

 No.45395

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

>45346
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.

 No.45402

>>45395
>>45396
Time to clock out then

 No.45408

>>45322
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.

$router->run();

if (empty($router->status)) {
// Success.
echo json_encode($router->body);
} else {
// Router caught some exception.
http_response_code($router->status);
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.

 No.45412

>>45408
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.

 No.45414

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

https://regexone.com/
https://php.net/manual/en/function.preg-match.php
https://php.net/manual/en/reserved.variables.server.php

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

<?php
require(__DIR__.'/Message/MessageController.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();
exit;
}
}

http_response_code(404);
echo 'No route defined for this URI.';

And Message/MessageController.php:

<?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…
}
}
}

Message/MessagesView.php:

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

Message/MessageView.php:

<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.

 No.45439

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.

 No.45444

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

 No.45448

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?

 No.45476

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.

 No.45527

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

 No.46000

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

 No.46009

>>46000
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.

 No.46167

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

 No.46517

What are your thoughts on Udemy?

 No.46518

>>46167
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.

 No.46520

>>46517
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.

 No.46777

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.

 No.46903

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

 No.46910

>>46903
LibreOffice Easy Hacks.

 No.46912

>>46903
create a video game

 No.46913

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

 No.46917

>>46916
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.

 No.47022

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.

 No.47023

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

>>47022
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.

 No.47024

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

 No.47033

>>46913
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

 No.47077

>>45448
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.

 No.47078

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

 No.47539

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%
pause



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 ARCHIVE FORMAT:
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.

 No.47540

>>47539
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

 No.47567

>>42238

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?

 No.47608

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

 No.47613

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.

 No.47624

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

 No.47691

>>47567

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

 No.47694

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

 No.47696

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

 No.47704

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.

 No.47705

>>47704
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.

 No.47709

>>47704
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.

 No.47710

>>47709
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.

 No.47711

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.

 No.47712

>>47710
>language
>ecosystem
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.

 No.47718

>>47711
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.

>>47712
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.

 No.47719

>>47711
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

 No.47720

>>47719
is any modern language case-insensitive? Why?

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

 No.47726

>>47720
i can only think of ring

 No.47776

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

 No.47819

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

 No.47900

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

 No.47902

>>47900
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.

 No.47914

>>47900
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.

 No.47948

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

 No.47950

>>47948
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

 No.47960

>>47950
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

 No.47963

>>47960
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.

 No.47966

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

>>47963
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.

 No.48704

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?

 No.49221

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

 No.49272

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.

 No.49273

>>49272
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.
https://developer.mozilla.org/en-US/docs/Web/HTML

 No.49274

>>49273
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.

 No.49276

>>49273
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.

 No.49362

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

 No.49379

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

 No.49389

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

 No.49485

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

 No.49486

>>49485
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

 No.49487

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

>>49486
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

 No.49489

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.

 No.49490

>>49489
>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

 No.49491

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

>>49490
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?

 No.49492

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

 No.49495

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

>>49491
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

 No.49503

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

>>49495
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.

 No.49510

>>49489
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

 No.49513

>>49489
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.

 No.49524

>>49503
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.

 No.49547

>>49490
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.

>>49510
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.

>>49513
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.

 No.49548

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

 No.49781

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.

 No.49782

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

 No.50080

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

 No.50088

>>46009
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.

 No.50089

>>50080
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

 No.51087

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.

 No.51138

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

>>51087
>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.

 No.51157

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

after a long day of spaghetti coding cookin up a mastapiece

 No.51241

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

 No.51242

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

 No.51292

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

 No.51481

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

>>41214
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.

 No.52105

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?

 No.52108

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.

 No.52110

>>52108
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.

 No.52111

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

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

>>52108
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.

 No.52113

>>52110
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

if(p)
{
free(p);
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.

 No.52114

>>52111
10/10

 No.52118

>>52113
>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.

 No.52124

>>52118
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

 No.52242

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

 No.52263

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

 No.52379

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

 No.52380

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

>>52379
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

 No.52488

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

 No.52490

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

 No.52493

>>52490
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))))

 No.52511

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.

 No.52512

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

 No.52542

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

 No.52555

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

 No.52559

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

 No.52561

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

 No.52562

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

 No.52569

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

 No.52578

>>52542
>>52559
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.

 No.52579

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

 No.52583

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

 No.52601

>>52583
I'm rooting for you wizzie.

 No.52704

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.

 No.52715

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

 No.53046

>>49276
>>49273

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.

 No.53057

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

>>52124
>>52118
>>52113
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.

https://benchmarksgame-team.pages.debian.net/benchmarksgame/fastest/python3-gcc.html

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

 No.53070

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

 No.53205

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.

 No.53222

>>41214
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.
https://mega.nz/file/dpMAGSQQ#OZqhukeRUrTKPhEGLGY05YbU8A2TsZLmia9vMd_Ghk8

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.
https://modernc.gforge.inria.fr/

 No.53248

>>52601
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.'

 No.53269

>>53248
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.

 No.53295

How do I run an imageboard?

 No.53296

>>53295
Textboard*

 No.53303

>>53296
try searchin textboard in your favourite search engine

 No.53358

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

 No.53544

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.

 No.53545

>>53544
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.

 No.53668

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

I just wanted to be a good programmer.

 No.54146

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"

 No.54147

>>54146
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

 No.54148

>>54147
>>54146
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.

 No.54159

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

 No.54167

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.

 No.54171

>>54167
is this the superautism i keep hearing about?

 No.54173

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

 No.54208

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

 No.54272

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.

 No.54273

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

 No.54274

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

 No.54275

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.

 No.54309

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

 No.54386

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

>>54309
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

 No.54402

>>54386
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.

 No.54404

>>54402
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

 No.54423

>>54402
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?

 No.54464

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

>>54386
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

 No.54556

Anyone coding MQL5 here?

 No.54568

>>54556
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?

 No.54591

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

>>41488
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…

 No.54594

>>41488
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.

 No.54597

>>54594
different things work for different people

 No.54598

>>41488
>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.

 No.54627

>>46518
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).

 No.54631

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

>>54591
>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.

 No.54705

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

 No.54711

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

 No.54729

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

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

 No.54731

>>54729
>>54711
ok finally made one. join ##TrueWiz on freenode

 No.54733

>>54705
Yeah, what kinda project would you like to do?

 No.54789

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


 No.54812

>>54789
why do you need permission?

 No.54813

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

 No.54826

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

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

>>54813
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.

 No.54827

>>54826
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

thanks

 No.54829

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.

 No.54830

>>54829
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

 No.54831

>>54829
>>54830
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.

 No.54841

>>54829
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.

 No.54842

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

>>54841
> armchair psychologist

 No.54879

File: 1597582562237.jpg (403.73 KB, 1000x1310, 100:131, 1596274084024.jpg) ImgOps iqdb

>>54813
>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 lag
The most likely problem is the timestamp doesn't match the video or audio streams. There are a few options for recalculating this in ffmpeg which I've thrown together:

ffmpeg -i in.ts -copytb -async -1 -vsync -1 -dts_error_threshold -1 -c copy out.ts

It's also worth trying -vsync drop, as according to the docs "as passthrough but destroys all timestamps, making the muxer generate fresh timestamps based on frame-rate" and if the video has a variable framerate you can impose one with -r 30.

 No.54904

File: 1597718104081.gif (369.67 KB, 404x455, 404:455, aestheic_xp.gif) ImgOps iqdb

>>54826
>>54812
>>54789
>>54733
>>54731
>>54729
If the IRC isnt working, we could use Mumble instead. I really dont want to just give up on IRC though. Lets get either the irc or mumble up and running so we can actually work on a project or something. Maybe github could work too?

 No.54905

File: 1597739572780.jpg (43.59 KB, 960x550, 96:55, hello.jpg) ImgOps iqdb

>>54904
Nobody likes to /join a channel and see no indication of conversation…

Sheep will also get skittish if there isn't a dozen present already. :/

What did you have in mind?

 No.54907

File: 1597753200920.jpg (40.88 KB, 460x460, 1:1, megu.jpg) ImgOps iqdb

I call this jsh (jank shell). If you thought sh or dash were bleak try using this for more than 5 minutes.

#include &lt;stdio.h&gt;
#include &lt;string.h&gt;
#include &lt;unistd.h&gt;
#include &lt;wait.h&gt;

void prompt(char *s)
{
    printf("* ");
    fgets(s, 1024, stdin);
}

void parse(char *buf, char **cmd)
{
    cmd[0] = strtok(buf, " \n");

    for (int i = 0; cmd[i]; ++i) {
        cmd[i + 1] = strtok(NULL, " \n");
    }
}

void execute(char **cmd)
{
    int stat;
    pid_t pid = fork();

    if (pid) wait(&amp;stat);
    else execvp(cmd[0], cmd);
}

int main(int argc, char **argv)
{
    char buffer[1024];
    char *command[256];

    while (1) {
        prompt(buffer);
        parse(buffer, command);
        if (command[0]) execute(command);
    }

    return 0;
}

 No.54912

File: 1597770198657.png (101.88 KB, 880x660, 4:3, cs360.png) ImgOps iqdb

>>54907
https://web.eecs.utk.edu/~huangj/cs360/index.html

>To become good general-purpose C programmers

>To become decent Unix hackers
>To become well-versed in the language of systems programming
>To understand basic uniprocessor organization

Public lecture notes backup: https://files.catbox.moe/88ur2k.zip

This looks worthy if you want to do C.

First link dead, but others okay. https://web.eecs.utk.edu/~huangj/cs360/lecture_notes.html

We probanly won't go as fast as the students actually enrolled in course…

What about two weeks per chapter? There are no public homeworks just the labs, we will have to come up with suitable exercises.

 No.54916

File: 1597795164575.jpeg (47.27 KB, 656x369, 16:9, beardy.jpeg) ImgOps iqdb

>>54907
>>54912
C is cool but some WizAnons might be at different levels…

Absolute beginners should look here and ask for help. http://www.cs.cornell.edu/courses/cs113/2006sp/

[note: the /2006sp/ can be changed to 2004-2008 and either "sp" or "fa" after. Very basic course but may need to ask for help.]

At a higher level read the book "Expert C Programming. Deep C Secrets" by Peter Van der Linden (1994).

That is the book with a blue fish on orange cover. Yes, 1994 was before C99 standard… Yes, the book is out of print… Yes, the copyright is still in effect… If you can aquire a copy it is a good book!

The cs360 course will need just a little familiarity with UNIX. All this stuff is old, become a Unix Gray Beard today!

 No.54919

File: 1597840721517.jpg (121.83 KB, 800x600, 4:3, v.jpg) ImgOps iqdb

>>54912
That's not a jank shell because it has bloated features like handling signals and shell redirection. What next, handling backspace correctly?

>What about two weeks per chapter? There are no public homeworks just the labs, we will have to come up with suitable exercises.

I've been doing systems and embedded stuff for coming up to a decade, so the course wouldn't be much use for me. We could collab on the exercises though.

 No.54973

I would like to make a Scheme interpreter in C.
Sounds easy, right? Well I have no idea where to start. I do know there's an online book about just that, I did start it once but put plainly it is shit.
Does anyone know a serious resource that actually goes into some level of detail on how to go about this? The book I mentioned (BYOL) it all does it for you, leaving you right where you started.
I was thinking a book about interpreters (rather than compilers) and the theory behind writing one. GC, parsing, executing code (bytecode? JIT?) , etc.
Thank you!

 No.54974

File: 1598163066274.jpg (511.64 KB, 850x680, 5:4, 1369457518268.jpg) ImgOps iqdb

>>54973
Most books about implementing lisp-like languages tend to focus on scheme actually. That includes "Lisp in Small Pieces" (LiSP). Some of those books are also out of print…

Sorry to say not an expert. you have a bunch of reading ahead! https://icem.folkwang-uni.de/~finnendahl/cm_kurse/doc/schintro/schintro_toc.html

 No.54986

trying to learn gpt2 so i can play around with it. python still needs regex installed, apparently it requires a fucking 5GB windows sdk install of visual studio c++ build tools. are you absolutely shitting me? regex in other languages is built in. how the fuck is this possible. fucking python lmao

 No.54987

>>54986
nvm, it's only like 1.5GB, the rest isn't necessary i think. but still, a python module requiring this… why can't they just use PCRE or something

 No.54997

File: 1598275222785.jpg (148.39 KB, 1058x1339, 1058:1339, yurika.jpg) ImgOps iqdb

>>54973
>Sounds easy, right? Well I have no idea where to start.
I would start with the simplest part.

typedef struct {
    void *car;
    void *cdr;
} list;

list *cons(void *car, void *cdr)
{
    list *pair = malloc(sizeof(list));
    pair-&gt;car = car;
    pair-&gt;cdr = cdr;
    return pair;
}

void *car(list *t)
{
    return t-&gt;car;
}

void *cdr(list *t)
{
    return t-&gt;cdr;
}

int main()
{
    list *env = cons((int *)1, cons((int *)2, NULL));
    printf("%d\n", car(cdr(env)));
    return 0;
}

Then, see if you can transform a stream of tokens from stdin like (a b c) into a list structure. eval will traverse your list expression and the environment list to look for special forms to apply.

With an environment containing

cons(symbol("+"), cons(add, NULL))

the special form in eval

if (op) return apply_op(op, evlist(cdr(e), env));

will apply the function pointer add to the rest of the evaluated arguments in expression e.

>I was thinking a book about interpreters (rather than compilers) and the theory behind writing one. GC, parsing, executing code (bytecode? JIT?)

The difference between interpretation and compilation is a matter of degree. Nearly all languages are first tokenised and hierarchically structured into trees (lists) before being transformed further. In Lisp there's no difference between your program and that structure.

 No.54998

>>41214
Can someone link me to a good webhosting guide?
I'm getting cucked by cpanel, it has denied my entry into my directory and i cant even change file names wtf

 No.55013

>>54998
I don't think you know what that word means…

Whatever, cPanel should have something called the "File Manager". It might be possible your version and/or configuration looks different than others. It might be possible there are bad permissions on home directory.

https://www.tutorialspoint.com/cpanel/
https://www.youtube.com/watch?v=QewtTsPXk2I
https://www.websitebuilderexpert.com/hosting-websites/

>>54997
>>54973
It isn't standard lisp/scheme, but a fun thing to do is extending rui314's minilisp!

PUBLIC DOMAIN https://github.com/rui314/minilisp

New special forms CAN BE implemented using macros. Minilisp uses "fexpr" style macros (a historical but obsolete kind of macro system) but uses them to implement `let` forms and `progn` forms etc. in example programs.

Or add new features via C code, you don't need to fully understand the garbage collector if just imitate preexisting functions as examples.

For example, an ADD (+) already exist but not MUL (*). Copy & paste the ADD function, rename it to MUL, modify the code to multiply instead of add keep the other stuff the same!

Don't forget to add a call to `add_primitive()` inside `define_primitives()`.

Minilisp doesn't have keywords like `&key` or `&rest` but a function's arguement list can be declared with a dotted pair (function will see that last arg as either nil or a list). It isn't standard but is pretty nifty!

 No.55014

File: 1598312281785.png (58.99 KB, 714x292, 357:146, ClipboardImage.png) ImgOps iqdb

made a skew correction thing for images containing text today. it just uses imagemagick to median filter > canny edge detection > hough line transform. then you can just look at the line data, the angles and so on, to determine which angle is the strongest and apply a rotation based on that

because it's not actually looking at the text, if the image's text is more upside down then normal, the result will stay upside down. to figure if it needs flipped or not i think is just a matter of passing it to tesseract and seeing which version contains more text

 No.55017

>>54973
It's not in C, but one of the projects of Berkeley's CS61A course is to implement a scheme interpreter in Python. They give you the skeleton code for lexing into tokens, but other than that most of the meat regarding environment lookups, lexical scoping, and eval/apply metacircularity is implemented by you. This might be worth going through.
https://inst.eecs.berkeley.edu/~cs61a/fa18/proj/scheme/

Also for a full featured book regarding writing an interpreter: http://www.craftinginterpreters.com/

 No.55032

File: 1598452380377.jpg (116.71 KB, 539x600, 539:600, mugi.jpg) ImgOps iqdb

>>55013
That Lisp is written in a clunky way (the environment and primitives could be defined together without registering functions) but it's pretty comfy to use. The print function in particular is clearer than mine.

>Minilisp doesn't have keywords like `&key` or `&rest` but a function's arguement list can be declared with a dotted pair (function will see that last arg as either nil or a list). It isn't standard but is pretty nifty!

The dot notation for variadic argument lists is the old skool Scheme 1 way. Apparently in Maclisp &rest wasn't necessarily standard at first, so it may be older.

>>55014
That program would have been handy when I was manually aligning scans for a short booklet. Nice work wiz.

 No.55049

File: 1598546169717.png (126.36 KB, 700x326, 350:163, ClipboardImage.png) ImgOps iqdb

>>55032
>That program would have been handy when I was manually aligning scans for a short booklet. Nice work wiz.
that's kind of why i made it. i have spent years doing image processing stuff for fun with image editors, doing each step manually at a time. after learning to program, the manual labor from before feels like a big waste of time since you can just make your computer do it for you. here's something else that's kind of related i'm working on for grabbing paper from photos

 No.55054

>>54829
>>54830
>>54831
I tried PPaP when I was just starting out and Bjarne is honestly a bad teacher. Brilliant computer scientist. Bad teacher. His choice of where to start out, what to focus on, etc… they were bad. Unengaging, and focusing on the wrong stuff, and dumping too much info on you too fast.

So instead I went over to Deitel & Deitel C++ and worked through that for a while, and it actually explained a lot of the basics that Bjarne had glossed over, as well as offering more interesting exercises, once I'd gotten those basics down I switched back to PPaP and it was a lot easier to work through.

 No.55056

File: 1598621054900.png (82.26 KB, 300x169, 300:169, 20200816_193210.png) ImgOps iqdb

>>54905
We can use the lainchan.org mumble server (default port) as long as we talk about programming and don't mention that we're from wiz.

 No.55062

File: 1598655745987.png (231.14 KB, 354x426, 59:71, christmaslain.png) ImgOps iqdb

>>55056
Lain's mumble server has nobody on it… And the app requires microphone permissions.

What is wrong with IRC? They have a #programming channel over there.

Whatever, how do I recognize you then?

 No.55068

>>55062
Do you have anymore nice images of lain? Top to bottom?

 No.55073

File: 1598722886344-0.png (64.88 KB, 1186x703, 1186:703, 2020-08-29.png) ImgOps iqdb

File: 1598722886344-1.jpg (179.09 KB, 1000x562, 500:281, darj.jpg) ImgOps iqdb

>>55032
>print function in particular is clearer
and fixed.

 No.55100

File: 1598810643112.png (37.94 KB, 524x425, 524:425, cond.png) ImgOps iqdb

>>55073
You gave that minilisp a try too, cool! I couldn't implement (cond <clause-list>) by using macros…

 No.55101

File: 1598811783169.png (41.13 KB, 524x425, 524:425, cond2.png) ImgOps iqdb

>>55100
Bug fix.

 No.55109

File: 1598874340719-0.jpg (90.46 KB, 800x697, 800:697, 1595010135487.jpg) ImgOps iqdb

File: 1598874340719-1.png (57.94 KB, 1526x1007, 1526:1007, 2020-08-31.png) ImgOps iqdb

>>55100
>You gave that minilisp a try too, cool!
I used it for a few minutes before stealing the print function. I find the rest of the program pretty ugly tbh.

>I couldn't implement (cond <clause-list>) by using macros…

A cond is just a series of ifs whose elses are ifs. (cond (a 1) (b 2)) is the same as (if a 1 (if b 2)), therefore you can accumulate the ifs by walking down the arguments passed to cond. In theory you could implement this (or anything else without side effects) just using lambda.

(defmacro cond (a . b)
  (defun make-cond (e)
    (if e (list 'if (car (car e)) (car (cdr (car e)))
                (make-cond (cdr e)))))
  (make-cond (cons a b)))

Pic related shows this in minilisp.

 No.55116

File: 1598887042870.jpg (84.58 KB, 800x400, 2:1, article-217.jpg) ImgOps iqdb

>>55109
That helper function is lexically scoped and reduces complicated quoting somewhat… Helper functions don't need to be anonymous lambdas. Nice trick!

I ought to try that technique out. Thanks! =)
(defun length (list)
  (defun helper (n list)
    (if list
      (helper (+ n 1) (cdr list))
      n))
  (helper 0 ls))
&lt;function&gt;
(length '(1 2 3))
3

 No.55143

File: 1599005454805.png (167.07 KB, 1000x984, 125:123, shapes.png) ImgOps iqdb

tried making a shape classifier that just looks at outlines as a 2d waveform and turns that into a 1d barcode type of thing. there is too much info being lost converting it to 1d, but for very distinct shapes it does work. it doesn't work well for round things though, it can't even identify a circle for example lol. you can see the scribbles i converted into distinct datasets on the right side, and on the left which dataset it thinks the input image is most similar to

 No.55665

File: 1602555132577.webm (138.79 KB, 719x638, 719:638, vim-manuever.webm) ImgOps iqdb

Been using vim for a few months

 No.56018

File: 1605221047319.jpg (184.04 KB, 1920x1080, 16:9, 1604978565886.jpg) ImgOps iqdb

>how do i split a dynamic array into 4 equal parts for threading
>spend an hour messing with quotient and remainder of length of divided array for an arithmetic solution
>just split the array twice

 No.56038

>>56018

There are times where you just need to get up and walk away from the computer for a bit. This was one of those times.

 No.56072

any binaries for a self contained machine learning system that i can use? something that just fucking works out of the box. i cant fix python dependency hell trying to set up gpt2, trabsformer, pytorch, etc and similar shit, everything is outdated, missing files, incomplete, undocumented. i dont care if it's inefficient or old as long as it works. how is there not a market for this

 No.56112

>>56072
Docker is meant to solve problems like that. I used one recently, but I don't remember the author/name. Have you tried https://github.com/anibali/docker-pytorch? It was high in the search results that I found. I've never had a problem pip installing pytorch on a fresh pyenv, though, with or without a gpu on the system. Not recently, at least; I remember a while back having a hell of a time doing all the bootstrapping and such for tensorflow, but maybe that's better now.

 No.56114

>>56112
yeah i didnt say tensorflow but thinking back that wasnt good either. ive never used docker, though ive heard and read things mentioning docker containers for years. i guess it's something worth checking out, i have all tomorrow i can fiddle around. thanks

 No.56115

>>56072
Have you tried Darknet? It's written in C and fully open source.
Conspiracy time: AI is written in shitlangs and kept in dependency hell and hidden behind 500 arcane libraries to ensure independent devs never produce a new competitive AI algorithm(not training, just the algorithm)

 No.56220

File: 1606862365318.png (141.6 KB, 1366x768, 683:384, binsearchscrn.png) ImgOps iqdb

Learning about search algorithms. Implemented binary search to help understand it.

(defparameter *xampl* (loop for i from 0 to 980 by 20
			 collect i))

(defun bin-search (ls x)
  (loop for i from 0 to (log (length ls) 2)
     with l = 0
     with r = (1- (length ls))
     with m = 0
     initially ;;(format t "~a~C" ls #\newline)
       (format t "~a indices to search. log₂(~a) = ~F max divisions to reach it.~C" (length ls) (length ls) (log (length ls) 2) #\newline)
     when (&gt; l r)
     return (format t "~a divisions and ~a not found." (1- i) x)
       
     do (setf m (floor (+ l r) 2))
     do (format t "Index ~a: ~a~C" m (nth m ls) #\newline)
     ;;(format t "L: ~a    R: ~a~C~C" l r #\newline #\newline)

     when (&lt; (nth m ls) x)
     do (setf l (1+ m))

     when (&gt; (nth m ls) x)
     do (setf r (1- m))

     when (= (nth m ls) x)
     return (format t "~a divisions to reach index ~a: ~a" i m (nth m ls))

     finally (format t "~a divisions and ~a not found." (1- i) x)))  

 No.57145

File: 1614230509478.png (79.64 KB, 1043x845, 1043:845, Untitled.png) ImgOps iqdb

Someone please help me I can't figure out how this part works in Stroustrup's calculator source code from PPP(Programming Principles and Practices using C++.pdf). How does the putback function "operate" on the cin stream? Thanks.


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