[ home / board list / faq / random / create / bans / search / manage / irc ] [ ]

Catalog (/prog/)

Sort by: Image size:
R: 86 / I: 13 / P: 1

How to get a solid foundation in compsci mathematics

This guide assumes you forgot everything from highschool. No you don't have to learn any of this in order to program you can just start hacking around every .c file in your kernel.org git source clone and see what happens. Why would you want to learn math? Because it will change your thinking. You won't be easily fooled by bullshit, you will have tools to sort through obvious logical fallacies. You will be able to optimize programs and create your own algorithms. You will be able to estimate. Above all, you will be able to solve problems using computation which is what computer science is all about. And least of all, you will get paid more than anybody else without this knowledge so if your goal is shekels then read on. Note: DO THE EXERCISES. You won't learn otherwise. Books instead of video lectures were chosen because they've lasted 30+ years some of them in relevancy in the field, also lectures disappear all the time like when MIT nuked all one prof's Physics OCW lectures because he tried to pickup a student, setting a precedent that at anytime this information can disappear. Read a book nigga.

Math Preliminary

Basic Mathematics by Serge Lang

Buy/Pirate this book (he's dead). It's highschool math, from the perspective of a Mathematician. You will learn up Pre-Calculus and be prepared for rigorous proofs later.

An Introduction to Mathematical Reasoning" by Peter J Eccels

This changes you from rote drilling and being a human calculator in highschool to learning what math actually is, and what proofs do. Excellent, excellent book.

How to Solve It by G. Polya

How to do proofs, written in 1940s and still for sale in every Chapters/B&N bookstore to this day because it's the best proof helper that exists.

Welcome to Proofs

Calculus" by Spivak

Actually, you are learning ANALYSIS, in addition to calculus. Torrent the 3rd edition w/the answer book. This is a fucking hard assed book, you may be better off reading "Advanced Calculus" which is actually easier, as the intro points out that Spivak's exercises are difficult as shit: http://www.math.harvard.edu/~shlomo/docs/Advanced_Calculus.pdf

Discrete Math Intro

http://cglab.ca/~michiel/DiscreteStructures/ it also comes with lectures on jewtubes https://www.youtube.com/channel/UCG96LXNYz9x7eTqSRtQ2R9A Doing real discrete math and probability.

Linear Algebra by Friedberg, Insel and Spence

Get the latest version (piracy). It's proof centric, this will come in handy later when you need to understand some Linear applications and don't know how something works so can revert back to your training in LA in proofs. LA is heavily, heavily used in all game programming. Also in cryptography and numerous other CompSci fields.

R: 65 / I: 4 / P: 1

Images on prog

Does /prog/ need images?

http://strawpoll.me/2622392

Also you can suggest changes (rules, dashboard).
R: 2 / I: 0 / P: 1

RULES

RULES

No advertising.

Stay on-topic.

No questions like "can someone do my homework?".

Use code tags for code and $$ for math.

No shitposting.

Don't do anything that requires to add more rules.


http://8ch.net/prog/rules.html
R: 5 / I: 1 / P: 1

Rot13 thread!


key = 13
U = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
L = 'abcdefghijklmnopqrstuvwxyz'
rot13 = str.maketrans(U + L, U[key:] + U[:key] + L[key:] + L[:key])

print('rot13 is cool!'.translate(rot13))

R: 0 / I: 0 / P: 1

ITT we discuss

What language do we love most? Why?

For me: C, pointer tricks.

R: 4 / I: 0 / P: 1

Is Java too hard to learn as a first language?

R: 1 / I: 0 / P: 1

Does anyone here freelance, how is your experience with it? Do you make enough for a living?

R: 173 / I: 13 / P: 1
What is the best and worst programming language you've ever used?
R: 3 / I: 1 / P: 1

What do you think about Go, anons?

R: 0 / I: 0 / P: 1

Haxe

I have never in my life seen anybody talk about this programming language.

Personally I love it, since its syntax, libraries, and cross-compile features are amazing.

Is it just because it is unpopular or do I most people dont like it and thats why they dont talk about it.

R: 2 / I: 0 / P: 1

HURT ME MORE SNAKE, MAKE ME FEEL ALIVE AGAIN!



import numpy

"""training data"""
x = numpy.array([[1,1,1,0,0,0],
[1,0,1,0,0,0],
[1,1,1,0,0,0],
[0,0,1,1,1,0],
[0,0,1,1,0,0],
[0,0,1,1,1,0]])

correct_label = numpy.array([[1, 0],
[1, 0],
[1, 0],
[0, 1],
[0, 1],
[0, 1]])

"""initializes weight and bias as zero vectors"""
weight = numpy.zeros((6, 2))
bias = numpy.zeros((6, 2))

def softmax(a_vector):
"""Compute a logit for a vector."""
denom = sum(numpy.exp(a_vector))
logit = numpy.exp(a_vector)/denom
return logit

def softmax_a_set(a_set):
"""computes logits for all vectors in a set"""
softmax_set = numpy.zeros(y.shape)

for x in numpy.nditer(a_set):
x = softmax(x)

return softmax_set

def cross_entropy(logit, label):
"""generates the cross entropy between label and logit"""
return -1*sum(numpy.log(logit)*label)

def train(x):
"""walks the function closer to the best value"""
pass

y = numpy.dot(x,weight) + bias

R: 0 / I: 0 / P: 1

Alice 3

hey is there anyone willing to do my alice homework, will pay in bitcoin

R: 7 / I: 1 / P: 1

Programming while crossdressing

hi /prog/

I'm an extremely average programmer and my code is shit. I started looking into ways to improve my code but couldn't really find any legitimate methods.

then I found pic and it opened my eyes.

my code got a little bit better over the past month of crossdressing and I'm not exactly sure why, maybe it's because it puts me in a good mood,

or maybe it's the determination to get it over with and do the best I can so I won't have to keep trying to explain to my mom why I'm wearing my sister's clothes.

but the real question

is what girl clothes will give me both comfort and improve my ability to program really well?

I expect it to be a few months before I'm really good but I'll never get there without the proper outfit.

thanks.

R: 3 / I: 0 / P: 1

Windows forced me to update so I turned automatic updates off. And it restarted before I hat save.

R: 55 / I: 5 / P: 2

random programming exercise!

Write a program that takes a string of digits and prints them back out in LED style.
./led 1234567890
_ _ _ _ _ _ _ _
| _| _| |_| |_ |_ | |_| |_| | |
| |_ _| | _| |_| | |_| _| |_|


My solution in Python3.
#!/usr/bin/env python3

from sys import argv
from sys import exit

if argv[1].isdigit():
digits = argv[1]
else:
print("gimme digits, fucko")
exit(1)

leds = {"0": [" _ ", "| | ", "|_| "],
"1": [" ", "| ", "| "],
"2": [" _ ", " _| ", "|_ "],
"3": ["_ ", "_| ", "_| "],
"4": [" ", "|_| ", " | "],
"5": [" _ ", "|_ ", " _| "],
"6": [" _ ", "|_ ", "|_| "],
"7": ["_ ", " | ", " | "],
"8": [" _ ", "|_| ", "|_| "],
"9": [" _ ", "|_| ", " _| "]
}


def get_row(num):
return ''.join([leds[i][num] for i in list(digits)])

print("{}\n{}\n{}".format(get_row(0), get_row(1), get_row(2)))
R: 43 / I: 3 / P: 2

Just Fuck a Language Up

>C without pointers

>Haskell without monads

>Java without exceptions

>Python without whitespace

R: 4 / I: 1 / P: 2

I have the knowledge of C but I have trouble translating it to code.

I dont know why this is, I have the idea in my head however when I try I seem to develop autism.

R: 32 / I: 1 / P: 2
beginner noob programmer here who wants to go proffessional as soon as possible. How many hours should I practice? How should I learn? Are YouTube tuts good enough? How will I know if im ready?
Im going for web developement and I have college for two days during the week but Im free the rest of the 5 days and I want to get started proffessionaly as soon as possible.
I apoligize in advance if this seems like shitposting but im serious.
Thanks in advance

And yes pic related, just an imageboard like webpage I designed for practice as I started out.
R: 2 / I: 0 / P: 2

I'm stupid and need help

Could someone please explain to me what is going on in this code?


#include <stdio.h>
#include <math.h>

// (1):
typedef struct
{
double x,y;
} POINT;

POINT c, o, p[10000]; // (2):
double a, q=0.0; // (3):
int n; // (4):

// (5):
double ccw(POINT a, POINT b, POINT c)
{
return a.x*b.y + a.y*c.x + b.x*c.y - c.x*b.y - b.x*a.y - c.y*a.x;
}

int main(void)
{
int i, j;

o.x=-10001; o.y=-47; // (6):
while (scanf("%d", &n) > 0) // (7):
{
if(!n) // (8):
break;
for (i = 0; i < n; i++) // (9):
scanf("%lf %lf", &p[i].x, &p[i].y);
a=0; // (10):
for(i=0; i<n; i++)
a += ccw(o, p[i], p[(i+1)%n]); // (11):

c.x = c.y = 0.0; // (12):
for(i=0; i<n; i++)
{
q = ccw(o, p[i], p[(i+1)%n])/(3.0*a); // (13):
c.x += q*(o.x + p[i].x + p[(i+1)%n].x); // (14):
c.y += q*(o.y + p[i].y + p[(i+1)%n].y);
}

printf("%.3lf\n", fabs(a) / 2.0); // (15):
printf("%.3lf %.3lf\n", c.x, c.y); // (16):
}

return 0;
}

I really can't grasp C at all, no such problems with JavaScript, HTML or XML or even Python (although I haven't really looked into that one yet), but C will most likely kill me for some reason…

I get the basis and some of the theory of what is going on in this particular code (calculates the area of the object formed by the co-ordinates, as well as the center of gravity(? - English is not my native language, so not sure if I got it right)), but I'm fucking done when it comes to how the parts work.

Could someone please explain it to me?

Input for the example:


4
-1 -1
-1 1
1 1
1 -1

R: 2 / I: 0 / P: 2

What projects are you guys working on?

I got a not-yet-conforming to PEP8 Python project.

https://github.com/keithstellyes/Seams-Bot

I have unlimited SMS but limited data, figured I'd just run a script using Twilio for texting. It also can run in a terminal and can be easily ported as an IRC bot or email interface.

Pic related, show me your cool stuff.

R: 10 / I: 0 / P: 2
Anyone wanna learn Android programming with me?

Add meow@hot-chilli.net on XMPP

Use OTR. We can do this.
R: 19 / I: 0 / P: 2

Rust disgusts us

Thesis: rustlang is a theoretically nice language whose community is overrun by mediocre webdevs who see it as a lazy shortcut to get into systems programming without having to learn all the low level stuff.

R: 38 / I: 4 / P: 2

Programming and Weed

I've been smoking/vaping weed on and off for about 8 months now and I've decided to start learning programming. Does marijuana impair one's ability to learn how to code? Should I quit weed altogether and just study programming or is casual use of weed still ok?

R: 6 / I: 0 / P: 2

Learning how to use HTML

I've got a lot of time on my hands for the next couple of days and I'd like to learn how to use HTML and at least be able to make something functional soon. The thing is, I don't know where so start.

I know basic things such as how to format the code so as it can be read and to use a css for pretty much everything but other than that, I'm useless.

Can you please point me in the right direction to start? Thanks.

Also happy New Year.

R: 16 / I: 3 / P: 2

Can I learn to code?

>19 yo

R: 2 / I: 1 / P: 2

Vulkan Thread

Vulkan 1.0 dropped Feb 16, 2016.

Full 1.0 Spec (warning, huge): https://www.khronos.org/registry/vulkan/specs/1.0/xhtml/vkspec.html

Vulkan 1.0 Quick API Reference: https://www.khronos.org/files/vulkan10-reference-guide.pdf

Mantle hello world (almost identical to actual Vulkan use): https://medium.com/@Overv/implementing-hello-triangle-in-mantle-4302450fbcd2

Mantle programming guide and API reference (since the official Vulkan programming guide doesn't land until August): https://www.amd.com/Documents/Mantle-Programming-Guide-and-API-Reference.pdf

Planning to use it? Already using it? What are you using it for?

R: 7 / I: 0 / P: 2

Terminal in C using <curses.h>?

Hello /prog/!

Learning myself C at a steady and slow pace. Now I've learn that creating even the most simple TUI using printf is bloody murder. So I've decided to take it to the next level.

Can anyone please tell me if there's a good tutorial on how to create terminals using <curses.h> (or some other library).

R: 4 / I: 2 / P: 2

ITT: Prove your worth

Let's play a game.

>Pick a open source project you like/hate/think is horribly buggy or bloated

>post example code on how to make something it does better

>Hard Mode: Test and commit the change to the project.

>Damn Fine Autism Mode: Show profiled proof that your change made it better. Valgrind.

8ch shut the fuck up this isn't even flooding yet

R: 84 / I: 5 / P: 2

Editor Wars

What are ya hackin' with, /prog/?

R: 107 / I: 6 / P: 3

Unpupular opinions thread

Share your unpopular opinions. I'll start:

I think Python is the best general purpose language if speed doesn't matters.
R: 8 / I: 0 / P: 3

PHP

FUCKING SHIT STUPID ASS PHP, WHY AIN'T THIS WORKING!

function SYS_newsFeed(){
$file = websiteURL()."/assets/database/feeds/news.txt";
$text = readfile($file);
$newsfeed = parseCode("$text");
return(parseCode($newsfeed));
}

It throws up exactly what is in the text file, but with 54 at the end AND parseCode doesn't fucking do its job and replace "%a%" with "<span style='color:#99ff99'>" what the hell am I doing wrong?

R: 14 / I: 0 / P: 3

prog=math?

/prog/ why the people say that math is so importan for programming… I started programming in the last year, and I didn't need more than the basics operation.

>ohggg faggot u don't know nothing of programming, kill u plz.

R: 11 / I: 0 / P: 3

>Be me

>work in low-level kernel/driver development

>Working long nights to get everything done as soon as I can

>bi-annual performance review comes up

>MFW my boss says he's disappointed because I don't talk to the other employees

>apparently its a problem that none of them know anything about me

What are some fields where I can find a programming job that doesn't involve talking to normies or anyone else? I'm a motivated self-learner who's willing to do whatever it takes to get the job done on time as long as it doesn't involve interacting with other people.

R: 26 / I: 3 / P: 3
>huuurrrrrr teach kids to "code"
>teach them pleb languages like javascript
R: 55 / I: 1 / P: 3

Gotta' Go Fast

What is the fastest way to program?
R: 7 / I: 0 / P: 3

Some say...

…syntax doesn't matter, but that's obviously bullshit, since programming languages are just another user interface.

However, is there serious research about effectiveness, readability etc pp.?

Not necessarily limited to programming, but also text in general?

R: 7 / I: 0 / P: 3

CompTIA Linux+ Cert [Books] - Question

Hello there people with no lives and girlfriends.

I've this question that I would like you to answer for me, please.

This Linux+ book came out just recently and I there is this other 2 books that are a bit older but not that much, should i buy the newest or not? I know new =/= good.

>1.CompTIA Linux+ / LPIC-1 Cert Guide BY Ross Brunson and Sean Walberg (thats the newest one)

http://www.amazon.com/CompTIA-Linux-LPIC-1-Cert-Guide/dp/078975455X/ref=sr_1_1?s=books&ie=UTF8&qid=1452380509&sr=1-1

>2.Linux+ Guide to Linux Certification 4th Edition by Jason W. Eckert (I was told it's good)

http://www.amazon.com/gp/product/1305107160?keywords=Linux%2B%20Guide%20to%20Linux%20Certification%20eckert&qid=1452380460&ref_=sr_1_1&sr=8-1

and finally…

>3. CompTIA Linux+ Study Guide: 2nd Edition by Roderick W. Smith (seems like everyone advises this one and that it's the best and easy to follow.

http://www.amazon.com/gp/product/1118531744?keywords=linux%2B%20roderick&qid=1452380558&ref_=sr_1_1&sr=8-1

Now what do you think guys?

ps before you mention RHCSA is much better, don't worry thats on my mind too but everything in its own time.

R: 3 / I: 0 / P: 3

I wrote a python script to download images from tinyboard/vichan imageboards.

It works on every imageboard I try except 8ch, which gives me a 403 forbidden error. I tried changing my user agent within the script (perhaps unsuccessfully), but still 403. What gives?


#!/usr/bin/env python3

import argparse, bs4, os, urllib.request, urllib.parse

parser = argparse.ArgumentParser()
parser.add_argument("url", help="Link to thread")
parser.add_argument("-d", help="Directory to download to")
args = parser.parse_args()

if args.d:
if not os.path.exists(args.d):
os.makedirs(args.d)
os.chdir(args.d)

soup = bs4.BeautifulSoup(urllib.request.urlopen(args.url))

domain = urllib.parse.urlparse(args.url).netloc
http = urllib.parse.urlparse(args.url).scheme + "://"

for link in soup.find_all("p", class_="fileinfo"):
image = http + domain + link.next_sibling.get("href")
filename = image.rsplit("/", 1)[1]
if not os.path.exists(filename):
urllib.request.urlretrieve(image, filename

R: 2 / I: 0 / P: 3

Reading 3 programming books at once

Hi /teck/ ! I want to learn a programming language and i've found 3 good books but I'm wondering about if I should read them in the same time or one by the other

And thank you !

R: 2 / I: 0 / P: 3

Compsci-related Physics Books

Hey /prog/, I'm looking for some compsci-related physics books other than pic related. Discovered it thanks to the godlike sticky.

Even RMS got his B.A. in the field. There must be at least a few others that are useful for programmers.

R: 3 / I: 0 / P: 3

/prog/, have you worked on a distributed extensible autonomous REPL before? How would I go about it?

R: 5 / I: 0 / P: 3

ADVANCED HACKING TOOLS.zip DOWNLOAD

ADVANCED HACKING TOOLS.zip DOWNLOAD

https://archive.org/details/ADVANCEDHACKINGTOOLS

R: 3 / I: 0 / P: 3

Programming practice

Hi guys I'm new to this board.

I know a bit of C++ and Java, but I don't know how to expand my knowledge/get some practice.

So I thought that once a week an "exercise" can be posted and those who want post their code in that thread, with more experienced programmers giving pointers and advice.

First exercise:

Program a fridge with the following properties:

-Is the cooling process working, if not where did the error occur.

-It needs to know if the compressor should work or not based on the internal temperature of the fridge.

-A list of the Items inside and their expiration date.

-The amount of space left inside in cm³, because metric system.

-Anything else you can think of.

R: 6 / I: 1 / P: 3

Python

Greetings good sirs, python and I went our seperate ways a really long while ago, and the last shitty script i had written before is a web scraper using python 2.

Now that my python skills have rusted, I have been meaning to get into it once again, I have been wondering wether python 2 is outdated or not.

Should I start considering working with python 3 instead of 2 ?

R: 3 / I: 0 / P: 4

How plausible is finding a remote job as a middle C++ dev?

One of my internet buddies works through upwork, but based on what I've heard from him, it's not very pretty. Remote jobs are mostly web-related and very few job propositions that are there quite often are small, low pay contract jobs that have tons of indians competing, promising that they'll make it for free and this instant.

R: 3 / I: 0 / P: 4

Learn to Program

Alright, faggots. You're going to take a first-year computer science class at MIT.

https://www.edx.org/course/introduction-computer-science-mitx-6-00-1x-6

Register. It starts next week.

>But Python is for plebs!

Well, good thing that Harvard is running a course that uses C and recommends Linux. No excuses. This one is even self-paced.

https://www.edx.org/course/introduction-computer-science-harvardx-cs50x

>But muh blub languages

I SAID NO EXCUSES. Here's a course that uses Scheme. This one is also self-paced.

https://www.edx.org/xseries/systematic-program-design

Those are your choices. If you don't choose any of these, you're a lazy sack of shit.

Even if you already know the basics of programming, you will almost definitely get something out of these if you haven't had a formal education yet.

If we do it together, we can make threads about it and encourage each other. I'm doing the third one, and I've been programming for 2 years.

R: 2 / I: 0 / P: 4

Help me with scripts

Guys, I had this script which enabled me to make my computer write whatever I chose, using Chrome. It no longer works. Why? and how to fix it?

I'll copypasta the script in the thread.

R: 9 / I: 1 / P: 4

Lads I have been trying to teach myself c++ and this exercise from my book is driving me crazy!

"Write a program in which you create a Text class that contains a string object to hold the text of a file. Give it two constructors: a default constructor and a constructor that takes a string argument that is the name of the file to open. When the second constructor is used, open the file and read the contents of the file into the string member object. Add a member function contents() to return the string so that you can display it. In main(), open a file using Text and display the contents."

I have a full solution that compiles but does not actually store any information from the inputed file (it prints empty lines or sometimes a single } )

http://coliru.stacked-crooked.com/a/d1ab2c2ad4e1b05d

Help me obi-wan you are our only hope

R: 2 / I: 0 / P: 4

i need some serious help. i was in court today and the prosecutor asked the secretary if it was possible to run the vin and see when that vehicle had insurance and when it was canceled and so on. she said no. got me thinking if i can write a code and bring it maybe i can get off. what language would be best for this do you guys think. basically i need the prog to have a search bar to put in the vin. then i need it to search the databases of the insurance companies (with permission of course) just wondering what language and where i should start. writing the code or getting permission. i think i should write the code show it to them then they can get the companies databases since they wouldnt want to give it to a criminal. please help. here is a pic of my baby shaking her bones to trey and the gd at fare thee well gd50

R: 12 / I: 0 / P: 4

Thought I'd come here to ask:

I'm trying to self-teach programming so that I can find a job doing it, though the main reason is I want to write my own games since modern games are shit and I want more Tactics Ogre and Sengoku Rance.

I have begun by picking up "Java: A Beginner's Guide 6th Edition" by Herbert Schilt and am working through it now. I'm in chapter 4 now, which is about classes and methods, and it is making me really excited.

Question, though: am I learning the right language? What other steps should I take? I have looked at github and it very confusing to me, but then again I only started in earnest about a week ago. I know that it's possible to develop games with Java 8 and libgdx, but I also want to make sure I can get a job with the skills I'm learning because my current one (teaching middle school) is the worst fucking job on the planet.

If this isn't the right place to ask I'll delete my post,

R: 3 / I: 0 / P: 4

Yearly Library Thread

Hello /prog/,

I would like to start off this new year by committing to learning at least 1 new, major library or SDK. Why only 1 library for the year? This way we don't end up hopping from library to library without gaining any real skill. This way we get to master it.

I suggest these:

>Android (make mobile apps, make money!)

>OpenCL (accelerate your computation, put that graphics card to better use!)

>Qt (gui's and so much more!)

>SQLite (master your data!)

Alternatively, it would also be very useful for any anons looking for a job to master machine learning techniques. I was thinking of working through pic related for starters. Would any anons be interested in learning neural nets / svm's / relevant tools, techniques, and libraries instead?

Who else would be interested in this? Are there any very useful, very practical libraries you would recommend beyond those listed?

After we settle on a library / learning we work through it for the year, post code, results, ideas, advice, explanations, and keep each other motivated.

R: 2 / I: 0 / P: 4

whatsapp spy

hey anons my friend know a way to spy on anyone by only his number He didn't want to tell me the whole secret to me but told me he uses Spyware script autoresponder by sending a sms to the victim with a kind of code and Then he will have the access to go get the whatsapp database and coby it and but it in bluestacks and it works if anyone know what he is doing or another way to spy on whatsapp accounts

R: 2 / I: 0 / P: 4

A distributed javascript forum

Using localStorage, the forum's content can be stored offline in the browser, which'd then get synchronized between online users with Peer.js.

There'd need a signalling server to introduce users to each other, but the server-side database load would be absolutely zero. And client-side localStorage has a limit of 10MB per domain, but I think that can be worked with if it doesn't grow excessively big, or maybe it can be circumvented somehow.

You could just go to your regular php file manager and upload an index.html, then go to yourhost.com/forum/ and the forum would be there, wholely javascript without page loads.

R: 2 / I: 0 / P: 4

Jquery/jquery mobile help

I need help. I am working on a text editor for mobile and its a hybrid app, so its made with web technology. Everything is fine and all until I want to make a button that bolds future text, kind of like in Word. But I can only find one that makes everytext in the text area bold. This is not what I want. I cant find any help on how to do this in Javascript/Jquery on the internet.

This is what I have with jquery and jquery mobile:

$("#bold").on("tap",function(){

$(".editor").toggleClass("bold");

});

It makes every text in the editor bold. I want to make only future text bold.

Can someone help me?

Thank you

R: 1 / I: 0 / P: 4

Bad code

Bring all dirty, disgusting and generally cancer code here.

I start

http://pastebin.com/DYCcxWER

Because "Hello, World!" is too mainstream

R: 2 / I: 0 / P: 4

This seems to be the best board for this question, what are the most important Terminal commands to know? So far, I only know the following.


pwd
ls
cd
sudo -i
vi(m)
apt-get install
gcc -o file *.c

R: 2 / I: 1 / P: 4

Books to read

Just started my first year in my computer science course at university, just wondering what the good books are to get a head start

R: 2 / I: 0 / P: 4

how to customize my board in 8chan ?

R: 1 / I: 0 / P: 4

so, i was thinking about starting the development of a "normal" program, and i have honestly no idea how to that, since i never created something with a proper interface.

with "normal" i'm talking about a program meant to be used by not expert, with the standard stuff like automatic re size of windows and stuff like that. The office family is pretty much my idea.

are there some libraries that allow you to implement standard features like control+z?

do they have a simple graphic engine?

and how "normal" programs are even called?

R: 4 / I: 0 / P: 5

How acceptable is calling external commands?

Hi, for years, I've been writing most of my things in python, where it's completely unacceptable to be calling external commands, and been working on low level things with C and assembly, where I barely even need libc most of the time, so calling external commands in a program other than a shell script is very weird to me.

Now, after opening my eyes to (the awesomeness that is) lua, I'm wrapping a script around a tool written in shell (can't be written/it's very cumbersome to write in anything else, for a number of reasons). I'm also calling curl somewhere in the script. I do this because I've used libcurl in C before, and to me, the library doesn't seem to be made for using it to simply get a file, and instead, the command line interface is.

I'm aware that calling external commands breaks portability, but that is a non-issue in this case.

Now, I'm debating if I should either call find -type f or use LuaFileSystem to recursively iterate over every file in a directory.

I'd like to know: What is the most acceptable option, calling curl and find, or using their respective libraries? Also, is one of the options actually objectively better?

R: 0 / I: 0 / P: 5

I would appreciate if someone could find some repos for a nice BBS or booru template I can work with. For some context, I'll be implementing VMs as a page central feature

I was thinking reddit style groups would have a single communal VM with posts optionally linking to the filesystem. So a booru or IB might provide an interesting model twist. Also mongoDB would be ideal. The less database and language there is web-facing, the smaller the attack vector.

R: 4 / I: 0 / P: 5

 
var a0 = document.getElementsByTagName("audio")[0];
var a1 = document.getElementsByTagName("audio")[1];
var a2 = document.getElementsByTagName("audio")[2];
var a3 = document.getElementsByTagName("audio")[3];

How to do this in a for loop?

R: 1 / I: 1 / P: 5

>mfw this board isn't about progressive rock

R: 4 / I: 1 / P: 5

What are some cool programming exercises

Hi /prog/,

computer science student here. At one of my courses I recently learned Scala and to finish it I need to write a program together with some other guy. The decision what we program is up to us, but it should have the amount of work a chat or a webcrawler would have.

The only problem: I have no idea. Any cool ideas would be appreciated.

R: 10 / I: 0 / P: 5

Disgusting features

What is something you hate about programming in general?

In other words, what programming features do you hate most that nearly every language incorporates?

Personally, I fucking loathe falsiness.

I hate it when any language inherently treats 0 as false, or empty strings, or empty lists, or NaN floating point values. It's excusable in C, and in C++ for C compatibility, but any language with a dynamic type system has no excuse.

The only things that should evaluate false are an actual boolean false value, or a null pointer (ie. pointer type with a null value, where type is significant, as integer 0 should still evaluate true).

R: 2 / I: 0 / P: 5

Improvement

Sup /prog/,

I am currently at uni and I am also working as a dev. I've been programming for 3-4 years but I feel like I'm stuck on a platoe. How can I improve? I have 2-3 projects I've completed but they're not very serious.

I can work with Python/C++/Rust/C#/Java/C but I spend most of my time working with Python and Rust.

I tried starting to pick up some CS in order to help me but I'm unsure if this will help me be a better programmer.

What advice would you give me?

R: 4 / I: 1 / P: 5

Dear anybody with a career in computer science

Hi /prog/.

I'm 17 and in my Senior year of high school. I love programming, and I recently scored an internship at a Software Engineering/Cybersecurity firm. I was one of 3 people out of the 10 that were interviewed that was chosen. I'm pretty pumped about it, and feel like this could lead to opportunities.

But I still want to talk to people that are farther than I am.

If this internship leads to some sort of apprenticeship that I can learn significantly more from, then I don't think I'm going to head straight to college to start working on a degree in Computer Science, mainly for debt and time-saving reasons.

However, if it doesn't, I'll probably head to community college and take classes to get knowledge and experience that I need to get started in the field.

What I want to know is, what did you do to get a career in programming going? What do?

I posted this on /g/ as well, but since this board is strictly about programming, I feel I should mention that I know HTML, CSS, some JavaScript and C++, and have been learning Java for a little bit (definitely looking like my favorite thing I've learned thus far).

R: 1 / I: 1 / P: 5

CRYPTOGRAPHY ARCHIVES.zip DOWNLOAD NOW!!!

Get it now, a great wealth of a resource on Cryptography!

CRYPTOGRAPHY ARCHIVES.zip DOWNLOAD NOW!!

https://www.mediafire.com/?os3yc50tol5slzw

R: 12 / I: 5 / P: 5

colorschemes

Enough arguing about languages, about editors, and about operating systems.

Let's argue about colorschemes.

I alternate between wombat256mod and a hand-modified eva01.

What colors are your favorites?

R: 55 / I: 0 / P: 5

fuck everyone

I'm so sick of these fucking people saying shit like "I'm gonna go do some C++" or "what programming language do i need to learn to be able to suck cock professionally?"

So many fucking ignorant wannabes with absolutely no ability to think for themselves.

Just like in 'real life', THE LANGUAGE YOU SPEAK HAS ABSOLUTELY NOTHING TO DO WITH WHAT YOU ARE ABLE TO EXPRESS. It has to do with your experience and how you use it to connect to the world around you.

platform > language

The point of the software is to interface with the hardware. Hardware comes with its own interfaces to support this. Any language you use is going to have to interface with these interfaces in the same exact fucking way. Whatever path gets you closest to the functionality you NEED (but not necessarily want) from the hardware is the best path. People go into projects with all these horrible fucking ideas about what it needs to be and look like and end up making some completely impractical, shallow, vision-less shit.
There is literally no good software written anywhere. This phenomenon of dysfunctional engineering rife with "bugs" is not tolerable if humans are to progress as a race.

Because dainty faggots need some one to do most/all of any given workload for them, we have this endless bloat of APIs, engines, etc. with absolutely no creative vision, which is the main cause of the endless array of useless, meaningless, shit products polluting our lives.

Be a real fucking person, think for yourself or kill yourself
R: 5 / I: 0 / P: 5

So, whst do you guys do for some inspiration? I usually look at other peoples work or watch some tutorials. Pic related

R: 2 / I: 0 / P: 5

PORN

A script that starts a local server at

127.0.0.1:8000
and serves random images from booru sites indexed by the cure.ninja/booru API. I wrote mostly this because webms seem to be broken on the site even after disabling referrer headers, but also because I'm planning to maybe make this into a fap gauntlet thing later.

Requires Python 3, uses only standard library modules. Images are not saved to the hard drive.

Originally intended to implement this in HTML, but it turns out working around CORS is a pain in the ass.

Usage: run

python3 file.py
, then point your browser to
127.0.0.1:8000
. Refresh the page or click on the image.

query = "-s"
# change this query to whatever, ex. "tanline+naughty_face+-s"
# See https://cure.ninja/booru/about/api for more information.

# This weeaboo porn scraper is licensed under the
# DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
# Version 2, December 2004
#
# Copyright (C) 2xxx ure mum m8
#
# Everyone is permitted to copy and distribute verbatim or modified
# copies of this license document, and changing it is allowed as long
# as the name is changed.
#
# DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
# TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
#
# 0. You just DO WHAT THE FUCK YOU WANT TO.

import http.server
from urllib.request import Request, urlopen
import socketserver
import json
import sys
import time
from datetime import datetime, timedelta

PORT = 8000

order = "r"# r=random, see API details for more options

request = {}
results = []
curImg = 0
page = 1

start = time.time()
def getElapsed():
sec = timedelta(seconds=time.time()-start)
d = datetime(1,1,1) + sec
return str(d.hour) + " hours " + str(d.minute) + " minutes " + str(d.second) + " seconds"

def fetch(u):
print("fetching " +u)
r = Request(url=u)
r.add_header("User-Agent", "Mozilla/5.0 ;Windows NT 6.1; WOW64; Trident/7.0; rv:11.0; like Gecko")
response = urlopen(r)
return response

def fetchResults():
global query, order, page, results

requrl = "https://cure.ninja/booru/api/json/"+str(page)+"?o="+order+"&f=a&q="+query
res = fetch(requrl)

jsn = json.loads(res.read().decode("utf-8"))
for r in jsn["results"]:
results.append(r)

page += 1

def getType(url):
ctype = ""
urlend = url[-10:]
if urlend.count(".jpg") or urlend.count(".jpeg"):
ctype = "image/jpg"
elif urlend.count(".gif"):
ctype = "image/gif"
elif urlend.count(".png"):
ctype = "image/png"
elif urlend.count(".webm"):
ctype = "video/webm"

return ctype

class Handler(http.server.SimpleHTTPRequestHandler):
def do_GET(self):
self.send_response(200)
if self.path.count("i="):
iurl = self.path[self.path.index("i=")+2:]
self.serveImage(iurl)
else:
self.servePage()

def serveImage(self, url):
ftype = ""
img = fetch(url)

data = img.read()

ctype = getType(url)
self.send_header("Content-type", ctype)
self.send_header("Content-length", sys.getsizeof(data))
self.end_headers()
self.wfile.write(data)

def servePage(self):
global curImg, page, results
self.send_header("Content-type","text/html")
self.end_headers()
if (curImg) >= len(results)-1:
fetchResults()
self.wfile.write(bytes(

("""
<!DOCTYPE HTML>
<html>
<head>
<title>"""+str(curImg)+": "+results[curImg]["tags"]+"""</title>
</head>
<body>
"""+
("""
<a href='http://127.0.0.1:8000/"""+str(curImg+1)+"""'>
<img style="max-width:100%" src='http:127.0.0.1:8000/i="""+results[curImg]["url"]+"""'>
</a>
"""
if getType(results[curImg]["url"]) != "video/webm"
else """
<video controls autoplay loop=1>
<source type='video/webm' src='"""+results[curImg]["url"]+"""' >
</video>
"""
)
+"""<p><a href='"""+results[curImg]["page"]+"""'>"""+results[curImg]["page"]+"""</a></p>
<p><a href='"""+results[curImg]["url"]+"""'>"""+results[curImg]["url"]+"""</a></p>
<p>"""+results[curImg]["tags"]+"""</p>
<p>query string: """+query+"""</p>
<p>Images loaded: """+str(curImg+1)+""", time elapsed since server start: """+getElapsed()+"""</p>
</body>
</html>
"""), "utf-8")
)
curImg += 1


if __name__ == "__main__":
server = socketserver.TCPServer(('', PORT), Handler)
try:
print("Server starting at 127.0.0.1:"+str(PORT))
server.serve_forever()
except:
server.socket.close()

R: 2 / I: 0 / P: 5

I need some help, please anyone

Hello /prog/. I am a 19 year old university student. I am really into software engineering but i want to go full professional ( i also study software engineering ). What i know is just some C++ , some Java , some HTML/CSS/JS , some Ruby. I also know nothing about GUI or how to connect GUI to a program. ( i am still pretty much a n00by ).

Here is what i have:

Current IDE : Qt Creator

OS : Ubuntu 14.04.3 , Windows 7 Ultimate (dual boot).

Knowledge : Pretty basic concepts.

Here is what i want :

>Master Java or C++ ( or both if possible )

>Learn how to create and use GUI

>Complete web programming

>Get at least some good knowledge about security,servers,etc.

>Learn some basic Assembly ( which i have no idea about, mostly for some projects in university ).

Links, guides, pdf, anything that can help. I am at your mercy people. As long as it is free i can do it ( right now my economic situation is pretty bad ).

Now most of you would ask why don't i just wait untill finish university. As i mentioned above my economic situation is pretty bad and i can afford going to university untill most this year. Basically i have untill the 2nd of July 2016 to do all this.

R: 7 / I: 0 / P: 5

Line - Line Intersection Algorithms

So needed an algorithm to detect if 2 lines intersect

SAT doesnt work to well for lines, so i decided to see if i could figure out something myself

Remembered from Geometry class that if a quadrilateral is convex, then its diagonals must intersect, and if its concave, then they dont

So i thought: "if quad(line1point1,line2point1,line1point2,line2point2) is convex, then the lines intersect, otherwise no"

But then i thought: "but wouldnt the 'convex-test' algorithm itself need to test if the diagonals intersect?

Aka:

Line intersection algorithm needs a function to determine whether a quad is concave or not

Concave-test algorithm needs a line intersection algorithm to determine if the quads diagonals intersect

Its a paradox

CPU murdering recursion

Help me

R: 2 / I: 0 / P: 6

Programmers!!

i'm C# beginner programmer

i have a small problem ,,,i've searched for it alot but i can't find a solution…pls tell me the solution if u know it is urgent for me

when i start a new form and add a media player window it appears a black square only with nothing…i played a video with it and i can hear the volume but ca'nt see any thing

td;r the code is running well , and the media player appears normally in other devices, and i have tried many video formats

R: 21 / I: 1 / P: 6

How do I become legion?

I want to learn programming, how do I do it? Where do I start? I'm willing to put as much time as needed.

Why am I wanting to learn?

Make money & hack shit

Note: I'm literally retarded when it comes to maths, so I'm hoping it doesn't require too much maths… Preferably it shouldn't contain any maths at all.

What are the basics? How do people make money? What else can you use programming skills for besides making money and hacking?

I must be coming off as very naive, and I admit that I am… I know nothing. I've heard of the words JavaScript and C++ but know nothing about them, what they're used for, etc… I just know the names and they're coding languages, coding what? Idk.

Any absolute beginner books you can recommend?

Also links to places I can learn would also be nice.

R: 26 / I: 1 / P: 6
Objects are just lists.

How does that make you feel?
R: 14 / I: 0 / P: 6

Should I start programming with which language? I heard that C# is a good thing to start with

R: 2 / I: 0 / P: 6

What's the most basic instruction set a machine must implement in order to solve problems that isn't as impractical as a Turing machine?

I am not talking about real world implementations of simple CPU. I mean something more abstract, since CPU tend to use registers for performance purposes when all you actually need is a way to access stored variables, independently of how you do it.

With "most basic", I mean the bare minimum to run. You will need an add operator and a bitwise negation operator, but there is no need for a sub operation since a + !b = (a - b).

What's the actual bare minimum a virtual machine would need to be operable? I have been searching for a Turing completeness article that goes straight to the point, but they often end up saying "just implement a Turing machine".

R: 5 / I: 0 / P: 6

Systems Programming

I'm really interested and wanting to get into systems programming. drivers, compilers, kernels… all that jazz. I have currently come out of university with a CS degree mainly focused on Java and work solely in Linux.

I want to learn C/C++ whilst learning sysprogramming, so it's not vastly different from Java. I know the concepts of programming(algorithms, data structures, procedural and object orientated programming), will just need to learn the C syntax and additional things Java doesn't deal with (malloc etc).

What would you recommend to help me get into systems programming?

R: 2 / I: 0 / P: 6

I want to learn about social network analysis. Can you give me any pdfs you might think cover the topic? I want to eventually build some sort of web crawler to map connections between people based on data on the web. If anyone is interested in helping me, please let me know.

R: 0 / I: 0 / P: 6

Not really looking for code, just ideas on an approach.

Assuming I wanted to create something like a screen locking software, nothing complex. What would be the best way to go about that without exiting the desktop like Windows screenlock?

I was thinking about capturing the mouse, and locking it in place until a specified key combination was pressed. All other key presses are ignored.

I am not concerned with it being super secure, just more of an annoying deterrent for snoopy friends.

With this in mind, would locking the mouse in place and all keyboard input besides the specified input be enough? What about a step further and hiding all desktop icons and the task bar as well?

This is for Windows, so let's assume I can use the registry to my advantage. What would your approach to this be? I don't mind sharing some code once I take a crack at it.

R: 7 / I: 1 / P: 6

Who cozy programmer here?

Feels good to make money in my pajamas by doing simple projects for retards on freelancer in exchange for hundreds of dollars.

R: 2 / I: 0 / P: 6

What's the best way to repeatedly hit an internet address as fast as possible?

I've written a program in javascript that uses multiple http request objects to send empty POST requests. It can send about a 100 hits in a few seconds. Is there a way to send hits faster than that?

R: 3 / I: 0 / P: 6

why is there no prog help sticky?

i guess this question will become a noob scripting help general so i won't feel bad for mucking up this board.

i'm trying to crate a script for my zsh prompt to display my laptop's battery in different colors depending on how full it is.

I need to isolate the percentage without the '%' and sometimes a ',' to do the math.

[CODE]

#!/bin/bash

ACPI=$(acpi)

BATTERY=$(echo $ACPI | gawk '{ print $4 }')

STATE=$(echo $ACPI | gawk '{ print $3 }')

STATE=${STATE:0:1}

if [[ ${BATTERY:${#BATTERY}} -ne '\%' ]]

then

echo "hello"

fi

if [[ $STATE -eq "U" ]]

then

STATE=F

fi

echo $STATE:$BATTERY

#${BATTERY:0:${#BATTERY}-2}

[/CODE]

R: 2 / I: 2 / P: 6

TensorFlow GOOGLE OPEN SOURCE AI TOOL.zip

Here it is, an open source artificial intelligence tool released by Google!!! FREE DOWNLOAD!!!

TensorFlow GOOGLE OPEN SOURCE AI TOOL.zip

https://anonfiles.com/file/f6b2212b0a0c76b02047d931f278976b

R: 0 / I: 0 / P: 6

MAC OS-X Security.zip DOWNLOAD

MAC OS-X Security.zip DOWNLOAD

https://anonfiles.com/file/e061730004d37a1ba11545fcf7069d57

R: 14 / I: 2 / P: 6

Am I too stupid to program?

Two years ago I tried to learn programming because I wanted t make video games.

I checked out a book called C++ without fear from the local library. I tried my best to understand the concepts but couldn't do the exercises and never made it past chapter 5. I had read online that C++ isn't the easiest language to learn programming, but it still bummed me out because the author stressed at the introduction of the book that "anyone can learn to program" and I couldn't do it.

I then learned about Codecademy and finished the JavaScript course but still felt completely retarded and didn't feel like I learned anything. Haven't really made much attempts to learn since.

Am I just too retarded to learn programming? Should I give up? I only really wanted to make video games anyways.

Would learning a game engine like Blender or Unity be more worth while to achieve my goal?

I never finished high school and only ever made it to Geometry in math.

Would [re-]learning mathematics help me learn programming better than my previous attempts?

What should I do?

R: 0 / I: 0 / P: 6

Anyone want to help me decode this?

R: 7 / I: 0 / P: 7

The Eudyptula Challenge

Learn how to contribute to the Linux kernel:

http://eudyptula-challenge.org/
R: 3 / I: 0 / P: 7

TheNastiest bugs you encountered

Tell me, /prog/, what were the nastiest bugs you ran into?

Mine was when I coded a multithreaded Java project for university. In our group was a girl which we considered incompetent and so we only gave her lowest-tier tasks where no sentinent being should be able to cause any harm. Stuff like putting the debug output calls in comments for the final version.

The result looked like this:


void runThreads() {
while(!done) {
iteration++;

if (iteration%10000 == 0)
//Debug.out("Iteration: " + iteration + ", State: " + state.toString());

/* I'm a huge comment explaining
what the critical section does*/

syncThreads();
doCriticalStuff();
}
};

Needless to say, our debug version sometimes had incorrect output due a data race resulting from the missing synchronization. The really annoying part was that this was part of the proven, extensively tested and seemingly unchanged core program and merged alongside with a large update to peripheral functions, so we spent several days testing the graphing, output, and other stuff before finding where the problem was. And then there was a huge comment in the middle which made it easy to overlook the if-statement when looking at the seemingly important parts.

R: 9 / I: 0 / P: 7

Hi, I am a student of physical science and let me know that you recommend for learning languages. I have several interests but I have nothing definite, I like particle physics, solid state, molecular simulation, complex systems.

I have heard now what science is being used in Python and Fortran was used long before How do I find it on my own? Where can I see languages used for research?

Also, would it be good to learn like "Origin"?

R: 33 / I: 2 / P: 7
Sup /prog/. It saddens me that programmers proficient in assembly language are becoming increasingly rare. Even knowing enough to do some reverse engineering is considered a black art by some. There are still a few people who do it but far less than 15-10 years ago.

People say that it's too inconvenient and some even get hostile over it but writing code in assembly language is something that I've always loved. It's not about speed – in a lot of cases a compiler will spit out code that runs faster or as fast as anything that I could write. You can pretty easily out-sizecode a compiler though, and that is always nice but there's rarely a need for that unless you're writing demos. It's about that feeling of control and interacting with the machine on a level that you can't do with other languages.

Does anybody on /prog/ actually know assembly language? I'm thinking about writing an online book about programming in x86-64 assembly language from the ground up, would anybody be interested? I'm going to be releasing a fully featured Windows bittorrent client written in x86 assembly language (fasm) that is ~50kb unpacked into the public domain in a few months so stay tuned.


I've met some "x86 assembly programmers" lately who can't answer the simplest of questions, let's hope one of you out there can.

Save a byte while still using the test instruction: test ax, 256
If you can't answer this (extremely basic) question than you're still a beginner.
R: 7 / I: 1 / P: 7

Metaprogramming

Let's talk about compile time programming. Do you find it useful? Do you even use it?

I've been scratching the surface since I have not really needed to use it but I've become more aware of the importance of doing calculations at compile time rather than during ruin time. Here are compile time strings:


#include <string>

class CTString{

private:

const char* const p_chars;
const std::size_t _size;

public:

template<std::size_t N>
constexpr CTString( const char(&p_Chars)[N] ):p_chars(p_Chars),_size(N-1){
}
constexpr char operator[]( std::size_t N ){
return N < _size ? p_chars[N]: throw std::out_of_range("");
}
constexpr std::size_t size(){
return _size;
}
constexpr const char* const str(){
return p_chars;
}
};

R: 1 / I: 0 / P: 7

We Know What Youre Doing

After months of being offline and the loss of our original domain, we know what you're doing is back online at a temp address: http://weknowwhatyouredoing.esy.es/

R: 0 / I: 0 / P: 7

tryin out 8chan

Oh hey there…

R: 18 / I: 1 / P: 7
I can't wait to ditch the clusterfuck that is X11. Looks like this is a a step in the right direction.

Wayland compositor (window manager)

https://github.com/Cloudef/loliwm
R: 3 / I: 0 / P: 7

The abysmal state of the majority of PL development

I can forgive languages like C, C++, LISPs, and even Java to some extent, because at the time we needed performance (where we used C/C++) and we didn't know any better (where we might have used a LISP).

However, there is a glut of modern languages that appear to have been developed by studiously ignoring the last 30 years of programming language research. JavaScript, Python, Ruby, Go, Erlang, and before you think I'm hating on dynamic languages, C#, F# and Scala too.

Concepts such as static types, immutability, parametric polymorphism, tail call elimination, first-class functions, higher-order functions, type inference, type classes, higher-kinded types, and rank-n types have all proven themselves and are absolutely essential to avoid code duplication and enable code reuse. Additionally, concurrency and parallelism become almost trivial when these features are present.

My question is: why are we still creating crippled languages, that do not allow for modularity, reusability, equational reasoning and easy concurrency and parallelism, when we know how to design better languages that do allow for these things?

R: 3 / I: 0 / P: 7

Let's build a programming language

Hey /prog/, I'm building a language. Here's an example, its the factorial function:


def is-zero [id, #0] =
def decr [id, #1] -
def ! is-zero -> #1 ; [id, decr!]

This should give you a feel for the syntax of the language. All of it. There are no variables, everything is a function application. Tuples, denoted [a,b … z] provide a way of destructing and restructuring data without explicit variables. Here's the basic evaluation rules:

[f1, f2, … fn] applied to a is equal to [f1 applied to a, f2 applied to a, … fn applied to a]

f g applied to a is g applied to f applied to a (composition)

Elements are accessed through the 1, 2, 3 … n functions.

When # is before a constant it is interpreted as a function that when given any argument will return that constant.

Here's paul graham's make-adder function in this language, which makes use of the postpone operator (^) that is used to make closures/delay evaluation:


def make-adder [id, ^id] +

That's basically the whole language.

R: 1 / I: 0 / P: 7

I have a graph with values assogned to each node. What is the most eficient algorithm to find 3 connected nodes that have the highest sum of values? There are approx. n nodes and 4n connections.

R: 3 / I: 0 / P: 7

Hello all, currently I am learning JavaScript, I was wondering if there is a way to save a file to the same directory as the js file that would contain info the the user provided.

The reason I ask this is I'm wondering if I can create a simple game that you can come back to and continue your adventures. I already have every thing else planned out.

R: 4 / I: 1 / P: 7

Technological Dependency

https://www.youtube.com/watch?v=t7Xr3AsBEK4

I, am, and all of you are, Tech dependant and most likely addicted. Technology in this case being used as a referrant to computational technology, having the amount of social media, sharing, and information we do with modern technology has made us dependant on technology, Socially as much as intellectually. Children are growing up to be ADD and Socially impaired because they live most of their social lives on the internet, where they can be their own Barbie doll; Looking, Thinking, and Communicating exactally how they would like to. This is a major problem. Kids are growing up on their sites only having to interact with the things and people they are interested in, merely discarding anything they care not about. These kids grow up to become rediculously ADD when faced with a task which is not in their area of interest, for that is how they have been conditioned to think. Crowds are exponentially more malleable when it comes to opinion and stance now as well. Without the internet, people like trump would not have as much praise, because people would have to actually think and form their own opinions about him in the stead of reading an article by a 'trusted' news source on Facekaf and preaching it to all of their friends. In the informational sense, dependency forms in that we have the answers to most any question at our fingertips, and take more advantage of that than we should. Our relationship with the internet when it comes to information is directly comprable with the person who uses a calculator for all of their mathematics, or one who uses a wheelchair for all of their movement, despte the fact that the alternitaves for both help build yourself. So this applies, as too it applies to the internet's constant exploitation as a primary informational source. When given a project, people google the project to see what other people have done already. When given a politival decision, people google the topic to find an argument which is close to what they think theirs would be to use as their own. The list of examples goes on and on, and i have a rediculous amount of homework to do, but embed related.

R: 22 / I: 2 / P: 7

Lisp Thread

Let us have a thread for the greatest programming language (family) of all time.

Favorite dialect?
Favorite Lisp software?
Working on any Lisp projects?
What got you interested in Lisp?
R: 2 / I: 0 / P: 7

Programming paradigms

So what's the best and worst?

What are some good examples of strengths of each

R: 7 / I: 2 / P: 8

Linking problems.

It's probably something stupid and simple, but I can't find it. Everything compiles fine, I can't link the object files.

Link command:


/usr/bin/c++ CMakeFiles/game.dir/game/src/globals.o CMakeFiles/game.dir/game/src/loadOBJ.o CMakeFiles/game.dir/game/src/generator.o CMakeFiles/game.dir/game/src/loadTexture.o CMakeFiles/game.dir/game/src/camera.o CMakeFiles/game.dir/game/src/loadShaders.o CMakeFiles/game.dir/game/src/main.o -o bin/game -rdynamic -lGLU -lGL -lSM -lICE -lX11 -lXext -lGLU -lGLEW -lglfw lib/open-simplex-noise-in-c/bin/libopen-simplex-noise.a -lGL -lSM -lICE -lX11 -lXext -lGLEW -lglfw

Output:


CMakeFiles/game.dir/game/src/generator.o: In function `getOpenSimplex(int, int, float**, float, bool)':
/media/pidata/project/MENR/game/src/generator.cpp:16: undefined reference to `open_simplex_noise(long, osn_context**)'
/media/pidata/project/MENR/game/src/generator.cpp:22: undefined reference to `open_simplex_noise4(osn_context*, double, double, double, double)'
/media/pidata/project/MENR/game/src/generator.cpp:26: undefined reference to `open_simplex_noise4(osn_context*, double, double, double, double)'
/media/pidata/project/MENR/game/src/generator.cpp:28: undefined reference to `open_simplex_noise4(osn_context*, double, double, double, double)'
/media/pidata/project/MENR/game/src/generator.cpp:30: undefined reference to `open_simplex_noise4(osn_context*, double, double, double, double)'
/media/pidata/project/MENR/game/src/generator.cpp:40: undefined reference to `open_simplex_noise_free(osn_context*)'
collect2: error: ld returned 1 exit status

If lib/open-simplex-noise-in-c/bin/libopen-simplex-noise.a is renamed the command fails with:


c++: error: lib/open-simplex-noise-in-c/bin/libopen-simplex-noise.a: No such file or directory

So I know which file it's linking, and that it is finding it. Here is the the output of objdump -t lib/open-simplex-noise-in-c/bin/libopen-simplex-noise.a:


In archive lib/open-simplex-noise-in-c/bin/libopen-simplex-noise.a:

open-simplex-noise.o: file format elf64-x86-64

SYMBOL TABLE:
0000000000000000 l df *ABS* 0000000000000000 open-simplex-noise.c
0000000000000000 l d .text 0000000000000000 .text
0000000000000000 l d .data 0000000000000000 .data
0000000000000000 l d .bss 0000000000000000 .bss
0000000000000000 l d .rodata 0000000000000000 .rodata
0000000000000000 l O .rodata 0000000000000010 gradients2D
0000000000000040 l O .rodata 0000000000000048 gradients3D
00000000000000c0 l O .rodata 0000000000000100 gradients4D
0000000000000000 l F .text 00000000000000a0 extrapolate2
00000000000000a0 l F .text 00000000000000ef extrapolate3
000000000000018f l F .text 000000000000012f extrapolate4
00000000000002be l F .text 0000000000000036 fastFloor
00000000000002f4 l F .text 00000000000000bc allocate_perm
0000000000000000 l d .note.GNU-stack 0000000000000000 .note.GNU-stack
0000000000000000 l d .eh_frame 0000000000000000 .eh_frame
0000000000000000 l d .comment 0000000000000000 .comment
0000000000000000 *UND* 0000000000000000 free
0000000000000000 *UND* 0000000000000000 malloc
00000000000003b0 g F .text 00000000000000d5 open_simplex_noise_init_perm
0000000000000000 *UND* 0000000000000000 memcpy
0000000000000485 g F .text 00000000000002ef open_simplex_noise
0000000000000000 *UND* 0000000000000000 __stack_chk_fail
0000000000000774 g F .text 0000000000000072 open_simplex_noise_free
00000000000007e6 g F .text 00000000000008fa open_simplex_noise2
00000000000010e0 g F .text 000000000000314b open_simplex_noise3
000000000000422b g F .text 0000000000007c57 open_simplex_noise4


...
0000000000000485 g F .text 00000000000002ef open_simplex_noise
...
0000000000000774 g F .text 0000000000000072 open_simplex_noise_free
...
000000000000422b g F .text 0000000000007c57 open_simplex_noise4
...

R: 10 / I: 1 / P: 8

Learning Java

What's the best way to learn Java for someone who has never programmed before? All the books I can find seem to either be old, or meant for programmers.

R: 0 / I: 0 / P: 8

Useful bash comin' in

function mkcd() { mkdir -p $1 && cd $1; }

R: 3 / I: 0 / P: 8

Redoing my shit

So I did alot of html, css, javascript and python learning several months ago, I was desperately looking for a job in it. But I was too frustrated that I could not create anything amazing yet. All I did was sit there all day and practice coding, and eventually I got burned out. So I took a break from it and got a job at a market. I want to come back to this, and get a job as a programmer. The pay is much better, and this seems like something I want to do as a career, hell my dad does it for a career. He thinks I might be ready in 2 or 3 months, but idk. I think I have forgotten quite a bit since when I started. My question is, do you think its possible to relearn and surpass my past efforts if I start this again? Will I be ready for some jobs in a few months?

R: 3 / I: 0 / P: 8

Fun with UML

Greetings "fam". I'm currently learning about UML in my software engineering class to start out the semester.

Does this have any practical application out in the field? Or are all my hours spent making these god forsaken diagrams for nothing?

R: 2 / I: 0 / P: 8

How should I start C programming? Is this good place to start?

https://www.youtube.com/watch?v=2NWeucMKrLI&list=PL6gx4Cwl9DGAKIXv8Yr6nhGJ9Vlcjyymq

R: 9 / I: 0 / P: 8

So /tech doesn't like my code so I'll share it with all of you :-)

Website Blocker

#include<stdio.h>

#include<dos.h>

#include<dir.h>

char site_list[6][30]={

"google.com",

"www.google.com",

"youtube.com",

"www.youtube.com",

"yahoo.com",

"www.yahoo.com",

"bing.com",

"www.bing.com",

"4chan.org",

"www.4chan.org",

"8ch.net",

"www.8ch.net",

"duckduckgo.com",

"www.duckduckgo.com",

"google.ac",

"www.google.ac",

"google.ad

"www.google.ad",

"google.ae",

"www.google.ae",

"google.af",

"www.google.af",

"google.ag",

"www.google. ag",

};

char ip[12]="127.0.0.1";

FILE *target;

int find_root(void);

void block_site(void);

int find_root()

{

int done;

struct ffblk ffblk;//File block structure

done=findfirst("C:\\windows\\system32\\drivers\\etc\\hosts",&ffblk,FA_DIREC); /*to determine the root drive*/

if(done==0)

{

target=fopen("C:\\windows\\system32\\drivers\\etc\\hosts","r+"); /*to open the file*/

return 1;

}

done=findfirst("D:\\windows\\system32\\drivers\\etc\\hosts",&ffblk,FA_DIREC); /*to determine the root drive*/

if(done==0)

{

target=fopen("D:\\windows\\system32\\drivers\\etc\\hosts","r+"); /*to open the file*/

return 1;

}

done=findfirst("E:\\windows\\system32\\drivers\\etc\\hosts",&ffblk,FA_DIREC); /*to determine the root drive*/

if(done==0)

{

target=fopen("E:\\windows\\system32\\drivers\\etc\\hosts","r+"); /*to open the file*/

return 1;

}

done=findfirst("F:\\windows\\system32\\drivers\\etc\\hosts",&ffblk,FA_DIREC); /*to determine the root drive*/

if(done==0)

{

target=fopen("F:\\windows\\system32\\drivers\\etc\\hosts","r+"); /*to open the file*/

return 1;

}

else return 0;

}

void block_site()

{

int i;

fseek(target,0,SEEK_END); /*to move to the end of the file*/

fprintf(target,"\n");

for(i=0;i<6;i++)

fprintf(target,"%s\t%s\n",ip,site_list[i]);

fclose(target);

}

void main()

{

int success=0;

success=find_root();

if(success)

block_site();

}

R: 11 / I: 2 / P: 8

Learning C# on books

Hi /prog/ I want to learn C# and I googled a bit and found C# in a nutshell.

Is it a good place to start or are there more appropriate books?

I should say that i'm not completely new to programming but besides the basics I haven't got much knowledge.

R: 4 / I: 0 / P: 8

How into software security

Most startups, and even gigantic corps have little or no actual security people to test software. It's just a factory where you churn out features and nobody is doing any checking, they work with C libraries with abstracted shit like angular/coffeescript/javascript and don't do proper testing or even best practices. If you learn how to write tests yourself, then you basically create your own CSIO role and parachute yourself into it. Remote CSIO is pretty easy, you just load up Emacs and use plugins like HiLock to quickly search through code, and org-mode to bookmark code you spot is obviously flawed or with to test later. You write your recommendations then go back to the beach in Thailand or w/e you work out of.

Start with

How to Design Program (HtDP)

it focuses on sane design and running tests in Racket (Scheme). The MOOC for it on edX is free, payment only for certificate of completion https://www.edx.org/xseries/systematic-program-design-0

At first it feels like rote learning, you are writing all these templates for seemingly simple functions. Trust me, it makes sense later on in the course/book when the programs become huge. You can slide right into Typed Racket after just a few chapters in https://www.classes.cs.uchicago.edu/archive/2014/fall/15100-1/guide.html

Do the rest of the course in Typed Racket to learn about type safety and you'll see for yourself how it works when you fail tests accidentally.

Now you need to write your own security tests, to start breaking non typed software using your knowledge of how stuff can break from creating type safe software. Read Gray Hat Python http://libgen.io/book/index.php?md5=381ABC536B480375ED49608177BB54E3

It specifically teaches you how to write security tests. If you've never used Python (after doing HtDP course) then read Zed Shaw's Python the Hard way tutorial which you will zoom through if already done HtDP http://learnpythonthehardway.org/book/ and/or Violent Python http://libgen.io/book/index.php?md5=eae478007e8e105aed06876890dfdf3d

Now get and read the following books:

Learn C the Hard Way http://c.learncodethehardway.org/book/

Secure Coding in C and C++ (2nd Edition)

The Art of Software Security Assessment

Zed Shaw's C tutorial has you breaking shitty code in the 4th lesson. The other books are still the defacto guides to secure development. It doesn't matter that they are C related, since the vast majority of errors apply to every program regardless of language. Whenever you come across a problem in the software assessment books, write a test for it and apply it to the software you maintain/build. If it fails, congrats you just saved whoever you work for countless money should anybody exploit that later.

Now go on HN (Hacker News https://news.ycombinator.com/news) and search for Unit Testing, Regression Testing, Fuzzing, and Security Tests. Write some of your own using their examples and apply them to where you work. If they don't parachute you into CSIO by now then nobody else will ever get that job. I guarantee you will break absolutely everything just doing basic tests unless you're using type safe languages from the start, which is hardly any company right now.

Other helpful books:

The Mobile Application Hacker's Handbook

The Web Application Hacker's Handbook

The Tangled Web: A Guide to Securing Modern Web Applications

The Android Hacker's Handbook

Yes, webdev shit but everything is networked, everybody runs a browser, every app has an API, ect. Again, everything you learn from those books write tests for them in your software suite (by now, your suite is so large you could probably sell or license it).

continued next post(s)

R: 5 / I: 1 / P: 8

How do I get away from Javascript?

Hey /prog/ I just finished everything on http://freecodecamp.com But I don't want to stick with javascript everything. Is there resources you know of that can help me get out of this? I've been looking into Go but I don't know what to do.

R: 5 / I: 0 / P: 8

Tips for pre-college beginners?

Still in Highschool and I've decided that I want to do programming as an occupation. Does anyone have any tips on how to start out? I'd like to get a strong knowledge base in [insert basic, widely used, programming language here.] before I even think about a post-secondary school.

R: 0 / I: 0 / P: 8

I miss the days of the Fibonacci Butt Sort.

Ya'll don't even know what the fuck FBS is.

Pour some out for the fallen, rip /prog/

R: 9 / I: 0 / P: 8
Does anyone know the name of a programming language with constraints/contracts that are fulfilled imperatively?
R: 0 / I: 0 / P: 8

Not VIP Quality!

This board does not pass the /vip/ Quality Inspection Test!

R: 4 / I: 0 / P: 8

C Version of Tor's Hammer?

Anyone interested in working on a C DoS tool with me?

I just have a simple prototype so far,

btw yes it's skid'd because i'm lazy, but I had to get something quick as I have a lot of other shit to program but i'm gonna dedicate some time to this.

Anyway here's the link and I can't wait to be shitposted to.

https://ghostbin.com/paste/2nvva

R: 70 / I: 3 / P: 9
Sorry guys, but I have seen that many people are using curly braces in a manner that is quite erroneous to the readability of code standards. pic related…
R: 11 / I: 0 / P: 9

8chan auto-notifications

I made a simple auto-notification script that you can run on your *nix machine. Just toss this script in your crontab, or run it in a loop on screen and you will start getting notifications for your favorite boards.

You can call this script like this to get notifications from /b/ and /prog/.


./8chan.sh b prog

Add as many boards or as few as you'd like.


#!/bin/bash
for board in "$@"
do
if [ ! -f /tmp/$board.hash ]
then
curl --silent http://8ch.net/$board/0.json | md5 > /tmp/$board.hash
else
oldHash=`cat /tmp/$board.hash`
newHash=`curl --silent http://8ch.net/$board/0.json | md5`
if [[ ! $oldHash == $newHash ]]
then
echo $newHash > /tmp/$board.hash
say "$board has a new post"
fi
fi
done

Note: I believe

say
is only available on mac os, so you might need to change that to whatever your OS uses.

Cheers.

R: 2 / I: 1 / P: 9

So I've learned tons of languages, done tons of shitty basic stuff.

What do?

I'm reading the c programming language atm, but it's not inspiring.

What kind of super simple shitty projects can I do?

R: 3 / I: 1 / P: 9

best laptop brand

which 1 is the best laptop brand to write code, programming?

is it Lenovo Thinkpad

R: 2 / I: 0 / P: 9

Greetings programmers.

I have a specific request today that I hope someone here has an answer to. There was a book I once found on /g/ years ago that I disregarded but it was held in high repute for its occult like angle of approaching computer science. I'm not sure if it contained actual coding practices within, or information designed to help get your mind into the proper space required for advanced coding but I'd love to read it now and feed my mind.

It may have been a seperate book, but I semi remember seeing a wizard on the front pointing to a Delta (triangle).

Anyway, any other books that would provide a strong introduction into advanced programming thinking (and not so much using the languages themselves) would be much appreciated!

R: 26 / I: 0 / P: 9

What are the basic things every programmer should know? Any practical advice you can share with new programmers like myself?

For example:

1) Several languages

2) Web development

3) Database basics

4) ability to think abstractly

5) Math?

Please add any of your own or relevant advice/tips/useful skills?

R: 5 / I: 0 / P: 9

JS Hate?

I know a lot of programmers who hate JavaScript are very vocal about it, but it seems this inflates the perceived amount of hate to JS.

What is the general attitude to JS? and by 'general' I mean 'the regular programming population', not just your opinion on it.

R: 2 / I: 0 / P: 9

What is the role of cin.get(); in the following code, I believe that it satisfies the requirement that the program wait for user input however the c++ refrence description of get() is confusing me


#include <iostream>
#include <string>
#include <fstream>
using namespace std;

int main () {
ifstream file ("inputfile.txt")
string line;
while(getline(file,line))
{
cout << line + "\n";
cin.get();
}
}

R: 3 / I: 0 / P: 9

Halp

Why isn't this working?!


$(document).ready(function () {
function spamDetect(post) {
var $post = $(post);
var $name = $post.find('.name');
var hasEmail = $post.find('.email').length > 0;
if (hasEmail) {$name.text('SAGE');}
});

Pls help good anons.

R: 3 / I: 0 / P: 9

I need your help!

Hello guys, I need advice from you.

I am last year in high school and I have to decide in which uni I will go. I am into CS, programming and stuff. But I am really bad at math, and I am afraid of it, what should I do ?? :/

R: 1 / I: 0 / P: 9

The developer has locked a word document called "protected.doc" with a password. He left this clue:

You will have to Ask and then See. BHOLD two times to reveal the password from this Key:

01001100, 6F, 154, I, 105, 01110000, 6F, 160, s, 50.

Can someone solve this for me? Or at least help. I tried converting all of it into ASCII (assuming the three digit values were octal).

R: 1 / I: 0 / P: 9

trying to open ashley madison logins

Does anyone know how to open .dump files? I downloaded the logins for ashley madison and its a 4gig .dump file which I can't open with anything I try….

R: 13 / I: 1 / P: 9

Reverse Engineer thread

Didn't see one in the catalog.

Let's talk about

>what we're working on

>tools we're using

>essential reads

>our favorite architectures

>other fun things

Also a reminder that REing isn't the dark art some people claim it is, as long as you have a decent understanding of programming, and know some low-level things (how data is stored in memory, how a processor executes code, basic knowledge about different file formats..) you could start reverse engineering today! Especially with tools like IDA and Hex-Rays which make it a lot easier than it was years ago.

R: 7 / I: 0 / P: 9

Programming languages

In the sea of programming languages, which three are the most important from

a) a historical perspective,

and

b) a modern perspective?

R: 2 / I: 0 / P: 9

Windows 10 - All Secret Folders!

Windows 10 - All Secret Folders!

Action Center.{BB64F8A7-BEE7-4E1A-AB8D-7D8273F7FDB6}

Backup and Restore.{B98A2BEA-7D42-4558-8BD1-832F41BAC6FD}

Credential Manager.{1206F5F1-0569-412C-8FEC-3204630DFB70}

Devices and Printers.{A8A91A66-3A7D-4424-8D24-04E180695C7A}

Display.{C555438B-3C23-4769-A71F-B6D3D9B6053A}

HomeGroup.{67CA7650-96E6-4FDD-BB43-A8E774F73A57}

Notification Area Icons.{05d7b0f4-2121-4eff-bf6b-ed3f69b894d9}

Recovery.{9FE63AFD-59CF-4419-9775-ABCC3849F861}

RemoteApp and Desktop Connections.{241D7C96-F8BF-4F85-B01F-E2B043341A4B}

Speech Recognition.{58E3C745-D971-4081-9034-86E34B30836A}

Troubleshooting.{C58C4893-3BE0-4B45-ABB5-A63E4B8C8651}

Administrative Tools.{D20EA4E1-3957-11d2-A40B-0C5020524153}

All Tasks (Control Panel).{ED7BA470-8E54-465E-825C-99712043E01C}

AutoPlay.{9C60DE1E-E5FC-40f4-A487-460851A8D915}

BitLocker Drive Encryption.{D9EF8727-CAC2-4e60-809E-86F80A666C91}

Computer Folder.{20D04FE0-3AEA-1069-A2D8-08002B30309D}

Default Programs.{17cd9488-1228-4b2f-88ce-4298e93e0966}

Ease of Access Center.{D555645E-D4F8-4c29-A827-D93C859C4F2A}

Font Settings.{93412589-74D4-4E4E-AD0E-E0CB621440FD}

Get Programs.{15eae92e-f17a-4431-9f28-805e482dafd4}

Manage Wireless Networks.{1FA9085F-25A2-489B-85D4-86326EEDCD87}

Network and Sharing Center.{8E908FC9-BECC-40f6-915B-F4CA0E70D03D}

Network Connections.{7007ACC7-3202-11D1-AAD2-00805FC1270E}

Network Folder.{208D2C60-3AEA-1069-A2D7-08002B30309D}

Parental Controls.{96AE8D84-A250-4520-95A5-A47A7E3C548B}

Personalization.{ED834ED6-4B5A-4bfe-8F11-A626DCB6A921}

Power Options.{025A5937-A6BE-4686-A844-36FE4BEC8B6D}

Programs and Features.{7b81be6a-ce2b-4676-a29e-eb907a5126c5}

Sync Center.{9C73F5E5-7AE7-4E32-A8E8-8D23B85255BF}

System.{BB06C0E4-D293-4f75-8A90-CB05B6477EEE}

User Accounts.{60632754-c523-4b62-b45c-4172da012619}

Windows Firewall.{4026492F-2F69-46B8-B9BF-5654FC07E423}

GodMode.{ED7BA470-8E54-465E-825C-99712043E01C}

R: 1 / I: 0 / P: 10

Hi there. Hope you could help me with a small problem - /b/ and /tech/ didn't help much so far.

I'm trying to get rid of one annoying auto-completion feature and I just can't find it anywhere in the settings… It's too specific for Google and too stupid for a new StackOverflow thread - so I hope you could help me. Thanks for any hint.

tl;dr VS15, C#, autocompletion, want if(x==1){x=2;}, getting if(x==1) {x=2;}

R: 2 / I: 0 / P: 10


* (defun reader-macro (stream char)
(declare (ignore char))
'(print "2 is for nerds"))

READER-MACRO
* (set-macro-character #\2 #'reader-macro)

T
* 2

"2 is for nerds"
"2 is for nerds"
* (+ 32 5)

"2 is for nerds"
debugger invoked on a SIMPLE-TYPE-ERROR in thread
#<THREAD "main thread" RUNNING {1002D7F363}>:
Argument Y is not a NUMBER: "2 is for nerds"

Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.

restarts (invokable by number or by possibly-abbreviated name):
0: [ABORT] Exit debugger, returning to top level.

(SB-KERNEL:TWO-ARG-+ 3 "2 is for nerds")

I'm not sure what I expected…

Lisp general.

>Favourite dialect

>What are you working on

>What is your favourite thing about Lisp

>What is your least favourite thing about Lisp

>Favourite dialect

Common Lisp, though I haven't used enough dialects to have a particular reason why.

>What are you working on

Just messing around with some sample projects and occasionally trying out all the weird things you can do.

>What is your favourite thing about Lisp

The simplicity and flexibility. Particularly Macros.

>What is your least favourite thing about Lisp

Community is too small so other programmers bully ;_;

R: 18 / I: 1 / P: 10

Why Python sucks

- Slow & inefficient performance

- Annoying indentation syntax that can't even mix tabs with spaces

- Inconsistent

- mutable and immutable primitive types mess

- Implicitly changing passing object by copy or reference, adding artificial complexity.

- No type safety

- Scope mess

- Shit class system

- Can't have more than 1 constructor

- Have to pass the class object to itself and use it to access its own members ('self')

R: 4 / I: 1 / P: 10

How do I actually get GOOD at programming? I've already got a decent enough understanding of C and C++, and have been doing shitty ass games with SDL, SFML, and Irrlicht, but that's baby shit. Where do I even start if I want to move up to big boy coding?

I want to be able to do stuff that's actually worth being proud of. Like making my own renderer or whatever the fuck else.

R: 2 / I: 0 / P: 10

Podcasts for getting better at coding

Best podcasts for intermediate or advanced ways of coding?

I like to listen to podcasts at night and I want to here what /prog/ listens too, to get better at coding.

R: 33 / I: 1 / P: 10

gamedev on linux

what options are open for developing games on linux?

R: 10 / I: 0 / P: 10

Dynamic linking and new languages/compilers.

So, for years, at least in the unix field, we've been using shared libraries to avoid duplication across every binary. This usually goes tightly coupled with a package manager. If myprogram needs libcrypto.so, it "depends" on it, and the package manager makes sure it's installed.

Static linking can be useful for binary redistribution, and when a program requires a specific version of a library to work.

Now, lately, some new (admittedly interesting) programming languages have popped up (Better worded: they have gained some popularity). I've found Go, Rust and Nim, though there could be others.

These three, all come with a package manager of their own to fetch and build dependencies, which is totally fine. The only problem is, it is very difficult if not impossible to build the dependencies as shared libraries, and link the binaries dynamically.

Sure, this might be a good idea if you just want to redistribute a binary, or if you want your dependencies at a very specific version.

But how will system package managers handle this? Sure, they can go the lazy way and provide the static binary, but that goes against what a package manager is meant to do (Hurp durp drag and drop in (/usr)/bin).

Why can't these languages/compilers at least make it easy to build shared objects and dynamically linked binaries "the olde way"?

R: 5 / I: 0 / P: 10

If you wanted to get into web design or web development what is the most common language used in it? HTML or Javascript?

R: 26 / I: 6 / P: 10

Can you help me extend the knowledge about the symptoms of a linuxfag coder?

This is what I have so far:

> Didn't discover the concept of GUI. Still uses the command line.

> Didn't discover the concept of IDE. Still using and wasting time with obsolete ancient text editors.

> Didn't discover the concept of abstraction. Still writes code in C.

> Didn't discover the concept of progress. Still wasting time on reinventing square wheels.

R: 4 / I: 1 / P: 10

Learn to program?

Hey guys
I'm thinking of learning to program, but I think we might already have enough coders in existence. Plus, I could just hire one. Once real virtual reality comes, will programming in the horrible coding sense be eliminated? Should I learn to program just so I can get a super fancy job here in the silicon valley , or should I focus on what I'm actually interested in, which is smoking weed all day and fucking bitches and try to become successful doing that? I need some life advice here d00ds
R: 0 / I: 0 / P: 10

programming irc channel

we're here, we're queer, join us

irc://irc.sublumin.al/#programming

R: 2 / I: 0 / P: 10

Learning tools.

I've been wanting to learn programming for a couple of reasons, one is music stuff (Probably with Python), the other is PHP for putting together a redesign of a site I'm a part of. My question is, are books worth picking up, or is it better going through free tutorials online? Which is more likely to get me to my end goals quicker?

R: 15 / I: 5 / P: 10

black death group is looking for a very highly skilled hacker for our ongoing contracts, we're paying 3500$ per day whether you work or not

more details and website available on request

contact on: blackdeathgroup@torbox3uiot6wchz.onion

blackdeathgroup@safe-mail.net

BM-2cWUGLuRXvzuJRgAT6FEC5NJpEP8QLxWsp@bitmessage.ch

R: 6 / I: 0 / P: 10

QUESTIONS GENERAL

There is no sticky here so I'll make a questions thread.

I made a program (for an excercise in a book) that draws an histogram of the length of words in a given text.

It works absolutely fine except for one little thing.

here's the full source code: http://pastebin.com/eFjEGA79

here's the relevant part:


while((c=getchar())!=EOF){
if (c!=' '&&c!='\t'&&c!='\n'&&c!='.'&&c!=',')
++teller;
else if(teller>=10){
++woord[10];
if (woord[10]>=maxteller)
maxteller=woord[10];
teller=0;
}
else{
++woord[teller];
if (woord[teller]>=maxteller)
maxteller=woord[teller];
teller=0;
}
}
++woord[teller];
if (woord[teller]>=maxteller)
maxteller=woord[teller];

When I was testing it I made a typing mistake and I hit backspace. Now this made me wonder if that does ++teller (teller is dutch for counter) since every keystroke except ' ' && '\t' && '\n' adds to it. In my reasoning backspace is part of ascii so getchar() 'gets' it and returns 8, which is the decimal integer for it, resulting in c having that value and c returng true to the first if.

tl;dr

hitting backspace to correct a typing mistake does not add to the word length although I didn't specify it do to so and I don't understand why.

R: 3 / I: 1 / P: 10

Idris

Get rekt lads Idris master race coming through.
https://en.wikipedia.org/wiki/Idris_%28programming_language%29
R: 1 / I: 0 / P: 11

Help/Advise on coding a card game.

Hey guys, first time posting. Im programming a battle card game and im just having some trouble on drawing a random card from a deck of 60 cards and removing the card from the deck completely.

Ive been using a random number generator to test this but since you cant take a variable out of an array it makes it a bit hard. I'll post my code my next post.

R: 1 / I: 0 / P: 11

Why Python sucks

============

- Slow & inefficient performance

- Annoying indentation syntax that can't even mix tabs with spaces

- Inconsistent

- mutable and immutable primitive types mess

- Implicitly changing passing object by copy or reference, adding artificial complexity.

- No type safety

- Scope mess

- Shit class system

- Can't have more than 1 constructor

- Have to pass the class object to itself and use it to access its own members ('self')

R: 3 / I: 1 / P: 11
Redpill me on Racket.
R: 4 / I: 0 / P: 11

New here, need your advice :)

So /prog/ (phonetically Prague, interestingly) this is my first time here and I have a few questions for you. I have never coded before but I would like to learn for a very specific purpose and I wanted advice.

First, I will explain the concept:

What we want is to create an online live battling league which works in real time, can record battles held with both microphone input and webcam input if enabled and automatically record that data to webserver. It can pull up beats from YouTube SoundCloud etc and have them in a lightweight player, the connections should be lightweight so it doesn't lag an obscene amount on a lesser system or connection. We would need multiple "rooms" and the ability to create them for specific battles and perhaps even a connection sort of like private messaging using the same system. This would be best if it were all built into a website but if ABSOLUTELY NECESSARY to be done well I suppose it could also have an external program.

What coding language would best fill these requirements and do all this well? How difficult would this be on a scale of 1-1000? Do you have any ideas for improving upon the idea or perhaps an efficient way of bringing this about?

Also, once the coding language is decided what is the absolute best way to learn it for me?

>pic unrelated but awesome

R: 0 / I: 0 / P: 11

Hey /prog/, I'm pretty new to programming, and was looking to make a career out of it, I do enjoy it but feel like what I'm doing is kind of slow going.

So, I started reading books on C++, and I'm not sure when I'll feel like I'm ready to go looking for work with it, but I assume other languages would be more hire-able earlier on.

I was thinking of swapping over to Java in an attempt to find something more quickly and get myself off of the cooking jobs paying just a bit more than minimum wage, but I don't know what resources are best for learning good habits.

R: 5 / I: 0 / P: 11

After watching this vid, I'm starting to believe that perl is the king of script language.

R: 17 / I: 0 / P: 11

Another Language Debate

Sometimes the argument will be made that "Language X isn't bad, it's just easy to write bad code in" or some variant.

Are there any languages which practically force you to write good code?

R: 4 / I: 0 / P: 11
Programming beginner here, all I know is the very basics of python and javascript. I started with those just to learn how to make my own game. I do however really like how python looks, it's very "readable".

But I started using game maker to learn it's own scripting language since I think it's the best way to not make me waste time and create my games faster.

And my question is this, will I become a bad programmer if I will only focus on game maker language from now on? See pic related on how it looks, I still think it's programming but it's just that it already has a lot of functions made for faster development.

Or should I still try to create some small python scripts every day to not lose touch with more powerful languages compared to gml?

Do you think that my skills will transfer after years if I use this scripting language, gml?

Before you greentext "using game maker" please understand that I do not want to program my own engine, I want to do things faster since I'm new to programming. What do you think about this, will this game engine make me think like a programmer after years of use?
R: 7 / I: 2 / P: 11

Why does everyone like static/strong typing? Maybe it's a consequence of all my codebases being <1mil LOK and used by < 20k people, but I've never seen a use for it. It needlessly keeps your code from being flexible, requires a lot of extra LOC and boilerplate, and doesn't seem to really give you much of a security gain in advance. I've worked with languages with dynamic typing for my entire career and I've never hit a serious bug that would have been fixed if only I was forced to declare that such-and-such a function only took ints, not floats or strings. Whenever I have to work with a language that gives a shit about types I always feel like I'm wasting my time getting it to do things that would be much more straightforward in another language. Is there some huge class of bug that I'm missing?

R: 16 / I: 1 / P: 11
What's a good windows IDE for coding LISP?
R: 4 / I: 1 / P: 11

What's a good book to learn assembly from the beginning? I'm fairly competent at programming.

R: 2 / I: 1 / P: 11

First reply decides /prog/'s favorite language

and go

R: 72 / I: 10 / P: 11

Questions better suited for stackoverflow thread.

Small questions that don't need a separate thread.




The code:

gifts = ['bike', 'cancer', 'rattler', 'toaster']
for n in gifts:
if n != 'cancer':
print " You are getting a " + n + " for christmas!"
elif n == 'cancer':
"You're getting cancer!"
else:
print "fgfgsdf"


The output:

You are getting a bike for christmas!
You are getting a rattler for christmas!
You are getting a toaster for christmas!


Why don't I have cancer?
R: 6 / I: 0 / P: 11

C++ primer exercise

So, I'm reading C++ Primer 5th edition, I get to chapter 5, and, I'm not sure how to go about solving one of the exercises.

When I get stuck I typically look at how the problem was solved here https://github.com/Mooophy/Cpp-Primer.

But there's a fatal error in how they solve it.

They use pair, and when I look that up in the back of the book, that type doesn't appear for about 230 more pages, and isn't even mentioned beforehand, as they sometimes do with "there's this we'll discuss later"

The exercise is as follows.

Write a program to read strings from standard input looking for duplicated words. The program should find places in the input where one word is followed immediately by itself. Keep track of the largest number of times a single repetition occurs and which word is repeated. Print the maximum number of duplicates, or else print a message saying that no word was repeated. For example, if the input is

how now now now brown cow cow

the output should indicate that the word now occurred three times.

I'm thinking that I'd start with a vector of strings, and a string variable, use a while loop to get input into the string variable, using .push_back to put the strings into the vector.

Then create a for loop to go through the string vector, comparing the current string to the next one, and upping a counter.

My issue being, what do I do to make it so, if I find say 3 of a word, and then 4 of a different word, make it use the 4, not the 3, and not have a counter just go from 3 to 7?

R: 15 / I: 2 / P: 12

Let's try something out /prog/.

What shall /prog/ code together?

http://www.codeshare.io/BwamK

R: 1 / I: 0 / P: 12

Post best tutorial languages with whom were you educated.

I blend into the crowd.

R: 4 / I: 0 / P: 12

So, what do you think of Julia language? It only came out a couple of years ago but it's getting popular.

It is a dynamically typed language but it has a very powerful type system and a JIT, so you can write code that has close to the speed of C code. It has multiple dispatch and with the type system, you can write generic functions really easily. It has lisp style macros, parallelism, and threads. And it can interface with C and Python really easily.

I'm pretty excited for this language. Hoping it will at least replace Python in the scientific community. What do you guys think?

R: 21 / I: 0 / P: 12
Hey /prog/
I'm planning to get a degree in computer science (B.S) any programming language recommendations to be ready for my studies?
R: 17 / I: 0 / P: 12
Python, Perl, Lua or Guile for small-scale/glue scripting?
R: 2 / I: 0 / P: 12

>my whole life is code

>eat sleep breath code

>i do nothing that isn't code

>i am the code machine

>i am the code

>IF I DREAM AT ALL it is in code

Ok serious. Have any of you had dreams that were just code? How so? I've had a few dreams recently that are just my text editor and me spitting out code. It's kind of neat I guess, sometimes it's not even anything I'm working on IRL. Does this happen to any of you? Anything cool come to you in your sleep? Did you remember it at all?

R: 8 / I: 1 / P: 12

cross platform c++ development

Microsoft visual studio baby here.

I'm working on a C++ project and I want to put it on my git but I don't want to exclude Linux users so I'd like to know how to get into cross platform c++ compiling.

All I know about compiling my C++ projects is how to open a visual studio project and press "build".

I've never worked with Linux before so I could seriously use some help here.

R: 15 / I: 0 / P: 12

Shell scripting thread

Shell scripting thread
Batch and bash are welcome. Post questions, tips, and what you have made.
R: 6 / I: 0 / P: 12
Hello, /prog/.
I'm learning SIMD intrinsics (SSE then AVX) and I find hard to find offline documentation for it.
I actually use https://software.intel.com/sites/landingpage/IntrinsicsGuide/ and basic search but, well, it's online. Any pdf/reference manual?
R: 1 / I: 1 / P: 12

help with GTA

hey /prog/. i need help with spawning cars online i can spawn them in SP but not online everything else works fine online its just the car spawning. i dont know a lot about this stuff any help is greatly appreciated also thank in advance

R: 17 / I: 1 / P: 12

goto

I see a lot of hate for goto, a lot of places saying never to use it in your code no matter the circumstance, and a lot of languages that despite being procedural decide to completely omit the feature. There was a python module written as an April fool's day joke that implemented goto, but urged the reader to never actually use it for anything. Java treats it as a syntax error. People say that it should be avoided because it makes code harder to read and can always be replaced with structured code.

Is it that bad?

Often I find times that I want to interleave iterations of a loop with a certain operation, and this is a chore without duplicating code or introducing otherwise pointless variables.
Because of that, I find this type of code (focus on the "goto") acceptable:
#include <iostream>
#include <vector>

std::string join(std::vector<std::string> const vec, std::string const sep) {
if (vec.size() == 0) return "";

std::string result;
auto pos = vec.begin(), end = vec.end();

goto skip_separator;
while (pos != end) {
result += sep;
skip_separator:
result += *pos++;
}

return result;
}

int main() {
std::vector<std::string> vec {"a", "test", "string"};
std::cout << join(vec, " ") << std::endl;
return 0;
}

I want to know what other programmers think: is a "goto" here called for? Does it clarify or does it obscure? Consider the alternatives (duplicating the latter half of the loop body above the loop, or introducing a new variable and an if statement into the loop), are they more or less readable or expressive in your opinion? If the goto is to be avoided, which of the alternatives is preferred? Can you add a condition but have it reliably optimized out by -funswitch-loops?

What do you think?
R: 8 / I: 0 / P: 12
Is it possible for me to learn c++, even if i majorly suck at math?
Also any tutorials that help me to understand code and what can i do with it? Like what can i type and such.
R: 0 / I: 0 / P: 12

Thus the enlightment begins:

http://codeshare.io/wC049

may you encounter any hindrance along your path, shed light by waving the torch of companionship.

R: 3 / I: 0 / P: 12
All right /prog/, I'm about to do a small personal project involving forms and a website. Convince me not to succumb to my urge to just do it in PHP and learn something new.
R: 2 / I: 0 / P: 12

Android Programming

Hey guys I'm working on an android soundboard because I am also taking a Java College class and would just like to dive into things because I don't really learn much in that class because its all theoretical.

I am having an issue with the sounds playing and a navigation drawer. Here is the link to my stack overflow question:

http://stackoverflow.com/questions/29581844/button-linked-to-sounds-onstart/29583172#29583172

(Too long to post here) Please help me out! (This is also my first 8chan post be nice plz…)

R: 5 / I: 1 / P: 13

Programming outside?

Not sure if this is off-topic but anyone program in places other than home/the office? I've been trying out doing so in a park by where I live (pic related) and it's really relaxing.
So, general out of doors programming thread?
R: 52 / I: 1 / P: 13

Is python good for making games?

Is python 3 any good for making a 2d rpg game? (Or maybe 3d like minecraft). If so what are some good engines that use it and are beginner friendly?
R: 23 / I: 0 / P: 13

Do you guys think lua is worth learning?

What can you do with lua?

Any examples?

R: 21 / I: 1 / P: 13

Gui toolkits

Qt? Gtk? Anyone tried IUP?

Which ones do you prefer? Loath?
R: 11 / I: 0 / P: 13

Holla Holla get dolla

So how can I make money from my programming skills? I know c++ and c# inside out but since I never went to uni and got a degree I have no chance of getting an actual job. How can I make sone money on the side with this stuff though? I've heard that mobile apps are too populated nowadays so that's out.

R: 24 / I: 1 / P: 13

Factorials and C++

The equation in pic related describes the behavior of cubes in any number of dimensions, with m being the total number of dimensions in a cube, and f(n m) describes "the number of n dimensional forms in a m dimensional cube."

Here's and example
>For a 2d cube (flat square), m=2. A line segment is n=1. Therefor f(n m)=f(1 2)=4, since a square has four sides

Let's try again and count the edges in a 3d cube
>For a 3d cube, m=3. A line segment is n=1. f(n m)=f(1 3)=12, since there are 12 edges to a cube

Now let's change n=1 (a line) to n=2 (a flat square)
>Fore a 3d cube, m=3. n=2 is a flat square. Therefor f(n m)=f(2 3)=6, since a cube has 6 sides


Now how would I go about writing this in C++? I've been fucking around with it all afternoon and nothing I do seems to work
R: 7 / I: 1 / P: 13

Coding Example Thread? Coding Examples thread.

Post code you've done.

Any language is acceptable.

Pic not related.

R: 12 / I: 0 / P: 13
How do you make your own language?
R: 16 / I: 2 / P: 13

What uses are there for pointers in C++?

Currently learning Sepples, and I'm genuinely curious about how pointers are used in a general basis. What are some situations where pointers would make your life easier, or save your ass or time? So far, I've only seen how useful it can be for iterating through shit like arrays and cstrings…
R: 15 / I: 3 / P: 13

Reading code

Do you guys know any project/program/app that you think it's useful to read and learn about it? For example, good coding standards or awesome implementation.

I'll start, if anyone here doesn't know the fast inverse square root of Doom III:
http://www.codemaestro.com/reviews/9

I'm looking for clean code in a not small project in Python, if anyone knows.
R: 1 / I: 0 / P: 13

Web developing noob halp

Hi everyone,

The thing is this: i've been reading books and doing tutorials on HTML/CSS/JS. I've made the excersices for each material i've looked into. I'm trying to make my own web applying Foundation, but i feel very green for what i need to make (which is basically a Carpooling System for my town). Where i can get some real life examples and problems? by real life i mean, from functional/tech designs used in consulting jobs (i'm actually working at one, but in SAP ABAP) to entire source for the projects.

Thanks in advance!

R: 4 / I: 0 / P: 13

Share something you learnt recently that you thought was cool and explain it.

Doesn't matter what it is. Just state what it does, why you think it's cool, and explain it! Explaining things to others is how you master your own learnings and also has a neat by-product of helping others.

[Web development]

If you use a templating langauge (eg. Handlebars, Mustache, Jade templates) or anything else that injects html elements into the page after it's already loaded, regular javascript selectors (eg. $('element').click) will not work.

They don't work cause the element wasn't mapped when the DOM first loaded. Using this you can select them anyway though:

<code>

$(document).on('event', 'element', 'yourFunction'); </code>

example:

<code>

$(document).on('click', '.aDiv', 'yourFunction');

yourFunction = function () {

$(this).css('color','red');

};

</code>

So basically, when you do something, and that something happens have the class or id of the element you're looking for, run a function.

pic unreleated

R: 3 / I: 0 / P: 13

semantic pondering

Not being too srs here, but sometimes I like to fantasize about how certain language semantics could be altered. Came up with this earlier:

void eg() {
// Series of if statements, typical for any C-styled language:
if (a) {}
else if (b) {}
else {}

// If you wanted loops, you can (in C):
if (a) while (a) {}
else if (b) while (b) {}
else while (c) {
// This last condition is exactly equivalent to:
// else if (c) while (c) {}
// "while ()" performs a check, defeating the point of "else"
}
// Which brings us to:

// Changing the semantics of while, for, and else:
while (a) {
// "while" and "for" can now be used to create a series of conditions, like "if".
}
else while (b) {
// Now, instead of ending the series of if statements, "else while"
// is treated like an "else if" where "else while (condition)"
// functions like "else if (condition)"
break; // will exit the entire series of blocks, skipping over "else"
}
else {
// This block is executed when neither condition (a) nor (b) are true.
}

// There is no point in an "else" or "default" loop
// since loops perform an "if" check by definition.

// …With one exception, a "do while ()" loop performs no check:
if (a) {}
else do {
// "else do while ()" is already possible in C and already functions
// the same way as in this example. It is just an "else".
} while (c);

// These examples could be mixed:
while (a) {}
else if (b) {}
else for (int i = 0; i < c; ++i) {}
else do {} while (d);
}

I'm sure plenty of you have ideas. Post them, or if you're feeling frisky, tell me how stupid mine is. Consider this a semantic masturbation thread for autists.

R: 29 / I: 0 / P: 13

Starting programming

Hey /prog/, I'm currently learning my first programming language, C++ (inb4 "retard starting with C++)

Anywho, I'm trying to decide on what language I should pair with it, as I'd like to turn it into a job at some point.

I'm thinking Java / C#, but I can't say I know the upside or downsides to either language and would like some opinions from people with more experience.

R: 3 / I: 0 / P: 13

Procedural writing.

Hey /prog/ at school we have to do some procedural writing activity, I decided to do Lua, you guys think this is a good TUTORIAL for BEGINNERS, and people with 0% experience with coding? inb4 ur spelling is shit

Commands:

= math.pi –Will print first 14 digits of pie.

= math.random(1,100) –Makes a random number gen.

a = 1

b = 2

= a+b

print(_VERSION)

+: addition

-: subtraction

*: multiplication

/: float division –(Standard Division.)

//: floor division

%: modulo –(Remainder.)

^: exponentiation –(To the power of)

-: unary minus

==:equality

~=:inequality

<:less than

>:greater than

<=:less or equal

>=:greater or equal

random = math.random(0,100)

print(random)

–This prints a valid point.

–Where as.

F = math.random(0,100)

print(f)

–Will have an error.

Introduction: Lua, what is it? Well you see Lua is a coding language, what is code? Code is what you use, to communicate with your computer. Lua is a lightweight addon to C. So where is it used? Lua has been used to make such applications and games as:

Adobe Photoshop Lightroom uses Lua for its user interface.

Cheat Engine, a memory editor/debugger, enables Lua scripts to be embedded in its "cheat table" files, and even includes a GUI designer.

Damn Small Linux uses Lua to provide desktop-friendly interfaces for command-line utilities without sacrificing lots of disk space.

Games that use Lua include:

Angry Birds

Crysis

Dark Souls

Garry's Mod

S.T.A.L.K.E.R: Call of Pripyat

S.T.A.L.K.E.R: Clear Sky

S.T.A.L.K.E.R: Shawdow

Saints Row 2

Saints Row 4

Saint Row 3

SimCity 4

Star Wars: Battlefront

Star Wars: Battlefront 2

The Sims 2: Nightlife

World of Warcraft

So, why lua? Well you see Lua is relatively easy to learn, thus my reasoning.

Today your going to be doing math, and making your own calculator for calculating, probability, and calculate the circumference of a circle.

Alright Step one, here we go.

First step make sure your computer is on. I'm expecting to much of you already aren't I?

Second step connect to internet, via bottom right then, click on the desired WIFI host. (HWDCSB-guest)

Third step open up the terminal via, bottom right, then click on accessories, then LXTerminal.

Forth step type in the terminal. “sudo apt-get install lua5.1” then allow it to run.

Fifth step type in “Lua5.1”

Sixth step Your lua interpreter has been opened, and your ready to code. What do we want to code though? Well today were going to make a calculator for doing probability and circumference of a circle.

Seventh step Alright, time to play around with your, interpreter. Type print(“Hello world”) congrats, you've joined the million of coders who have typed this first, as they begin to set out on there journey to create great things, like well this whole operating system was created by a coder.

Eighth step now that you've done that you can play around with some commands.

Example assign a to 1 via a=1 then do b=2 then do = a+b

Ninth step Now for our Probability calculator, we simple take any question involving probability, anyone got one? Question=false if question == false then print(“Alright lets do the chances of rolling a 5 on a 6 sided die”) end (do = math.random(0,6) if answer equals 5 then boom you won.)

Easy right?

Tenth step Now for that, circumference calculator. So say your trying to find the circumference of a circle with a 10cm long radius? Well this is easy actually. Simply do r = 10 then do = r/math.pi

your answer is? 3.18cm.

Eleventh step Alright guys now its your time to get to play around with your interpreter. What can you do? Well you can write some more calculations with those calculators you recently made, or you could try adding, a+b. Or simply just print some words, you can also use io.write“nil”

If you want to write something more complex you could do a couple of things

With if, then, or else.

And that is how to make a calculator for calculating circumference and probability, in Lua.

R: 2 / I: 0 / P: 14

Polish Notation or Hungarian Notation?

R: 13 / I: 4 / P: 14
Can anybody tell me what's wrong with this code?
it just shows a blank window in chrome, only the header works


<!doctype html>
<html>
<head>
<title>
header
</title>
</head>
<body>
<frameset rows="17%,*">
<frame src="window1">
</frame>
<frameset cols="17%,*">
<frame src="window2" name=menu>
</frame>
<frame src="window3.html" name=display>
</frame>
</frameset>
</frameset>
</body>
</html>
R: 14 / I: 0 / P: 14

Starter languages

For anyone looking to start from scratch, give Turing a try. It's what I used back in high school to learn the very basic fundamentals. Input and output is made super simplified and easy so you can focus on the actual working code. I found it very helpful in getting my head around the basic programming structures, like if/else conditions, loop types, variable types and arrays, and simple dot and line drawings. Once you have these concepts down it's easy to move up into object-oriented programming and other languages.

https://github.com/Open-Turing-Project/OpenTuring
http://www.beens.org/turing/
R: 25 / I: 1 / P: 14

its a matter of opinion

What is the best way to learn c++?
R: 12 / I: 0 / P: 14

Hey /prog what suggestions due you have for new programmers.

you know stuff you wish you knew when you started programming
R: 16 / I: 1 / P: 14
Does /prog/ have opinions on .NET? I bet it does.
R: 4 / I: 0 / P: 14
Just came up with this new sorting algorithm
I'm pretty sure this beats anything out there.

import sys
def arraySort(unsorted):
largestVar = 0
for i in unsorted:
if float(i) > float(largestVar): largestVar = float(i)+1
sortedArray = [None]*int(largestVar)
for i in unsorted:
sortedArray[(int(float(i))-1)] = i
for i in sortedArray:
if i != None:
print(i)

arraySort(sys.argv[1:])
R: 2 / I: 0 / P: 14

I'm trying to do more than one spoiler on a html document.

Yet when I click the 2nd spoiler button to show content, it displays the first spoiler content.

Help please.

<!DOCTYPE html>

<html lang="en">

<head>

<meta charset="utf-8">

<meta name="generator" content="CoffeeCup HTML Editor (www.coffeecup.com)">

<meta name="dcterms.created" content="Sun, 19 Apr 2015 20:52:42 GMT">

<meta name="description" content="">

<meta name="keywords" content="">

<title></title>

<!–[if IE]>

<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>

<![endif]–>

</head>

<body>

<a id="show_id" onclick="document.getElementById('spoiler_id').style.display=''; document.getElementById('show_id').style.display='none';"

class="link"><b><center> – click on me – Police Match DNA, Charge Man In Brutal Rape & Assault Of 81-Year-Old Woman – click on me – </center></b></a><span id="spoiler_id" style="display: none">

<a onclick="document.getElementById('spoiler_id').style.display='none'; document.getElementById('show_id').style.display='';"

class="link"><b>[Hide]</B></a>

<br>

<center><img src="perp/ME42F.png" width="387" height="248" alt="" title="" /></center>

<center>

<p>An 81-year-old woman was beaten, raped and terrorized for hours.Now, Columbus police have charged a suspect.</p>

The elderly victim spoke with 10TV New's Laura Borchers.Police say they now have DNA evidence that links Shawn Malone Jr to the crimes.

They did not have to go far for an arrest.</p>

<p>

Malone was in the Franklin County jail on a burglary charge.

Detectives say he's the suspect in a string of burglaries in addition to the abuse of the elderly woman.

</p>

<p>

"He picked me up by my heels and was beating me on the floor to wake me up again, because I was unconscious at least two times that I know," she said.

The woman said the suspect broken into a basement window, then crept upstairs to the room where he attacked her with a knife.

She says he left her with serious injuries including deep cuts, broken ribs, a broken tailbone and multiple deep bruises.

</p>

<p>

Columbus police confirmed she was abused and raped for hours January of 2014. The case remained open until they were able to match physical evidence with Malone. Monday afternoon they presented her with a photo line-up that included Malone's mug shot.

</p><p>The victim says after revisiting her memories of that night, she's given thought to what she wishes was Malone's punishment.

</p>

</center>

<center><a href="https://archive.today/ME42F">https://archive.today/ME42F</a></center>

<center><a href="https://web.archive.org/web/20150409055355/http://www.10tv.com/content/stories/2015/04/06/columbus-ohio-police-match-dna-charge-man-in-brutal-rape--assault-of-81-year-old-woman.html">https://web.archive.org/web/20150409055355/http://www.10tv.com/content/stories/2015/04/06/columbus-ohio-police-match-dna-charge-man-in-brutal-rape--assault-of-81-year-old-woman.html</a>

</center>

</span>

</body>

<body>

<center>

<a id="show_id" onclick="document.getElementById('spoiler_id').style.display=''; document.getElementById('show_id').style.display='none';"

class="link"><b>[Show]</b></a><span id="spoiler_id" style="display: none">

<a onclick="document.getElementById('spoiler_id').style.display='none'; document.getElementById('show_id').style.display='';"

class="link"><b>[Hide]</B></a>

<br>dog</span>

</center>

</body>

</html>

R: 46 / I: 3 / P: 14
I want to store data that will need to be human readable. Is there a better alternative than XML?
R: 1 / I: 0 / P: 14

Programming Study Group Started

We have a new project on /tech/ that started a couple of days ago. If you're a total beginner, it'd be a good idea to join in.

http://8ch.net/tech/res/196446.html#197013
R: 12 / I: 0 / P: 14

Vala

What does /prog/ think of vala? Is it worth my time?
R: 8 / I: 1 / P: 14

rate this page

Greetings fellow /prog/ers. I have 2 noobz questions for you guys.
1. How is the design of this page so far? I asked /art/ for critique on an older version and I fixed it since and i want to know if you guys think this looks good. Im looking to be a front end developer for websites, I can html, CSS, JavaScript and Jquery, and some extremely basic Python, and i made this because i need something to put in my portfolio as I have no experience. Keep in mind that this is not finished yet and I will be adding more and need to change the font too but I want to know if you guys think it looks good so far.

2. What else would I need to add to my portfolio? I have plural sight certificates, that's It really. Im making a personal webpage and if this webpage is good I can add that too, but what else should I include?

Thank you in advance folks
R: 7 / I: 0 / P: 14

Vim tricks

Does anyone know any tips for using vim?
R: 5 / I: 0 / P: 14

how ruby on rails?

Any Ruby on Rails users on /prog/?
Im learning Ruby right now(its a strange language) but I heard some mixed things about Rails. Some say its great and others have said its ridiculously hard. Iv also heard some say its dead and others say its flourishing.
And how is the job market like? I looked up some job posts online and found that people who look for Ruby on Rails programmers dont also ask for other ridulous demands, unlike say people who look for Javascript programmers they also need to be good at html and css, which I suck at extremely( I understand them easily, im just a shitty styler all around).
R: 4 / I: 0 / P: 14

Website on Dedicated Server

If I buy a dedicated server with a static IP, can I host my own website from there?

Expecting low traffic. The dedi has unlimited traffic w/ 100Mbps connection, 1.6GHz CPU with 2GB ram.

I'm already paying the same amount for a seedbox that's not a dedi, with 3/5 the storage and the same speed. If I do this how would I go about registering a domain?
R: 15 / I: 2 / P: 15
why the fuck am I so shit at html and cssing? I cant design a decent looking web page for shit. Hell im better Javascript and Jquery then I am at HTML and Css. How do some people say its easy? I think it must be because I am a shitty artist/designer so no matter what I do I cant make a decent looking webpage. I can read and write them easily but I can only make ugly looking pages even if I spend an entire day at it. Is there any hope for me? What do people with shit artsy skills do to make just a decent looking webpage?
All I want to do is make a simple webpage or two to show of some employers soon so I can web dev for employers but because I suck at designing a page I cant.
R: 16 / I: 2 / P: 15

OOP is a fag?

Hello /prog/, I need some advices about object oriented programming, why is it better than procedural? I code for the web so I always faced php, JavaScript and such, and lately I'm seeing OOP everywhere, bunch of frameworks that are messy, I get so confused, I understood the basics, but I can't let go the idea that procedural is more understandable, what can I do about it? Have you got some useful links? I really don't wanna quit coding just cause objects fuck with my head
R: 2 / I: 0 / P: 15
Ey guys, I am totally stuck. I need some examples of:

-Synchronous exception detected by the application
For example, an assertion on the program failed.

-Synchronous exception detected by the environment
For example, a division by zero.

-Asynchronous exception detected by the application

-Asynchronous exception detected by the environment
For example, a power failure.
R: 33 / I: 3 / P: 15

Functional Programming

Let's get into it. Lambda Calc, Pi Calc, Type systems, Macros, Monads, and even continuations.
R: 6 / I: 0 / P: 15
Web programming total noob here

I need to write some javascript that monitors a chat page. Any time there is new text that contains a certain word, it alerts the user. How is this done?
R: 4 / I: 1 / P: 15
I want to get into webdev, both frontend and backend. Any suggestions about what languages and libraries could I use for this, and also materials to read on recommended practices or even tips about security?

I thought about using Scala for both the backend and the frontend, since it is compatible with Java libraries and I heard Java is often used for high performance frontends, but I don't actually know which Java frameworks could I use for this.
R: 17 / I: 1 / P: 15

small shell utils

Just dicking around making small shell utilities in C. Any thoughts on this simple print util? Possibility to make it faster, more concise, etc. I'm going to be adding an option tomorrow to take in a format string for the remaining args to expand it's functionality to cover printf.


#include<stdio.h>
#include<string.h>

#define VERSION "0.2"
#define AUTHORS "O.P. Faggot"

void help(char * reason)
{
fprintf(stdout, "%s\nkutils 'print' v%s authored by: %s\nusage: print "
"[<-n> <-s '?'>] <variable>…\ndescrip: prints arguments to the screen "
"in the order they are given\noptions:\n-n\tdoes not print newline after "
"all arguments.\n-s '?'\tprints with separator '?' between each argument; "
"defaults to space.\n", reason, VERSION, AUTHORS);
}

int main(int argc, char **argv)
{
//ensure that argc is not 0 (possibility due to C11),
//quick finish no args for echo-like behaviour (argc == 1)
switch (argc)
{
case 0:
{
return 0;
}
case 1:
{
fputc('\n', stdout);
return 0;
}
}
argc–;
argv++;

char print_newline = 1;
char separator = ' ';

//check for program info args
if (!strcmp(argv[0], "–help"))
{
help("");
return 0;
}
else if (!strcmp(argv[0], "–version"))
{
printf("kutils print v%s\n", VERSION);
return 0;
}

//check for no newline and separator arg
while ((argc != 0) && (argv[0][0] == '-'))
{
switch(argv[0][1])
{
case 'n':
{
print_newline = 0;
break;
}
case 's':
{
if ((argv[0][2] != '\0') && !argv[0][3])
{
separator = argv[0][2];
break;
}
argc–;
argv++;
if (!argv[0][1])
{
separator = argv[0][0];
break;
}
//else falls into error below
}
default:
{
help("Invalid argument");
return 0;
}
}
argc–;
argv++;
}

// print all args separated by separator
while (1)
{
fputs(argv[0], stdout);
argc–;
argv++;
if (argc == 0) break;
fputc(separator, stdout);
}
// print newline at end if not specified otherwise
if (print_newline) {
fputc('\n', stdout);
}

return 0;
}


If you have any small utils like this share 'em here.
R: 0 / I: 0 / P: 15

You're welcome to #legit!

We're hosting a channel on irc://irc.freenode.net/legit.
If you wish to participate, or just to take a visit, we'll be happy.

The channel is open to everyone; we discuss several topics, not necessarily computers or programming.

Have fun.
R: 20 / I: 1 / P: 15

Dart Lang

https://www.dartlang.org/

Anybody else here use it? What do you think?

I've been using it for over a year now, and it's slowly dethroning python as my fav language. Sane OO, nice+easy lambdas, solid core libs, nowhere near the clusterfuck that is JS, and OPTIONAL_TYPING_MASTERRACE
R: 3 / I: 0 / P: 15

Anyone with nothing to do want to help?

Hello /prog/. On /b/ some of us are trying to get dragonslayer threads over here to 8chan. The problem is that none of us know what the hell we're doing, or just don't want to do it.
http://8ch.net/b/res/2115098.html
This is the thread.

If anyone here would be kind enough to help, we would be grateful.
>http://dragonslayer.eu01.aws.af.cm/
>https://github.com/entomb/dragonchan
This is the website and github. An anon in the /b/ thread said that this project would require rewriting the script from scratch, so it might be a lot of work.

If you don't want to help I completely understand. But if no one wants to it would be helpful if you would point me in the right direction for what I need to learn and download to at least attempt to try doing this myself.
R: 9 / I: 0 / P: 15
Java, C# or F# for my new project?

It's a small project but not too small. I master none of them but can put my shit together pretty well with Java. Anyways I don't mind learning a new language, will be the first one in years (not counting interpreted ones) which is always a good thing.

Also, is Visual Studio + Blend a good thing or a bad thing?
R: 5 / I: 2 / P: 15

pythonshit

pythonfags get in here.
i have a python3 script and i'm trying to translate it to python2.
it's just a post request.
code:
url = "https://site.com/register/"
payload = {"username":uName,"password":pwd,"birthday_month":bMonth,"birthday_day":bDay,"birthday_year":bYear,"email":email}
pReq=requests.post(url, payload)

i'm trying to create account on that site
R: 32 / I: 1 / P: 15
What kind of language would /prog/ make?
R: 7 / I: 0 / P: 15
Hi. I've never coded anything in my life, really, but I have a practical problem and I'm trying to create a practical solution for it.

I want to take a bunch of highlighted text, search each word in:

http://m.jisho.org/words?jap=[VARIABLE]&eng=&dict=edict

and then return the top result. ( body > p:nth-child(6) )

I had the idea to use LibreOffice to parse each word into its own cell, but trying to figure out how to do the next part is really stumping me. The only functions I've found are XMLFILTER and WEBSERVICE and neither of those seem to work since Jisho doesn't seem to use XML or a URI.

I'm learning Nipponese via romaji because I'm fed up with all the anti-romaji autism out there and don't give a shit about learning to read runes, but that means I have to provide 100% of my own content for learning, and staying stocked with new words to learn is much harder than actually learning them. This is supposed to be the answer to creating all the words I'll ever need.

Ideally I'd also like to take my spreadsheet data and turn them into anki cards, but one thing at a time.

Just what am I supposed to do here? Don't tell me I have to open up a development environment and code an entirely new feature to do something this simple.

Thanks for any help you can provide, I don't know how active this board is.
R: 5 / I: 0 / P: 15

JS power of twos

Sorry for the small question, but does anyone know if Javascript cares whether you have numbers in power of twos? i.e. is it any different if I decide the max value for my variable should be 100, or if I decide it should be 64?

And if not, can I make it care for optimization reasons? (millions of numbers in an array cluster)
R: 3 / I: 0 / P: 16

God please help me thread

I've been trying to get into programming around the clock. I'm quite good at reading and understanding the code, but compiling is such a pain.
I've tried getting into Python, Lua and C/C++, but the problem remains that i can't get any custom libraries working.

I feel like i completely misunderstand how libraries work, and at most; someone please tell me how i can install the wxwidgets library to work on my debian7 for Code::blocks.