[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: 323
Thread images: 40

File: 1486890112107.jpg (79KB, 602x820px) Image search: [Google]
1486890112107.jpg
79KB, 602x820px
What are you working on, /g/?

Previous Thread: >>58918216
>>
>>58921723
>ifunny
Christ
>>
>>58921737
Reminder that C is deprecated.
>>
(re-asking for help here)
Here's to hoping someone can help me, I'm probably about to look like an idiot though....
I've been working on this unity game for a while now, and my biggest hurdle is an attack script. I've been fucking with it for weeks and have tried multiple different scripts. Here's my latest attempt at attack:http://pastebin.com/UUdA8wQH
and here's the health:
http://pastebin.com/B8WQTXR5
The debug on the attack script does work in telling me my distance, and the health script was able to automatically remove health at a certain interval. I'm sure there's some really obvious small thing i'm missing, but I just can't seem to get them to work together so when i press Z the health bar loses help.
tl;dr: I need help getting my attack script to actually take health from the health bar / work with the health script.
Thanks in advance for any help.
>>
>>58921737
>Christ
created the world in C++
>>
>>58921723
I can't get libcurl to work
>>
>>58921760
Sorry to hear that
>>
File: aaaa.png (23KB, 1342x484px) Image search: [Google]
aaaa.png
23KB, 1342x484px
Oh shit fuck save me lord jesus
>>
>>58921747
Learn programming first before you start making "vidya" as your kind (manchild) likes to call them.
>>
>>58921760
my thoughts and prayers are with you
>>
Recreate the Our Father in your favorite language.
>>
Answer because curious

http://www.strawpoll.me/12327974

http://www.strawpoll.me/12327968
>>
"The most powerful programming language is Lisp. If you don't know Lisp (or its variant, Scheme), you don't know what it means for a programming language to be powerful and elegant. Once you learn Lisp, you will see what is lacking in most other languages." -Richard Stallman
>>
I work in the GIS field and as such I code a lot in python a lot. Been coding in python since I left university. Recently I have been doing some coding of my own back at home and I think I should pick up some new language to learn.

What is another good language to learn? I have been exposed to C++ and C at University.
>>
>>58921793
Where's the 3000 years old loli option?
>>
>>58921807
Learn C++, versatile, fast and OOP.
>>
i'd like to take a moment to thank all the indian people who supply youtube with c++ tutorials

thank you, indian people. without you, i couldn't do it.
>>
>>58921723
:3

my cat died last year. i think i need a new one
>>
>>58921834
i'm glad!
>>
>>58921746
What's your kernel written in, then?
>>
trap OP threads are always better
>>
>>58921838
>legacy software written in 1989 is his only argument
>>
>>58921747
That's a lot of fucking code for subtracting one number from another. No wonder you can't even reason about it. Rewrite it simpler.
>>
>>58921838
Rust and Haskell
>>
>>58921838
I wrote it myself.
Used O'Haskell plus some parts in Go.
>>
>>58921839
Do you have qt knee high socks?
>>
>>58921793
The degree one is stupid because it's phrased to ask what degree you HAVE, with the only other option being no degree. I, and I suspect many others on /g/, don't have a degree yet, but are working on one, so I think it's silly not to have an option for that. In any case, I'd say what field you're in (CS/EE/IT etc) is more useful information then whether you actually have a degree yet.
>>
>>58921747
>class
that's where i stopped reading. fuck off with your iindian commie bullshit.
>>
File: asus-eepc-900.png (1MB, 1024x768px) Image search: [Google]
asus-eepc-900.png
1MB, 1024x768px
>>58921838
Rust.
>>
>>58921825
Hmm. My knowledge of C++ is minimal at most. I mostly worked in C due to embedded systems. Where is a good place to start for C++?
>>
>>58921866
just pick the degree you're going to get
>>
>>58921850
>written in 1989
The latest Linux kernel release was 3 days ago.
>>
>>58921854
Can you actually do that? I'm learning both so I'd like to try.
>>
>>58921874
Yeah that's what I figured you're supposed to do, the phrasing is pretty dumb though.
>>
>>58921873
C++ is a terrible language.
It would be in your best interest to avoid it.
>>
>>58921880
COBOL also has recent releases. Your point?
>>
>>58921897
REEEEEE.
Then what is another language I should pick up?
>>
>>58921891
https://github.com/redox-os/redox
>>
>>58921873
http://stackoverflow.com/questions/388242/the-definitive-c-book-guide-and-list?lq=1
>>
>>58921800
My name is Richard Stallman and I approve of this post.
>>
>>58921908
Learn Smalltalk.
>>
>>58921903
Ignore the C++ haters.
C++ is a pretty good language.
Worked with it for 10 years, couldn't be more happier with a language.
>>
>>58921908
https://nim-lang.org/
>>
>>58921930
meant to reply to
>>58921908
>>
>>58921930
Your clearly have astronomically shit taste and probably have absolutely no frame of reference.
Go learn a language that is actually well designed.
>>
>>58921930
C++ is a fine language for applications, but C is a better choice for kernels and utilities. The low-level subset of C++ is basically identical to C anyways.
>>
File: 1486934960999.png (12KB, 225x321px) Image search: [Google]
1486934960999.png
12KB, 225x321px
>When it comes to code reuse, projects that used an object-oriented approach were able to take more than 70% of their code from previous projects. Subsequently, the projects that used functional design were able to take about 35 percent of their code from previous projects (McGarry, Waligora, and McDermott 1989).

OMG HOW ARE FUNCTIONALTARDS EVER GONNA RECOVER FROM THIS #REKKING?
>>
>>58921918
>>58921935
>>58921930
Thanks. I guess having C++ knowledge would be good for my field as well since GDAL was coded in C and C++.

Time to stealth study C++ at work under the pretense of efficiency.
>>
/g/uys, I think OCaml might be the best language. Ivy League schools and hedge funds both use it, and when have they ever been wrong?
>>
>>58921941
Well I actually am employed.
I'm sorry if that hurts your Haskell ridden feelings.
>>
>>58921880
>release
who cares when it's an old code base maintained by the same guy and that's all he knows
>>
>>58921947
Object Pascal is better for applications though.
>>
>>58921930
I feel like C++ is more engineering than programming.
>>
>>58921955
>1989
I'm sorry but that is from 20 years ago.
>>
I need to practice, and I can't think how.

Someone post those programming challenge charts so I can roll.
>>
>>58921908
http://www.youtube.com/watch?v=LR8fQiskYII
>>
>>58921966
Delphi?
>>
File: autism.jpg (43KB, 514x536px) Image search: [Google]
autism.jpg
43KB, 514x536px
>>58921972
>truth changes over time
>>
>>58921981
Yeah, but there's always FreePascal if you wanna write open source software.
>>
>Anime makes Programming 42.7% better, this is according to studies made in 2016 by The International Institute of Anime Research in conjunction with ANSI.
>>
>>58921997
Yeah true. Good family of languages, massively underrated.
>>
>>58921723
Programming is shit.
>>
>>58921987
>there have been no meaningful changes in the toolchains and practices associated with FP and OOP paradigms in the last 20 years
cool meme friendo :^)
>>
>>58921998
Source? Can't find anything about it on Google.
>>
File: wew.jpg (110KB, 1280x720px) Image search: [Google]
wew.jpg
110KB, 1280x720px
>>58922004
>thinking his opinion matters
>>
File: 1482410101296.jpg (9KB, 250x215px) Image search: [Google]
1482410101296.jpg
9KB, 250x215px
>>58921998
programmers with anime profile pics are usually better than those who haven't
>>
>>58922005
>only FP has progressed, other paradigms have not
>>
File: 1471685523823.png (549KB, 1920x1080px) Image search: [Google]
1471685523823.png
549KB, 1920x1080px
>>58921974
>>
>>58921723
have you learned your Go (golang) today, /dpt/?
https://tour.golang.org
>>
>>58921966
Why would one use pascal when Ada exists. Genuine question.
>>
>>58922041
Thanks brosef.

/rollin/
>>
>>58922041
This really needs to be in the OP already.
Too bad OP is a fucking faggot too busy deciding on the anime image.
>>
222p35*89+*11p>133p                   >33g1+33p   22g33g- v>22g33g%#v_v
o >|
2 v,,,,, ,,,,,.g22"is prime."<
1 > v^ <
^_@#-g11g22p22+1g22,*25<,,,,,,,,,,,,,.g22"is not prime."<


rate my prime number finder.
>>
>>58922025
No, it's more that we simply don't know which has progressed more, or if they have progressed evenly.
>>
>>58922025
I am aware of the sarcasm, but this is actually true.
>>
>>58922054

Ada is great, but AFAIK there's nothing even close to Delphi for it.
>>
File: rgh.png (23KB, 677x343px) Image search: [Google]
rgh.png
23KB, 677x343px
help
>>
>>58922075
Do you hate anime?
>>
>>58922121
No, I've even watched some.
I hate anime posters.
>>
>>58922108
>this is your brain on SICP
>>
>>58922075
>This really needs to be in the OP already.
why
>>
>>58922117
https://get.debian.org
>>
>>58922117
just learn Go instead:
>>58922045
>>
>>58922133
Because every single thread someone asks for it
>>
>>58922113
What's Delphi giving you?
>>
>>58922117
>Windows
I found your problem.
>>
>>58922117
>Windows
>>
what is the best programming language for business applications if I just want lots of money and care about nothing else?
>>
>>58922148
>Because every single thread someone asks for it
wrong

>>58922163
Java, according to the current tradition
>>
>>58922163
COBOL. Few people are able to maintain the old codebases nowadays.
>>
>>58922163
HolyC, God will provide for you.
>>
>>58922163
Learn Excel and go into finance.
>>
>>58922174
>wrong
There's different levels of wrong, this just wrong enough to trigger autistic sperglords but not wrong enough to matter
>>
>>58922163
C++, everything else is a meme.
>>
>>58922128
>SICP is about the developments in functional programming after 1990
confirmed for never having read it
>>
>>58922189
But that's the best kind of wrong.
>>
>>58922198
>Business application
>C++
How to spot a NEET 101
>>
>>58922174
>>58922182
these two make sense

>>58922182
>>58922198
memes

>>58922185
please explain how this will make lots of money
>>
>>58922210
I've been on the business for more than you have existed.
Using C++ since I was born.
>>
>>58922229
lmao
>>
>>58922215
I would, but instead, I'll redirect you to >>>/biz/
>>
>>58922163
Java
>>
>>58922215
>please explain how this will make lots of money
Just buy the dip
>>
>>58922215
>please explain how this will make lots of money
>Look at excel sheet
>Tell your lowly programmers what to do
>Make money
I am 90% sure that is my bosses job scope.
>>
>>58922163
Java
>>
>>58922362
If you ever actually had a job, you would realize that only lowly wage slaves spend all day in excel.
>>
Does anybody have that image with the list of books for a "4 year knowledge in CS"?
Thought I had saved it but I can't find it
>>
>>58922381
Yeah, it's called SICP.
>>
>>58922430
Yes, that's one of the books in that list, along with K&R and about 10 other ones.
>>
File: dallas.png (552KB, 565x572px) Image search: [Google]
dallas.png
552KB, 565x572px
all that superglue for nothing
>>
>>58922430
Sicp is a meme book tho
>>
Write a program that doubles as a girlfriend for the following February 14th. You can use the language of your choice.
>>
best python book?
>>
>>58922483
>that doubles as a girlfriend
En inglés por favor.
>>58922494
Learn ruby instead.
>>
>>58922503
that is valid english, "that doubles as" means "that can also be/do/*"
>>
File: screenie.jpg (104KB, 818x679px) Image search: [Google]
screenie.jpg
104KB, 818x679px
>>58921955
Found the source (PDF warning)
https://ntrs.nasa.gov/archive/nasa/casi.ntrs.nasa.gov/19910008268.pdf
Starts at page 45
Here's a screenshot of what appears to be the quote source on page 53
Seems based on context they're comparing FORTRAN against ADA, thought there are some mentions of Pascal, C, ALC (don't know what this is)
>>
>>58921972
30 years ago

>>58921987
statistics do
>>
File: viewgraph.jpg (60KB, 763x526px) Image search: [Google]
viewgraph.jpg
60KB, 763x526px
>>58922527
and the viewgraph
>>
What's so great about lisp/scheme?
>>
>>58922199
It's true, I haven't. It's a complete meme, why would I? I've been in the software industry for the past 12 years, and I have never met any developer who had ever even heard of it.
>>
what's so great about Go?
>>
>>58922560
>I only interact with D grade programmers
>>
>>58922544
Macros.
>>
>>58922583
C has macros, Scala has macros, they're pretty horrid.
>>
>>58922527
Well Ada's has always had genetics, which Fortran has never had. I don't think that's an oop benefit.
>>
>>58922591
>he thinks all macro systems are equal
>>
>>58922560
what books do all the developers you met in the industry all recommend?
>>
>>58922631
How are lisp and scheme different, then?
>>
>>58922649
Do you want some goober on fourchan to answer your question or do you want to see a StackOverflow answer with research and intelegence?
>>
>>58922683
Give a stackoverflow tier response but make sure to post an anime image and insult them before and after the answer.
>>
>>58922683
I want it explained in memes, please.
>>
>>58922702
Lisp is 80s anime
Wild, mature, and slick

Scheme is 00s anime
moeblob shit
>>
>>58922649
In terms of macros, Common Lisp's macros are not hygienic, whereas Scheme's are.
>>
>>58922720
What does that mean though? To me hygienic means like showering, flossing and brushing regularly, emptying your piss bottles into the toilet and not the sink, that sort of thing
>>
>>58922731
It means macros in Common Lisp can capture variables.
>>
>>58922758
Thanks!
>>
File: why2.png (7KB, 376x360px) Image search: [Google]
why2.png
7KB, 376x360px
So if I have two int variables in my main function called X and Y and I wish to alter them using a separate function and pointers...

How do I do this? Pic related does nothing.
>>
File: 1486851162379.jpg (232KB, 495x547px) Image search: [Google]
1486851162379.jpg
232KB, 495x547px
>>58922719
>moe
>bad
>>
>>58922778
Call change like this:

change(&x, &y);


Do this inside change:

*n1 = 1;
*n2 = 2;

printf("...", *n1, *n2);
>>
>>58922778
That's some serious undefined behavior you've got here.

You're confusing pointers and values, missing some &
>>
>>58922731
>>58922758
More specifically, in Common Lisp it's easy to write macros that accidentally refer to a local binding, which can fuck everything up if the user rebinds mapcar or format or whatever. Hygienic macros perform some invisible name resolution using the context where the macro was defined.
>>
>>58922797
>>58922799

Ah you guys are right, thanks, I completely forgot about the &
>>
>>58922804
Why did they design Common Lisp that way? Was it easier to implement or something? It sounds like a recipe for confusion.
>>
>>58922804
And to top it off, CL macros typically make use of gensym under the hood, which generates a symbol to be used in the macro, to minimize the chance of capture. Redefining standard functions is undefined behavior of course.
>>
>>58922163
AdvPL
>>
>>58922572
>six-figure earning software engineers
>D-grade
Whatever you say, pleb.

>>58922642
GOF, OOSC, Fowler's Patterns of Enterprise Application Architecture, Humphrey's PSP and TSP books, etc.
>>
>>58921871
I can't get networking to function. It's been fucked for the past several releases.
>>
>>58921908
Racket
>>
How can I get a retrieving pi value for loop function's iteration number when it reaches '3.14159'?
For some reason it is showing as 1.000 when i basically have
if(pi == 3.14159) {
break;
}
and then printf("%d", i);
>>
>>58923091
Show us the code, anon.
>>
>>58923091
Never use equality operators for floats. It's better to use greater or less than.
>>
>>58923091
Use fixed point anon
>>
>>58923100
>>58923111
When I use Greater than or equal to,it messes up the output of pi to 3.47.
public class CalculatingPi {

public static void main(String[] args) {

double pi = 4.000000;
double numOfLoops = 500000.00;
double i;
double startValue = 3.00;
for(i = startValue; i < (numOfLoops + startValue); i++) {
if(i % 4 == 1)
pi = pi + (4 / i);
else
pi = pi - (4 / i);
if(pi == 3.14159) {
endValue = i;
break;
}
i++;

}
System.out.printf("%.9f%n", pi);
System.out.printf("Loops Needed: %f%n", i - startValue);

}

}
>>
>>58923200
forget the endvalue thing too
>>
>>58923200
You want to define an epsilon, for your function probably 0.000005, and then test

if (pi < (3.14159 + epsilon) && pi > (3.14159 - epsilon))
>>
>>58922560
>made up credentials
>>58922572
>insult / questioning of credentials
>>58922938
>more made up credentials

Enlightening stuff.
>>
>>58922938
>GOF, OOSC, Fowler's Patterns of Enterprise Application Architecture, Humphrey's PSP and TSP books, etc.
How quaint. All irrelevant if you use a more powerful language.
>>
>>58922938
>six-figure earning software engineers
Not him but does this really happen outside of silicon valley or new york?

65k seems to be the average around where I live
>>
>>58923230
is there a more efficient way to calculate pi? because it's supposed to be under 200000, and mine is taking > 261,000 to get 3.14159.
And thanks that helped.
>>
>>58923339
I hear places like Austin and Seattle pay quite well, not as high as SV or NYC though. There's been a bit of buzz about Pittsburgh too recently.
>>
>>58923354
Binary search the transcendentals
>>
>>58923354
>is there a more efficient way to calculate pi?
Yes.

https://en.wikipedia.org/wiki/Category:Pi_algorithms
>>
>>58923364
I see, thanks

I'm still in university and I've completed a couple internships at large non-tech companies, and I've never had a real technical interview. Always just a couple basic questions about data structures and algorithms, and a few basic java questions.

If I want to get a job at a large, reputable tech company, what should I start studying/reviewing to be good for the interview?

Also, what kind of side projects should I be doing? What kinds of github projects are impressive to potential interviewers?
>>
Lets make money programming with Java! Who is with me?
>>
>>58923354
>>58923382
In particular, this one converges quickly.

https://en.wikipedia.org/wiki/Gauss%E2%80%93Legendre_algorithm
>>
I'm going to use serde to parse Nicol Bolas' reformatted Vulkan API registry file.
>>
>>58923393
Just start working on some projects you'd find useful, like a PS4 emulator, developing strong AI, figuring out P=NP, that kind of thing.
>>
File: 1392858534804.gif (933KB, 343x284px) Image search: [Google]
1392858534804.gif
933KB, 343x284px
>>58923420
p-please
>>
>>58923339
In my industry (airline reservation systems) there's a fair few six figure software engineers. Most of them are 20+ year veterans of this specific field though.
>>
>>58923420
kek

>>58923393
Practice practice practice the main business-friendly language they've taught you (e.g. Java, C#). You should know the basic language inside out. For example, if you're applying for a Java job and your main language is Java, you should be able to talk about covariance, its problems in mutable collections, wildcard generics, and PECS, among other things.

Be prepared to think on your feet to come up with an solution to a problem you haven't seen before. Don't rely on rote memorization of algorithms.

If you list a language/technology/framework/library on your resume be prepared to be asked about it. I may be in the minority here, but I'm unimpressed when an interviewee has put Haskell on their resume and then tells me "oh, I only did that in my first term at uni" when I ask them to write some code in it for me.
>>
I am currently making a specific niche in women accessories using image processing for both ios and android
>>
Can anyone experienced in C++ help me set up the constructor for this stack implementation of a generic list? Basically I created a generic linked list that can store different types of data and I want to implement a stack on top of that GenericList. I'm basically dumbfound trying to set the constructor for the Stack. I understand that I need the current pointer set to null, but I have no idea on how to create a new instance of the list to do that.

GenericList.cc : http://pastebin.com/xFeMZ0Ti
Stack.cc : http://pastebin.com/Pr2ELStB
StackTest.cct: http://pastebin.com/mFNqbMRf
StackTest.out :http://pastebin.com/3zgRaJsC
>>
File: 1483073157801.jpg (110KB, 1280x720px) Image search: [Google]
1483073157801.jpg
110KB, 1280x720px
/g/ cool kids club checklist

[x] hate OOP
[x] hate IDEs
[x] never produce actually useful software (this is important)
[x] tiling window manager
[x] dark-like-my-soul customized colors
[x] 40% keyboard with braided cables and custom caps
[x] hate Apple
[x] hate popular Linux distributions (far too intelligent for them)

You need 5 points to qualify for the cool kids club.
>>
>>58923503
>covariance, its problems in mutable collections, wildcard generics, and PECS
I have never even heard any of these things before. Should I read a Java reference book?

I'm practicing problems on HackerRank to get better. Are there any good bocks on the topic?

I definitely agree about the resume part, I have made sure to only include what I know about.
>>
>>58923579
all memes don't listen to that guy he doesn't know what he is talking about usually you will get asked about all the main topics in Java for example

Objects, Inheritance, Polymorphism, Classes, overloading, constructors, data structures like arraylists or arrays, and all the other ones
>>
>>58923613
That's much more in line with what I already know.

I know it's a long shot, but is there any way to become a graph algorithm expert really really fast? I want to be prepared for any opportunities that may come my way.
>>
File: 1470808214936.gif (43KB, 478x332px) Image search: [Google]
1470808214936.gif
43KB, 478x332px
Sup guys. Does anyone know how to stop a while loop in Lua with ^C? Found this thingy here in the archives, it runs unstoppable forever. http://pastebin.com/raw/brwgHnCq
I've no clue about Lua. jiff related
>>
>>58923579
What year are you in at uni? If it's the first then they might cover it later on, but if you're near the end of your course and Java is your main language then I'd get reading. The online Oracle docs may be helpful.

>>58923613
I was asked about the things I listed when I interviewed at my current employer. However, I wholeheartedly agree that he should be fully fluent in all the things you list before he goes onto more esoteric topics.

He should try to stand out, you know?

>>58923663
See if your college library has a copy of Introduction to Algorithms, by Cormen et al.
>>
>>58921746
Jesus Hrist
>>
>>58923712
Third year

To be honest, I haven't done much Java outside my first algorithms class. I'm focusing my degree on systems architecture and networking because I like low-level programming and infosec-related stuff, but it seems there's no money in those areas compared to Java work.

I'll grab that book, thanks for the tip
>>
>>58923781
The full book is fairly pricey so if you can't get it from the library try looking for a used version.

If only one of your classes used Java, what else have they been teaching you?
>>
>>58923796
As far as languages go, C, assembly, SQL, some python here and there, and lots of low level concepts and theory. Operating systems, compilers, processor design, high-performance computing

Used a little bit of java for one shitty project design class, but that's about it.
>>
>>58923824
all the real money is in Java, web development, databases knowing php and sql, and IT security
>>
>>58923824
Huh, I thought everywhere taught a significant amount of Java and/or C#. My earlier posts were made under the assumption that you'd done several courses in Java.
>>
>>58923838
I know, but I don't want to be stuck doing Java and CRUD apps for my whole career.If I'm going to waste away at a cubicle for 8 hours a day for the rest of my life, I at least want the work to be interesting.

Surely some of these large tech companies hire people for writing device drivers and doing embedded programming, right?

>>58923841
I see

I would still like to learn about those things for my own knowledge, but I really, really want to avoid doing Java for the forseeable future.
>>
>>58923894
Unluckily for you, Java and .NET are where a lot of the money is these days.
>>
>be white
>open my CLion in front of my boss
>it pops up "Licensed to Ilyanahu"
>mfw
>>
File: 1421686036565.jpg (331KB, 600x876px) Image search: [Google]
1421686036565.jpg
331KB, 600x876px
>>58923926
> Be employed
> Don't buy cheap tools
>>
>>58923987
i already pay for way too much stuff man
>>
>>58921838
Java
http://jnode.org/
>>
>>58923926
Do you read CLion as Kleeon or See-Lion?
>>
>>58924721
I read it as Klyon
>>
File: programming socks.png (338KB, 1140x813px) Image search: [Google]
programming socks.png
338KB, 1140x813px
What is the best color for C++?
>>
>>58924796
learn rust
>>
>>58921793
Good luck correlating the two polls
>>
>>58923926
there's free software that's just as good but a pain in the ass to install
>>
>>58924796
Brown: for shit.
>>
>>58924905
What is this?
>>
>>58924796
>tfw no qt striped socks gf (male)
>>
just made a reverse shell with a password dump, anyone interested?
>>
>>58925020
i'll be your girlfriend tonight
>>
File: Symbolics3640_Modified.jpg (154KB, 308x608px) Image search: [Google]
Symbolics3640_Modified.jpg
154KB, 308x608px
>>58921838
Legacy Lisp.
>>
Working on an project that uses the facebook API. Is there any easy way I can get a list of all the friends of a particular user?

Pic related is what I get when I use the "GraphAPI Explorer" and select "friends" as one of the arguments to display. Am I supposed to only see three of my friends (even though the total_count is correct?)

Below is the code PHP code FB gives me:
$request = new FacebookRequest(
$session,
'GET',
'/me',
array(
'fields' => 'id,name,friends'
)
);

$response = $request->execute();
$graphObject = $response->getGraphObject();
/* handle the result */
>>
File: 1486948995253.jpg (105KB, 602x681px) Image search: [Google]
1486948995253.jpg
105KB, 602x681px
funnier just by cropping

fuck you plebeian internet
>>
>>58925248
>9gag
>>
File: 1486376206702.jpg (39KB, 500x556px) Image search: [Google]
1486376206702.jpg
39KB, 500x556px
>>58925258
>>
File: hqdefault.jpg (11KB, 480x360px) Image search: [Google]
hqdefault.jpg
11KB, 480x360px
Need some advice for a noob....

I'm new to programming and I've been working with Java, reading "Head First Java". This is day 2 and I'm on chapter 6, and I'm already feeling discouraged/demotivated.

When I look up beginner coding projects, is it normal to just feel like I don't want to do any of them? Like "build a calculator" or "build a program that switches the first and last letter of a string", I look at those and I think to myself "fuck this"

I just looked at a bunch of example coding interview questions, just reading them made me sweat and feel nervous. I don't think I could ever pass a technical interview like that.

Where do I go from here? Is this a common thing for beginners or is it just that programming isn't for me?
>>
>>58925281
>reddit frog
>>
>>58925286
try something other than Java
and not Python either

both of those languages are trash
>>
File: socks.png (307KB, 1314x720px) Image search: [Google]
socks.png
307KB, 1314x720px
>>58924796

These do the trick for me.
>>
File: girls' programming accessories.png (341KB, 832x480px) Image search: [Google]
girls' programming accessories.png
341KB, 832x480px
>>58925314
>socks that increase your IQ
how does that work?
>>
>>58925286
>Is this a common thing for beginners
yes

writing real phone apps or something is fun

sounds like you're reading some shit book
>>
File: 1486948995253.jpg (211KB, 602x681px) Image search: [Google]
1486948995253.jpg
211KB, 602x681px
>>58925258
>>
>>58925296
>both of those languages are trash
they are our fuckicking cash crop

literally can't go wrong with those two while C++ requires phd level dedication to be taken seriously
>>
>>58925321

Pretty sure they're not the actual advertised effects.
>>
>>58925321
Socks can change a lot about a man. Just as striped socks increase programming ability, the FreshIQ raises your IQ temporarily.
>>
>>58925341
you should start the next thread, young man
>>
I just have to say, coming from a background of only c++ for a while, Python is so wonderful...

So happy at the fact that I just wrote a script to append 3 unique random elements of a list to every line in a text file in ~15 lines of code.
>>
>>58925286
btw Java is one of the hardest things you can learn in programming, classes and OOP are deep water

so be patient, is hard for everybody
>>
>>58925430
> only c++
there's no excuse for that

before python there was Perl, which is even better at that kind of stuff

I'm sure Lua has been well liked in the c++ community for the same reason
>>
>>58925383

Next thread isn't for another 100 posts.

>>58925459

>Java is one of the hardest things you can learn in programming
I dunno man, cryptography was pretty goddamn hard.
>>
>>58921747
>from health code, in adjust current health is the line: cur_Health -= adj;
>adj is tested as -10

In the test, you are subtracting a negative number, which means you are trying to add 10 health instead of subtract 10 health...
Assuming current health is at max, this does nothing.
>>
>>58925523
>I dunno man, cryptography was pretty goddamn hard
cryptography is a specific math domain, not programming
>>
am i retarded for limiting my program to run at 60fps? should it be 30?
>>
>>58925570

Number theory, which is a huge part of modern cryptography, is a math domain.
Cryptography itself is a computer science domain.
>>
How would I compile/run this with gcc?

#include <stdio.h>

int main(int argc, char *argv[])
{
int i;
for (i = 1; i < argc; i++)
printf("%s%s", argv[i], (i < argc-1) ? " " : "");
printf("\n")
return 0;
}
>>
File: common emitter bias calculator.png (67KB, 1751x803px) Image search: [Google]
common emitter bias calculator.png
67KB, 1751x803px
I wrote up a quick common emitter amp DC bias calculator. Nothing too fancy really.
>>
>>58925768

gcc filename.c -o outfile
>>
>>58925505
Perl I still use when I need shell scripting on steroids
For most script tasks Python has taken over because of sheer convenience of the standard library.

In an unrelated note, I learned that someone tacked on Lisp on Python's AST which is neat
>>
File: 1459640486237.jpg (346KB, 1280x720px) Image search: [Google]
1459640486237.jpg
346KB, 1280x720px
Why do people use text protocols over the network?
It's not like it's a config or log file where user readability matters.

Binary protocols are:
- Faster and easier to parse
- Smaller, therefore performs better, and saves more data
- Simpler and cleaner code
- Less error prone

There is literally NO benefit to using a text protocol, AT ALL.
>>
>>58925981

Which text protocols in particular are you objecting to?
>>
>>58925998
All of them.
>>
>>58926015

So you would object to, for instance, JSON as a data serialization format for web APIs?
>>
>>58926026
Yes.
>>
>>58925981
> Debugging malformed anything
> Text as UTF-8 is the universally understood datatype, as opposed to all the shit you can get into if you use other things. (Big vs Little endian and what about representation? Is it sign-and-magnitude, ones' complement, two's complement, and excess-K?)

Yeah, if you have a fixed format that everyone knows, then this will all be fine. But if the content can vary, you're fucked.

Binary JSON is retarded. all non-retarded web servers compress the text before sending, so you're not even saving a lot of space.
>>
>>58925286
Find something you want to do and do that.
>>
>>58926080
>hur dur I'm retarded
Big endian is the standard on the web, so you obviously convert to big endian you retarded shit.
Two's complement would also be the standard or at least defacto-standard.

The problems you've listed literally do not exist.
Even if the representations aren't standard, they'll be standardized in the particular protocol you're using and developing for, you retarded faggot.
>>
New to programming. About to start reading/working through K&R's "The C Programming Language (ANSI)". I use Windows; what IDE should I be using for C? Or perhaps I should be using a plain old text editor.
>>
>>58922041
roll
>>
>>58926032

Sounds silly then. JSON is a rather efficient format for serializing key:value stores, and because it is plaintext, it doesn't need to be converted to base64 when transferred over HTTP.
>>
>>58926251
>it doesn't need to be converted to base64 when transferred over HTTP.
Uh. You don't need to convert to base64 when sending anything over HTTP..
You do realize that HTTP can send binary data right?
Besides, HTTP is a disgusting text protocol.
>>
File: loopdaloop.jpg (13KB, 197x156px) Image search: [Google]
loopdaloop.jpg
13KB, 197x156px
please help i'm tired and my brain is fried i think

why doesn't this loop run
>>
>>58921838
JavaScript
>>
>>58925286
Program a client server application using sockets 8)
>>
>>58926114

It's funny. The web uses Big Endian because IBM and Sun were a big deal when these standards were formed. These days, however, most relevant architectures for both server and client side use Little Endian. As a result, you have to byte swap on both sides.

>>58926267

I could have sworn there was a problem with HTTP and binary data, due to certain byte sequences having semantic meaning in HTTP packets...
>>
>>58926313

file is the file name? or are you trying to use strlen on the actual file?
>>
>>58926313
size_t i =  (len - 1); 


should be an int?
>>
File: filestruct.jpg (36KB, 374x596px) Image search: [Google]
filestruct.jpg
36KB, 374x596px
it's the the complete path to the file, i'm trying to seperate the filename from the directory name

size_t len = strlen(file);

if(file[len - 1] == '\\')
return NULL;


why does this break my program?
>>
>>58926433
>>58926408
meant to quote
>>58926428
i didn't realize that size_t is unsigned, that must be the problem
>>
>>58926447

Why would you assume size_t to be signed? Would you suppose it possible for an array to have a negative size?
>>
>>58926447

Aren't you compiling with all error and warning flags on? The compiler should have caught that error
>>
>>58926465
Think he's attempting to reference the array elements by using pointers, but is failing miserably.

Just be normal and use array indexes kid :uB
>>
>>58925981
I dare you to program a distributed application without text-based protocols. You'll quickly understand why you need a text stream in most of cases: it's the universal message-passing interface across any possible programming language.

Binary protocols have their own use cases, namely buffer of characters. For anything that may include some sort of implementation-defined encoding, it's definitely not recommended and far more prone to error and difficult debugging.
>>
>>58926377
>I could have sworn there was a problem with HTTP and binary data, due to certain byte sequences having semantic meaning in HTTP packets...
Well, I never had any problems transmitting binary data over HTTP when I made https://github.com/sora-chan/wakaba, and I used to host this for about half a year with regular users from different browsers, and no problems came up.
It had 682 files in the database.

>>58926536
>prone to error
Lol nope. At least no where NEAR as prone to error as parsing a text protocol is.
Parsing binary data is easy fucking peasy and not prone to error at all. Also because it's easy and not prone to error, debugging isn't a problem.

>it's the universal message-passing interface across any possible programming language.
If your programming language can't read binary data either directly (raw) or common standard formats, then it's a meme and no one serious gives a fuck about it.
>>
>>58926433
Quite a clunky way to break your string into tokens... Use strtok or strpbrk instead of looping over the string from the end.
>>
>>58921908
C
>>
File: 232134.gif (2MB, 250x188px) Image search: [Google]
232134.gif
2MB, 250x188px
>be weeb
>be fluent in moon
>want to apply for internship at a translation department for video games and shit
>internship literally asks for "pursuing a degree in the area of translation, interpretation or localization management"
>graduate degree candidate fucking preferred
>graduate
>degree
>for fucking localizing shitty games

Should I apply anyway? What is this unrealistic bullshit they're asking for? I can't even, is this HR shit?

This is so retarded words fail me right now
>>
>>58926963
give your application in japanese
>>
File: 138425261635.jpg (203KB, 1000x1000px) Image search: [Google]
138425261635.jpg
203KB, 1000x1000px
>>58926963

>asking a graduate degree for a fucking mediocre internship

whatever company that does this deserves to die
>>
File: ewqdqwe.jpg (51KB, 800x408px) Image search: [Google]
ewqdqwe.jpg
51KB, 800x408px
>start pogram
>drag in file
ok
>drag in folder
ok
>drag in file
crash

>start program
>drag in folder
ok
>drag in file
ok???????????????????
>drag in folder
>ok
>drag in file
>crash

>start program
>drag in files and never folders
ok

can somebody help?
>>
>>58923565
0/8

What do I win?

>>58926963
>graduate degree candidate fucking preferred
That's because transfer students are a huge chunk of most major US schools' grad programs. They speak a native foreign tongue and were also able to learn English.
>>
>>58927039
Are you programming in fucking comic sans?
>>
>>58923309
>Team Software Process is irrelevant if you use a more powerful language
How can a programming language substitute for proper software engineering process?

1/10 for making me reply...
>>
>>58927066
yeah

also, i fixed it. i was calling delete on null
>>
>>58927057
I really wonder if they realistically expect people to do graduate programs on translation for video games. I can understand anything more sophisticated, but video games? Really?

Anyway, should I apply still? How would "graduate degree preferred" play out when applying?

Do they just throw it away if you're undergrad... of a completely unrelated subject?
>>
>>58922897
This is pretty much THE enterprise language. It looks nasty, but gets the job done.
>>
>>58927084
>expect people to do graduate programs on translation for video games
Pretty sure you've created some facts outside of what was posted.

What the anon in >>58926963 implies is that they're looking at someone who is currently working on a grad degree, regardless of the field (I would assuming something related), not that they need a Master's in Shrieking Japanese Woman Translation.
>>
>>58922163
Java or C#. These two have the most and second-most jobs, respectively (excluding Javascript and SQL).

Java if you absolutely give zero fucks about anything other than money.

C# if you want a guaranteed job and a more enjoyable language.
>>
>>58926963
Just send a video of your katana skills and they'll accept you
>>
>>58922163
By lots of money do you mean a decent paying job? then C#
>>
File: 1486963086865.jpg (65KB, 521x453px) Image search: [Google]
1486963086865.jpg
65KB, 521x453px
>>58927151
I put this on my resume and sent it to apple, they didn't rike it so much
>>
>>58923565
>[ ] hate OOP
>[ ] hate IDEs
>[x] never produce actually useful software (this is important)
>[ ] tiling window manager
>[ ] dark-like-my-soul customized colors
>[ ] 40% keyboard with braided cables and custom caps
>[x] hate Apple
>[ ] hate popular Linux distributions (far too intelligent for them)

>tfw i can't get into the Kool Kids Klub
>>
>>58927158
C# has a ton of jobs, but wouldn't you be better off with some esoteric old language that big enterprise still has to use for fuckhuge monolithic enterprise business applications?

Yeah, it'd be nearly impossible to get a job, but if you do, you're guaranteed like $200k.
>>
If I want to send bytes from a Java client to a C server, would I have to encode them as ASCII first?
>>
>>58927167
Of course not.
>>
>>58927171
ok then, so how would I send a string from a Java client to a C server, to be processed, and sent back?
>>
Should I skip gui in my java class? theyre not on the final.
>>
>>58927159
Maybe you should deliver the katana in person, decapitating whoever rejected your superior japanese steel.
>>
>>58927165
>Gambling on a life-negating legacy job to get money.
It's fucking stupid, but if all you care about is money then who am I to stop you
>>
>>58927178
>>58927167
Languages become irrelevant when it comes to networking.
All you're working with is a stream of bytes.
Picking something sane like UTF-8 would be a good idea though.
>>
>>58927039
>Comic sans
>Underscore abuse
Fucking off yourself.
>>
>>58927284
i didn't write that, vs opened that file when my program crashed. i have no idea what it does and i thought that maybe one of you guys would know.
>>
I've been solving problems on Codeforces in order to teach myself Python. I came across one where the NumPy package would much of use. I'm using Windows and the official site recommends installing a Python distribution like Anaconda. Why? I already have the official one. Why are they rusing me into installing some freemium shit?
>>
File: sproll.png (6KB, 377x330px) Image search: [Google]
sproll.png
6KB, 377x330px
>>58927039
>0xDDDDDD
>>
>>58922041
rollin
>>
>>58927362
0xD1DD1E5 0xDDDDD
>>
>>58927284
That's a part of STL, the underscores are reasonable.
>>
>>58927534
>the underscores are reasonable
You're encroaching on the implementers/standards namespace.
Stop it, you idiot.
>>
writing everything from scratch is actually a lot of work
>>
>>58921880
I work in research and development, making next generation software/hardware. C is the only sane option for embedded systems because it's the only (commonly used) high level language that doesn't hide the low level functionality too much.

Plus, as Torvalds points out, C is good for weeding out the incompetent programmers who scream about C being obsolete and shit because they can't write C.
>>
>>58927795

Torvalds is a blithering idiot.

C is in fact obsolete, and calling everyone who points that out "incompetent" is not an argument. First, because it's not a refutation of the points they make, it's just a red herring. Second, because they usually aren't incompetent, they're security experts who exploit C for a living. They can write C. If anybody can, it's them as a matter of fact.

We know how C is poorly designed. The standard library is erratic in its string treatment, pointers are dumb and memory management is simply a clusterfuck. It's a great language if you love buffer overflows, but it doesn't really provide any added benefit. It's not a sane option, there are better designed languages that don't hide any low-level functionality from you - whether it's new languages like Rust or even old ones like Pascal.

Now please just stop with the "you only say that because you're dumb" meme. Either refute our arguments, or admit defeat. Enjoy your rectal ache.
>>
>>58927680
Can you even read?
>>
>>58927846
If you're seriously pushing for C++ over C, as several people here are, you seriously are completely retarded and are beyond help.
>The standard library is erratic in its string treatment, pointers are dumb and memory management is simply a clusterfuck
Nice statements with absolutely no substance. You can't even refute that, because that is so vague.
You're going on about your supposed "arguments", but you haven't even said anything at all.
>>
>>58927902
>C++
You have got to be kidding me, its memory management is even worse.

>that is so vague
They sound vague to you because you don't know what they mean.

>you haven't even said anything at all
Sure I haven't. You got me! Go celebrate elsewhere...
>>
>>58927846
McCarthy is a blithering idiot.

Lisp is in fact obsolete, and calling everyone who points that out "incompetent" is not an argument. First, because it's not a refutation of the points they make, it's just a red herring. Second, because they usually aren't incompetent, they're security experts who exploit Lisp for a living. They can write Lisp. If anybody can, it's them as a matter of fact.

We know how Lisp is poorly designed. The standard library is erratic in its string treatment, lists are dumb and memory management is simply a clusterfuck. It's a great language if you love buffer overflows, but it doesn't really provide any added benefit. It's not a sane option, there are better designed languages that don't hide any low-level functionality from you - whether it's new languages like Rust or even old ones like Pascal.

Now please just stop with the "you only say that because you're dumb" meme. Either refute our arguments, or admit defeat. Enjoy your rectal ache.
>>
>>58927920
>You have got to be kidding me, its memory management is even worse.
How? C++ has what very few other languages have: a well-defined object life cycle.
>>
>>58927920
>They sound vague to you because you don't know what they mean.
You've used a bunch of terms with no real defined meaning in these circumstances.
>erratic
How? Are you going to complain about strnlen, and how it's "inconsistent" with some other functions, even though it was actually designed for something different?
>pointers are dumb
That's just a completely retarded thing to say.
>memory management is simply a clusterfuck
How? C memory management is pretty fucking easy. Auto variables, static variables, dynamic variables.
Just because your a Gobabby or something, it doesn't mean that every fucking language needs a GC.
>>
>>58927942
You've never done Object Pascal, have you?
>>
>>58927959
Nope, care to elaborate, though?
>>
>>58922041
>Red - Difficult
>LISP interpreter
>Design an Esoteric Language
>Booru Client
>Go (No AI necessary)
Change it from "Programming Challenges" to "First Time Programming Projects" and maybe I won't think you're retarded.

Here are some alternatives:
>EcmaScript interpreter
>Design Esoteric Language which fully supports OOP and FP styles.
>Chess (With >1000 ELO AI)
>>
>>58927970
>EcmaScript
>supports OOP
What a fag.
>>
>>58927949
The way your post degenerates into a "you're incompetent" towards the end just proves my entire fucking point: you faggots can never defend your failed language so you blame the developers. Nevermind the fact that even the most experient and seasoned C developers still commit a lot of buffer overflows. Heck, the Linux kernel is chock full of them! And we're gonna keep exploiting them, and you're gonna keep calling us incompetent... like poetry really.
>>
>>58927993
>tl;dr no u
Good one.
>>
>>58927949
>it doesn't mean that every fucking language needs a GC
Holy shit you're ignorant! A garbage collector isn't the only alternative, you fucking moron. There's reference counting, there's all sorts of techniques!

Gosh, C toddlers are dumb!
>>
>>58927989
Did you miss the part where they're supposed to be the hard projects? lrn2think newb.
>>
>>58928002
>"you can't code C"
>I just wrote C code exploiting a buffer overflow in your C code, tell me again how I can't code C
>"b-but... but... YOU CAN'T!!!!"
Keep telling yourself your language is immaculate, kid.
>>
>>58927949
>>58927993
Get a room, guys.
>>
>>58928022
I agree with you, but you sound really dumb and edgy. Work on your persuasive writing skills or stop having the same opinions as me.
>>
>>58928005
What's stopping you from reference counting your shit?
In fact, a lot of things use reference counting.

>>58928022
You're making a bunch of general statements about a large group of people, with absolutely no evidence.
Seriously, you're pretty much just saying "I'm such a l33t hax0r, because I broke some code a novice wrote".
I don't even know which language you're arguing for to replace it.
If you say C++, you're fucking retarded.
If you say Go, you're fucking retarded.
If you say Rust, the jury is still out on that one. However, Rust and its ecosystem has a lot of its own problems.
>>
>>58928052
>you sound really dumb and edgy
I don't care what you think.

>Work on your persuasive writing skills
I'm not here to persuade people. I don't feel the urge to convince everyone I'm right, I'm not a teenager anymore. Let them believe whatever they want, I don't give a fuck.
>>
>>58928078
>I don't care what you think.
Yes you do. That's why you're posting on an image board, you dumbass.
>I'm not here to persuade people.
Shut the fuck up, then.
>>
>>58922041

Lmfao the Hard Mode / Fuck you mode for the Chip - 8 Emulator suggestion I made is still around on that image?

Legitimately I don't even have the code anymore from when I made that suggestion.
>>
Will the language wars ever end here?
>>
>>58928078
Maximum edge.
>>
>>58928089
>not using offsite version control
>>
>>58928090
Not until all of the Sepplesfags fuck off.
>>
>>58928090
When WW3 happens, only C and Lisp will remain.
>>
New thread:
>>58928112
>>58928112
>>58928112
>>
>>58928098

I feel no need to keep code around for a bunch of small one off projects that I don't intending on publishing or maintaining.
>>
>>58928111
Ada, because >muh DoD
>>
File: 1484996898178.jpg (28KB, 500x281px) Image search: [Google]
1484996898178.jpg
28KB, 500x281px
>>58923354
Divide 748 by 238 and call it a day.
>>
>>58924326
I'm going to vomit
>>
>>58923666
function sleep(s)
local ntime = os.clock() + s
repeat until os.clock() > ntime
end

while true do
move = math.random(1,6)
dir = dirs[math.random(1,2)]
draw()
for m = 1,move do
changepos(dir)
draw()
-- os.execute("sleep 0.1")
sleep(0.1)
end
end
Thread posts: 323
Thread images: 40


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