[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: clang2.jpg (203KB, 574x800px) Image search: [Google]
clang2.jpg
203KB, 574x800px
Old thread: >>59023578

What are you working on, /g/?
>>
File: 1472516292639.png (566KB, 1000x352px) Image search: [Google]
1472516292639.png
566KB, 1000x352px
>>
>you will never be a cute programmer loli
>>
>>59025971
Maid Dragon. MC is an OL programmer.
>>
>>59025554
>>59025503
Cool, I guess I'll just try doing some exercises from CLRS, or something, in C++.
>>
>>59025942
>old awful language

heh
>>
>>59025931
>Posted before the bump limit
Delete this invalid thread.
>>
>>59025954

'Tis more important to be a skilled programmer than it is to be cute.
>>
Post the most complicated and over-engineered fizzbuzz
>>
>>59026137
for i in range(1, 100):
if i % 3 == 0 and i % 5 == 0:
print('FizzBuzz')
elif i % 3 == 0:
print('Fizz')
elif i % 5 == 0:
print('Buzz')
else:
print(i)
>>
File: 1392507273085.png (21KB, 176x232px) Image search: [Google]
1392507273085.png
21KB, 176x232px
>>59025954
why fucking live
>>
>tfw all the money is in either java or webdev feels bad man
>>
Poker player here.
I wanna write a program that generates random hands for me for practice.
What is a good program
>>
Task:
>if the letter "a" appears in a string you should print to output "letter <a> found!"
>but if the letter b is in the string, you should report it first than the letter a
>also indicate at which position you found the letters

WHAT THE FUCK
>>
>>59026225
>Poker player here.
online?
>>
>>59026225
Write your own, it's not very difficult.
>>
>>59025931
I'd get into their LLVM, if you know what I mean
>>
>>59026248
I mean that wrongly. What language should I use?

>>59026247
Online and offline.
>>
>>59026229
nice simple task. what's the issue?
>>
>>59026252
luscious loli vaginal manko?
>>
>>59026266
the question is if you have the string "aab", you have to go backwards?
>>
>>59026264
Any. There should be no difference, unless you choose brainfuck or something.
>>
>>59026264
Which ever you feel most comfortable with.
>>
>>59025931
Me on the right.
>>
>>59026229
if 'b' in string:
print(letter b found)
print(string.index('b'))
elif 'a' in string:
print(letter a found)
print(string.index('a'))
[\code]

If you are using python
>>
>>59026137
>>59026163

print("\n".join(('', 'fizz')[i%3 == 0] + ('', 'buzz')[i%5 == 0] or str(i) for i in range(1,101)))
>>
>>59026334
>elif
;^)
>>
thread image downloader in python. works pretty well. could've been better.
>>
>>59026286
>luscious loli
you are repeating yourself here
>vaginal manko
you are repeating yourself here

DRY
>>
>>59026344
The best :^)
>>
>>59026137
10 LET I = 1
20 LET S$ = ""
30 IF I > 100 THEN GOTO 900
40 LET A = I
50 LET B = 3
60 GOSUB 400
70 IF A = 0 THEN GOSUB 500
80 LET A = I
90 LET B = 5
100 GOSUB 400
110 IF A = 0 THEN GOSUB 600
120 IF S$ = "" THEN GOTO 150
130 PRINT S$
140 GOTO 160
150 PRINT I
160 LET I = I + 1
180 GOTO 20
400 IF A < B THEN GOTO 430
410 LET A = A - B
420 GOTO 400
430 RETURN
500 LET S$ = S$ + "FIZZ"
510 RETURN
600 LET S$ = S$ + "BUZZ"
610 RETURN
900 END
>>
>>59026137

https://github.com/EnterpriseQualityCoding/FizzBuzzEnterpriseEdition
>>
>>59026344
learn programming logic it will help
>>
>>59026344
What is wrong with elif or do you just hate python?
>>
>>59026339
top pleb

watch this
for i in range(1,101):print"FizzBuzz"[i*i%3*4:8--i**4%5] or i
>>
What the hell do I program when i have 5+ years experience front/backend on a long weekend bored out of my mind.
>>
>>59026392
Internet 3.0
>>
>>59026374
read the problem description haha
>>59026376
hehe
>>
Is Twilio the go to for sending SMS?
>>
>>59026417
C
>>
>>59026288
What language are you using?
You don't have to check letter by letter.
Just check the entire string at once if it contains X character.
>>
>>59026288
I'd just iterate through the string once, recording all positions of both a and b in an array, and then reporting them afterwards, first the indices of occurences of b, then the same for a. Not sure if that's what the problem's asking though.
>>
Java is the best programming language.
>>
>>59026365
nani?
kami desu ka?
>>
>>59026456
the thing is, you cant go backwards, you are iterating through each character from left to right
>>
>>59026516
It would help a lot if you just tell us what language your professor asked you to do your homework in dipshit.

Also you are not going backwards. You are recording their position and then checking if b is in the array before reporting b and a.
>>
Is (((LISP))) anti-Semitic?
>>
>>59026339
Alternative
print("\n".join((str(i), 'fizz', 'buzz', 'fizzbuzz')[(i%3 == 0) | (i%5==0) << 1] for i in range(1,101)))
>>
>>59026534
it's in flex (the fast lexical analyser generator)
>>
>>59026550
Use indexOf to check if a string contains a certain substring.

Only anarchic languages do you have to parse through each letter.
>>
>>59026536
>Punctuation is anti-Semitic

Why are Jews always on the lookout for ways to play the victim?
>>
>>59026473

神じゃない、ばかだけ。
>>
>>59026414
Not any of the people who have posted yet, but you're an idiot, just letting you know. Just because your program description says if doesn't mean you can't use an else if statement. I can't fathom how much regret your mother has for not aborting you.
>>
>>59026380
>2017
>python2
>>
>>59026603
pleb
>>
>>59026536
>>59026577
/pol/ please go /dpt/ is a very diverse community who's sole focus is on programming
>>
>>59026392
Anonymous Distributed 4chan clone
>>
>>59026620
if you don't wear programming socks and write in ISO C90 exclusively, you're not welcome here
>>
>>59026442
Each check will internally loop over the string, so you are looping twice, which is slower than just looping once.

>>59026463
4 (you)
>>
>>59026638
>do i fit in yet, guise xDD
>>
>>59026645
True. But clearly that is a homework assignment and I doubt looping over a string twice is worth writing more code than looping once.
>>
>>59026365
Human Resource Machine?
>>
>>59026638
I only program in a g string and low assembly machining languages
>>
>>59026601
Are you serious? If there's a 'b' and an 'a' in the word, it will only report that there's a 'b'. It should be two if statements.
>>
>>59026664
you can only loop once from left to right.

and yet you have to report things found on the right before left

how's that possible
>>
>>59026671
so what do you program in if you're naked? binary?
>>
>>59026620
*/dpt/ is a transgender white nationalist support group with an emphasis on programming
>>
>>59026664
If it's homework then it is worth writing because just looping twice is lazy and won't teach you whatever your teacher was trying to go for when they left you that assignment.

You are probably supposed to solve it using dynamic programming even.
>>
>>59026683
There are these things called variables that can store data for you, so you can use then at a later time.
>>
>>59026692
Looping twice is lazy and correct way to do it.

>>59026683
To loop once
>Loop once
>Record shit in Array
>Check array
>Report shit

Loop twice
>Check for B
>Report B
>Check for A
>Report A

There you go
>>
>>59026687
exactly!

I am fully clothed with a jacket on and shoes on programming in Java and then remove lairs of clothing based on the programming language

>>59026690
I am pretty sure it's multicultural
>>
>>59026692
You are still looping over the array afterwards. You are just making your code more complicated.
>>
>>59026638

I primarily program in ISO C11, C++14, and Ruby. I have recently been toying around with F#, and have been working in some x86_64 assembly for my security assignment.

I wear black crew socks.

>>59026690

I am a cisgender male Libertarian programmer.
>>
>>59026731
The lower level the language, the fewer the layers.

Rust is this weird programming language where you wear a shirt and a coat and a hat but no pants.
>>
>>59026740
>I am a cisgender male Libertarian programmer.
then this place is not for you, only girls are allowed here
>>
File: 1481425736558.gif (77KB, 500x416px) Image search: [Google]
1481425736558.gif
77KB, 500x416px
>>59026755
i want to build an assembly compiler.

how far does the rabbit hole goes?
>>
>>59026740
are you at least full on ancap? If not, you're not welcome here.
>>
>>59026739
Yes but the array is smaller and only supposed to have two variables. Heck, you don't need an array, just two variables defaulted to -1 and set to the position of b and a respectively if found.

It is more complicated but it is what you are expected to do if you are writing an OS. You don't want Linus yelling what a moron you are through mail.

You are probably a webdev.
>>
>>59026770
Not very far
>>
>>59026787
>Flex
>Writing an OS
????
>>
File: 1471774902833.jpg (326KB, 636x900px) Image search: [Google]
1471774902833.jpg
326KB, 636x900px
How many more of these books are there? I found the LLVM one on amazon.
>>
>>59026770
If you are using a needle, a looking glass and a disk plate, you are probably an undead zombie or Grace Hopper.
>>
>>59026770
i hope it's in assembly and not some pleb bullshit
>>
>>59026813
now this anime i can FAP to
>>
>>59026787
Except once your code gets more complex with more substrings to track, your array gets larger and needs to be manually updated all the time.

While searching for a single substring and printing it can be wrapped into a function and reused multiple times.
>>
Quick, program a clock that will print the time every second.
>>
>>59026864
now=$(date +"%T")
echo "Current time : $now"
>>
>>59025931
Imagine if an authoritative book on computing was plastered with anime girls.
>>
Where do I find "Idea guys"? I'm a dev that can be picky and looking .
>>
>>59026881
As soon as Japan writes one. They put anime on fucking everything, even supposedly high brow literature.
>>
>>59026889
professional idea guy here

ask me anything
>>
>>59026864
python
__import__('datetime').datetime.now().strftime('%H:%M:%S')
>>
>>59026889
Have you checked your local liberal arts or business faculties?
>>
File: bainari_konkon_konpairu.jpg (124KB, 692x976px) Image search: [Google]
bainari_konkon_konpairu.jpg
124KB, 692x976px
>>59026813
There's two others apart from the ones in the last two /dpt/ threads. It seems most of them were only distributed at Comiket.
>>
>>59026767
Pretty sure most posters here are just men.

>>59026770
An assembler? Those aren't that difficult.

>>59026771
No. I'd rather not have my country get destroyed by the Chinese and the Russians. A proper government is necessary to reasonably defend the people from foreign powers.
>>
>the visual c compiler only supports ANSI C
fuck you microsoft I want my VLAs
>>
>>59027006
just use malloc you shit
>>
>>59026978
it's 2017, men can be girls too
>>
>>59026767
>only girls are allowed here
that's right! only cute lolis allowed!
>>
File: 1428166758785.jpg (259KB, 1280x1810px) Image search: [Google]
1428166758785.jpg
259KB, 1280x1810px
>>59027026
>>59027026
This, If you don't identify as a cute 2d loli you don't belong here
>>
>>59027013
it's not the same thing retard. I don't want to use the heap
>>
Am I allowed to address myself with "Dr." and wear a lab coat?
>>
>>59027006

Why do you need MSVC? If you're developing Windows drivers, don't use VLAs -- the kernel stack is fucking tiny. If you're developing anything else, use GCC or Clang.

>>59027043

Do you have a PhD?
>>
>>59027038
I identify as a cat do I belong here?
>>
File: 1486600903057.png (333KB, 596x720px) Image search: [Google]
1486600903057.png
333KB, 596x720px
>>59027038
LOLI PROGRAMMERS UNITE
>>
>>59027059
>Do you have a PhD?
A fake one? Yes.
But do I even need one to officially wear a lab coat?
>>
File: 1458154393162.jpg (500KB, 1080x1080px) Image search: [Google]
1458154393162.jpg
500KB, 1080x1080px
>>59027063
Sorry. cute loli cat or no go
>>
>>59027068
Lab techs with no degrees can wear lab coats.
So yes you can
>>
>>59027059
>Why do you need MSVC? If you're developing Windows drivers, don't use VLAs -- the kernel stack is fucking tiny. If you're developing anything else, use GCC or Clang.
I try to keep my malloc()ing down to a minimum. also if I'm programming on windows I might as well use their fucking compiler. turns out I should've stayed on ganoo+loonix
>>
>>59027102
Nice. It helps me focus.
>>
I don't know how people have the motivation to program outside their working hours.

I spend 40-50 hours a day at my job looking and writing code. I can't imagine myself going home and doing more of that.
>>
>>59027154
>writing code
>code
found your problem
>>
>>59027169
I should get a new job?
>>
>>59027154
I just do IT stuff and program on the side for fun
>>
>>59026877
>>59026900
Every second, you are just printing once
>>
>>59027219
while(1)
>>
File: 1487358408046.jpg (137KB, 857x1202px) Image search: [Google]
1487358408046.jpg
137KB, 857x1202px
>>
>>59026877
>>59027219
watch -n 1 date +%T
>>
>>59027217
What does doing IT stuff entail?
How do I find a job that lets me do IT stuff only.
>>
>>59027238
>not piping date to figlet
>>
>>59027233
That's not every second

>>59027238
It's a start but will skip seconds once in a while
>>
>>59026675
I got you bro, those others anon are retards who can't follow basic instructions.

The problem states you should report occurrences of BOTH 'a' and 'b', and their code only reports one or the other.
>>
>>59027154
It's fun.

If you don't find it fun why did you get a job in it in the first place?
>>
>>59027250
It could mean working with databases, system admin in linux, help desk, configuring files, analyst, security and so on there is so many different IT fields
>>
>>59027256
import time

start_time = time.time()
interval = 1
for i in range(20):
time.sleep(start_time + i*interval - time.time())
f()
>>
File: trimester.png (24KB, 304x434px) Image search: [Google]
trimester.png
24KB, 304x434px
>>59027043
>>
>>59027268
Jacking off is fun.
Jacking off ALL the time isn't fun.
>>
>>59027154
I don't program as a job because that would crush my soul. I do it as a hobby because it's fun
>>
>>59027250
>How do I find a job that lets me do IT stuff only

search for help desk jobs and work your way up in the company. if you're good, you won't be help desk for long
>>
>>59027271
That doesn't work, what is f? even if f is defined it will only loop 20 times, sleep can't be negative. You suck
>>
Apple's pricing model for iOS licenses is pissing me off but I'm gonna fool around with Swift anyways
>>
>>59027270
How do I go into these field with no experience and minimal knowledge?

>>59027287
It was fun as a hobby.
Now it is not fun as a hobby.

>>59027302
Does that mean I start from the bottom again?
I am already nearing project lead.
>>
>>59027068
You can wear a labcoat even if you have nothing but a GED. But you can't call yourself Dr. unless you have a doctoral degree that isn't a J.D.

>>59027112
>also if I'm programming on windows I might as well use their fucking compiler
DON'T! Microsoft is terrible and making compilers. They're slow as hell at implementing the latest C and C++ standards, and they can't beat out any of their competitors in terms of compiler optimizations. There's a reason they now have official support for using Clang in Visual Studio.

You don't have to switch to Linux (although it can be helpful, since the development environment is nicer in general), but you do have to use a decent compiler. Clang and GCC are decent compilers. ICC is an okay compiler, but it really only makes sense to use it if you're developing high performance applications for supercomputers with Intel processors or some shit.
>>
>>59027306
Try it yourself looser
http://stackoverflow.com/a/10813270
>>
>>59027302
this

help desk is the gateway into many interesting and good paying IT fields
>>
>>59027309
>joo
>doesn't want to pay for license
doesn't surprise me :^)
>>
>>59027285
outside working hours != ALL the time
>>
>>59027327
fuck paying $100 if im probably never gonna use this thing again
>>
>>59027329
Imagine spending 8 to 10 hours jacking off a day.
When you get back home do you still want to jack off?
>>
>>59027321
>It's in stack overflow so it is right
>>
>>59027353
No. If it works it is right.
>>
>>59027351
The panda has a lot of doujins, so yes.
>>
>>59027353
Just run it and see anon. Obviously replace f() with a print statement.
You probably think:
i  = 0x5f3759df - ( i >> 1 );   

is wrong because you don't understand it
>>
>>59027317
>But you can't call yourself Dr. unless you have a doctoral degree that isn't a J.D.
I have a PhD though, albeit a fake one.
>>
>>59027317
>DON'T! Microsoft is terrible and making compilers
I figured after seeing optimization comparisons between various C compilers. but I'm planning on making and releasing programs exclusively for windows.
>>
>>59027382
I thought I was the only one with a Pimpin'Hoes Degree
>>
>>59027374
A reminder that any code you write as a "hobby" and in your own free time still belongs to the company you work for especially if you are a software/web/app dev.
>>
>>59027409
t. gavin belson
>>
>>59027409
That actually depends on the contract you sign before getting the job. It doesn't sounds unreasonable that the code you write in the company belongs to them.
>>
File: 1484513582402-1.png (403KB, 450x630px) Image search: [Google]
1484513582402-1.png
403KB, 450x630px
>>59027351
For fucks sake. There's plenty of people doing that while also finding time for relationships and family.
Stop finding excuses. YOU are the problem, not the situation.
If you want to continue to be a small time loser, go ahead. Just don't make it sound like it's impossible to be anything else.
>>
>>59027351
I jack off at least twenty hours on the weekend, and I still want to fap that much on the weekdays.
>>
>>59027378
ValueError: sleep length must be non-negative


Your computer must be really really slow
>>
>>59027419
>>59027428
Most companies have that stipulation in their contract to prefer employees from coding their own projects in their free time.
>>
>>59027327

Widely-used platforms typically give away their SDKs for free, because their respective companies recognize that they make money simply from the availability of applications for their platform. Anyone can make an Android application without having to pay Google. Anyone can make a Windows application without having to pay Microsoft. Charging money just to be a developer as Apple does is rather silly.

>>59027382

Then you don't actually have a PhD.

>>59027398

Even if you plan on releasing programs exclusively for Windows, use MinGW-w64.

>>59027409

More reasons to be glad I'm planning on pursuing a PhD to work as a professor.
>>
 import time
import datetime
start_time = time.time()
interval = 1
for i in range(20):
time.sleep(max(0, start_time + i*interval - time.time()))
print(datetime.datetime.now().strftime('%H:%M:%S'))
>>
>>59027464
>Then you don't actually have a PhD.
I literally do though. Did you even read my post?
>>
>>59027154
Maybe you should find a better job.
I spend maybe 20 minutes writing code in an 8 hour day, the rest is just me thinking and zoning out and maybe watching anime sometimes.

You sound like you're regurgitating braindead CRUD applications code for 8 hours a day.
>>
>>59027464
>Charging money just to be a developer as Apple does is rather silly.
Indeed, but that works as a filter too.
>>
>>59027464
full automation will replaces professors by digital holograms shortly
>>
>>59027472
I work in HP updating firmware for routers and other bullshit. It pays really well but it kills my soul.
>>
>>59027477
50% of all apps on the app store are fart apps and that's not an exaggeration.
>>
>>59027472
what do you work as?
>>
>>59027504
webdev :^)
>>
>>59027468
A fake PhD isn't a PhD.

>>59027477
Why filter? Platform creators should stay out of the way of developers and users entirely. You can choose whether or not to allow an application in your store, but the platform should be able to run applications distributed in other manners to run as well.

>>59027484
Professors do more than just teach, idiot.
>>
>>59027484
But who will write the scripts the holograms have to speak?
>>
>>59027537
/dpt/ of course
>>
File: why are you lying.png (67KB, 926x225px) Image search: [Google]
why are you lying.png
67KB, 926x225px
>>59027440
>Lying on the internet
Pathetic
>>
>>59027493
How bad are firmware software? Are toasters gonna become the next botnet?
>>
>>59027525
A fake PhD is by definition a PhD. It just has the additional property of being fake.
>>
>>59027525
They can easily replace professors in lower division courses.

Most of them just teach blindly from the book, and in the case of liberal arts, show videos in class instead of teaching.
You can replace them with something like mymathlab.
>>
>>59027547
This is bound to fail

>>59027551
As I said, you have a very slow computer. Try time.monotonic like the SO comments said.
>>
>>59027552
Never. Proprietary firmware software is held together by duct tape with legacy codes no one can read, what the intern wrote, what pajeet wrote. Half the time you are rewriting what some else already wrote, the other half is reading what the other person wrote and trying to figure out why they wrote it. Oh that is 100% of your time. Too bad you have to write documentation as well. Which is why no one writes proper documentation, leading to a catch 22.
>>
>>59027566

fake1
fāk/
adjective
adjective: fake

1. not genuine; counterfeit.

gen·u·ine
ˈjenyo͞oən/
adjective
adjective: genuine

truly what something is said to be; authentic.

Fake PhD = PhD that is not truly what it is said to be = Not a PhD.
>>
>>59021712
>Katakana
get the fuck out
>>
>>59021712
see >>59027673
>>
>>59027637
I never claimed it was genuine or that it's "truly said to be a PhD". It's still a PhD though.
>>
>>59026536
>John McCarthy (September 4, 1927 – October 24, 2011) was an American computer scientist and cognitive scientist. McCarthy was one of the founders of the discipline of artificial intelligence.[1] He coined the term "artificial intelligence" (AI), developed the Lisp programming language family, significantly influenced the design of the ALGOL programming language, popularized timesharing, and was very influential in the early development of AI.

John McCarthy was born in Boston, Massachusetts on September 4, 1927 to an Irish immigrant father and a Lithuanian Jewish immigrant mother,[2] John Patrick and Ida Glatt McCarthy
>>
>>59025942
>heh java, or as I like to call it: ++C.
>>
File: vammaa päähäm.png (61KB, 1354x889px) Image search: [Google]
vammaa päähäm.png
61KB, 1354x889px
>>59027738
/pol/ BLOWN THE FUCK OUT
Go home trumplets
>>
>>59027574

The job of professor is a lot more complicated than simply lecturing and doling out assignments. Professors must also be available for office hours to explain students queries in greater depth should they not fully understand the lecture material. We do not have AI smart enough yet to answer questions in the general case. Professors also have to be able to deal with tests, which may often be a bit more complicated than multiple choice style. I've dealt with those My[Subject]Lab courses, and they don't handle conceptual problems easily.

Beyond this, there remains the factor of research. Many universities require professors do both the roles of teaching and research. An AI can assist in research, but cannot conduct research on its own.

>>59027722

1. Say it is a PhD
2. Say it is not what you are saying it is
3. 1 and 2 contradict
4. Therefore not a PhD
Q.E.D.
>>
File: 1484279646442-0.png (166KB, 543x727px) Image search: [Google]
1484279646442-0.png
166KB, 543x727px
>>59027793
Why are you arguing logic with a troll?
A thing can be something and not something depending on apriori assumptions based on what being something is
You can play word games all day, and all he wants if (you)s so you'll never win
>>
>>59027793
AI will be advanced enough to do research on it's own eventually
>>
>>59027793
You're really stupid. A fake PhD is not a true PhD. Which I didn't claim it was. For it to be fake it has to be some kind of PhD in the first place.
>>
File: 1449187285936.png (181KB, 600x590px) Image search: [Google]
1449187285936.png
181KB, 600x590px
>>59027839
where the hell did you get this phd?
>>
>>59027790
(You)
>>
>>59027857
The internet is a wonderful place.
>>
File: 14700623554720.jpg (73KB, 1280x720px) Image search: [Google]
14700623554720.jpg
73KB, 1280x720px
>>59027857
Why do you care?
>>
while (1) malloc(-1);
>>
File: 1477938580353.jpg (91KB, 720x720px) Image search: [Google]
1477938580353.jpg
91KB, 720x720px
>>59027885
b-because
>>
Java is /dpt/s language of choice
>>
>>59027905
Java's gross
>>
I'm running simulations on Linux and I was wondering if multiple programs read from the same file incurs slow down. I don't think it should since it's owning it for reading only.
>>
#lang racket
(define (LISP)(lambda () (lambda () (identity "OY VEY, SHUT IT DOWN"))))
>>
what does /dpt/ think of phonegap?
>>
>>59027809
It's not about winning, it's about having fun.

>>59027885
Depending on the website he got it from, it might not be a genuine fake PhD.
>>
>>59027949
Meant to reply to
>>59026536
>>
File: 1486693295169.png (291KB, 915x645px) Image search: [Google]
1486693295169.png
291KB, 915x645px
>>59027903
I've learned from the military that you can never underestimate stupidity
>>
>>59027956
Are u a cute girl?
>>
File: 1486160052104.jpg (96KB, 643x900px) Image search: [Google]
1486160052104.jpg
96KB, 643x900px
>>59027793
>>59027839
>>59027903
>>59027965
I think Frank Abagnale's life demonstrates that the difference between a "fake" and a "real" PHD is pretty slim
>>
>>59027965
https://www.youtube.com/watch?v=ktHn97hl0Cs
>>59027976
girl (boy)
>>
>>59027976
Neither am I cute, nor am I a girl.
>>
File: 1471144346350.jpg (28KB, 241x321px) Image search: [Google]
1471144346350.jpg
28KB, 241x321px
>>59027996
Wow, this girl has serious self-esteem issues.
>>
>>59027996
everyone's seen your striped ruby sock pics on 8ch ruby, you're not fooling anyone
>>
>>59028008
did you see what she calls panties? what a slut
>>
File: IMG_1485535492162.jpg (18KB, 240x211px) Image search: [Google]
IMG_1485535492162.jpg
18KB, 240x211px
Mobile app development:

Xamarin vs Android Studio

Xamarin vs X-code

Xamarin vs Notepad++

Who wins and why?
>>
>>59026252
4chan is an anime website not a pedophilia website.
>>
>>59027235
2 and 3 are literally the same aren't they? Don't foreach loops just use iterators?
>>
>>59028433

2 is syntactic sugar for 3.
>>
>>59027949
dog bless morrakiu.
>>
why does making Java CRUD applications make so much money?

Literally $120,000 salary and business applications being made with CRUD a ton of money

Someone explain this
>>
hi ruby
>>
File: lain.png (310KB, 1005x742px) Image search: [Google]
lain.png
310KB, 1005x742px
How does this make you feel, /g/?

>John deliberately avoided every woman he met. Rather than asking the female receptionist for directions, he emailed one of the owners and waited for the Head Developer to take him to the interview room.
http://workplace.stackexchange.com/questions/85255/how-should-we-evaluate-a-candidates-strange-behaviour-in-an-interview
>>
>>59028494
Because people really don't want to work with indians and they seem to be the only ones that use java.
>>
>>59028494
because CRUD development is soulcrushing corporate drudgery
>>
>>59028337
>
>>
>>59028511
just another wizard trying find his way in this world. sadly he'll most likely kill himself because
>m-muh woymin!
>>
>>59028503
Hello. How are you, Anon?

>>59028511
If candidate gets several comments from coworkers about rude behavior, it may be a good idea to no-hire. You should at least be able to fake being super polite during the interview process.
>>
>>59028511
>get rejected from every company
>every company has all female HR
>"if i avoid all the women, they might actually hire me this time"

It's not a stupid assumption to make to be quite honest.
>>
>>59028686

What you do is you keep your conversations strictly business related to everyone in the company.
>>
>>59028700
>purposefully avoid talking about sports when asked in the interview because i don't watch TV
>"We're sorry, but you're not a good cultural fit"

I want off this ride
>>
>>59026137
int main(){int i=0,d;char *f=" FizzBuzz\0Fizz";while(++i<101){d=(!(i%3)?(!(i%5)?1:10):(!(i%5)?5:0));printf(d?"%s\n":"%d\n",d?(f+d):i);}}
>>
>>59026417

bump
>>
#include<iostream>
using namespace std;
int main(){
for(int i = 0; i < 100; i++){
if(i % 3 == 0)
cout << "Fizz \n";
if (i % 5 == 0)
cout << "Buzz \n";
if (i % 5 == 0 && i % 3 == 0)
cout << "\t FizzBuzz \n";
}
return 0;
}
>>
>CPython is written in C
Why isn't it written in Python?
>>
>>59028802

Because then you'd need another Python interpreter to run the CPython interpreter.
>>
>>59028801
The hell is this.
>>
>>59028801
>when it encounters a 15 it posts fizz, buzz, fizzbuzz
>>
>>59028801
>If instead of else if
>>
>>59028888
Well you wouldn't if you compiled it
>>
>>59029172

Well yes, this is true, but Python was designed as an interpreted language. To produce a proper executable out of it, one would need to package the runtime into the application, and that runtime would have to include a Python interpreter, since eval() is a thing.
>>
total = 2
a = 1
b = 2
while a <= 4E6:
a += b
b += a
if a % 2 == 0:
total += a
if b % 2 == 0:
total += b
print(total)

Am I good at math yet? I heard if you can complete the first 29 problems of Project Euler, you're set for your programing career; I'm almost there, only 27 to go.
>>
>>59029579
>I heard if you can complete the first 29 problems of Project Euler
Citation please
>>
>>59029579
you can't be serious
>>
>>59029579
>python
embarassing
>>
>>59029734
Nothing wrong with python.
However if python is the only language you know then it is embarassing
>>
>>59029781
>Nothing wrong with python.
embarassing
>>
>>59029781
>Nothing wrong with python.
yeah, aside from it being shit that is
>>
>reverse engineering IoT firmware
>find undocumented "suicide" function that is callable remotely by the vendor
>>
>>59029785
>>59029794

Python is a perfectly fine scripting language.
But I forget I am /dpt/ where idiots like you will use complex functions and pointers for simple scripts.
>>
>>59029804
Python offers no advantages
>>
File: 1483073157801.jpg (110KB, 1280x720px) Image search: [Google]
1483073157801.jpg
110KB, 1280x720px
Employed Haskell programmer reporting in
>>
ok guys how about this
#include <stdio.h>
#include <stdint.h>
int main() {
int i = 0,e,f,h,j;
uint64_t a = 5270498306774157604;
uint64_t b = 595056260442243600;
uint64_t c = 19634136210;
uint64_t d = 35468117025;
uint64_t g = 5073721120729168506;
while(++i<101) {
if(i<65){e=a&1;a>>=1;f=b&1;b>>=1;}else{e=c&1;c>>=1;f=d&1;d>>=1;}
if(e){j=4;for(;j;){printf("%c",(g>>(32+(((j--)-1)*8)))&0xff);}}
if(f){j=4;for(;j;){printf("%c",(g>>((((j--)-1)*8)))&0xff);}}
h=e||f;
printf(h?"\n":"%d\n",h?(g+h):i);
}
}
>>
>>59029804
>complex functions
no such thing
>pointers
so?
also, stop with that reddit formatting, you fucking retard.
>>
File: plane1.png (20KB, 455x351px) Image search: [Google]
plane1.png
20KB, 455x351px
>>59029815
>complex functions
>no such thing
>>
>>59029810
>Easy to write
>Easy to read
Oh I forgot those things are looked down upon here.
>>
>>59029804
>he thinks pointers are "complex"
Confirmed for being mentally deficient.
>>
>>59029830
Both false, both something other languages are better at
>>
>>59029830
>that plebbit posting style
Fuck off, your kind is not welcome here.
>>
>>59029834
I forgot programming gives people autism that they are unable to comprehend the context of the sentence
>>
>>59029844
I was like this before programming.
I would even say that's the reason why I'm interested in programming.
>>
>>59029843
You post just like him you retard. Fuck off to reddit as well.
>>
>>59029840
Yeah like Rust right?
>>
>>59029851
I don't, my post doesn't test positive for redditry. His post does however. Perhaps you should join him too.
>>
>>59029860
anything statically typed is by definition better than p*thon. last time I checked rust was statically typed.
>>
>>59029860
I was thinking literally any non-Python language that isn't C, but that too
>>
>>59029862
Everyone should fuck off to reddit. Makes this thread more bareable. Including you.
>>
>>59029881
You go ahead, I'll follow you. I promise. Just be sure to close this site and never step here ever again.
>>
Holy shit you're all fucking retarded especially this python fag
>>
Hello all stations, this is 0. Impose radio silence. Over.
>>
>>59029804
>he doesnt regularly utilize the power of complex analysis and pointers
>>
>>59029963

*continues broadcasting death metal music*
>>
>>59029910
Shiskell users here are retarded too.
>>
File: Selection_20170220_10:55:22.png (6KB, 466x83px) Image search: [Google]
Selection_20170220_10:55:22.png
6KB, 466x83px
>>59029910
>>
>>59026536
Haskell is protestant, SPJ's wife is a priest and they have 5 kids I think
>>
>>59030107

Matz is a Mormon, so I assume that the Ruby programming language is as well. This would make it only the second Mormon that I've fucked.
>>
>>59030024
>no grade + snarky teacher comment
>>
all programming languages are slow as fuck. with the exception of assembly, c and c++.

why can't we have a language that's as fast as assembly but writes like python? is that too much to ask in 2017?
>>
>>59030418
>writes like python
absolute trash
>>
>>59030130
Could be worse. PHP is fucking garbage, and the scope resolution operator is, in the language, literally hebrew.

>Parse error: syntax error, unexpected T_PAAMAYIM_NEKUDOTAYIM

>Paamayim Nekudotayim literally means "twice colon" in hebrew
>>
>>59030418
Julia?
>>
File: CCC.jpg (143KB, 1835x1037px) Image search: [Google]
CCC.jpg
143KB, 1835x1037px
>>59030418
i've been watching a ton of talks these past few days, c++ seems to be getting there. which makes it weird that there's so much hate for it here.
>>
>>59030460
>C++
>clean

>type deduction, range for, lambdas
>new

>exceptions
>safe
>>
>>59030418
>all programming languages are slow as fuck. with the exception of assembly, c and c++.

this is an even bigger meme than the "meme languages" you probably bitch about. look, when i'm trying to program something that's systems-critical, and the best way to do it is a proof written in the calculus of inductive constructions, do you think I'm gonna do it in C or in fucking x86 assembly because of "muh speed"?

show me one fucking useful thing you've ever written in assembly. you, personally you, that i won't be able to find on someone else's github. or, shut the fuck up and go back to your totino's pizza rolls, masturbation, and leaky shitty code, you dilletant.
>>
>>59030418
>all programming languages are slow as fuck. with the exception of assembly, c and c++.
Wrong on very many levels.

>why can't we have a language that's as fast as assembly but writes like python?
Because Python is a show-piece language which just exists to grouping abstract collections look pretty but ultimately lacks the functionality and expandability of other languages and the Python community is obsessed with keeping it that way so that their style wankfest isn't muddied by practicality, so no serious team has ever put the effort into making a decent Python compiler. Also because people will baselessly claim that C and C++ are faster even if they aren't.
>>
Okay, /dpt/

Tell me this: "What makes a certain programming "the first programming language"?

Or is "the first programming language" is mostly a buzzword?
>>
>>59030439

Fact: There are people still using PHP to this day, who still think the language is okay to use. They do this despite many other web frameworks existing in nearly every programming language. And they'll start new projects in it too, so this isn't just "hey, I need to maintain this old hunk of junk," it's "I thought really carefully over all of the possible programming language and web framework choices that I could use to tackle this project, and I settled on PHP."
>>
>>59030484
for me it was javascript
>>
>>59030418
also
>why can't we have a language that's as fast as assembly but writes like python? is that too much to ask in 2017?
you are literally fucking retarded and have no idea how languages work if you are asking this because of the very definition of how higher level languages work. if you want "muh close to the metal speed", you have to deal with every single processor operation. if you want to write cool lil' scripts, you gotta go high level, so that the compiler takes care of all that big bad tough work for you. bonus points for bitching about the so called shitty speed of higher level languages while also wishing that FUCKING ASSEMBLY was written like PYTHON, which makes you sound like a first semester CS dropout. go back to wikipedia, faggot.
>>
>>59030497
senpai what do you think of this >>59030484?
>>
>>59030460
>In here we create circle
See how much you need to write?
>In NEW way we use library to create a circle!
See how you don't have to write things? Amazing isn't it?
>>
>>59030484
It's name is lexigraphically anterior
>>
>>59030470
>>type deduction, range for, lambdas
>>new

>same new features

It's not implying C++ invented these things. Why is reading so hard for people on this board?
>>
>>59030418
R U S T
U
S
T
>>
>>59030418
rust
>>
>>59030484
i mean... wasn't simply typed lambda calculus technically the first universal language? or am i wrong
>>
>>59030510
The fact it took until today for C++ to add those is fucking abhorrent.
Type deduction has been around for 70 years.
Lambdas for 80.
>>
>>59030418
Go
>>
>>59030522
the untyped lambda calculus precedes the simply typed, but you're also forgetting programming languages from before then, e.g. work by babbage and lovelace, clockwork, etc
>>
>>59030523
>implying it was good thing that sepples added them
>>
>>59030484

>what makes a certain language "the first programming language"
Being named Fortran.
>>
>>59030523
>Type deduction
>good
:X
>>
File: this-nigga-en-ffffff.jpg (50KB, 550x545px) Image search: [Google]
this-nigga-en-ffffff.jpg
50KB, 550x545px
>>59030418
Cool, you triggered some people on /g/ by acting totally retarded. I hope you're proud of yourself.
>>
>>59030546
I mean "the first programming language to learn"
>>
>>59030552
>you triggered some people on /g/
including you
>>
>>59030553
Typically as you learn more languages you compare them the first language you learned and claim they are shit because they are not the same language as the first you learned.
>>
>>59030523
It didn't take until today, it was added five years ago. Lambdas weren't in vogue in mainstream programming until at least the 90s and type deduction even letter. I don't think it's fair to criticize C++ for not implementing it back when the lambda calculus was invented; there weren't even digital computers back then.
>>
>>59030546
Is this bait?
>>
>>59030572
*facepalm*
>>
>>59030497
The weird thing is, I get kind of a nostalgia boner every time I have to do some shit in Perl. Apples and oranges, I guess, but if something's gonna be a pain in my ass, it better be a pain in my ass that I remember fondly, like the first time I met my biological father and lost my anal virginity in one day.
>>
>>59030418
Top notch example of how to trigger this thread
>>
why are you so triggered by me suggesting that we should have a language as fast as assembly that's human friendly to type? are you all small minded autists or something?
>>
>>59030507

>In NEW way we use library to create a circle
Err... not quite. The differences are as such:

1. A "smart pointer" container class is used to manage the lifetime of the circle class. All this really removes is the need to call the delete keyword, since that is processed automatically whenever the smart pointer would go out of scope. Since there are a number of possible areas that a function might terminate, this has the potential to save a lot of cleanup in one line of code. This is perhaps the only part associated with a library (the standard library), but it's using an already existing language feature (RAII).

2. Typenames are simplified to just the auto keyword. This is a language thing, not a standard library thing.

3. An ugly for loop is made shorter using syntactic sugar (range based for loops).
>>
>>59030617
Round 2 let's see how many people fall for it
>>
>>59030571
So, how often do you have to debug your shit, since you used the word "letter" instead of "later"?
Later's kind of a common word. If you blame this on spellcheck, you admit to using spellcheck, which in itself is retarded.
Don't bitch at me about being a spelling nazi, either, because if anyone fucking cares about a character or two being off, it's us. Compilers don't "oh it was phonetically the same so who cares how I actually spelled it".
English not being your first language isn't an excuse either. If you can learn C, you can learn how to fucking type things the right way the first time, or at least look over them once before you submit them, or at least give a shit whether or not what you just typed into your do-everything device is what you meant to write.
Fucking casual.
>>
>>59030460
I'm 99% sure that C++ added the atrocity that is type deduction just to hide how ugly shared pointer syntax is.
>>
>>59030617
>human friendly
ohhh i thought you meant python for a second
guess that was just a typo
>>
>>59030642
this sounds about right
>>
File: openstack-logo.png (13KB, 432x432px) Image search: [Google]
openstack-logo.png
13KB, 432x432px
How come the retards at OpenStack use Python and not Assembly?
>>
>>59030642
Type deduction is not an atrocity
>>
>>59030592

>like the first time I met my biological father and lost my anal virginity in one day.
Completely unrelated events, right?

>>59030572

So my history of computing knowledge isn't perfect, but I am pretty sure Fortran was the first real programming language. And then shortly after that came COBOL and Lisp.

>>59030640

>oh it was phonetically the same
LEHT-TUR is not pronounced the same as LAY-TUR
>>
>>59030571
C++ was never about fancy shit like lambdas. Adding them just makes it more bloated, and if you need to write something functional, use a functional language FFS. OTOH, are you really saying that C++ should be given leeway on how late it added lambdas because LC was invented in the 1930s? How does that make sense?
>>
>>59030642
Smart pointers are just templated types with a single parameter; there's nothing offensive about that. I think it's more to hide ugle iterator garbage like in the example.

>>59030640
lol
>>
>>59030663
Seems like you came up with the answer already
>>
>>59030673
https://en.wikipedia.org/wiki/Analytical_Engine
>>
>>59030673
>LEHT-TUR is not pronounced the same as LAY-TUR

I'm from Kentucky.
>>
>>59030642
There is LITERALLY nothing wrong with type deduction
>>
>>59030663
i for one am totally okay with this python vs assembly meme and will shitpost it while drunk for the next few days

but seriously why isn't python faster than assembly, it takes less time to write it
>>
>>59030707
>possiblity of wrong type deduction
>nothing wrong
Why don't you just use python
>>
>>59030642
says the faggot who tried "learn you a haskell" one time and gave up
>>
>>59030724
>>possiblity of wrong type deduction
type deduction is never wrong
>>
>>59030723
Stop
>>
>>59030724
Because it's not as fast as assembly.
>>
>>59030739
Until it is
>>
New thread: >>59030705
>>
>>59030748
No one here codes in assembly
>>
>>59030767
when is it wrong?
>>
>>59030724
fucking hell, man.

myFunction :: (RealOrd A) => a -> a -> a

etc. Type deduction isn't there to make you lazy and inevitably crash your program, but if it does, then you can't parse.
>>
>>59030724

>possibility of wrong type deduction
You cannot simply make claims like these without evidence, Anon.
>>
>>59030780
global _start

section .text
_start:
mov rax, 1
mov rdi, 1
mov rsi, message
mov rdx, 13
syscall
mov eax, 60
xor rdi, rdi
syscall
message:
db "Fuck you, nigger", 16
>>
>>59030855
whoah...wtf does this code do
fuckin assembly
>>
>>59030863
RAX = 1
RDI = 1
RSI = &message
RDX = 13
sysacll
EAX = 60
RDI = 0
syscall
>>
>>59030863
Same thing as this in python, more or less.

print ("Fuck you, nigger")

Only way, way faster
>>
>>59030884
the fuck is "sysacll", other than something that'll make your program crash if you try to compile it? nice parsing, pleb
>>
File: Untitleddocument.png (465KB, 2550x3300px) Image search: [Google]
Untitleddocument.png
465KB, 2550x3300px
>>
>>59030989
>Programming is just putting libraries together

Thanks for the useful fucking advice, Pajeet. I'm one of the neckbeards that actually writes those goddamn libraries; granted, most of what I contribute to now is shit like Ocaml, Idris, Cedille, Coq, Agda, and other non-pajeet non-toy languages. But I'll fist my own ass with a progeria kid's head if none of the fucks on this board haven't used at least one of my shit-language libraries at least once if they have an actual career in webdev, infosec, or app development that's more than 3 years old.

This is like saying that programmers don't need to know math. Well, the shitty ones don't. The shitty ones can learn basic syntax and then call libraries that motherfuckers like me wrote on the side of some project or for free because it needed to be written.

AFAIK from everyone I know in the group of developers I actually spend my time with... we hate people like you. Absofuckinglutely hate them. We're all glad you get to benefit off of our combined autism or whatever, but it doesn't make any of us think of you as anything more than "paint-by-color-kit" programmers. Eat a dick and die.
>>
Does C++ work best for a game programming language or just a general user-program language (like word processing, calculations, etc.)?

I'm looking to specifically code for highly versatile sound design and engineering in video games.
>>
>>59031506
> game programming language
bada bing
> general user-program language (like word processing, calculations, etc.)?
Literally any language will do calculations for you, but i'd recommend something math-oriented and functional. MIT Scheme, GCL, Haskell, etc. Haskell's honestly probably the friendliest, but you should learn a LISP, too.
>word processing
Back to LISP. You don't really need to know a specific lang for this, unless I'm not really understanding the question (are you trying to write your own word processor or something?) But for this, learn how to use EMACS, and with it, EMACS LISP. Of course, EMACS is much more than a word processor - once you learn the language.

Sound design, C++ ain't really your friend. If you wanna play around with some cool languages for sound, PureData (which seems like a toy, and is basically open source MAX) is cool, and Impromptu is pretty fucking great - it's a scheme-based language that's specifically designed for live-coding audio processing.

C++ is just good to know, but really, figure out what works best for you and learn as much as possible about that. Then, branch out into other paradigms. You'll always benefit from knowing a little about everything, and a lot about a few things, and continuing to learn. One language will only get you so far, and C++ is kind of a beginner language.
>>
I know this may be a common question but what's the best way to start learning C++ with barely any prior coding experience.
>>
>>59033035
Well, first you should really start with whatever assembly that your processor uses. That way, you'll get a good feel for what exactly your processor is doing, and what pointers are for.

Then, go through K&R C. Nothing better than learning a really old standard of C from the old fart that invented it, and unix, or whatever.

Then, install Gentoo. This is just a stepping stone towards your ultimate goal, which is installing OpenBSD and running it headless from a netbook that you run Arch on. You'll understand why you need your own server later, but it's best to learn now.

Then, it's time to tackle Linus Torvalds' seminal volume on his own, fantastic, totally not shitty at all language. If you've gotten through K&R, know how to use vim a little bit, and still have that aching C boner that just needs to be augmented by one, read Linus' book. It's like the bible of C++: Referred by many, understood by few, fully read through by only the truly holy.

If that fails, you can just fucking google "c++ tutorial" like a normie. Haha, jk. This tutorial video is actually really helpful:
https://www.youtube.com/watch?v=dQw4w9WgXcQ
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.