[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
/dpt/ - Daily Programming Thread
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /g/ - Technology

Thread replies: 255
Thread images: 33
File: K&R himegoto waifux2.png (1 MB, 1000x1400) Image search: [Google]
K&R himegoto waifux2.png
1 MB, 1000x1400
old thread: >>54184851

What are you working on, /g/?
>>
resize using border instead of window
>>
My god...the possibilities i can make with html,css and js alone...
>>
nope, not this picture again. we're done with this one for a while. sage and make a new one boys.
>>
Writing a LISP interpreter in C.
>>
File: mfw waiting.gif (148 KB, 340x340) Image search: [Google]
mfw waiting.gif
148 KB, 340x340
>>54189600
>mfw waiting for my copy of K&R in the mail

i already read it 1000 times but i just want a physical copy to keep on my desk and look cool
>>
>>54189695

I think I need another. Mine is covered in coffee stains now.
>>
>>54189695
>everybody knows what K&R is
>i am so cool
>>
Working on my GNU/Turd kernel
Right now it outputs "Poo in loo" to UART
I should make a virus that replaces android kernel with the executable and make indians see poo in loo on their tablets and not be able to do anything
>>
ACTUAL NEW THREAD

>>54189735
>>54189735
>>54189735

DAERHT WEN LUATCA
>>
Reminder that "coding" and "coder" are legitimate words, e.g. Speedcoding, autocoders, and automatic coding systems.
>>
>>54189771
nobody cares, they're just words
>>
>>54189764
cease and desist immediately
>>
File: fuck joptionpane.png (28 KB, 690x328) Image search: [Google]
fuck joptionpane.png
28 KB, 690x328
I'm using JOptionPane to output messages, including this string, but it's ignoring the placement of my spaces. Pic related.

Any fix to this other than fucking up my string?
>>
>>54189728
What are you trying to say, anon?
>>
gonna spam my project once again: http://www.nask.co

any suggestions on what could I use this for?

and thanks to the anons that have helped me
>>
File: thuedotnet.png (4 KB, 303x201) Image search: [Google]
thuedotnet.png
4 KB, 303x201
Thue is actually pretty neat as far as esolangs go. It's not useless for the sake of being useless like BF and relatives.
>>
>>54189824
the definition is mono spaced font
>>
File: miley nightstick 1.png (316 KB, 728x485) Image search: [Google]
miley nightstick 1.png
316 KB, 728x485
Since we're not using my superior miley thread one of you faggots should at least try to answer my question.

>>54189225
>>
>>54189225

This is how you transform between variables.

B(t + k) - B(t) = C(t + k) + m(t+k) - (C(t) + mt) = h + mk

A(t + k) - A(t) = exp(B(t+k)) - exp(B(t)) = exp(B(t) + h + mk) - exp(B(t)) ~ exp(B(t)) + exp(B(t))*(h + mk) - exp(B(t)) = A(t)*(h + mk)
>>
>>54189874
fuck off
>>
>>54189874
>there are people on this earth who unironically enjoy whore miley cyrus
>>
File: ISHYGDDT.gif (1 MB, 250x250) Image search: [Google]
ISHYGDDT.gif
1 MB, 250x250
>>54189824
>manually typing out the entire board
Do you have a separate case for every permutation of moves?
>>
>>54189929
he probably does
>>
>>54189885
Actually, there's a mistake here.

A(t + k) - A(t) = exp(B(t+k)) - exp(B(t)) = exp(B(t) + h + mk) - exp(B(t)) ~ exp(B(t)) + B(t)*exp(B(t))*(h + mk) - exp(B(t)) = A(t)*B(t)*(h + mk) = A(t)*ln(A(t))*(h + mk)
>>
so, what would you people do if you were a complete failure as a programmer, as a tech person, and as a human bean?

should I an hero on cam?
>>
>>54189929
>>54189936
No, I don't. I use a 2d array and a for loop to tell it where in the string to replace with an X or O
>>54189872
Thanks. Any idea how to fix it without altering the string?
>>
>>54189951
>so, what would you people do if you were a complete failure as a programmer, as a tech person, and as a human bean?
Becoming a cop.
>>
>>54189962
>Becoming a cop.
only in shitty countries

>>54189951
browse /g/
>>
>>54189955
I hope you have a separate function for drawing the grid that takes a 3x3 gamestate array
>>
File: model turn phat.jpg (43 KB, 750x937) Image search: [Google]
model turn phat.jpg
43 KB, 750x937
>>54189885
>>54189943
this looks promising anon, thank you. it's going to take me a bit to decipher/figure out what you did and then implement but this should definitely help put me back on the right track.

here's a fatassed jewish girl as a reward.
>>
>>54189955
>>54189987
thats how i did it for my cli version i wrote in python
>>
>>54189987
Basically yeah. Look, my program is working perfectly. I'm just trying to output it in a window using JOptionPane. In the past I've just used icons, but that would be stupid for every instance of tictactoe so I'm using a string of which I alter. It works perfectly in the console but JOptionPane isn't outputting the string right. It sounds like it's because its monospaced, but what can i do?
>>
I'm trying to, with char arrays take the first letter of two names and combine them with the last four of their SSN to create a unique ID.

using namespace std;

typedef char input[20];
input fname, lname;
char ssn[10];

int main()
{

cout << "Enter first name: ";
cin >> ws;
cin >> fname;
cout << "Enter last name: ";
cin >> ws;
cin >> lname;
cout << "Enter SSN: ";
cin >> ws;
cin >> ssn;


cout << endl;
cout << "Unique ID: " << fname[0] << lname[0] << ssn[5] << ssn[6] << ssn[7] << ssn[8] <<ssn[9];

return 0;
}


This works fine. But if I want to be able to loop this and take in multiple inputs (lets say three, and end with 3 unique ID numbers) I have no clue how to do this.
>>
>>54189834

http://www.nask.co/L/e4qH5jfDck?a=1

The voice doesn't work for quite a lot of words but then sometimes it works well
>>
I'm coding a social aggregation website that will hopefullz be the new Reddit, I-m coding it in full stack Rails and Im looking for a Javascript ninja to join forces .... anyone interested? I dont need a 10xer but you need to be a MEAN/reactJS code artisan using the most async fork of node.js

the basic idea is to create a gamification userspace that will serve as an additional layer and a dock to people social applets. it-s all in the cloud and its scalable as we plan to add deep learning functionality with tensorflow

we need you to be proficient in IoT, big data, Hyperconvergence, SaSS and AGILE development

join our slack @ http://webizr.io

we can't pay you but you get a % after the project grows,rest assured

we do not code for the money. we code for the poetry of it

Team NoPass
>>
>>54189951
>>54189962
I don't mean a failure as in "I don't know shit", but as in "I don't even apply the things I know, I don't know how to apply them to help people/make money"

it's too late to become cop in my country, anyway
>>
>>54190134
>new Reddit
stop reading right there
>>
File: navyseal.png (62 KB, 794x821) Image search: [Google]
navyseal.png
62 KB, 794x821
still need to decide what to use for the database
2bh im kinda considering using mongodb but in terms of rust libraries nothing really competes with postgresql
>>54189853
what is the actual language like? can you post the file you're running?
>>
>>54190134
>reinventing the wheel
You should read Zero to One by Peter Thiel.
>>
>>54190166


Sure.

1_::=1++
0_::=1

01++::=10
11++::=1++0

_0::=_
_1++::=10

::=

_1111111111_


This just increments the binary number surrounded by underscores.

Basically, you write the list of replacement rules, followed by a rule with the LHS & RHS blank, and anything after that is where the replacement starts occurring.
>>
>>54190074
yeah, fucking picotts misspelling uppercase words. I guess I should convert the inputs to lowercase, but then, I may have problems with that, too
>>
how does someone miss all these grammatical errors in their comments?(like half is correct and half is not)
it's not the grammar that bothers me, it's all the red text underneath, good thing i can turn that off
>>
>>54190223
chrome likes to underline my correctly spelled words whenever I use words not in the top 1000 vocab words
>>
>>54190252
>chrome user
>>
>>54190268
Only browser that doesn't fuck up after a couple months.
>>
>>54190166
so why not just use postgresql? if you're just trying to be a contrarian you can take solace in the fact that normies use mysql. postgresql + linux is pretty unbeatable.
>>
>>54190289
keep thinking that faggot
>>
Best C++ for beginners?
>>
>>54189600
the SAME fucking picture every god damn thread
>>
>>54190314
control your autism
>>
>>54190305
I'd recommend the c++ variety.
>>
>>54190199
huh, that's interesting. sounds like a kind of primitive version of pattern matching. could be super cool if languages with pattern matching allowed you to expand out to digits/bits like that:
let is_even = function
| 0b{_0} -> false
| 0b{_1} -> true

>>54190294
it's probably what i'll end up using, but i think mongodb is more elegant in modelling the data in the way that the rest of the program will reason about it
>>
>>54190296
It's been my experience.
>>
>>54190340
wow fuck i wrote that function wrong, should be the opposite cases
>>
>>54190340
>huh, that's interesting.

It's pretty neat. Unfortunately, it's not complex enough to be of significant use.
>>
File: miley bbw love.jpg (134 KB, 634x954) Image search: [Google]
miley bbw love.jpg
134 KB, 634x954
>>54190340
>i think mongodb is more elegant in modelling the data in the way that the rest of the program will reason about it
elaborate if you care to. I find that I rarely go beyond CRUD, with like 80% of the work being R & C/U and all I care about is thus performance, safety and API ease/versatility. I haven't looked into all of it in a bit but on my initial research postgresql was the clear winner on that scale.

>>54190314
I tried making a superior thread containing pic related but it was rejected by the facist anime-loving regime of /dpt/ and resulted in hurtful things being said about miley.
>>
How much better are books compared to online resources like Sololearn?
>>
>>54190407
It's preference
>>
>>54190407
e-books
>>
>>54189600
I'm working on understanding how induction heaters work so that I can build one and blacksmith things in my dorm.
>>
File: smug.jpg (90 KB, 951x840) Image search: [Google]
smug.jpg
90 KB, 951x840
/git/
wtf is going on


git checkout xxxxxx
I tested some stuff.
Now git checkout master
It warn me about 4 commits behind not connect to any branch (?) I tought that after git init master branch is created?

Now after
git log
First 3 commits to the repo are normal, but all others are from completly different repo with different checksum.

What the fuck is going on?

I can get to old repo with git checkout -b temp HEAD{}, but why git messed up commits from different repo into this repo?
>>
If I have a vector of vectors of integers, how can I set the outer row and columns equal to zero?
Basically, if you imagine my two dimensional vector as a square, I want the outer edges to equal zero.
>>
just finished my crappy xml parser for lua...

https://github.com/MultHub/Aurora/blob/master/aurorasrc/apis/xml if anyone cares

and YES I KNOW THERE'S AT LEAST 1 XML PARSER FOR LUA, I'M JUST TOO BORED TO COPYPASTE THEM and it's fun to rewrite it every 2 seconds
>>
let's chat:

ssh <username>@chat.shazow.net
>>
Getting an LCD screen and a WiFi device working with SYS/BIOS but I am having a hell of a time with the SPI bus timings for some reason.
>>
>>54190620
fuck off
>>
>>54190576
the first row is just the vector at the 0th index, right? so you should've googled that and found this. http://stackoverflow.com/questions/8848575/fastest-way-to-reset-every-value-of-stdvectorint-to-0.

for the column you'll have to iterate through every other vector and set the first element to 0. it's kind of common in computer science that dealing with columns requires iteration of some sort while row manipulation is usually controlled by more explicit functions.
>>
>>54190607
god i forgot about that mod, that was hella fun to make shit with
have there been any updates recently? i might try making somethibng for it if i can be arsed to relearn Lua
>>
>>54190199
>Basically, you write the list of replacement rules
So, like Markov algorithms?
>>
Finaly got a 3D Cube Rotating but it looks...not right...can you help by telling me whats wrong?
>>
https://www.youtube.com/watch?v=0g_ziowjgR8
almost forgot
>>54190744
>>
>>54190744
https://en.wikipedia.org/wiki/Z-fighting
>>
>>54190744
https://en.wikipedia.org/wiki/faggot
>>
>>54190717

Maybe? I'm not actually familiar with Markov chains. Have some material to read on them, just haven't done it.
>>
>>54190700
>updates
cc 1.78, basically classic computers can use 4 colors now (black, gray, light gray, white)

JUST ASK THE WIKI
>>
>>54190773
Faggot, faggots, or faggoting may refer to:

faggot or fagot, branch or twig, or bundle of these
Fascine, bundle of brushwood used in civil and military engineering
Fasces, ancient symbol of an axe bound in a bundle of rods
Faggot (unit), archaic unit of measurement for bundles of sticks
Death by burning, metonymically referred to by the faggots which fuel the fire
Ashen faggot (or ashton fagot), Christmas wassail tradition in the West Country of England
a discarded cigarette end
Faggot Hill, a summit in Massachusetts, United States
>>
>>54190761
see >>54190759
>>
>>54190759
Looks like you're not not rotating with respect to the origin, if your cube is not at the origin you need to translate it there first, do the rotation, then translate back.
>>
>>54190773
Faggot
>>
>>54189600
killyourself
>>
sicc avatarfagging
>>
>>54190827
Thats not the Problem - look at the cube itself - it doesnt look like a 3D cube, kinda streched but i dont know why or what it is
>>
>>54190777
>Markov chains
Markov algorithms. They were invented by Andrey Markov Jr., the son of the guy who invented the chains.
Now that I've read entry about wikipedia, yes, Thue is indeed related to them.
>>
>>54190851
looks fine for a perspective projected cube dumbass

for 3d graphics you need to put more effort into it than this
>>
>>54190744
It is using orthographic projection which makes it look "weird".

>>54190761
>>54190773
Fuck off.
>>
>>54190886
thx
>>
>>54190882
>>54190886
>orthographic projection
ok this, not perspective projection
>>
Why do people do shit like this? It's not hard to script it, just evaluate the expression.

        var t,r,a,f, ISEbaix={"EtC":+((!+[]+!![]+!![]+!![]+[])+(!+[]+!![]+!![]+!![]+!![]+!![]))};
t = document.createElement('div');
t.innerHTML="<a href='/'>x</a>";
t = t.firstChild.href;r = t.match(/https?:\/\//)[0];
t = t.substr(r.length); t = t.substr(0,t.length-1);
a = document.getElementById('jschl-answer');
f = document.getElementById('challenge-form');
;ISEbaix.EtC+=+((+!![]+[])+(!+[]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]));ISEbaix.EtC+=+!![];ISEbaix.EtC+=+((!+[]+!![]+!![]+!![]+[])+(+!![]));ISEbaix.EtC+=+((!+[]+!![]+!![]+!![]+[])+(!+[]+!![]+!![]+!![]+!![]+!![]+!![]+!![]));ISEbaix.EtC+=+((!+[]+!![]+!![]+!![]+[])+(+[]));ISEbaix.EtC-=+((!+[]+!![]+!![]+[])+(!+[]+!![]+!![]+!![]+!![]));a.value = parseInt(ISEbaix.EtC, 10) + t.length;
f.submit();


/var t/ {
s/^[^:]+:/var expr = /;
s/};$/;/;
p;
}
/f = document/ {
n
s/^[ \t]+;//
s/a.value.*//
s/[^=]+(.=)([^;]+);/ expr \1 \2;\n/g
p
}
$ {
c\
console.log(expr + "domain.com".length);
p
}


var expr  = +((!+[]+!![]+!![]+!![]+[])+(!+[]+!![]+!![]+!![]+!![]+!![]));
expr += +((+!![]+[])+(!+[]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]));
expr += +!![];
expr += +((!+[]+!![]+!![]+!![]+[])+(+!![]));
expr += +((!+[]+!![]+!![]+!![]+[])+(!+[]+!![]+!![]+!![]+!![]+!![]+!![]+!![]));
expr += +((!+[]+!![]+!![]+!![]+[])+(+[]));
expr -= +((!+[]+!![]+!![]+[])+(!+[]+!![]+!![]+!![]+!![]));

console.log(expr + "domain.com".length);
>>
>>54190919
fuck off to >>>/g/wdg
>>
>>54190936
The only thing I wrote was sed, which I don't think is webdev.
>>
File: pc.png (378 KB, 1450x1080) Image search: [Google]
pc.png
378 KB, 1450x1080
>>
>>54190956
your entire cancer whatever the fuck it is reeks of webdev
>>
>>54190974
It's not, it's scraping.

Also calm down, lad.
>>
>>54190971
rolling
>>
File: eslqJ67.gif (2 MB, 375x375) Image search: [Google]
eslqJ67.gif
2 MB, 375x375
>>54190971
Noice, time to roll
>>
File: 1408546981270.jpg (202 KB, 1250x1250) Image search: [Google]
1408546981270.jpg
202 KB, 1250x1250
>>54190919
>this is valid javascript
>>
File: qqqqq.jpg (127 KB, 500x500) Image search: [Google]
qqqqq.jpg
127 KB, 500x500
Anyone ever think to overhaul Prison Architect to create a holocaust sim?
>>
>>54191069
do it faggot someone needs to make a good holocaust sim
>>
>>54191069
just play the sims instead
>>
>>54191092
what would be the social ramifications of a holocaust simulator game?

You certainly could never attach your real name to it or you would be thoroughly destroyed by internet progressives.
>>
>>54191092
I feel like there's no financial benefit to it though. I wouldn't be able to sell anywhere and couldn't use it for as a portfolio project.
>>
>>54191139
You might be able to slide it as an "educational" project.
>>
>>54191166
>I wouldn't be able to sell
yeah you, other people would
>>
>>54191209
That was a dumb point for me to make.
>>
>>54191069
Probably one hell of a work doing it alone. Though the idea is neat, might try something like this when I am on vacation the upcoming month
>>
>>54191139
>>54191166
you could literally sell it with your name attached unless you live in like germany

might stir up some controversy but that's what you'll be profiting off of
>>
>>54191264
Yeah but who pays for mods? That's why I think it was a dumb point for me to make.
>>
>>54190761
while this may not have been relevant I still had not heard of it and found wikipedia's brief summary interesting anon.
>>
>>54191069
>>54191092
super boring game, it'll be a management sim where you don't need to take care of the residents
the whole point of the game is taking people off trains and into ditches
no challenge what so ever
>>
>>54191284
counter-strike, dota, left4dead were all mods
>>
>>54191296
You could make it a logistics simulator game.
>>
File: 1460837290839.jpg (6 KB, 261x202) Image search: [Google]
1460837290839.jpg
6 KB, 261x202
>>54191284
Thought you meant building it from scartch. Like an own game.

I'd enjoy building some gas chambers that actually work
>>
>>54191296
there's plenty of things to do

transport people
sort them by gender, age, healthy
make them work
kill people
keep the good ones fed and free of disease
do research experiments
make counterfeit currency
etc
>>
>>54191139
same as the social ramifications for making a loli rape simulator, except in Germany where you'd probably be hanged if you made it
>>
File: ayyy.jpg (26 KB, 582x583) Image search: [Google]
ayyy.jpg
26 KB, 582x583
>>54191296
I think there'd be some way to make it work.
>>54191312
I'd say this idea is more akin to DayZ (not the standalone).
>>54191337
Avoiding uprisings as well.
>>54191335
Learning C++ and how to mod prison architect seems to be the requirements. So if you feel motivated, have at it.
>>
>>54190804
that's actually kind of interesting haha. I knew about the bundle of sticks but not about the relation to Fasces and by extension Facism. anyone know how it evolved into hate term for gays and then just a general term for a self-absorbed douche? I get the leap from gay to douche but sticks to gay seems odd
>>
>>54191337
>transport people
it's a camp, you don't control how people get there
>sort them by gender, age, healthy
completely irrelevant
>make them work
it's in a deathcamp
>kill people
that's the point of a deathcamp
>keep the good ones fed and free of disease
yeah no, that's not a deathcamp
>do research experiments
yeah no
>make counterfeit currency
the Nazi government should make fake Nazi money?

tr:dr your ideas a shit
>>
About Unity Engine development, is it preferable to work under *NIX or NT environment ? concerning C#, Mono and shit
>>
>>54191383
Not sure if it'd be more complicated modding it, or just making a holocaust sim from scratch. I'd actually prefer making it from scratch
>>
>>54191396
I think faggot was also used to refer to the people who gather the sticks for kindling.

I guess they were sissies or something, like what the fuck kind of lame ass job is that anyway?
>>
>>54191441
>deathcamp
good goy

also
https://en.wikipedia.org/wiki/Operation_Bernhard

tl;dr you have shitty imagination
>>
>>54191502
your ideas suck, your imagination sucks
>>
>>54191537
>On the evacuation of Sachsenhausen, the counterfeiting team was transferred to Redl-Zipf in Austria, a subsidiary camp of Mauthausen-Gusen concentration camp. At the beginning of May 1945, the team was ordered to transfer to Ebensee subsidiary camp, where they were to be murdered.[1] Their SS guards had only one truck for the prisoners, so the transfer required three trips. The truck broke down during the third trip and the last batch of prisoners had to be marched to Ebensee, where they arrived on 4 May. The guards of the first two batches of prisoners fled when the prisoners at the Ebensee camp revolted and refused to be moved into tunnels, where they would have probably been blown up. The counterfeiters then dispersed among the prisoners at Ebensee. The order was that all the counterfeiters be liquidated together; the delayed arrival of the third batch therefore saved the lives of all of them.
even here you have logistics gameplay

fag
>>
>>54191445
I'm afraid it'd turn out shit that way.
>>54191441
>no labor in a death camp
You could use them as labor to build and expand while having the risk of them fighting back or attempting escape.
>research experiments
Research could work like a tech tree that would go toward more efficient ways at exterminating them.
>counterfeit currency
It would be Allies currency and could be one of many ways of affecting the advance of Allies forces which would affect how many prisoners arrive to the camp.
>>
File: 1371598175760.jpg (2 MB, 3264x2448) Image search: [Google]
1371598175760.jpg
2 MB, 3264x2448
I want to have some level-generation shit run on the GPU instead of the CPU because GPUs are so much faster at this shit and I'm only going to be displaying a loading screen during the generation regardless
How would I accomplish this?
>>
>>54191884
That's some shit heroin
>>
File: Untitled.png (135 KB, 235x428) Image search: [Google]
Untitled.png
135 KB, 235x428
I've been trying to make a python program for my raspberry pi that posts on 4chan, How the fuck do I deal with the captcha?
I don't mean bypassing it, How do I even include it in my program? I'll type it in and shit.
Pic related, I just used ghost, because why not, to click it then grab the pictures but I have no clue what to do, it gives me an error if I view them on any other device.

Help /g/

pic related
>>
>>54189853
Yeah, I'm the anon who wrote that thue interpreter yesterday, it's actually really fun to play around with. Here's a program that eats up balanced parens (just for fun) and ignores any extra ones.

1+::=00
0+::=00
00-::=0
_0-::=_

00_|(::=00+<|
00_|)::=00-<|
1_|(::=1+<|
1_|)::=1-<|
0<::=<0
1<::=<1
_<::=_>
>0::=0>
>1::=1>
>=::==>
>|::=_|
>|::=_|
::=
_1_|((()())())()())
>>
>>54191884
https://www.opengl.org/wiki/Pixel_Buffer_Object
>>
>>54190971
what do I get to do?
>>
If you want to write a sequence of code
And at certain points within that code if a condition is met the program should skip to the end of the sequence
What would be the best way to do that? Function with returns?
Sorry for bad writing english isn't my first language
>>
>>54191981
also how to recaptcha v1?
;_;
>>
>>54192034
just use an if statement
>>
Im too retarded for github. how does it work?
>>
>>54192064
You simply don't use it. Use gitlab instead.
>>
>>54192034
goto

or nested if(!condition)
>>
File: Untitled.png (48 KB, 520x543) Image search: [Google]
Untitled.png
48 KB, 520x543
I remember a picture like this being posted, I made it for some reason.
from tkinter import Tk, Label
from PIL import ImageTk, Image
#shit code
def lol():
root = Tk()
root.iconbitmap(default='Blank.ico')
root.wm_title("Error")
img = ImageTk.PhotoImage(Image.open("penis.png"))
panel = Label(root, image = img)
panel.pack(side = "bottom", fill = "both", expand = "yes")
root.mainloop()
#shit code
lol()
>>
>>54192080
git is the problem and not the hub or lab. all those made up words and overcomplicated bullshit that was written by some hipster fedora with too much time. probably installed gentoo too.
>>
>>54192085
>>54192053
Okay thank you
Only thing is no goto and testing for the condition happens a lot so I will end up with a lot of nested ifs, which I've been told is bad
>>
>>54189600
Should I be trying to use design patterns? I usually try to make my program code just look generally good to look at and easy to navigate, and I don't like the idea of being told how to design my shit.
>>
>>54192111
It was rather sarcastic, but anyways.

I recommend using gitlab as it gives you the ability to create pretty much endless private repositories.

As for git, using SourceTree helps a lot with getting into git as you don't have to use your console.

Look for some videos on git preferably by windows users as they tend to not like using their console.
>>
>>54192163
I dont really need private ones. in fact I only need one public for my new open source project. I just wish I would be less retarded.
>>
Friendly reminder, don't use master/slave when referring to a model of communication where one device or process has unidirectional control over one or more other devices.

The correct term is primary/replica.

Thanks.
>>
>>54192111
you only need to learn some 5 commands,
git clone $URL
git pull
git add $DIRORFILE
git commit -m $COMMIT_MG
git pull


then, if you make a mistake or something, you google how to do it...

or just follow some tutorial or something
>>
>>54192227
I use the plugin for eclipse. Somehow I managed to add an existing project to a repository. did I do it correctly? no fucking clue.
>>
>>54192226
You're shitposting, but primary/replica actually makes the most sense.
>>
>>54192250
I suppose you did, I can't see what you are doing or what you need to do, m8

>>54192227
>$COMMIT_MSG
FTFM
>>
>>54192020
out of all the things I could have rolled
#include <stdio.h>
#include <stdlib.h>

int verifyInput(int argc, char *argv[])
{
if (argc != 2){return 0;}
else if (strcmp(argv[1], "-h")==0){return -1;}
else {return 1;}
}

void fizzbuzz(int n)
{
int i;
for (i=0;i<n;i++)
{
if (i%3==0){fprintf(stdout, "fizz");}
if (i%5==0){fprintf(stdout, "buzz");}
if (i%3!=0&&i%5!=0){fprintf(stdout, "%d", i);}
fprintf(stdout, "\n");
}
}

int main(int argc, char *argv[])
{
int verified = verifyInput(argc, argv);
if (verified==0)
{
fprintf(stdout, "Use a number dipshit");
return -1;
}
else if (verified == -1)
{
fprintf(stdout, "USE:\n\tfizzbuzz (N)\n\tWill perform Fizzbuzz from 0 to N as long as N is an integer greater than 0");
return 0;
}
else
{
int n = atoi(argv[1]);
fizzbuzz(n);
return 0;
}
}
>>
>>54190971
ROLLIN 4 JAY-Z
>>
>>54192218
Create the repo on github or gitlab

Connect SourceTree to your github/gitlab account and checkout the repo (left button, where it says URL put in the URL it shows on the project page) (it asks you for the login when you check out the repo)

Click on the 'Git Flow' button which will create the develop branch on your local machine and switch to that

Start developing your project

Every time you finish a feature / small part of one, fix something, etc, select all the files you want to commit and click on the commit button, put in a comment which helps you (and others) see what you did, prepending small 'tags' like feat, fix, docs, style, refactor, perf, test, chore so that your commit message looks something like:

>fix: Bug where users couldn't log in


Try to not exceed a length of ~70 in the first line of the commit message, if you need more space do two returns and write more info

>fix: Bug where users couldn't log in

>Some part of something was broken, fixed it by doing xyz


If there's changes on the remote, SourceTree will show you a number on the pull button, just click that.

To push changes to the remote, click the push button after committing them.

>Jesus fucking christ I typed too much, just use fucking google.
>>
>>54192227
FFS... last one is
git push
>>
>>54192298
https://github.com/Heerbann/openStronghold

it's a libgdx project so it should contain 3 projects in total but only one is showing for whatever reason.

>>54192365
thanks that helps. but one thing Im still unsure what exactly needs to go up. there is a lot of meta data (for example the gradle stuff). does this need to go up too or just the source files? is the idea that there is a 1:1 copy on git?
>>
>>54190971
?Roll?
>>
File: derp.png (24 KB, 330x538) Image search: [Google]
derp.png
24 KB, 330x538
Can someone write a program to get captcha hashes for me?
I'll type the captcha, I just don't know how to do the rest.
I have programs that need this code ;_;
Wat do?
>>
>>54192343

this isn't even a full fizzbuzz
>>
I'm a bored as FUCK anon with no direction in life, anyone have a cool project idea they want to share so I can try to get my shit together?
>>
>>54192500
how is it not?
fizz for multiples of 3, buzz for multiples of 5, fizzbuzz for multiples of 15, numbers for everything else
that's a fizzbuzz
>>
>>54192504
Omegle IP grabber
I made one and it was pretty satisfying.
It even has options to screenshot or pull geolocation data and display a map of where the person lives. kek
>>
>>54192523
And where do you print FizzBuzz?
>>
>>54192540
are you joking anon?
fprintf prints to stdout, where I separate them by newline characters
so for 15, it hits the first case, prints "fizz", then hits the second case as well, printing "buzz" right after it
then it does not hit the 3rd case, and it prints "\n"
so it prints "...\nfizzbuzz\n..."

do you not understand how these functions work?
>>
>>54192495
>tfw I'll never be able to make my program complete
>>
>>54192113
it would help if you post example code so we can see if there's a nicer way to write it

personally i dislike making functions just for things like this
>>
>>54189600
That's a boy, isn't it?
>>
>>54192584
>implement new features to "99%" complete
>be left with a gorillion boring things to finish off that i keep putting off for later
>>
I like that idea but I'm hesitant because I've already written too much useless shit that's not going to look good on a CV.
>>
>>54192762
Meant to quote >>54192534
>>
>>54192615
Pseudo code because my actual code is long. The program is a server that connects to a client. The client needs to send messages that follow a protocol. If any of the clients messages don't adhere to it then the server needs to send an error code and then end the communication

Open connection
Send greeting message
Read line from client
if (line is valid)
Send next message
Read message from client
if (line is valid) {
Send next message
Read message from client
if (line is valid) {
etc.
} else {
Send error message
}
} else {
Send error message
}
} else {
Send error message
}
Close connection
>>
>>54192627
Yes. Yes it is. It's from an anime about a boy forced into crossing from some female peers.
>>
>>54192445
You might need git stash too.
>>
Installing dmd on Gentoo was a minor inconvenience
>>
>>54192900
send msg
recv msg

if (msg is wrong)
return message_is_wrong_01

send msg
recv msg

if (msg is wrong)
return message_is_wrong_02

...


Depends on language, return might be throwing an exception.

If it's C(or similar), you might have cleanup to do in your function. There you use goto.

errcode = SUCCESS

send msg
recv msg

if (msg is wrong) {
errcode = message_is_wrong_01
goto fail
}

send msg
recv msg

if (msg is wrong) {
errcode = message_is_wrong_02
goto fail
}

...

fail:
/* cleanup */
return errcode
>>
>>54191988

Interdasting. Wrote mine in C#.

RULE ADDED, LHS: >|, RHS: _|
RULE ADDED, LHS: >|, RHS: _|
RULE ADDED, LHS: >=, RHS: =>
RULE ADDED, LHS: >1, RHS: 1>
RULE ADDED, LHS: >0, RHS: 0>
RULE ADDED, LHS: _<, RHS: _>
RULE ADDED, LHS: 1<, RHS: <1
RULE ADDED, LHS: 0<, RHS: <0
RULE ADDED, LHS: 1_|), RHS: 1-<|
RULE ADDED, LHS: 1_|(, RHS: 1+<|
RULE ADDED, LHS: 00_|), RHS: 00-<|
RULE ADDED, LHS: 00_|(, RHS: 00+<|
RULE ADDED, LHS: _0-, RHS: _
RULE ADDED, LHS: 00-, RHS: 0
RULE ADDED, LHS: 0+, RHS: 00
RULE ADDED, LHS: 1+, RHS: 00

::=
_0_|()())


Not a lot of thue programs out there, though. I only found a few of the test ones.
>>
It's an adventure generator.

1::=Steve Jobs
1::=Richard Stallman
1::=Dennis Ritchie
1::=Bill Gates
1::=Haskell Curry
2::= was uneasily contemplating the nature of his A life while planning his suicide.
2::= has been known to eat A parts of his own body.
2::= is a well known researcher and has contributed Aly to the computer science community.
A::=curious
A::=quizzical
A::=imperfect
A::=monstrous
A::=beautiful
A::=phallic
::=
12


Richard Stallman is a well known researcher and has contributed beautifully to the computer science community.
Haskell Curry has been known to eat monstrous parts of his own body.
Haskell Curry was uneasily contemplating the nature of his beautiful life while planning his suicide.


wew
>>
>>54193519
>multiple returns
>gotos
You sick fuck.
>>
File: 1460291316757.jpg (40 KB, 640x480) Image search: [Google]
1460291316757.jpg
40 KB, 640x480
>>54193944
Fuck off Dijkstra, nobody likes you and your faggot ideas.
>>
>>54192227
I'd say that git pull --rebase is also essential.
>>
What is DPT's opinion of Mercurial?

>>54193944

While goto is pretty shit, there is absolutely nothing wrong with multiple returns.
>>
>>54194177
What advantages does it have over git?

cvs/svn can be tolerated for historical reasons, but if it has nothing over git, hg should die.
>>
I'm quite noob at git...

>>54193347
imho, git stash is kinda dangerous tbqh, I prefer git add/remove then pull

>>54194037
I still don't know shit about branching :(
>>
>>54194208

So... I've got a professor that hates the shit out of Git. One of the reasons being that it doesn't support checking things out by tag. CVS supports this, and so for his assignments, he requires us to use CVS. For my compiler's class, he has lately allowed us to use Mercurial, since it supports the same features, and it's newer. By comparison, I prefer Mercurial over CVS, although every so often I find myself accidentally typing git instead of hg, only to remember that "oh yeah, I'm using Mercurial."
>>
>>54190971
pls nothing hard, roll-kun
>>
>>54194266
>he requires us to use CVS.

This professor seems like a dummy.
>>
>>54189785
well said
>>
I found the key and secret to being really great at programming I shoved a water bottle up my butt 15 minutes ago and programming became super easy to me and I saw the components of a computer down to 1's and 0's and saw every byte down to memory address location
>>
>>54194452
it will be ages for i can even think about doing this
>>
>>54190067
what IDE you using mate?
>>
>>54194509
It's not that hard you need to read up on Networking in your programming language then read up on TCP protocol and how it works it's a lot of reading
>>
>>54194472
He required it for one class, before he had become aware of Mercurial. I'm using Mercurial right now for my compilers class with him, because it beats the hell out of CVS.

And yes, he hates Git. He also has a thing for NetBSD over Linux, although this may be because he ported NetBSD to some odd architecture.
>>
>>54194568
>He also has a thing for NetBSD over Linux

Oh, he's one of those guys.
>>
File: 1428996280012.png (254 KB, 592x602) Image search: [Google]
1428996280012.png
254 KB, 592x602
>>54194530
>it's not hard
>you just need to do a lot of reading
im already reading something
>>
>>54190067

Take all the code you have in your main function but return 0 and make a function with it.

In your main function use a while loop.
>>
>>54194587
Learning about things usually involves reading.

When you're done reading what you're reading, read something else.

If it's manga or any fiction, it falls under another category. Read the informative shit until you get bored, read the entertaining stuff, then get back to the other shit.
>>
>>54190403
Is she getting breastfed?
>>
>>54190971

lets see
>>
>>54189600
Stop this programming fag meme.
>>
>>54194791

fuck
>>
>>54194782
No, just sucking on a fat niggers tits.(For degeneracy's sake)
>>
Am I the only one who hates people doing this or am I autistic
>>
>>54194810
>No, just sucking on a fat niggers tits.

I am truly jealous
>>
File: 1461370951449.jpg (108 KB, 700x933) Image search: [Google]
1461370951449.jpg
108 KB, 700x933
>>54190971
be kind
>>
>>54194858
>very hard
kekkkkkkkk
>>
>>54194828
Yes, I only believe in typedefs when the type is opaque or clearly defined(and required).
>>
File: 1461369528138.jpg (74 KB, 736x1104) Image search: [Google]
1461369528138.jpg
74 KB, 736x1104
>>54194869
I'm just going to reroll
>>
>>54194828
top kek
>>
>>54194828
as much as I shill Xcode, that looks nice
>>
What are the best practices for making a game engine? Other than not doing that.
>>
So, I'm trying to design a simple language that will be compiled into C because fun! And because there are some things I want in C.

I was thinking about indentation vs brackets for scoping, and I would like you guys to remind me why using indentation for scoping is so bad. It just keeps things so much more clearer than using brackets.
>>
>>54194914
Not making a game engine is the best thing to do when making a game engine. Even if it's a simple one. Just... no. You'll get bored and frustrated within a day.
>>
>>54194928
>Other than not doing that.
It's also in javascript because fuck you answer my question.
>>
>>54194947
>javascript
ok definitely don't make a game engine pls

>>54194923
Forced indentation is cancer (*ahem*python). Braces make scoping much more clear.
>>
>>54194979
I'm making it, I just don't want to start typing shit and then realise it's shit and have to restructure.
>>
>>54194989
A game engine in development begins as shit, it stays shit, and is released as shit. If you're uncomfortable with that then don't make a game engine.
>>
>>54194979
>Forced indentation is cancer (*ahem*python). Braces make scoping much more clear.
But how?

For instance, here's what I was thinking about at first:

type f-name: c:type arg, c:type arg
{
(func arg arg)
if (func)
{
(func arg arg)
(func arg)
}
else
{
(func arg)
(func arg)
}
}


Brackets just waste so much space. Here's what I have currently, which is much more lispi and more close to what I want as a basis:

(type f-name ((c:type arg) (pp:type arg))
(func arg arg)
(if (func arg arg
arg)
(func arg arg)
{(func arg arg)
(func arg arg)})


you don't really need to look at the parenthesis to understand where things belong. Infact, one of the first things I've been told when I was learning lisp was that nobody actually reads code through parentheses or brackets, but through indentation.
>>
how do you learn new langs fast when you already know a few? do you simply read a book on it from start (integers and other bullshit) to end? do you try to find books on "X language for Y programmers"? do you simply build the dev env and start following guides?
>>
>>54195200
When you learn a big language like C++ to a point where you're confident, learning another language is pretty trivial. It's pretty much looking at the documentation and saying, how do I do this, what kinds of things are named differently etc.

Looking through the documentation is so much easier than getting a book imo
>>
>>54189951
probably
>>
>>54195279
>>54195200
This is not true. It highly depends on what language you're trying to learn and how much you need to learn about it. An integer can be handled very differently between even similar languages.
>>
>>54194650
nah i was talking about informative shit.
>>
>>54195200
1. don't focus on syntax or standard libraries at first
2. download the compiler/interpreter and fire up a REPL
3. read the docs on the website if you dont have time for a book, but skip whatever makes sense to you off the bat
4. give yourself a weekend to do something with it. dont be scared to write shitty code, it'll give u something to look back at and fix later on
5. if you're stuck, look through some example code and then take the day off. try the problems from scratch the day afterwards

this is more or less the strategy ive used every time ive tried to learn a language in less than a week, but with some of the languages it's just not possible to learn them that quickly

as an example, i basically started seriously learning Rust (ive read other people's Rust code in the past and looked up things i wasnt sure about, but never tried writing anything until now) on monday evening and i've been working on a project with a few friends all week using it
>>
>>54195279
>What is Haskell
>What is Prolog
>What is Brainfuck
>>
>>54195620
yup those were the kinds of exceptions that i couldnt learn within the span of a week alone but had to keep returning too to "get it right" after finding better sources each time
and i will say, 50% of the difficulty in learning a lot of languages is just shitty tutorials. im certain that with the right tutorial it'd be possible to learn enough Haskell to make a small project in a matter of days
>>
>>54195601
nice, thanks. I've actually done a few of the things you mention... but then I keep fearing that I will forget things soon :/
>>
>>54189600
So I need to print out grades for students alphabetically for an assignment as homework for a C++ programming course. I have created a method that displays the grades, but the names are stored in a different array, and I also have to print the total (don't know why), average, and letter grade. This is the code I have so far. I made the arrays type string because I think I might be mixing numbers and names soon.


#include <iostream>
using namespace std;
void display(string marks[10][5]);

const int ROW = 10;
const int COL = 5;

string marks[10][5] = {{ "50" , "60" , "70" , "80" , "90" },{ "50" , "60" , "70" , "80" , "90" },{ "50" , "60" , "70" , "80" , "90" },{ "50" , "60" , "70" , "80" , "90" },{ "50" , "60" , "70" , "80" , "90" },
{ "50" , "60" , "70" , "80" , "90" },{ "50" , "60" , "70" , "80" , "90" },{ "50" , "60" , "70" , "80" , "90" },{ "50" , "60" , "70" , "80" , "90" },{ "50" , "60" , "70" , "80" , "90" }};

int main() {

string names[10] = { "Abba", "Babba", "Cabba", "Dabba", "Ebba", "Febba", "Gebba", "Hebba", "Ibba", "Jebba" };


display(marks);
return 0;
}

void display(string marks[10][5]) {
cout<<"Displaying marks: "<<endl;
for(int rowCnt = 0; rowCnt < ROW; rowCnt++)
{
for(int colCnt = 0; colCnt < COL; colCnt++)
{
cout<< marks[rowCnt][colCnt] << " ";
}
cout << endl;
}
}


// Make a character array to store the names of ten students
// make another int marks[10][5] array to store three marks for ten students
// extend the display function to display the name of every student, followed by 5 marks, total , percentage and Grade obtained by the students.
// display() should be called ten time from the loop in the main body of the program


>>
>>54189600
I'm so happy /g/. I had 55% going into my discrete math final, and I got 72% on the exam, bumping me up to 63%. I went up a whole letter grade.
>>
>>54194810
try ENORMOUS fat nigger tits. miley is 5'5", that bitch has gotta be about 7 foot
>>
>>54196050
disgusting. discrete math is a lot easier than continuous, there's a lot fewer numbers.
>>
>>54196138
Continuous is much easier.
>>
>>54189679
please tell me you're not reading buildyourownlisp
because its shit
>>
Tell me, /dpt/. Why does 2 + 2 equal 5986?
>>
>>54189653
websites
you can make websites
>>
>>54195620
>haskell
I'll give you that one
>prolog
Declarative isn't that bad
>Brainfuck
It's a set of simple instructions. I don't know how that's a hard one to learn if you know any decent language
>>
Is there a difference between these?
function testing(shobon) {
this.shob = shobon ? shobon : "shobon";
this.shobon2 = function() {
return this.shob + "2";
};
testing.prototype.shobon = function() {
return this.shob;
};
};

var shob = new testing();
var shob2 = new testing("(´・ω・`)");


Also is there a difference between putting the prototype stuff outside of the function?
>>
>>54196642
because you touch yourself at night
>>
>>54196854
It takes <10 minutes to learn the instructions for Brainfuck. Mastering the language takes a while. I don't think I could even write a for loop in it.
>>
>>54196886
I forgot to say between this.shobon2 and prototype.shobon.
>>
>>54196897
you would use a while loop and check/modify the values in a cell. basically something like this
>             args in the cell (like, i := 0)
[ > + increment the cell
conditions go here
<< - ] end loop
>>
I have a single #ifdef HAVE_PLEDGE in my small C program to add support for openbsd's pledge function. I really don't want to pull in cmake or autoconf just to check for a single dependency.
>>
>>54197038
Doesn't seem possible to do without make. You could just shove #define HAVE_PLEDGE at the top and tell people to uncomment it or something.
>>
>casting an 8 bit int that is zero and adding it to a string/char array results in C treating it as a NULL terminator
For fucks sake kill me.
>>
Is there a performance difference between copying, say, 10 chars and 10 ints individually and a structure containing all of them?
>>
>>54197193
As is the character or the number? The NULL terminator is literally just 0.
>>
>>54196897
Well that was fun

+++++[>+++++++++++++<-]>.<++++[>++++++<-]>..<++++[>---<-]>-.+.<++++[>---<-]>.<++++[>+++<-]>++.
>>
>>54197193
yes, NULL is the string terminator. btw, casting the 8 bit int to what?

>>54197195
depends on how you copy them, no?
>>
>>54189600
Keep overflowing the stack, Hime!
>>
>>54197203
Exactly. I can't set a string(char arrray) to have a zero in it so I can send it over a network so the other computer can process it. The problem really is that I can't simply pass strlen(string) to the socket send function which is a pain.
>>
>>54197250
Just add zero to the number.
0 + '0';
>>
>>54197237
struct t a=b;
vs
while(i<n){
intarrA[i]=intarrB[i];
chararrA[i]=chararrB[i];
i++;
}
>>
>>54197250
So? Just make your packet structure hold a length.
>>
>>54197265
Hahah what? This actually worked. Can just "+ '0'" on the sender and "- '0'" on the receiver. Seriously thank you mate I was stuck on this for an embarrassingly long time.
>>
>>54197317
I know this will *usually* work but is it guaranteed to work? IIRC some systems grant different characters different integer values.
>>
I've mainly just used fancy text editors and terminal to code, but I want to become more adjusted to IDEs for work. Specifically, I'd like to learn IntelliJ, since eclipse is horse piss (my work uses both). What'd be the best way to get a head start? YouTube? Online documentation?
>>
I did not sleep yesterday, today i need to implement some features, but i can't, i wanna sleep, i write on ruby and react.
>>
>>54190971
Hello
>>
>>54197342
It would break literally everything if it wasn't standard.

If you're really worried there are functions like atoi() which converts strings to integers. You'll have to write itoa() yourself (it isn't hard) because it isn't standard.
>>
>>54197310
Problem with that is that when I receive, I can't strlen in that case. "+ '0'" seems allot more intuitive. Don't even have a packet structure, just functions that return malloced strings that I can send right away, which might be horrible, will see if defining a packet structure is less messy.

>>54197342
It's pretty portable with stdint, you can use uint32_t, uint8_t etc so you don't have to worry about the system being x64 or x32
Thread replies: 255
Thread images: 33

banner
banner
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [Home]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.