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

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

Thread replies: 255
Thread images: 24
File: 1451763095689.jpg (753 KB, 1276x1015) Image search: [Google]
1451763095689.jpg
753 KB, 1276x1015
old thread: >>52191963

What are you working on, /g/?
>>
>>52195556
First for OCaml
>>
Second for OCaml
>>
>>52195556
>school swimuit
bueno
>>
i get uncomfy around 2d anime girls in swimsuits
>>
Threadly reminder that you should not refer to the act of programming as coding. It is improper and makes you look like a 15 year old

You are a programmer, not a coder
>>
>>52195556
She can program muh dick
>>
File: Gospers_glider_gun.gif (21 KB, 250x180) Image search: [Google]
Gospers_glider_gun.gif
21 KB, 250x180
The more I read about cellular automata/Conway's game of life the more it seems like a fun weekend hobby rather than a discrete scientific model
>>
>>52195556
disgusting tranny
>>
>>52195625
There is no cure for the gay.
>>
I am a C programmer.
I do not recognize interpreted languages as valid software engineering tools.
All programs should be compiled and linked to the target processor for optimal performance.
>>
Why can't /dpt/ be a place for serious discussion on programming?
>>
>>52195662
defensive programming is wasteful and leads to overhead and redundant checks for edge cases that the programmer should be handling themselves
it babies them
>>
>>52195632
>>52195677
>>52195684
Autists who will never hold a real programming job detected
>>
File: 1446073409929.png (1 MB, 1098x1645) Image search: [Google]
1446073409929.png
1 MB, 1098x1645
>>52195705
b-but anon I have a development job
>>
>>52195556
>animshit
>>
File: dpt_.png (147 KB, 2000x2810) Image search: [Google]
dpt_.png
147 KB, 2000x2810
>>52195677
Agreed.
>>
>>52195684
""""""""implying""""""""
>>
Dynamic typing is useless.
TDD is almost entirely retarded in most cases.
Go is a solution to a problem that doesn't exist.
Lisp syntax is disgusting.
F# is king
>>
>>52195783
>F# is king
kill yourself
>>
>>52195783
>TDD is almost entirely retarded in most cases.
All cases*

Testers should not be bossing developers around
>>
>>52195556
>girls with big manly beards
what the fuck
why is this so cute
>>
>>52195783
>TDD is almost entirely retarded in most cases.
why are you spastic
>>
It finally happened, I found a job that uses Haskell as its primary language. Wish me luck /g/NEETs
>>
>>52195799
stay salty :^)
>>
>>52195783
>Lisp syntax is disgusting.
'(I'll bash your skull in, twat)
>>
>>52195783
Agree with everything except
>F# is king
>>
D!
>>
>>52195831
>why are you correct
fixed
>>
>>52195832
Do you have a plan for when they inevitably reject you for not being attractive enough, or progressive enough, or not fitting their "company culture" or whatever?
>>
>>52195831
TDD is fucking retarded
development should not be driven by fucking tests, like what the fuck, why do i need to tell you this
if you can develop "perfect" tests then why can't you just develop "perfect" software without them?
and many things outside of tippity top pleb code monkey tasks can not be tested with a simple pass/fail condition or have too large problem spaces to tests exhaustively.
>>
>>52195832
>Haskell as its primary language
hahaha what kind of fucked up place is that
>>
>>52195875
don't be stupid now
>>
>>52195875
Glad to see some back up on this. It's on of the more baffling fads to me. I remember going to a jobs show, and talking to some company rep. He was saying how "now we make sure everyone writes all their tests before they write any actual code. It takes awhile to get used to, but it's so much better". I just walked away pretty much, but died a little inside. I'm glad to see it's kinda died off a bit in the past few years after real world experience has taught people it doesn;'t really work so good for a lot of stuff.
>>
>>52195913
kill yourself

>spend countless hours developing the """"""""perfect"""""""" tests
>spend the least amount of effort on making the lowest quality program that will pass said tests
>t. top cuck
>>
>>52195632
>You are a programmer, not a coder
You are a programmer that writes code
>>
>>52195934
you just did what I said not to

idiot boy
>>
>>52195783
>Dynamic typing is useless.
>Go is a solution to a problem that doesn't exist.
Both true.
The rest is false.
>>
>>52195974
coder
>>
>>52195934
You mean as opposed to
>make the least amount of effort on making the lowest quality program to deliver
>it's broken beyond belief and fails on 80% of inputs
>write tests
>spend weeks on that because the code is not built in easily testable, independent units
>finally done, can finally correct the code to pass the tests
>same outcome, 50x the effort
>>
>>52195988
honestly this has to be the best insult possible
>>
>>52196009
#justplebthings
>>
>>52195867
I'm not beautiful but I have a semblance of personality and social skills so I'm OK on that front. Anyways it's not the only job I'm looking at so I'm not hedging my bets.
>>
>>52195934
isn't this what DESIGNATED programmers do?
>>
>>52195632

Reminder that opinions on the vernacular of technology on >>>/g/ have zero bearing on the world.
>>
>>52196019
really? that's the best insult you can imagine?

you've got a shit life m8
>>
>>52196009
>code is broken
>"let me write some tests!"
how about just fix the retarded code? You'll have the application working way fucking faster than writing some tests that check for things that almost certainly not going to fail because you are aware of them.
>>
>>52196042
kill you'reself

coder
>>
Alright I'll bite.

What's wrong with the word "coder">
>>
>>52195875
assert(f(x) = y)

Trivial.
rettype f(intype x) {
think_up_literally_every_possible_input();
work_out_solution_by_hand_because_lolnotests();
implement_solution();
review_implementation_because_lolnotests();
use_a_billion_tools_to_verify_other_errors_because_lolnotests();
mfw_there_are_still_errors_because_lolnotests();
}

Virtually impossible.
>>
File: coder_projects.jpg (51 KB, 640x250) Image search: [Google]
coder_projects.jpg
51 KB, 640x250
>>52196042
coder confirmed
>>
>>52196060
it's reddit speak that dumbs down programming as a concept so that girls aren't scared away from CS programs
Also, coder girl sounds nicer to say than "programmer girl".
>>
>>52195956
Just like an author writes words.
>>
>>52196009
Tests should only be written when the code is fully functional and ready for production
>>
Guys, tell me something cool and useful to implement in C++.
>>
>>52196067
kill yourself
>>
>friend is writing XML to mod his game
>It's only 3 elements deep at the max
>still call it coding because I'm not an autistic spurge cum bucket.
>>
Remember when all tinkering and electronics hobbyist projects were boiled down to one word? Maker.
An easy to say, easy to market word.

Coder is the same thing.
>>
>>52196082
Makes perfect sense.

I'll be sure to publicly chastise anyone using the term coder from now on.

>tfw I'm TA and I'm autistic enough to actually do this.
>>
>manually testing code over and over again
just write tests m8
>>
File: ii.png (573 KB, 1012x1088) Image search: [Google]
ii.png
573 KB, 1012x1088
>>52195783
>Dynamic typing is useless.
I don't have to convert everything all the time with dynamic typing, you're like those Amish refusing to accept change and progress.
>>
>>52196090
a program to display a 3d model of a pussy that's anatomically correct and allows you to travel around it
>>
>>52196060
Coder is a term used by tech evangelists to get 11-15 year olds into programming. Programming sessions or hacking conventions have turned into "code crunches", "code jams", and "hackathons" to pique the interest of little buddies.
>>
>>52196067
>think_up_literally_every_possible_input();
This really isn't that hard if you just spend a little time designing your codebase well.

Test every possible input with unit tests is hardly any easier than just writing your code to handle them properly in the first place.
>>
>>52196057
You know one input for which your program fails. How do you know it doesn't fail on more inputs?
How do you know it fails because of the input and not other conditions such as global states?
How do you know which part of the program is misbehaving?
How do you know the exact conditions under which that part of the program is misbehaving?

You can ducttape spaghetticode your shit for years until you figure out that actually the condition that made your code fail was inputs less than 0, or you could write a single test and a) know that the code doesn't work on negative inputs b) ensure that no future version of the code breaks on inputs less than 0 no matter how much refactoring you do.

Moreover, you get an exact readout of where and why the error happens instead of having to guess.
>>
>>52196111
you still have to convert it in your head to follow the logic

it's just less stringent and more error-prone

it's absolutely disgusting
>>
>>52196112
I have never seen a vagina.
>>
>>52196111
>I don't have to convert everything all the time with dynamic typing
Yes you do. Dynamic typing has nothing to do with converting. You do not know what dynamic typing is.
>>
>>52196088
That leads to having to refactor most of the code as it isn't easily tested.
>>
>>52196137
I know, that's why I think it's a good project for you.
>>
File: xTutor1.jpg (95 KB, 500x492) Image search: [Google]
xTutor1.jpg
95 KB, 500x492
>>52195783
>Lisp syntax is disgusting.
Lisp syntax is bare bones, and gets the job done. If you can't read your own Lisp code, you're intending it wrong. C-family syntax, on the other hand, is unnecessarily complex. Want to add/multiply more than two numbers together? Well fuck you, binary operators only.
>>
>>52196129
retard
>>
(You)
>>
>>52196060
Programming is an all encompassing terms for the process of developing computer instructions, i.e debugging, writing code, writing documentation, planning, thinking. Coder only identifies one of these processes but is used in place of programming
>>
>>52196122
Only people who've never worked on something more complex than fizzbuzz could possibly think that.
>>
>>52196158
cretinous melt
>>
>>52196147
Is developing your applications to have independent, loosely coupled, easily testable components a foreign concept for you?
>>
Ebin bread :^}
>>
>>52196178
coder
>>
>>52196182
>write the program to be easily tested
>without writing tests to know what and how testing would happen
Exactly as bad as premature optimization.
>>
>>52195695
> defensive programming is wasteful and leads to overhead and redundant checks for edge cases
If you care about efficiency, use a language which cares about efficiency. If you check for validity then call an inline function which also checks for validity, the compiler is going to optimise one of them away.

> that the programmer should be handling themselves
You would prefer having your code littered with
double y = x < 0 ? nan() : sqrt(x);

rather than just calling sqrt() directly?

The main reason that most modern languages use exceptions is so that you can focus on what it's actually doing without having to peer through a forest of error-handling boilerplate (which, in my experience, usually manages to overlook something).
>>
>>52196060
there's nothing wrong with it

people who develop software using scripting and markup languages are coders

web devs are not programmers
>>
How does this make you feel, /g/?
>>
File: wef.jpg (105 KB, 1368x968) Image search: [Google]
wef.jpg
105 KB, 1368x968
>>52196111
>i use static typing
>>
File: messy_wallpaper-1600x1200.jpg (2 MB, 1600x1200) Image search: [Google]
messy_wallpaper-1600x1200.jpg
2 MB, 1600x1200
>>52196090
A program that organizes the desktop of someone who messily leaves a bunch of files on it.
>>
>>52196149
That's harsh, but okay.
>>
>>52196209
So, a right-click > align to grid generator?
>>
>>52196090
3d physics engine with opengl rendering
>>
Could someone explain discriminated unions (f#) to a poor programming illiterate?
>>
>>52196129
>How do you know it doesn't fail on more inputs?
because you have either tested them manually once, and know the only other cases for inputs you weren't confident about don't fail, or the code is written in such a way that there is no other possible inputs.

>How do you know it fails because of the input and not other conditions such as global states?
Because I am a good programmer and did not use global state, so I can rule our bugs like this and save time needing to test for them.

>How do you know which part of the program is misbehaving?
debugging tools.

>How do you know the exact conditions under which that part of the program is misbehaving?
debugging tools

>You can ducttape spaghetticode your shit for years until you figure out that actually the condition that made your code fail was inputs less than 0, or you could write a single test and a) know that the code doesn't work on negative inputs b) ensure that no future version of the code breaks on inputs less than 0 no matter how much refactoring you do.

Why would it take me years to find it fails in inputs less than 0, if I was able to know to write a test for that? How would it not take you years to think to test for negative ints?

>Moreover, you get an exact readout of where and why the error happens instead of having to guess.
Tests don't do this. debugging tools do.
>>
>>52196194
Testing isn't fucking rocket science, a general idea is all you'll ever need
>>
>>52196201
Perfectly fine.

Code is shorter than programming, I wish /dpt/ would be mature about things.
>>
>>52196217
cool, use opengl and Qt/WxWidget and put it on github because I'd like to a have a go on it.
>>
>>52196227
Naw, more like putting the files in folders. Like all the pictures are sent to %UserProfile%\My Pictures, Documents sent to %UserProfile%\My Documents, etc
>>
>>52196233
>manual testing
why
>>
File: 8-tips-moms-learning-to-code.jpg (563 KB, 1500x1000) Image search: [Google]
8-tips-moms-learning-to-code.jpg
563 KB, 1500x1000
>>52196239
cool, how about this one?
>>
>>52196233
>because you have either tested them manually once,
Stopped reading here.
>>>/helloworld/
>>
>>52196236
Which is why there's nothing wrong with TDD. It's very simple and easy to setup, it causes you to be able to program the simplest possible implementation and know it's correct (no wasted effort), and it allows you not to oversegment your code around theoretical future testing efforts.
>>
>>52196171
I've worked on 300,000 line code bases. Last one had a suite of unit test written to test various things. When i as learning how to build the project, i built the tests. 1/3 of them failed. I was told that those were tests that just weren't updated with code changes...

oh... then what was the point of writing them if they can fail but the code is apparently still okay?

So I asked should i fix some of them now? I was told no, because there was more important things that needed doing right now. I felt like there would always be more important things. When will fixing one of these test be more important than fixing an actual real bug? No one fixed any of the tests over the next year I worked on it, but the guy I worked with added new ones.

A lot of TDD seems to be this retarded. It just gives people a sense of false security. It's a huge waste of time.
>>
>>52196239
Spoken like a true coder
>>
enum token_type {
ATOM, LIST, NUMBER, STRING, BOOL
}

struct token {
enum token_type type;
union {
char *atom;
struct {
size_t len;
struct token *data;
} list;
int number;
char *string;
char bool;
} value;
}


Is this considered idiomatic C? I'm writing a parser for Scheme and this is how tokens will be represented in the AST.
>>
>>52196294
>not programming like shit means you're doing TDD
okay retard
>>
File: er.jpg (25 KB, 533x300) Image search: [Google]
er.jpg
25 KB, 533x300
Lets all write a script that deletes your most recent (deletable) 4chan posts and we'll all run it at the same time (at 200 posts or something) every single thread.
>>
>>52196277
Because it's much much faster, and test once is generally sufficient. Tests you write are brittle anyways, and change to the code they are testing and the tests break. So they require a lot of maintenance. Testing manually takes a second.
>>
>>52196307
enum token_type should be a typedef and be called type_t, but yeah, that's fine
>>
>>52196300
>When will fixing one of these test be more important than fixing an actual real bug?
How do you know there's an actual real bug when your tests aren't verifying your program integrity?

Protip: the codebase you were working on was never used by third parties ever. Nobody even considers using poorly tested libraries for a fucking reason. If I ask for the mean of a vector, I expect to get the actual mean of the vector, not its sum, not the negative curvature at the peak of the surface defined by the vector.
>>
>>52196335
I don't think that would get around the bump limit,
>>
>>52196318
>I am omniscient pls belib and listed me y google no higher me ;_;
>>
>>52196362
It wouldn't, it's just for fun.
>>
>>52196294
>and know it's correct
You can't possibly be dumb enough to think this.

>Thinks he can imagine to write tests to test every possible bug that could ever happen
>Thinks there isn't any chance at all that the tests he writes may themselves contain bugs

To be extra sure you should write tests to test you test before you even write your tests.
>>
C or C++?
>>
>>52196338
>Testing manually takes a second.
>I have never worked with large infosystems

This entire TDD talk is relevant for people who actually work a programming job, not script kiddies who work on 5 minute desktop applications.
>>
>>52196171
Actually, it's called property-based testing and it's incredibly effective.
>>
>>52196385
C
>>
>>52196385
C++, anything else is a meme.
>>
>>52196385
yeah
>>
>>52196335
How do you check if a post is deletable or not?
>>
>>52196385
C, anything else is a meme
>>
>>52196379
The script would need to delete all the posts stored in your 4chan cookie every 24 minutes, and I'm pretty sure 4chan has some limitations where you can't delete more than 5 posts in a short period of time to cut down on shadow bumping on slow boards
>>
>>52195661
>discrete scientific model
What does that mean? What did you think it was?

It's a system with interesting properties worth investigating. How is that different than anything in mathematics?
>>
>>52196345
>How do you know there's an actual real bug when your tests aren't verifying your program integrity?
because you run the program and see it's not behaving the way you wanted.
It's not rocket science anon.

>the codebase you were working on was never used by third parties ever
It was used by 300,000 people. All paying customers even.

>Nobody even considers using poorly tested libraries for a fucking reason.
It wasn't a library.

> If I ask for the mean of a vector, I expect to get the actual mean of the vector, not its sum, not the negative curvature at the peak of the surface defined by the vector.
tests for stuff like math libraries i can get behind more. But most TDD i see is unhelpful.
>>
>>52196367
There's this neat thing called "software architecture" which roughly translates to "thinking things through before writing whatever shitcode pops into your head first"

Read up about it sometime
>>
>>52195783
>Lisp
>syntax
>Lisp syntax
I don't think you know what any of those things mean
>>
>>52196383
Compare the likelihood of there being a bug in
assert(f(x) = y)

as opposed to
int f(int x) {
//10,000 lines omitted
}

Go on, I'm waiting.
>>
>>52196442
Syntax vs Semantics battle incoming.
>>
>>52196423
It's just for fun, anon.

I just think it would be neat to see loads of posts disappearing every single thread at a specific time.
>>
>>52196397
That's a kind of unit-test you fucking retard.
>>
>>52195556
i clicked on this thread thinking the picture was that of an elf undressing and shitting on a pizza
>>
>>52196432
>because you run the program and see it's not behaving the way you wanted.
usually you don't develop a whole program yourself kiddo, you work on a small part of it. how are you going to "run" that?

the answer is you write a testcase. if you follow TDD it just means writing them first and keeping them neatly organised in suites so that you can use them again.
>>
>>52196406
>>52196421
I'm getting mixed signals here
>>
>>52196432
>because you run the program and see it's not behaving the way you wanted.
How do you know when you're only testing a single input?
>>
>>52196471
You already said that.
I'm telling you it's extremely impractical and you will be stopped after the 5th post
>>
>>52196436
>I literally don't have the slightest clue about anything!
>My brain hurts just reading posts in this thread, I'll never know what any of that means!
>I know, I'll string random words together and hope it makes sense!
>BTFO!
>>
>>52196417
Well, the site can detect if a post is by (You), so we use the same method. Then there's a time limit, so we just check the time of the post and that's how we figure it out.
>>
>>52196279
soon the average mom will outperform the average /g poster in programming

lmao
>>
>>52196520
who are you quoting?
>>
>>52196511
If 20 posters delete 5 posts at the same time that is 110 posts that will be deleted, anon.
>>
>>52196536
he's clearly quoting >>52196436 you massive dipshit
>>
>>52196548
those posts still count toward the bump limit
>>
>>52196453
The first one seems simpler. But I'm not really sure what it does. I can't see how f x and y are defined, so i guess there's more code somewhere.

I hope you know having 10,000 lines in a single code block is not considered good practice.

But yeah, I'd guess the first one will be less likely to contain a bug. Did you have a point?
>>
>>52196559
no
>>
I need your help, /g/. Come up with a random english (!) phrase and shift it with a random rotation using Caesar Cipher and I'll throw it in my program and see what it thinks might be the decipher.
>>
>>52196556
but that post doesn't contain any of that text and is completely made up by your autistic mind
>>
>>52196560
There is no more code. It's called abstracting it because f is not committed to any particular implementation for the sake of examples. I won't bother reading the rest of the post since you're too braindead to understand even that much.
>>
>>52196492
>usually you don't develop a whole program yourself kiddo
you run the parts you are responsible for and the parts you are working on.

>you work on a small part of it. how are you going to "run" that?
Generally very easily. I'm not sure what mystified you about this.

>>52196498
>How do you know when you're only testing a single input?
You test all the inputs yourself. You write your code well enough that any likely variation of those inputs should work fine, or if any were to fail, then the inputs you test should also fail. If you can think to write a test for it, you can test it yourself.
>>
>>52196548
>20 posters delete 5 posts at the same time that is 110 posts
You did this on purpose, didn't you?
>>
>>52196231
Have you used any C like language before with unions?
Basically, if you see the | in the type definition, that's still OR

type Suit = Spades | Clubs | Hearts | Diamonds
a suit object is Spades OR Clubs OR Hearts OR Diamonds
(well XOR but you get the point)

with a Tree:
type Tree<'T> = | Leaf of 'T | Subtree of Tree<'T>
Either a leaf (which is a 'T) or a subtree (which is a tree<'T>)
>>
>>52196609
>You test all the inputs yourself.
You fucking asshole! Do you know how much it costs to get sides surgery? Why did you have to make my sides explode like that?
>>
>>52196300
I've worked with a similarly sized code base. Every single test passed. We never released without 100% tests passing.

Writing tests was easy. If I wanted to write a module to be bound to a constraint, I'd throw down a few lines to verify that constraint. Nothing serious or complicated. From then on, the module was constrained by that test, safe from the next bonehead.

Our biggest source of bugs was merge errors. When I made a change I thought would be prone to merge errors, I wrote a few lines of tests to make sure they didnt fuck the merge up. I cant count the number of bugs this caught.

We had about 200 servers running our code. Sometimes these servers went down. We wrote code to test the servers. Super simple, just ping the server and wait for an OK back. When a test failed, an engineer was alerted and would fix the server.

Our tests saved the company thousands of man hours and millions of dollars. The company would be bankrupt if it werent for our testing suite.
>>
>>52196609
>Generally very easily. I'm not sure what mystified you about this.
how would you run a function that calculates the volume of a sphere?
>>
>>52196671
>We wrote code to test the servers. Super simple, just ping the server and wait for an OK back. When a test failed, an engineer was alerted and would fix the server.
kek why is no one monitoring the servers?
>>
>>52196609
>>you work on a small part of it. how are you going to "run" that?
>Generally very easily. I'm not sure what mystified you about this.
I'm not convinced it's a good thing but on large projects you often exclusively produce significant pieces of code that would take a fair deal of effort to execute (consider system-down scenarios). Sometimes you're writing a component that has no obvious entry point, or which can't be invoked without a significant system context. These are scenarios where failing to test would be insanity. But the real value of TDD is in creating good/stable design rather than as a verification tool
>>
>>52196722
You put a gun to your head and you pussy out
>>
>>52196722
Kill yourself, dumb frogposter.
>>
>>52196576
Please respond guys, I need to test my thing
>>
>>52196769
Frogposters are nothing but a cancer.
You should seriously consider ending your own life.
>>
>>52196720
>why is no one monitoring the servers
because we wrote test and had a machine to do it for us
>>
>>52196725
Unit testing is the verification tool, TDD is the discipline which enforces least effort and minimally fragmented structure across the codebase with no sacrifice to composability and testability.
>>
>>52196767
Sorry, I don't know what those words mean.
>>
>>52196576
Ujrz sp edaxrt!
>>
Is C++ even used for developing Linux applications? Everything I see is written in C.
>>
>>52196788
Unless that test goes off every 5 seconds, it's pretty unreliable
>>
>>52196639
You gotta test them yourself. No one else will. You can tests everyone you would write into a suite of tests in a couple of minutes manually. Tests are useful if you think the same things will keep breaking over a long period of time, and the interfaces the test target will not change, since then you need to rewrite them.
>>
>>52196831
we came to the same conclusion. it ran once a minute.
>>
>>52196824
shit, I tested it and it didn't work. I bruteforced and it's apparently 'fuck da police', I changed it to 'fuck the police' with the same rotation and now it works. Guess my program only works for formal english.
>>
Writing tests is just making sure that every function produces a valid output when given sample data?

Why is this such a point of contention?
>>
>>52196832
Please, no more! I'm dying here!
>>
File: 1450124211905.jpg (83 KB, 374x720) Image search: [Google]
1450124211905.jpg
83 KB, 374x720
>tfw someone says your programming language of choice is shit
>>
>>52196831
Tests are supposed to test behavior and behavior will be constant across across a deployment. Code doesn't change when you're not looking at it.
>>
>>52196576
Bang her and mosh
>>
>>52196865
Because fizzbuzztards think you shouldn't spend the 5 minutes you have to spend to make tests because it's "unnecessary!" and "bloat!" or something.
>>
>>52196194
Code that can't be easily tested is throw away code.
>>
>>52196867
Glad to be doing God's work.
>>
>>52196520
kill yourself idiot
>>
explain in 10 seconds to explain why I should care about any programming language besides C, Python and Java.
>>
>>52196894
And throwaway code need no tests and thus TDD isn't even considered in that case. Thus, you should always use TDD [in real code].
>>
>>52196385
C++

Ctards aren't as common as python turds but Ctards seem to be even more retarded
>>
>>52196864
Well the usual assumption with crypto cracking is that you have a bigger corpus than a three word phase. One deviation in a short phrase represents a lot more noise than in a book or email or something. You could try it on the whole song lyrics or something, I would expect it to do better.
>>
>>52196915
Because your boss told you to.
>>
>>52196915
Higher-level, significantly faster with the same abstraction level (and also significantly more consistent and safe), ridiculously less verbose, somewhat faster and significantly more expressive.
>>
File: 1396508799625.jpg (50 KB, 500x211) Image search: [Google]
1396508799625.jpg
50 KB, 500x211
>>52196915
Because you're using JavaScript right now senpai.
>>
>>52196832
>You can tests everyone you would write into a suite of tests in a couple of minutes manually
ahahahahahahahahhhaaaaaaaa
>>
>>52196889
How are they bloat?
Ideally, you should be writing them separately and simply testing functions that your program uses.
For best results, do NOT share the test driver code with the dev team so they don't attempt to write the shittiest possible code that manages to pass tests.
>>
>>52196915
functional purity
>>
>>52196873
python and haskell are legitimately shit
>>
File: disgusted_pepe.jpg (101 KB, 1024x904) Image search: [Google]
disgusted_pepe.jpg
101 KB, 1024x904
>>52196944
>tfw people bash JavaScript but still use it anyway
>>
I want to learn more about gpu programming for general things.
What reading material is a good place to start?
I do not have nvidia, so I was thinking either opencl or opengl but if you know something better, let me know.
My previous experience is mainly single process c++ and vhdl.
>>
>>52196915
>Python and Java
You shouldn't use those either.
>>
>>52196927
True, I tried it on the first chapter of Call of Cthulhu and it worked immediately.
>>
>>52196972
Nice meme!
>>
>>52196973
>implying you have a choice

Even wasm won't be replacing it.
>>
>>52196973
because modern websites are shit
>>
>>52197010
kill yourself fag
>>
>>52197010
He's completely right though.
>>
>>52197013
>what is coffeescript
>what is ice
>>
>>52196671
Well that kind of stuff does sounds pretty reasonable. But I do see tons of shit that seems way over the top and indefensible.

>>52196725
Yep, I definitely see value like that is writing tests. But kinda in a case by case basis, rather than "let's write tests absolutely everything before we write any code". Even that can be okay in some scientific libraries or some shit like that. But I've seen people go loopy with this shit too often.
>>
>>52197010
>dynamic typing
it automatically loses

any language that lacks static typing and a C-style syntax is just impractical
>>
>>52197013
wasm has GC primitives on the roadmap; once it's complete we'll finally be rid of this cancer.
>>
File: cvx.jpg (165 KB, 1280x720) Image search: [Google]
cvx.jpg
165 KB, 1280x720
>>52197017
I can agree to that senpai, JavaScript should not be required for a website to function.

JavaScript should only be used for meme features.
>>
>>52197049
Any language with explicit pointer management and a C-style syntax is just impractical
>>
>>52197056
>once it's complete we'll finally be rid of this cancer.
exiting times... almost feels too good to me true. I have a feeling it's gonna bit shite for some reason : /....
>>
>>52197026
coffeescript is just shitty pseudo-ML sugar that solves none of javascript's semantic problems and aggravates it by adding touchier syntax.
>>
>>52197072
>JavaScript should only be used for meme features.
>using meme as a synonym for "things I don't like"
This is actually worse than reddit
>>
>>52196628
Ok, thanks.
I have been learning f# just for a few days, but I find it much harder than the languages I learned previously...
>>
this whole thread is a shitpost.
>>
>>52195783
F#'s not even that bad a language but the shills for it are just too much

>THERE IS NO REASON TO EVER USE DYNAMIC TYPING
>VERIFYING THAT MY CODE WORKS DOESN'T MATTER BECAUSE I ONLY WRITE HELLO WORLDS
>WAAAH CONCURRENCY DOESN'T REAL
>I AM TOO DUMB TO IGNORE EXTRA CHARACTERS IN MY SYNTAX THAT HELP IMPROVE THE OVERALL USABILITY AND EXPERIENCE
>>
>>52197107
shut the fuck up.
>>
File: ij.jpg (104 KB, 1280x720) Image search: [Google]
ij.jpg
104 KB, 1280x720
>>52197091
I don't really know what I mean when I say meme, I sometimes mean it's a good thing, I sometimes mean it's a bad thing, and sometimes I mean both.

It just feels right.
>>
>>52197025
He's not. Python has simplistic syntax and tons of libraries making it ideal for rapid prototyping and testing. Just because it's not very fast or portable and is highly abstracted from the system doesn't mean it doesn't have its place.
>>
>>52197088
>solves none of javascript's semantic problems
fixes .this scoping with => lambda notation. Fixes some variable scoping shit by putting all variable declarations at the top of functions.

.. maybe that's it...
>>
>>52197117
>THERE IS NO REASON TO EVER USE DYNAMIC TYPING
there isn't. Do you know one?

>VERIFYING THAT MY CODE WORKS DOESN'T MATTER BECAUSE I ONLY WRITE HELLO WORLDS
That's stupid anon. You should always verify your code works as much as you can.

>WAAAH CONCURRENCY DOESN'T REAL
?

>I AM TOO DUMB TO IGNORE EXTRA CHARACTERS IN MY SYNTAX THAT HELP IMPROVE THE OVERALL USABILITY AND EXPERIENCE
Not sure what you mean
>>
>>52196342
no, you are a fag
>>
>>52197195
I'd still fuck it.
>>
>>52197236
>it
I didn't dress like a girl just to be called "it".
>>
>>52197284
Never fucking reply to me again while your mouth is full.
>>
>>52197195
Post feet
>>
>>52197284
type Genit = HasPenis | HasVagina | HadPenis

let Pronoun = function
| HasPenis -> "He"
| HasVagina -> "She"
| HadPenis -> "It"
>>
>>52197195
kill yourself
>>
>>52196307
Looks sorta like what Guile does (or did previously), so yeah. Although I'd advise you to create some nice macros so you don't have to write those out every time and it also might be a good idea to use non-null-terminated strings (so an extra
struct {char *start; size_t len;} string;
there).
>>52197199
>there isn't. Do you know one?
yes, how about:
- simple one-off scripts
- dealing with raw data that you don't know the type of until runtime
- prototyping full applications
- simplifying config files for users
>That's stupid anon. You should always verify your code works as much as you can.
That's exactly what TDD is made for.
>?
you said Go tries to solve a problem that doesn't exist. the problem it attempts to solve is concurrency (albeit not as well as Erlang)
>Not sure what you mean
The biggest reason for parentheses in Lisp is the homoiconicity that allows you to treat arbitrary data as code (and vice versa). For example, you can just quote any piece of code and it becomes a list, which means you can deal with it as though it was any normal piece of data, run it through `eval` to interpret it, and use it with some rewrite rules to modify the AST without the huge overhead this requires in other languages. The parentheses make defining new syntactic constructs or DSLs extremely simple.
Also, they help with parsing so you don't have to adhere to the language-defined formatting rules like you do with F#'s default syntax.
>>
>>52197322
I still have a penis so you can use male pronouns, but I like to pretend I'm a girl.
>>
>>52197072
>JavaScript should not be required for a website to function
Believe me, if I could a get Websocket-event-driven web app to function without JS, I would. Unfortunately that isn't possible, and so I use JavaScript.
>>
How do X window managers draw borders around windows? does it just expand the window or does it draw directly to the root window?
>>
>>52197333
>simple one-off scripts
Static typing

>dealing with raw data that you don't know the type of until runtime
Dictionaries

>prototyping full applications
Static typing

>simplifying config for users
JSON and the like aren't dynamic typing
>>
>>52197195
Is that seriously a trap? That's pretty good, I won't reverse image search, just dump in my porn folder and fap to it later.
>>
>>52197354
Are your feet little and cute?
Do you paint your toenails?
How old are you?
>>
>>52195832
Lucky fucker
>>
>>52197333
>- simple one-off scripts
>- dealing with raw data that you don't know the type of until runtime
>- prototyping full applications
>- simplifying config files for users
What about them? How about you explain why any of those things is helped by dynamic typing? Take your most compelling example to make it simple. I'm all ears.

>That's exactly what TDD is made for.
yes. But it's often misused.

>the problem it attempts to solve is concurrency (albeit not as well as Erlang)
So it solves problem that didn't need solving at all. That was kind of my point.
>>
>>52197354
Then why are you on the internet?
More to the point, why are you in a programming thread?
>>
>>52197195
why do you mentally ill trannies always dress like whores?
>>
>>52197333
>- dealing with raw data that you don't know the type of until runtime
This is my favourite.

How can you write code to access raw data in a dynamically typed language if you don't know what the types of the data will be until runtime?

if you write
dataObject.person

then you presume the object has a person property, and this will fail at run time if you try to do any with it and it's not there. How does dynamic typing help this?

Dynamic typing advocates have no brains.
>>
>>52197367
>Websocket-event-driven web app
By that I hope you mean you're making something for HTML5 canvas.

If not, I will shake my head in a disapproving manner.
>>
>>52197416
That's how they get you to fuck their boipussy.
>>
>>52197416
This
Assuming that someone had seen you on the road and liked you, he would not ask "hey gurl, are you alone?", he would instead ask you "How much for N hours?"
>>
>>52196990
nobody?
>>
>>52197393
Isn't everyone in this thread a cute girl?

>>52197416
What's wrong with looking like a whore in the privacy of your own home? I also have clothes like that but I would never go out in them.
>>
>>52197416
They're perverts that wish they were gay but cant into homosex

They also want all the benefits that come with being a woman because they can't cope with being a man
>>
>>52197416
Because it's fun, baka.

Try it sometime.
>>
>>52197446
Vulkan, SPIR-V and OpenACC
>>
>>52197455
>I also have clothes like that but I would never go out in them.
are they cute or also trashy like your whore outfit?
>>
Why the fuck did server-side JS take off?
I mean, you can do anything with every language if you're bored enough, but that doesn't mean people won't call you out for creating some useless shit. Yet it didn't happen with JS. Why? It's an ugly, inconsistent and badly designed language overall, why would you actually try to build complex shit with it?
>>
>>52197507
hipsters
>>
>>52197458
>They also want all the benefits that come with being a woman because they can't cope with being a man
I only pretend to be a girl when Tyrone comes over and I do it because it's fun.
>>
>>52197507
Because webdev retards wanted to feel like real programmers so they started writing server-side and client-side applications programming with it to make themselves feel better
>>
>>52197507
because the vast majority of web devs hate learning new languages. And they all need to learn JS no matter what. So being able to use JS on the server side made things easier for teams. Also because most web dev's poo poo MS and therefor C#, every major server side language is garbage. JS really isn't that bad next to Java and PHP.
>>
>>52197017
>>52197072


Why are people so autistic about JS? It allows sites to be non fucking static. It makes it so you don't have to reload an entire page of assets. It's why you don't have to reload this page to see new posts. Fucking hell.

Oh, some websites abuse it and don't optimize it? Well the same can be done with any language. Fucking Minecraft is written in Java, the worse language for making a videogame. Doesn't mean Java is shit.
>>
>>52197378
>>simple one-off scripts
>Static typing
You're joking, right? You're telling me that you use a statically typed shell?
>>dealing with raw data that you don't know the type of until runtime
>Dictionaries
Does F# even have heterogenous dictionaries? The overhead of having to go through and manually parse strings out of dictionaries/serialize and deserialize to something like JSON is retarded in 99% of cases that you'd be dealing with unknown data going between two languages or whatever.
>>prototyping full applications
>Static typing
yup, also gonna spend my time writing out unit tests for that and optimizing it for the best possible performance :^)
>>simplifying config for users
>JSON and the like aren't dynamic typing
what about if that involves some scripting?
>>52197390
for scripting you just want to write as little code as possible in as little time as possible without having to think at all and without having to have it perform well or be completely correct.
>yes. But it's often misused.
true, but that doesn't make it something inherently bad
>So it solves problem that didn't need solving at all.
it still needs solving, Erlang isn't a perfect solution to concurrency, and as long as that remains true there will always be room for people to try something new. i bet you think that new programming languages are pointless because "F# already solved that problem" too
>>52197428
That's not what I mean. If you have to transfer some data between two other programs or two servers or whatever that have their own weird data format, it would take too long to have to parse your JSON or whatever when you could just send it along without worrying about the type information at all
>>
>>52197536
>non fucking static
>dynamic
REEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE
>>
>>52197541
>for scripting you just want to write as little code as possible in as little time as possible without having to think at all and without having to have it perform well or be completely correct.
yeah yeah. So why does dynamic typing help you there?
>>
>>52197541
>when you could just send it along without worrying about the type information at all
... lol, what?? How does dynamic typing help with that at all. If you receive JSON data. and don't want to parse it and instead just want to send it on to somewhere else... then you just pass on the string without parsing it. What does dynamic typing have to do with this?
>>
>>52197195
Hey girl, please don't ignore my questions
>>
>>52197195
>this is unironically a trap
>Traps Galore - Album on Imgur
fugg

some of them are quite good at passing as female

they still look like there's something wrong with them but irl it might be hard to tell if they're a trap or an imperfect cis female

when in doubt, stay out
>>
>>52197536
Because it is all or nothing.
Either you allow the javascript to run and you have to hope they aren't abusing the trust or the site can't be updated the right way.
>>
>>52197498
Most of my clothes are pretty modest.
>>
>>52197416
because they're sex fixated
>>
>>52197620
>using cis unironically
>>>/lgbt/
>>
>>52197620
most of those "traps" are really MtF transexuals on HRT

a crossdresser that simply does this as a fetish and looks like a girl is a literal unicorn
Thread replies: 255
Thread images: 24

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

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