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

/dpt/ - Daily Programming Thread

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 339
Thread images: 32

File: 1480956343871.jpg (675KB, 940x822px) Image search: [Google]
1480956343871.jpg
675KB, 940x822px
What are you working on, /g/?

Old thread: >>59813382
>>
>>59816790
Writing a Haskell compiler in assembly.
>>
>>59816790
Why is Shinji dressed like a girl?
>>
File: gccwtf3.png (20KB, 751x439px) Image search: [Google]
gccwtf3.png
20KB, 751x439px
gcc made this nice loop for me.
but what does it do?
>>
>>59816803
It's Kaworu
>>
Who are you quoting /g/?
>>
>>59816819
Why is Kaworu dressed like a girl?
>>
>>59816830
Because he's gay
>>
>>59816821
Whom quotest thou?
>>
>>59816830
cuz he took lessons from you
>>
>>59816830
they do show his dick in the first rebuild movie for a brief moment though.
>>
c++ garbage
>>
Maybe I should wait for a few years. Then it will be possible to fuck an actual anime.
>>
>>59816790
I like her when I see her as autistic. I don't know if she's meant to be autistic though.
>>
Am I autistic?
>>
Trying to balance all my engineering pre-reqs with going through SICP

That, and complaining about how cancerous /dpt/ has become with desperate attention whores that post the same fucking drivel each time
>>
>>59817008
>going through SICP
how far are you in? when did you start?
>>
>>59817024
I've been going kind of slow, but I started last week and I'm at 1.2.4 - Exponentiation... I'm actually kind of motivated to get ahead in my classes to have more time to read this book
>>
>at strip club
>all i can think about is telling the stripper you can find the pair of closest points in O(nlogn) time

help me
>>
>>59817024
>>59817036
Does SICP cover compilation?
>>
>>59817071
From what I can tell, yes!
(Chapter 4 is titled " Metalinguistic Abstraction", and Chapter 5 has a section called Compilation!)
>>
>>59817051
From whom did you reference this statement?
>>
>>59816814
what is this
>>
>>59817051
just tell her
post results
>>
>>59817085
>Metalinguistic Abstraction
>In computer science, metalinguistic abstraction is the process of solving complex problems by creating a new language or vocabulary to better understand the problem space. It is a recurring theme in the seminal MIT textbook, the Structure and Interpretation of Computer Programs, which uses Scheme as a framework for constructing new languages.

>seminal
>1. (of a work, event, moment, or figure) strongly influencing later developments
>2. relating to or denoting semen.

english was a mistake
>>
>>59817132
I didnt. But I did refuse a lap dance with one

Its probably the funniest shit ive ever seen
>>
File: 1459081435041.jpg (81KB, 720x720px) Image search: [Google]
1459081435041.jpg
81KB, 720x720px
>>59817085
Now I don't know if I should read it or Lisp in Small Pieces.
>>
File: truth.jpg (27KB, 320x320px) Image search: [Google]
truth.jpg
27KB, 320x320px
>>59817051
>>
>>59817159
>Its probably the funniest shit ive ever seen
ok, story time
>>
>>59817140
Nice faggot book, can't believe cs fags are such semen slurpers. Well I'm not surprised in the slightest in the end.
>>
>>59816790
Define work Xd
>>
>>59817213
>>>/v/
>>
>>59817171
that's a really cute girl anon.
>>
/dpt/ challenge: write a repeating digits detector. It must detect all repeating digits in a number.

Next level: write a bot that automatically shits up the thread when it detects one such digitworthy post
>>
>>59817203
You couldn't get through the first chapter, could you? I bet your uni taught Java
>>
>>59817171
Well, I don't know about "Lisp in Small Pieces", but SICP seems to e universally acknowledged as a good book. I'm having a lot of fun with it, for what it's worth, so I suggest you give it a try!
>>
>>59817140
If you knew latin you would find the joke extremely dull
>>
>>59817281
You drank the cum of all your schoolmates while they wrote console apps didn't you?
>>
>>59817314
lewd
>>
>>59817182
went to atlantic city for my friends bachelor party
we went to a strip club
some latino stripper asks me if i want a lab dance
shes like 2 feet shorter than me and is doesnt even look 21
she tries her hardest to get me to say yes
still say no
as a last resort shes gives me the ole "are you really gonna reject me?" with a playful face
still say yes

idk man i think it was funny
>>
>>59817314
>apps
>>
>>59817310
Whats the joke?
>>
>>59817340
meh
>>
>>59817436
im not good at telling stories
>>
>>59817441
You're not good at accepting lap dances either.
>>
Would it be worth trying to program in something like Python using a Dell laptop running on 16GB of RAM and an i3-3217U? Everyone keeps telling me it's a bad idea.
>>
>>59817465
>Python
No, it's not worth it.
>>
>>59817464
its not like it was free
>>
>>59817491
wouldn't accept it either desu
>>
>>59817478
What is then?
Or should I just get a new computer?
>>
>>59817561
>>59817465
Unless you're trying to do some very computationally heavy shit, you can program on a toaster.
>>
What book about clean code would you recommend /dpt/
>>
>>59817261
bool has_repeating(int n)
{
bool ret = false;
for (; n != 0; n /= 10) {
int last = n % 100;
if (last % 11 == 0) {
ret = true;
break;
}
}
return ret;
}


Alternatively...

bool has_repeating(int n)
{
bool ret = false;
auto n_str = std::to_string(n);
for (int i = n_str.length() - 2; i >= 0; i--) {
if (n_str[i] == n_str[i + 1]) {
ret = true;
break;
}
}
return ret;
}
>>
Is there a way to launch a node.js server locally in order to test a project in development?

Or is there a free service that can launch node.js and let me dick around with server/client side ideas.
>>
>>59817644
>Is there a way to launch a node.js server locally
u serious bruh

just run it on localhost
>>
File: 62451464321.png (273KB, 720x780px) Image search: [Google]
62451464321.png
273KB, 720x780px
what type of work would an entry level python dev do on the job?
>>
>>59817678
can you dance at all or just code python?
>>
>>59817694
i can write shitty scripts with my limited knowledge
no good at dancing
>>
Trying to make a dumb endurance game for betterfap via greasemonkey but the damn next button is killing me, nothing I do works to trigger it. I've tried document.querySelectorAll('div[tip="next"]')[1].click(); but that doesn't work. I know it's getting the right element because document.querySelectorAll('div[tip="next"]')[1]; ran via console returns as expected, also tried via making a mouse event and calling it on it and that didn't work either.

https://betterfap.com/view/15083109

found a SFW image that should work as an example- I am just trying to trigger that next button up at the top, but I'm not a web dev so I am at my wits end
>>
>>59817670
>just run it on localhost
For some reason I wasn't getting any proper results when I looked up how to launch a node.js locally. I typed in localhost node.js and I got the results I need.

Thanks for honoring my tardism.
>>
@59817678
>python
>dev
>>>/r/abbit
@59817694
>code
>>>/g/wdg
>>
>>59817718
alright well the scripting will take you pretty far bit if you wanna be famous and you wanna be a dancer you gotta show a little skin alright?
>>
File: robbie.jpg (36KB, 600x614px) Image search: [Google]
robbie.jpg
36KB, 600x614px
>>59817739
ok
>>
>>59817791
Basically Python is a terrible language
>>
#include <stdio.h>
#include <string.h>

void copy(char to[], char from[],int x);

/* print the longest input line */
int main(char *argv[1]){
FILE *f;
int lines = fgetc(f);
int c = 0;
char name[80];
char name2[80];
char first[1];
char second[4];
f = fopen(argv[1],"r+");

if(f == NULL){
perror("Error in opening file");
return(-1);
}

while(c<lines){
int a = 0;
int b = 0;
for(a<80;a++;){ name[a] = fgetc(f); }
copy(first,name,1);
a++;
while(name[a] != ' '){
name2[b]=name[a];
b++;
}
copy(second,name2,4);
c++;
}
printf("%s%s000\n", first, second);

fclose(f);
return 0;
}

/* copy: copy 'from' into 'to', with a character limit */
void copy(char to[], char from[],int x){
int i;
i = 0;
while (i<x){
to[i] = from[i];
++i;
}
}

I'm getting a segmentation fault, please help.
>>
rate my prime checker
def check_if_prime(n):
if n <= 2:
if n == 2:
return True
elif n == 1:
return False
else:
return None
for a in range(2,n):
if n % a == 0:
return False
else:
pass
return True
>>
>>59817937
shouldnt it be the square root of n?
>>
>>59817930
>int main(char *argv[1]){
That is not the correct signature for main.
Seriously, your compiler should have warned you about all of the shit you're doing wrong.
>>
>>59817937
Fucking retard nigger. Why do you have 'else: pass'? Explain yourself.
>>
>>59818132
>he doesnt code in notepad
>>
>>59818206
That has literally nothing to do with what I said.
>>
/dpt/ challenge: implement Euler's method.
>>
I'm in my first year of a CS degree. I haven't done any of the work and have an assignment due in python at the end of the week. Is it possible to learn python enough in a week and code the assignment.
>>
>>59818289
>/dpt/ challenge: do my homework
>>
>>59818132
I changed it to

int main(int argc, char *argv[])

and I'm still getting a segmentation fault. Anything else. Using emacs + gcc by the way.
>>
>>59818292
You can learn python in like 30 minutes lmao senpai
>>
>>59818310
You code produces more warnings than that.
Please tell me you're at least compiling with -Wall.
>>
What's the right way of passing command line options to a program in linux systems? I mean is there some sort of library everyone use so they don't have to parse command line arguments like ./myprog -n "name" -abcd -o "output" ?
>>
File: euler.gif (357KB, 360x223px) Image search: [Google]
euler.gif
357KB, 360x223px
>>59818300
I already did it though. Here's an animation I made showing how the points approach the solution as the number of subdivisions increases.
>>
>>59818292
yes, but remember to watch a whole season of $currentAnime before you get to it!
>>
>>59818320
Is it that easy? I'm a complete noob to programming
>>
>>59818292
>>59818361
why are you wasting your parents money?
>>
>>59818292
depends on the assignment
>>
>>59818339
Fair enough. I'll try to do it tomorrow when I get home because it's sleepy time nao.
>>
>>59818377
let him waste. the economy needs retards like him.
>>
>>59818377
I'm paying for uni.
>>
#include <stdio.h>
#include <string.h>

void copy(char to[], char from[],int x);

/* Usernames from names*/
int main(int argc, char *argv[]){
FILE *f;
f = fopen(argv[1],"r");
int lines = fgetc(f);
int a = 0;
int b = 0;
int c = 0;
char name[80];
char name2[80];
char first[1];
char second[4];

if(f == NULL){
perror("Error in opening file");
return(-1);
}

while(c<lines){
for(;a < 80;a++){ name[a] = fgetc(f); }
copy(first,name,1);
a++;
while(name[a] != '0'){
name2[b] = name[a];
b++;
}
copy(second,name2,4);
c++;
}
printf("%s%s000\n", first, second);

fclose(f);
return 0;
}

/* copy: copy 'from' into 'to', with a character limit */
void copy(char to[], char from[], int x){
int i;
i = 0;
while (i<x){
to[i] = from[i];
++i;
}
}


Ok, this version produces no warnings with -Wall and Wextra. Still getting a segmentation fault.
>>
>>59818408
why are you wasting your own money
>>
>>59818320
>>59818359
>>59818377
>>59818379
the assignment is:

Write a program that prints the numbers from 1 to 100. But for multiples of three print “Fizz” instead of the number and for the multiples of five print “Buzz”. For numbers which are multiples of both three and five print “FizzBuzz”."
>>
>>59818416
how so?
>>
>>59818410
Now you need to learn how to debug your own programs.
>>
>>59818377
not him, but you didn't have to work through your uni, did you?
>>
>>59818425
You're paying for classes that you're skipping and then trying to teach yourself everything at the end of the year anyway.
>>
>>59818377
Have you heard about this brand new concept
free education
>>
I accidentally loaded a file into IDA at the wrong offset then saved the database without realizing.
how do I undo that?
>>
>>59818292
>>59818361
why are you wasting the taxpayer's money?
>>
>>59818420
Low tier bait
>>
>>59818410
I know what's wrong with it but you should follow >>59818429's advice. Standard C debugging protocol calls for sticking 'printf's at various points within the program and seeing where it makes to to before segfaulting.
>>
>>59818499
>printf debugging
>standard
I don't think so Pajeet.
>>
>>59818441
Its the 7th week of class. I will admit I skipped about half of them but I don't think I will do that again.
>>
>>59818420
>>59818481
This is not me. I'll post the assignment if someone can tell me what I should focus on learning to be able to do it quickly.
>>
>>59818530
Well you're in cs so theres no way you are in school because of an athletic scholar ship so what are you doing?
>>
>>59818541
post it already damn it
>>
>>59818499
>Standard C debugging protocol calls for sticking 'printf's at various points
No. Do yourself a favor and learn gdb. It's like 30 minutes of work.
>>
Bunch of armchair programmers.
>>
>>59818530
You can do it. In intern they told us to learn python by the next day and all 3 of us did. Well, at least we read through the documentation.
>>
>>59818588
you work standing up?
>>
Hey /g/,
teaching myself Java and I had some nooby questions. Making a GUI with a little bit of abstraction and I was wondering if it was better to write the GUI code in with my objects or to make a separate 'GUI class' for that object.

For example if I had a "SquareInfo" that held things like color/size/position/etc. and a SquareDraw for handling the GUI code.
>>
>>59818379
>>59818557
I have to draw 4 different blocks in turtle. Then these blocks are arranged into a pattern that you can change by inputting data into a list.
>>
>>59817561
you fell for the bait faggot. python is great to learn for starters, you have to realize that on /g/ and tech boards, a lot of these faggots are tech hipsters who get hardons for the fringe.
>>
File: _.jpg (328KB, 695x800px) Image search: [Google]
_.jpg
328KB, 695x800px
>>59818616
sure
>>
>>59818616
>what are standing desks
>>
>>59818639
A way to lose friends
>>
>>59818626
get to work then
>>
>>59818499
Whats wrong with it? Im just curious
>>
Coding a control software for a UV/VIS Spectrophotometer
>>
File: 1433698243654.png (29KB, 613x556px) Image search: [Google]
1433698243654.png
29KB, 613x556px
What's a cheap way to get into embedded programming? Like is there easy cheap shit that I can program to do stuff in my house like turn my lights on/off from a control panel on my PC or something cool?
>>
>>59818697
>Coding

Are writters worders?

kys
>>
>>59818659
well, better than losing your job because you literally can't have a sitting job anymore due to health issues.
>>
File: dead.jpg (27KB, 720x576px) Image search: [Google]
dead.jpg
27KB, 720x576px
>>59816790
dying
>>
>>59818697
if it's not in electron javascript you should consider quitting.
>>
>>59818707
cute
>>
>>59818713
fuck off cancer
>>
>>59818748
>being this butthurt

lmao

not an argument, "coder"
>>
>>59818761
call me a susan if it makes you happy
>>
why is this guy upset about "coder"? its not as fancy sounding as programmer and programming but code is both a noun and a verb

so yeah a coder codes like a runner runs
>>
>>59818794
what do you think about the harry potter worder, J.K.Rowling ?
>>
>>59818410

> int lines = fgetc(f);

you just wrote an 8 bit ascii value (char) to a signed int
>>
>>59818814
word isnt a verb
>>
>>59818841
Sorry don't know how to remove yet still learning
>>
>>59818707
Raspberry Pi are quite cheap
>>
learning programming for the first time in my life and was doing really great until I hit while and for loops then it all fell apart, god damn moments like this when you realize you truly are an idiot. Feels bad.
>>
>>59818707
https://store-usa.arduino.cc/products/arduino-starter-kit
>>
>>59818915
So you lasted a day?
>>
>>59818925
more like two weeks :(
>>
>>59818915
>While loops
>For loops
>Hard

What the fuck? Keep doing task so long as condition is met. Keep doing task for X number of times. How the fuck can you not grasp these concepts unless you are retarded.
>>
>>59818915
>>59818956
what are you learning programming with?
>>
>>59818960
my computer
>>
>>59818976
what language
>>
>>59818991
german
>>
>>59818991
Python
>>
File: cpp_while_loop.png (27KB, 263x404px) Image search: [Google]
cpp_while_loop.png
27KB, 263x404px
>>59818956
Have you seen block diagrams for those loops?
Have you ever drawn a block diagram in your life?
>>
>>59819019
hallo bernd!
>>59819021
Learn Lisp.
>>
>>59818410
What the fuck is this monstrosity?
>>
I don't get how people can not understand the concept of a loop. What is so complicated about while condition do action?
>>
>>59819108
>I don't get how people can not understand the concept of a monad. What is so complicated about bind and return?
>>
>>59818673
Probably the file itself.

The way he has it now it would need to something like:
2abutts
qdildos

It's probably got a newline after the number of lines or something.
>>
>>59819122
I unironically think this. People find monads hard to understand because they look for meaning where there is none. The ever-growing plethora of monad tutorials doesn't help.
>>
File: cDull.png (36KB, 1366x768px) Image search: [Google]
cDull.png
36KB, 1366x768px
trying to follow along with video and it seems i am using the same principles, yet his code works. mine does not.

how do i grab a value from one block and use it in another block?
>>
>>59819122
Who are you quoting?
>>
>>59819141
The vast majority of monad tutorials served only to delay my eventual understanding of what is, ultimately, a rather prosaic concept.
>>
When reading a large number like 142913828922, you have to jump to the end of the number and then place a comma every 3 digits (or count the number of sets of 3s). That brings you back to the beginning of the number and then you can read the number. This is terribly inefficient

You can remember that a 6-8 digit word starts with thousands but then you have to count the number of digits. Still inefficient


How do we solve this problem?
>>
>>59819122
muh nads?
>>
>>59819154
You. I've always been quoting you. You just haven't realized it until now.
>>
>>59819168
u wot m8?
>>
>>59819168
>comma
Not portable.
>>
>>59819169
Do you enjoy being anti-intellectual?
>>
>>59819168
read numbers backwards
two-and-twenty-and-nine-hundred-and-eigth-thousand-and...
>>
>>59819197
>or count the number of sets of 3
>>
i'm working on an alternative for genius.com

big project actually.
>>
Functions are objects:

class Function<A, B> {
B apply(A a);
}


Functional programming is just a subset of OOP programming. Hasklel rekt
>>
>>59819206
but you jumped to the end of the word
>>
So fucking much great courses about programming from many disciplines (ML, Algorithms, Mobile, Distributed Systems, etc)

What do you think are the best ones Anons? (only answer if you've successfully finished any)
>>
>>59819227
I finished a degree, not a slap-dash collection of "courses".
>>
>>59819227
i watch thecodingtrain on youtube, he's an awesome teacher in processing (java) and javascript
>>
>>59819227
Computer vision
>>
>>59819213
Still not portable.
>>
>>59819157
I think the biggest barrier for most people is that they're not used to interfaces for higher kinded types. Because that's all a monad is.
>>
>>59819239
currently he's talking about machine learning and A.I. and all that stuff which gets more and more important the next 20 years
>>
File: monad.png (20KB, 663x325px) Image search: [Google]
monad.png
20KB, 663x325px
>>59819198
actually, anon is smarter than you think.
you are not as intellectual as you would like to portray.

monad (certain instance of) comes from muh nads and goes into your mom/wife/sister/daughter
>>
>>59819227
just fucking start writing already. don't waste your time letting others tell you how to write your code.
>>
>>59819261
angular and firebase
>>
>>59819150
Programming might not be your thing, anon.

Console.WriteLine(Gettem());
>>
>>59819122

I don't think it is quite right to compare a basic primitive for programming with an abstract data type. That said, the reason why monads are hard to understand is because most people do a terrible job of describing them, often doing so with either poor metaphors or terminology not typically used in a computer science curriculum. Also, because the names "bind" and "return" are very vague, and might easily make someone think of something else.
>>
>>59819275
what do you mean with this post?
>>
C++ a best. Other languages also good.
>>
>>59819239
Fucking Shiffman! The best guy teaching anything regarding programming on YouTube.
>>
>>59819284
thank you Milo! you glorious faggot!
:* muah!!!
>>
>>59819150
what language is this
>>
>>59819285
Monads are a basic primitive for programming, though. They allow sequencing of effects. They're simply a way of describing what millions of Java, C#, C++, ... programmers do every day.
>>
>>59819237
Well I have a degree already too, has decent grounding but still nothing stellar, only that its fucking outdated so I need to brush up. I've kept somewhat updated with books recommended by peers and what not but online courses IMO bring a better way to learn, only that idk which ones are best. All those things are complementary, taking degree courses, reading books, and now doing online courses that are beyond the scope any university here teaches.
>>
>>59819150
You know you could just set Gettem as void then just call it from main.
>>
>>59819345

Java, C#, and C++ can do sequencing of events without ever defining a state monad. They're not really a primitive, because the programmer never touches them.
>>
>>59819348
you are right. i was doing a follow along with video but tweaking for my program versus his. a few artifacts seem to remain.
>>59819343
really? at least 2 clues in the post... ffs
>>
FROM NOW ON, ALL NUMBERS WILL BEGIN WITH WHAT I DEEM A SIZE DIGITS

THE FIRST DIGIT OF A NUMBER IS THE NUMBER OF SETS OF 3S FOR THE REST OF THE NUMBER

THE SECOND NUMBER IS THE NUMBER OF SLOTS FILLED FOR THE LAST GROUP OF 3

FOR INSTANCE THE NUMBER 9000 IS NOW 219000

THIS WAY WHEN YOU ARE READING YOU CAN INSTANTLY KNOW THAT THE NUMBER IS 9000,

ANOTHER EXAMPLE

100,129,333 BECOMES 33100129333

ANY QUESTIONS
>>
>>59819367
Java, etc. can only sequence a fixed set of effects. You have to plumb any other effect through by hand, which can be incredibly verbose.

When you make effects explicit, and make use of bind and return easy (e.g. like Haskell does), then you can both avoid writing a lot of boilerplate code and write much more tightly-constrained code that is easier to test and verify.
>>
>>59819312
yes, totally...i'm pretty good in javascript, but he just teaches so much regarding workflow and structuring code and object orientated programming
>>
>>59819405
2/10
>>
>>59819324
Let's ignore that extreme faggotry you just performed for us.
You, anon, need to stop coming here for every small problem you're experiencing. It wil hurt your problem-solving capabilities. Furthermore, if you're having issues with simple concepts such as these you need to find better videos or buy/pirate a C# book. I'll be glad to direct you to a free C# textbook.
Finally, dont' do
>:* muah!!!
that ever again.
>>
>>59819374
C# is one of the easiest language to learn and work with. How are you asking all the basic questions so often?
>>
>>59819427
I think its genius. It sames so much time in reading numbers
>>
>>59819440
C# is literally a worse Java
>>
>>59819432
:^)
>>
>>59819445
Those factors are mutually exclusive.
>>
>>59819443
What happens when you have a 36-digit number?
>>
>>59819440
C# doesn't really teach you what you're doing, it's a language where the CRE and IDE do so much heavy lifting you can just sort of blindly write shit and it works for the most part.

>>59819445
C# is infinitely better than dealing with Java.
>>
>>59819447
???
>>
>>59819458
You're so innocent and naive.

>>59819465
Wrong. Java has type erasure, C# doesn't. Java made the right choice.
>>
>>59819466
d:^)
>>
>>59819374
>doing a follow along with video
How old is said video?
Does the person doing said video sounds like an indian?

Then anon i recommend you stop following said video. I also recommend you never ever go to CodeProject.

Also just read this:
https://learnxinyminutes.com/docs/csharp/
>>
>>59819410

>When you make effects explicit, and make use of bind and return easy (e.g. like Haskell does), then you can both avoid writing a lot of boilerplate code and write much more tightly-constrained code that is easier to test and verify.

You CAN do this, but most Java programmers don't. You can't really call it a primitive, considering how trivial it is to write large programs without it.
>>
>>59819465

>it's a language where the CRE and IDE do so much heavy lifting you can just sort of blindly write shit and it works for the most part.

But what if I write C# in a simple text editor?
>>
>>59819460
alright clearly its not perfect
>>
>>59819427
hey buddy, dont you mean 112/1210
>>
>>59819552
How does writing to the framebuffer work in DOS? Is there just a segment of memory in DOS that is the 'framebuffer' or do you have to do calls to some function that does the work for you?
>>
>>59819485
nice. thank you!
>>59819440
well gee, maybe i am JUST learning this shit at age 36... my schools never offered any tech classes.
fucking millennial homo who was spoon fed everything. go live a life of hard knocks, then you can talk to me.
>>59819432
maybe you are right. gotta start somewhere. appreciate the tips. free book you say?
>>
>>59819596
The problem isn't you asking shit. Everyone has runs into plenty of problems when they start learning programming. The problem is you asking questions that are very easily google-able. You are not going to make it as a programmer if you cannot troubleshoot your own problems. Even after programming for 5 plus years, I still turn to the internet for help all the time.
>>
>>59819628
>I still turn to the internet for help all the time.
 is this.not the internet? 

> Everyone has runs into plenty of problems
of course. and after 5 years, do you ever come across something that leaves you banging your head on the desk for hours just to realize it's the simplest stupid thing?
>>
>>59819628
>Even after programming for 5 plus years, I still turn to the internet for help all the time.
TELL ME IM BEING TROLLED
>>
>>59819592

I have never programmed for DOS before, so not a goddamn clue. That said, if you're on an OS with basically no fucking memory protection, you can more or less just write directly to VGA memory.
>>
>>59819669

What the fuck do you think Stack Overflow exists for?
>>
>>59819663
He isn't wrong. You are asking the most stupid questions possible. What is next? How to print lines in the console? Retards like you lower the quality of this thread by turning it into a help desk. I should filter you.
>>
>>59819693
100+ hours of videos
50+ hours of books
100+ hours of practice
<3 minutes asking questions on a live board.
FFS, plz 4give me
>>
>>59819663
Here's a very friendly tip, go make an account in StackOverflow

People will be happy to answer all your questions for free without calling you insults left and right, it's a win win for both you and /g/
>>
>>59819596
>free book you say?
http://www.robmiles.com/c-yellow-book/
I find it extremely dull, but I have a hard time not falling asleep in general when using Java and C#. With that said, it seems people like it.

And anon, listen to >>59819628. Also the questions you're asking have been answered many, many times elsewhere; they're just a startpage search away. By asking them here, you're lowering the thread quality and bringing /dpt/ another post towards the bump limit.
>>
>>59819717
>100+ hours of videos
>50+ hours of books
>100+ hours of practice
>Can't figure out how to pass a values between functions
You are trolling right? Please tell me you are trolling and not just fucking retarded.
>>
>>59819685
Okay so to be clear

You guys are mad at a guy who is asking a (simple) question on the internet, while you yourself admit to searching the internet for a question and getting a responses knowing full well that the only reason you get a response is because someone already asked the same question on a website?

You dont see the hypocrisy?
>>
File: 76549177_XS.jpg (10KB, 400x267px) Image search: [Google]
76549177_XS.jpg
10KB, 400x267px
>>59819741
>>
>>59819628
I ask stupid questions on 4chan sometimes just to "talk" to people
>>
Are Java Generics the same as C++ templates?
>>
this thread is full of 'tism
>>
>>59816790
learning flexible oop
>>
I mainly do C, C++ and Python stuff and am interested in trying some web development. Can someone please recommend a text to get me up and running with HTML/CSS/JS? I'd like to be able to make a simple website. For example something like a blog with comment section.

I'm kind of bad at aesthetic stuff so I'm not too familiar with frontend programming and layout.
>>
>>59819753
The problem is asking simple questions that is one google page away. He could have easily solved it himself under a minute if he typed it into google. I have no problem if the question he asked was complex or promotes some form of discussion. This is basic shit that even a braindead moron who took CS101 can answer.
>>
>>59819791
>flexible oop
sounds like garbage
>>
>>59819799
>am interested in trying some web development.
Web dev gen is down the street senpai.
>>
>>59819814
Oh I didn't know we had one of those. Thanks
>>
is python really that fucking easy?
>>
>>59819803
And the only reason why you can google it is because someone asked it on a website that doesnt delete its shit
>>
>>59819806
you can incrementally change the official implementation of a language to your desires, hence the flexibility
sounds good desu
>>
>>59819833
Yes. The hardest part when learning Python is deciding if you wanted to use 2.7 or 3.
>>
>>59819782

C++ templates are much, MUCH more flexible. They're not really that comparable.
>>
>>59819844
Yes and? What is your point? It is available on the internet because another moron asked a moronic question instead of reading the relevant chapters on their textbook. It is available for you now to read. How does it excuse people asking stupid shit in this thread?
>>
File: 1491362449254.jpg (24KB, 293x340px) Image search: [Google]
1491362449254.jpg
24KB, 293x340px
>>59819737
i do have and i use it
but just looking at the code there left me in the same spot... i needed someone to POINT OUT that i needed () around it.
as for the bump limit... really? there's always a new continuation page. just like the sun comes up everyday.
honestly i don't mind insults.
>>59819753
yes, it's insane
>>59819741
i hope you feel trolled, but no.
VS didn't show any errors... and staring at it for an hour + going to SO = no help since the
the error was invisible to layman me.
you old hats, spotted it right away.

but if you were trying to learn a simple skill like shifting in an 18-wheeler, you'd be grinding the gears, missing them, etc... and as a former driver, (over 1000000 miles) i am expert and would know what you are doing wrong (most likely not waiting the right time for the RPMs to be in range).
>>
Explain to me how you would implement windows if not with OOP?
Having a base superclass and deriving other types of windows is a really good approach.
I can't see how you would do that in other languages.
>>
>>59819876
The only bad question is the one that goes unasked
>>
>>59819886
Not that guy but, it didn't show any errors because there wasn't any

Machines are really good at following the exact instructions you give them, but they can't make assumptions, you defined a method to do something in particular but there is no way the system knows you want to use it somewhere in particular
>>
File: sammy.jpg (28KB, 400x400px) Image search: [Google]
sammy.jpg
28KB, 400x400px
>>59819739
>By asking them here, you're lowering the thread quality and bringing /dpt/ another post towards the bump limit.

1 question asked, 40 flame posts
and you claim to be worried about the bump limits?!
>>
>>59819911
You are right. I can't wait for /dpt/ to turn into Stack Overflow for retards the 4chan version.

>Anon how do I for loop?
>Anon how to I use printf?
>Anon how do I install C++?
>Anon what is a variable?
>>
>>59819910
>in other languages
Do you want to know how I know you're underage?
>>
Anon how do I git gud
>>
>>59819949
Learn Lisp.
>>
>>59819934
You mean 40 post on why we shouldn't entertain retards in this thread. I much rather /dpt/ be a rust shill thread than have retards coming here and treat us like tech support.
>>
>>59819479
C# doesn't need type-erasure because when you implement generics it compiles special classes for it. This means there's literally 0 runtime overhead when dealing with generics.

Java just does a horrifying cast-everything dance.
>>
>>59819940
>You can talk about programming but you cant talk about that part of programming
>>
>>59819946
I meant in other paragidms, sorry.
My point still stands.
>>
How do i compile the latest version of SFML to DotNET?
>>
>>59819974
Learning how to google isn't part of programming you moron.
>>
>>59819962
But the rust shills and the dumb questions are coming from the same source.
>>
>>59819934
I'm worried about thread quality. And while I can't stop people shitposting and not using sage (I really wish I could!), I can at least give that one anon advice on how to contribute to threads.
>>
>>59820000
Quads confirm the Jews are behind it.
>>
>>59819886
>since the
>the error
am i the only one who caught this "invisible error"?
probably... but damn, despite making the tiny fuck up in your code, you seem to be rather clever. keep it up, you will git gud and go far in this field.
>>
>>59819974

This is /dpt/, not /sqt/.
>>
File: kurtz.jpg (7KB, 400x300px) Image search: [Google]
kurtz.jpg
7KB, 400x300px
>>59819986
He asked a programming question in the programming thread, the horror.
>>
File: Untitled.png (55KB, 164x161px) Image search: [Google]
Untitled.png
55KB, 164x161px
>>59818636
>>59818616
>>59818588
samefag
>>
>>59820027
/sqt/ can't answer code questions 95% of the time.
again, everyone. plz 4give me.
my thanks to everyone else.
>>
>>59820043
And 1+1 is also a math question. I am not sure why you are defending stupid questions in this thread unless you are him or you ask stupid questions all the time.
>>
I think you guys are just too bored and just want to argue.
>>
>>59820055
This thread is shit 60% of the time, so I don't know why you care so much.

It's mostly flame baiting and circle jerking and
>omg you use haskell too?
>>59820078
Also this
>>
>>59820055
so what IS /dpt/ for?
>your lang sux
>your lang is pajeet
>look at this code written in klingon!
>oh senpai, more anime (despite the being other boards entirely devoted to drawing, animation, japanese shit)
>secretly i know nothing but i love to poke at others so i lurk and attack others
>java is meme lang
>>
>>59820090
Give a man a fish and you feed him for a day; teach a man to fish and you feed him for a lifetime.

We are giving that anon tough love so he makes it as a programmer.
>>
>>59820108
Oh I agree that he needs to learn to google for easy questions but to imply that this thread isn't as full of shitposting as the rest of this site is laughable.
>>
Ruby, do you have any idea for some fun intermediate level thing I can program as a challenge?
>>
File: 1mz5sg - Copy.jpg (117KB, 697x500px) Image search: [Google]
1mz5sg - Copy.jpg
117KB, 697x500px
>>59816790
I am trying to figure out how to the prime sum faster in python. :( No cigar so far.
>>
>>59820108
TEACH A MAN A FISH? YOU LITERALLY TOLD HIM TO GOOGLE IT

YOU ARE A FISH GIVER MY MAN
>>
>>59820130
A randomizer that gives you fun intermediate program challenges.
>>
I can only hope people are ironically defending spoonfeeding ITT
>>
>>59820138
Learning to google to solve your problems is like the first step to programming.
>>
>>59820137
>Faster
>In python
:^)
>>
>>59820169
And the first step to being incompetent
>>
Right I've had just about fucking enough of this 2 million prime meme/dogshit.

Use segmented Sieve of Eratosthenes. Job. Fucking. Done.
>>
>>59820192
So asking questions on /dpt/ is the proper way to be competent?
>>
>>59820196
what are you on about
>>
>>59820196
Sum all primes below 2 googols.
>>
>>59820137
>The sum of 2 million primes
That's easy. It's just 4 million.
>>
>>59820207
You can become dependent on google

you cant become dependent on /dpt/
>>
>>59820248
Yeah, ask again in two years
>>
>>59820244
What happens when you run into problem that you can't solve?
>>
File: 1491103667517.png (266KB, 339x345px) Image search: [Google]
1491103667517.png
266KB, 339x345px
>>59820248
>Underage
>>
>>59820248
Abort. Go into business instead.
>>
>>59820272
Business is boring though :(
>>
File: 1490543423363.jpg (61KB, 666x632px) Image search: [Google]
1490543423363.jpg
61KB, 666x632px
>>59820271
>and a weeb
>>
>>59820248
>16
Anon...
>>
>>59820248
>16
let me show you the inside of my van anon
>>
File: Crona.png (200KB, 400x400px) Image search: [Google]
Crona.png
200KB, 400x400px
>>59820309
>>59820319
:(
>>
>>59820267
What happens when google doesnt have your answer?
>>
>>59820349
i guess you can stay with one condition anon
>>
>>59817930
That's a C feature
>>
>>59820272
this... kinda. If I was competent enough at 16 to get hired somewhere then from my current perspective I wouldn't think twice about going into business instead of college.
>>
>>59820355
Mailing list.
>>
>>59820367
>>59820272
What's so good about business that isn't in comp sci?
>>
File: Ps.jpg (164KB, 1600x900px) Image search: [Google]
Ps.jpg
164KB, 1600x900px
>>59820357
:D
>>
>>59820386
Being an employer vs. working for an employer.
>>
>>59820386
You dont risk losing your job over a missed parenthesis
>>
>>59820403
you must give us that jailbait butt of yours
>>
>>59818206
>implying notepad removes compiler warnings
>>
File: this isnt how it works.png (165KB, 600x600px) Image search: [Google]
this isnt how it works.png
165KB, 600x600px
>>59820454
anon, are you gay?
>>
Also, my teacher told us that the most commonly used IDE is NetBeans. Is this actually true? Just curious.
>>
>>59820522

no, probably visual studio or some emacs/vim configuration
>>
Reminder that imperative code can be made declarative with single static assignment.
Reminder that declarative code can be made imperative with continuation passing.
>>
>>59820522
>>59820536
It's notepad++
>>
>>59820539
What does that mean? What is declarative code?
>>
>>59820547

t. student
>>
File: graph.jpg (129KB, 1095x805px) Image search: [Google]
graph.jpg
129KB, 1095x805px
>>59820522
>>59820536
>>59820547
>>59820563
Did i down grade when i went from eclipse to netbeans?
>>
>>59820487
nah, i only fuck feminine butts, like yours
>>
File: 1491771087577.jpg (453KB, 574x861px) Image search: [Google]
1491771087577.jpg
453KB, 574x861px
>>59820403
>>59820454
>>59820487
>>59820579
>>
>>59820571

>https://blog.codeanywhere.com/most-popular-ides-code-editors/
>sent this survey to 10,000 users of Codeanywhere

yeah only students and newfags probably answered that survey given how shitty that site is
>>
>>59819910
What different types of windows are there?
>>
>>59820563
No one actually codes in notepad++. Everyone however uses notepad++ to view code because it is extremely portable and you don't have to use a dedicated IDE to view specific language code. So you use notepad++ on a computer that doesn't have the IDE of X language. It is that simple/
>>
>>59820613
Cool, that explains a lot.
>>
>>59820613

>Everyone however uses notepad++ to view code

been a developer for 10 years and never see a team use that shitty tool except for a young new hire
>>
Also, what do your guys' lives look like? Is coding a good field to go into if you've got no friends? How's life down the road?
>>
>>59820636
Mostly because your team all has computer with an installed IDE that can view whatever code you are using. It is more for the non-commercial side of things.
>>
File: Crona2.jpg (37KB, 720x404px) Image search: [Google]
Crona2.jpg
37KB, 720x404px
>>59820579
>>
>>59820659
>coding
You should probably just kill yourself now.
>>
>>59820664

>It is more for the non-commercial side of things.

...and all of the open-source partners I've worked with used vim or emacs

no, notepad++ is for shitty windows users who don't want to build up or script their own IDE

why do /g/ newfags pull these facts out of their ass?
>>
New thread:
>>59820692
>>59820692
>>59820692
>>
>>59820672
i'll be gentle, promise.
>>
>>59820675
Why are you so mad, bro?
>>
>>59820686
Are you a fucking moron or did you completely miss my point. No one fucking uses notepad++ to actually code. They just use notepad++ to view code because it is extremely versatile and can view

Ada, asp, Assembly, AutoIt
Batch
C, C++, C#, Caml, Cmake, COBOL, CoffeeScript, CSS
D, Diff
Flash ActionScript, Fortran
Gui4CLI
Haskell, HTML
INNO
Java, Javascript, JSP
KiXtart
LISP, Lua
Makefile, Matlab, MS-DOS, INI file
NSIS, Normal Text File
Objective-C
Pascal, Perl, PHP, PostScript, PowerShell, Properties, Python
R, Resource file, Ruby
Shell, Scheme, Smalltalk, SQL
TCL, TeX
Visual Basic, VHDL, Verilog
XML
YAML

Stop being such a basic bitch
>>
File: 1489945277309.jpg (75KB, 567x461px) Image search: [Google]
1489945277309.jpg
75KB, 567x461px
>>59820579
< me when see qt trap boi
>>
>>59820730
Is that supposed to be impressive?
Basically everything that isn't Windows notepad-tier can do that.
>>
>>59820730

>They just use notepad++

YOU use notepad because you're a newfag/student and every major IDE can read those languages
>>
>>59820748
Go ahead name an IDE that supports just as much languages and is lightweight.
>>
>>59820758
I don't use notepad++ you moron. I am explaining to you why it is popular. Fucking idiots like you should be brought out back and shot.

>Hurrr durrr why is JAVA so popular
>But it is BADDDDDD

Idiots like you can't comprehend somethings being popular might not make it good.
>>
>>59820767
Not him, but emacs supports all of those
>>
>>59820767
Even GNU nano can highlight most of that shit.
>>
>>59820786
>Why is emacs not the most popular IDE?
Do i even need to answer this?
>>
>>59820786
>>59820794
>Why is a program only found on GNU/Linux not the most popular?
My fucking god
>>
>>59820807
Beats me, but it works really well.
Why worry about popularity? Emacs has enough packages to do anything you want, and extending it is really easy.
>>
>>59820828
>Why worry about popularity?
Because the question was >>59820522
>my teacher told us that the most commonly used IDE is NetBeans
>>
>>59820821
GNU nano is shit. It's extremely primitive and only appropriate for novices and making small changes to a file.
I'm not saying that you should use it. I was just saying that being able to have syntax highlighting for a bunch of languages is not impressive in the slightest.
>>
>>59820842
oh okay, i didn't read the earlier posts

if we're strictly talking about INTEGRATED development environments, then i'd say eclipse or visual studio would be the most popular.
>>
>>59820854
I am not explaining why Notepad++ is a good program. I am explaining why it is a popular program you fucking moron
>>
>>59820859
>Environment meant for development have better tools suited for development of programs

You don't say anon
>>
>>59820887
I'm not saying that regular editors don't have their place, but there's no point in ranking IDEs specifically if you're going to introduce regular editors into that list as well.
>>
>>59820927
I agree. But the question isn't about the sensible ranking of IDE. It is about which is the most popular which is Notepad++ generally.
>>
>>59818289
Literally implemented on my TI-84
>>
>>59816790
Is there any cross platform (Linux + Windows) Unit Testing for C/C++ that isn't a complete clusterfuck to use? I'd settle with having one for each platform i have too.
Thread posts: 339
Thread images: 32


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

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
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.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.