[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: 328
Thread images: 53

File: DPT.png (389KB, 934x1000px) Image search: [Google]
DPT.png
389KB, 934x1000px
What are you doing, /g/?
>>
First for Javascript is a programming language
>>
>>52509824
Learning Haskell.
Getting frustrated.
>>
File: ;D.png (57KB, 800x334px) Image search: [Google]
;D.png
57KB, 800x334px
show me your fizzbuzz
>>
your mom
>>
File: WHAT.png (2KB, 154x76px) Image search: [Google]
WHAT.png
2KB, 154x76px
WHAT'S GOING ON?
>>
>>52509898
lel, kid
http://0.30000000000000004.com/
>>
>>52509898
What do you mean?
0.1 + 0.2 = 0.30000000000000004

Can't you into maths?
>>
>>52509898
Basic understanding of binary representation of floating point numbers is going on.
>>
>>52509824

http://codeshare.io/4chan
>>
File: womm.png (748B, 136x32px) Image search: [Google]
womm.png
748B, 136x32px
>>52509898
Works on my machine.
>>
>>52509955
It depends on the language idiot
>>
>>52509955
>0.3
wrong
>>
>>52509910
But 1 tenth plus 2 tenths should be exactly equal to 3 tenths, not 3 tenths and a bit.
>>
>>52508359
>>52508424
>>52508442
this?
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <time.h>

void sleep(float time);

int main()
{
char msg[] ="WARNING: SHITTY CODE IN PROGRESS ";
float freq=0.01;
float amplitude = 40;
float speed =0.02;
int i,j,k,len,s;
char c;

for(i=0;;i++)
{
s= amplitude *(sin(2*M_PI*freq*i) + 1);
for(j=0;j<s;j++)
putchar(' ');
puts(msg);
c=msg[0];
len=strlen(msg);
for(k=0;k<len -1;k++)
msg[k]=msg[k+1];
msg[len -1] = c;
sleep(speed);
}
return 0;
}
void sleep(float time)
{
clock_t time_end;
time_end = clock() + time * CLOCKS_PER_SEC;
while(clock() < time_end);
}
>>
>>52509961
then why do people feel the need to use shit languages?

>>52509971
you're mome
>>
Any amazing tutorial on opengl shaders?

I understand making buffers and pushing data to buffers via opengl api but looking for a tool on linux just to practice developing shaders and reading material that explains whats going on.
>>
>>52510037
>tutorial
>good
pick one
>>
>my language is better than yours because the default precision for printing is smaller and hides floating point errors better
>>
>>52510037
not sure if there is one at all tbqh

look at various things online like the opengl wiki and maybe look in the opengl superbible

also read these for a start:
https://rbt.asia/g/thread/S52403869#p52404910
https://rbt.asia/g/thread/S52403869#p52405043
>>
>>52510091
well, that is a legitimate advantage
>>
File: lu.jpg (30KB, 396x500px) Image search: [Google]
lu.jpg
30KB, 396x500px
Is Beginning Lua a good book?

also wtf is this cover?
>>
Complete beginner here

I'm doing bjarne stroustrup's programming: principles and practice using c++, spent like 2 hours and I can't figure out what's wrong or find a solution online.

the error is unresolved external symbol "int foo", but it's what it tells me to put in the book.

my.h
extern int foo;
void print_foo();
void print(int);


my.cpp
#include "../../std_lib_facilities.h"
#include "my.h"

void print_foo()
{
cout<<foo;
}

void print(int i)
{
cout<<i;
}


use.cpp
#include "my.h"

int main()
{
foo = 7;
print_foo();
print(99);
}
>>
Trying to work out how to read user inputs in C from the console without having scanf blocking since the rest of the code has to be running if there's no input/while waiting for one, any ideas?
>>
>>52510110
>wtf is this cover?
It's a photo of two typical Lua programmers.
>>
>>52510091
Actually it's better because it knows the required precision based on the input used and removes errors automatically so that the programmer can bother fixing actual problems.
>>
>>52510122
Threading
>>
>>52510122
It's called "threading". Have fun.
>>
>>52510110
https://learnxinyminutes.com/docs/lua/
>>
File: OpenGL-ES-2_0-Reference-card.png (2MB, 1944x1320px) Image search: [Google]
OpenGL-ES-2_0-Reference-card.png
2MB, 1944x1320px
>>52510037
>>52510103
also these reference cards give you a quick overview of what's available to you

look into each individual thing that you're interested in on the opengl reference pages
>>
>>52510156
>>
>>52510037
Unless you're looking for help with linear algebra there's nothing special about shader programming compared to regular programming, besides different considerations when it comes to optimization,.
>>
>>52510120
>reading bjarne's book
first mistake
>>
>>52509824
Thank you for using an anime picture.
>>
>>52510178
yes but it's not so easy in the start if you don't have the first clue of what's going on. most tutorials are very bad at explaining things and just throw some code at you to copy.
>>
>>52510205
it's not animated
>>
>>52510120
You didn't define foo anywhere.
>>
>>52510210
I disagree. I think there's a myth around shader programming that makes it seem really arcane or different and people actually fall for it. This may have been true back in the day of writing shaders with vendor-specific assembly when the GPUs were actually quite different from one another, but that's been left far behind.
>>
File: 1448825677254.png (10KB, 354x432px) Image search: [Google]
1448825677254.png
10KB, 354x432px
>>52510127
I see

>>52510153
I already skimmed trough it, but meta programming is completely new to me
>>
>>52510257
opengl in general gets explained very poorly to beginners
>>
>>52510256
doesn't "extern int foo;" define it
>>
File: 1443225682058.jpg (33KB, 600x360px) Image search: [Google]
1443225682058.jpg
33KB, 600x360px
>>52510153
>metatable-based OOP
>>
>>52510315
It's a scripting language
For script kidding yourself
>>
>>52510315
who is this boner moaner?
>>
File: 1449540436324.jpg (236KB, 560x822px) Image search: [Google]
1449540436324.jpg
236KB, 560x822px
>>
>>52509898
Basically, 0.1 in binary is 0.00011001100110011001100110011001100110011001100110011001100110

and 0.2 in binary is 0.00110011001100110011001100110011001100110011001100110011001100. Adding those together give a remainder
>>
File: 1449540488870.jpg (307KB, 560x822px) Image search: [Google]
1449540488870.jpg
307KB, 560x822px
>>
>>52510358
what is this?
>>
>>52510370
HAHA IN YOUR FACE TOLD YOU C++ IS BETTER
>>
>>52510120
>>52510256
no wait I'm seeing what I'm doing, I'm misunderstanding the book
>>
This guy wrote a compiler and bytecode interpreter in minecraft command blocks.
https://www.youtube.com/watch?v=t4e7PjRygt0&app=desktop
>>
File: barely 9000.gif (2MB, 500x281px) Image search: [Google]
barely 9000.gif
2MB, 500x281px
>>52510429
Literally nobody cares.
>>
>>52510457
>>>/out/
>>
>>52510429
>that isPrime function
Awful
>>
>>52510476
Go back to youtube or reddit or whatever the fuck you came from
>>
Anyone got experience with ffprobe? I'm trying to list all the available metadata as json.
>>
File: minecraft.webm (1MB, 720x404px) Image search: [Google]
minecraft.webm
1MB, 720x404px
>>52510429
yes, today minecraft modders are the turing award laureates of tomorrow.
>>
>>52510476
>>52510429
No, you fuck off. Nobody cares about your shitty electronic toys for manchildren
>>
File: VNyk86k.png (651KB, 1067x800px) Image search: [Google]
VNyk86k.png
651KB, 1067x800px
>>52510521
>>
>>52510263
Just read PiL. the old version is available on their site. And newer versions 'around'.
>>
File: 1448473404155.jpg (114KB, 720x960px) Image search: [Google]
1448473404155.jpg
114KB, 720x960px
>>52510370
>javascript has been used server side recently
>>
>>52510602
What's truly disgusting is that it's actually one of the better options for server side dev.
>>
>>52510429
kill yourself

>>52510499
>>99.99% of them really aren't
>>
>>52509982

#include <iostream>
#include <cmath>
#include <unistd.h>
#include <string>

using namespace std;

#define PI 3.141592654/180;

int main()
{
string str ("_-^-_-^-_-^-_-^-_-^-_-^-_-^-LEL");
unsigned long strsize = str.length()-1;
while(1){
for(int i=0; i<360; i++){
if (i%20 == 0){
cout << " ";
double pimag = i*PI;
double sinfunc = sin(pimag) +1;
double space = sinfunc*20;
for(int j=0; j<floor(space); j++){
cout << " ";
}
str = str[strsize] + str;
str.erase(strsize+1,1);
cout << str << endl;
usleep(100000);
}
}
}
return 0;
}
>>
>>52510521
>>52510621
Why are you in a programming thread if you don't like programming?

I don't think you understand how amazing it is that someone wrote a compiler in minecraft command blocks.
>>
>>52510679
amazing, yet very VERY autistic and useless.
>>
>>52510639
>#define PI 3.141592654/180;
stopped reading there
>>
>>52510679
>building a house made of lego is somehow more impressive than building a conventional brick house
>>
>>52510690
good for you
>>
>>52510705
thanks anon :)
>>
>>52510679
Here look at my C interpreter:

#include "filepath.c"

(compile & run)
>>
>>52510689
>VERY autistic and useless.
That's not the point.

>>52510692
Yeah see, you don't understand at all what's going on in the video, your just a retarded fizzbuzzer.
This isn't playing with legos at all.
>>
File: beta squad.jpg (66KB, 848x640px) Image search: [Google]
beta squad.jpg
66KB, 848x640px
>>52510110
>also wtf is this cover?
What do you have against gay couples?
>>
>>52510718
Holyshit you're retarded.
>>
>>52510712
that was sarcastic you autist
>>
>>52510724
ok he made a compiler in minecraft golly gee how fucking impressed i am i should contact all the major newspapers and nominate him for the turing award or someshit
>>
>>52510743
Thanks for noticing.
>>
I want to write a script that uploads lots of thumbnails to google image search, downloads the result web page(text only), and deletes it if "No other sizes of this image found." is present inside.
In the end I want to get filenames of files that can be found in other resolutions.
How do I make that?
>>
>>52510747
turing was probably autistic tbf
>>
>>52510747
its easy to impress manchilds and 12 year olds and unfortunately theres way too many of them.
>>
>>52510818
>>52510747
Let's see what you've made recently, buckaroo's
>>
>>52510841
sorry anon, but all my work is proprietary and owned by my company.
>>
>>52510877
same

i'm never going to post my serious projects/code on 4chan
>>
>>52510877
>>52510888

>I haven't made anything because I've been too busy shitposting and watching anime
Yeah, I figured as much.
>>
File: 1451683583776.gif (2MB, 400x600px) Image search: [Google]
1451683583776.gif
2MB, 400x600px
>mfw finding out I've implemented some CHIP-8 codes in a more restricting manner
So the opcode for loading a group of memory to registers and vice versa doesn't load 16 bytes at a time, it loads up to how many you want. Also the option for adding a number to the I counter has an undocumented functionality where it lets you loop once you hit the end and sets the VF flag to 1. Safe looping means CHIP-8 Snake will be much easier in regards to node manipulation

Things are moving lads
>>
File: x.png (4MB, 2576x3872px) Image search: [Google]
x.png
4MB, 2576x3872px
I'm working on improving a stereovision system.
I found a simple way to find areas in image which are uniform and shouldn't be matched between left-right image pair. I'm computing local standard deviation (in an area 5-21 pixels) and accepting only areas with standard deviation above a certain threshold.
I've implemented this in a fast way by using box blur and squaring operations:
StdDev(Img) = Box(Img^2) - Box(Img)^2

Pic shows image and 21x21 standard deviation. The less uniform the area, the lighter. It turns out to mostly highlight edges but also areas with lots of texture, and is relatively resilient to noise. It kind-of looks like a blurred sobel/laplace.
>>
>>52510788
sounds like a neat idea anon, want to work together at it?
>>
>>52510895
>projecting this hard
ok kid keep playing with your minecrafts
>>
>>52510907
My first post was asking what you've made, I couldn't care less about minecraft. Fact of the matter is, I'm sure it's more than you've done any time recently. No projection. I work full time, I barely have time to program, which changes nothing about my original statement.
>>
>>52510877
Lol cuck.
>>
>>52510933
> No projection. I work full time, I barely have time to program.
>I work full time
>I barely have time to program.

why are you in /dpt/ ?
>>
>>52510974
I read the posts, which over the last few months have only been about OS/language wars, general shitposting, trapfaggotry and little progress/code. Your question is way too valid, and I have no idea anymore.

Are you implying someone who works full time can't be interested in programming?
>>
Does anyone here experience working with the IBM data studio? Could anyone tell me if there is a simple autocomplete function in the damn IDE?
>>
>>52510479
It should have been

for j = 2 to (x - 1) / 2


right?
>>
>>52511027
> Are you implying someone who works full time can't be interested in programming?

I'm implying someone who is interested in programming SHOULD BE programming.
>>
>>52511071
Some of us have responsibilities. One day you'll understand.
>>
>>52511085
>programming can't be a hobby.

geez anon, you're just making excuses now.
stop projecting.
>>
>>52511085
the responsibility to funpost on 4chins?
>>
>>52509961
English, but I think more languages have the same numbers desu, senpai.
>>
File: 90626e8ceeae06bdfbc3155e840e64eb.png (475KB, 708x1000px) Image search: [Google]
90626e8ceeae06bdfbc3155e840e64eb.png
475KB, 708x1000px
>>52511145
someone has to do it.
>>
>>52511132
After working all day, I'm way too tired to think about programming. I try to get some in on the weekends.

>>52511145
Work. Rent. Food. Bills.
>>
std::Stack<BaseState*> stateStack;

stateStack.emplace(new GameState());
stateStack.top()->onEnter();


Does anyone have any idea why this code is executing the base State class's onEnter function rather than the GameState's onEnter function?
>>
File: 83421.png (14KB, 203x248px) Image search: [Google]
83421.png
14KB, 203x248px
>>52511166
>emplace
>>
>>52509898
let's say you can store a decimal number with a limited number of significant figure

like 1 / 3 = 0.333....

if you can only store for example 4 digits then it would be

0.3333

and then 3 * 0.3333 = 0.9999 instead of 1

same principle with 0.1 + 0.2

in decimal (base 10) you can store numbers like 0.3 exactly

in binary (base 2) with a limited number of bits you can't
>>
>>52511166
Why are you using emplace here? It doesn't make sense.
Also, is that function marked virtual?
>>
>>52511196
>>52511222
I was under the opinion that emplace created a new element on the top of the stack, was I mistaken?

And yes, the BaseState's onEnter function is virtual
>>
>>52511166
>using an explicit stack
http://www.gamedev.net/page/resources/_/technical/game-programming/brain-dead-simple-game-states-r4262
>>
>>52509824
Just had to start PowerShell and it drives me nuts since I'm not used to it. Made the same code in bash it runs smooth and perfect "translate" it to ps and it always returns a 0.
hulp
>>
File: 1448224356554.jpg (41KB, 390x390px) Image search: [Google]
1448224356554.jpg
41KB, 390x390px
>>52510594
Yeah, thanks I looked around a bit more an found PiL 3rd edition, currently reading it. So far it really as comfy as some anons say it is
>>
>>52511238
Change it to push, see what happens
>>
File: 1448101989331.png (31KB, 915x589px) Image search: [Google]
1448101989331.png
31KB, 915x589px
>>52510897
It really is inspiring seeing you progress, pleas do continue posting.
>>
>>52511334
I've tried, but there's no change.
>>
>>52511365
post more code
>>
>>52511238
Yes, emplace constructs an element ant that's the problem. The element constructed is of type pointer to base (casted from pointer to derived).
>>
>>52510263
Metatables != metaprogramming
>>
is there a site that will teach me coding 1 on 1 for free? I want to make a better search engine than google
>>
>>52511238
But is it marked as virtual in both classes?
>>
File: 1451683513443.gif (2MB, 400x225px) Image search: [Google]
1451683513443.gif
2MB, 400x225px
>>52511361
That means a lot lad

With my new found info, I'm sure being able to move the snake will be easier (the hard bit was figuring out how to do the conditionals. If you were forced to load or unload all your registers to read/write to memory, you'd have to backup your registers somewhere and shit would get messy. The looping around memory was also a nice touch because finding the tail node was also a stumbling block in design).

I might have it tonight
>>
>>52511400
>better search engine than google
>>
File: 36743.gif (855KB, 500x281px) Image search: [Google]
36743.gif
855KB, 500x281px
>>52511409
>is it marked as virtual in both classes

Does anybody here know C++?
>>
on the other hand my chip 8 project is going well... lol
>>
>>52511438
>Does anybody here know C++?
no this /wdg/, try /dpt/
>>
>>52511427
googlel sux m8
>>
>>52511500
heh
>>
>>52511500
what you're saying is
>i'm gonna make a better algorithm than google even though they spent years perfecting the algorithm to optimize searches

sure go ahead
>>
>>52511531
will you help me?
>>
>>52511400
this is bait

>>52511500
the search engine is good
>>
Google spy on you and profit from it, and so you owe it to them to profit from spying back on them
>>
>>52511561
nah too hard. google search engine is perfectly fine for me
>>
>>52511308
Lua is just comfy. LuaJIT makes it fast. Lua is love and Lua is life.

I have some issues with it that keep it from use as a general purpose system scripting language, mostly just about the addition of integers in 5.3 (they should be a separate type, i.e. type(1) == "integer") and the incompleteness of the metamethods (proxy tables are a fucking dumb idead, make a __get and __set method and register them as fast access metamethods), but also support for zero-basing) but after become well versed in Python I would rather choose Lua and it's idiosyncrasies.

desu, if I could find a sponsor I'd take over the JIT project.
>>
>>52511594
Sorry for the incorrectnesses, I'm tipsy. One too many glasses of brandy. But my opinion is truthful, not a result of drunkenness, Lua is awesome.
>>
>>52511594
kill yourself
>>
>>52511631
Okay. brb... Or not actually.
>>
>>52511410
cool
>>
>>52511594
>>52511629
Dynamic typing is garbage
>I'm tipsy
Not surprising
>>
File: 1453191306930.gif (2MB, 400x360px) Image search: [Google]
1453191306930.gif
2MB, 400x360px
>>52511631
>>
File: 1430444266556.png (835KB, 1024x1820px) Image search: [Google]
1430444266556.png
835KB, 1024x1820px
does anyone here know Unreal Engine 4 Blueprint?
i cant find any good source to learn from
>>
>>52511731
>>>/vg/agdg
Those are the best (well better) people to ask for video game development related questions chap
>>
>>52511738
this

at least for enginebabby stuff
>>
>>52511671
>Dynamic typing is garbage
Nice opinion. Do I need to illuminate you to the fact that the JIT is nearly as fast as your shitty statically typed language? If it's Java or C#, as fast.

When I write in Java I spend too much time worry about properly specifying class relations and also writing any of that shit is just tedious and time consuming. I recently wrote a Java application and finished the algo in like an hour, then spent 4 hours writing the fucking thing because I tried to adhere to all of the goddamn OOP, type abstraction bullshit. Static typing has it's uses, but it's just a waste of time in most applications. That's why dynamic typing is useful. Also weak typed languages are better than strong. There is nothing wrong with C.

If you can't write good software in a weakly typed or dynamically typed language you probably suck at programming and should just stop as soon as possible.
>>
>>52511766
To summarize, static typing is a tool. use it when necessary.
>>
>>52511738
>>52511756

thanks /dpt/, i hope one day i'll be as cool as you.
>>
for i in ("Fizzbuzz" if i%3==0 and i%5==0 else "Fizz" if i%3==0 else "Buzz" if i%5==0 else i for i in range(100)): print(i)
>>
>>52511738
Ow wow, I didn't know about that.

That looks like a fun place to funpost too.
>>
File: B8yoFc1IcAEl5_2.png (36KB, 473x328px) Image search: [Google]
B8yoFc1IcAEl5_2.png
36KB, 473x328px
>>52511766
>Java
You're complaining about Java, not static typing.

>Also weak typed languages are better than strong
pic related

>>52511788
It's never not useful though. It's always better to find bugs at compile time than at run time.
>>
File: ookbuzz.jpg (576KB, 1349x539px) Image search: [Google]
ookbuzz.jpg
576KB, 1349x539px
>>52511822
I'll raise you orangutan fizzbuzz
>>
>>52511822
for i in range(1,101):print"FizzBuzz"[i*i%3*4:8--i**4%5] or i


nice try faggot
>>
>>52511849
>>Also weak typed languages are better than strong
>pic related

>Can't reason through it
You are stupid, obviously. The rules for it are pretty obvious. As is whoever wrote that.
>>
>>52511849
>It's never not useful though. It's always better to find bugs at compile time than at run time.
It's all about development time. If you write your program and it tells you when you run it there are type errors, then there is no functional difference in error checking. Just development time.
>>
>>52511880
>The rules for it are pretty obvious.
Their not really. It's very very easy to end up with bugs caused by weak typing and it happens all the time. There's no benefit to it either.

>>52511899
>It's all about development time.
Precisely. Static typing saves a lot of development time.
>>
>>52511913
>Their not really.
So you are admitting you are stupid. Good luck finding a job.

Dynamic typing saves a lot of time. Not having to build type abstractions actually SAVES time, didn't you know?
>>
>>52511822
for(int i=1;i<101;++i)
cout<<(i%15?i%5?i%3?to_string(i):"fizz":"buzz":"fizzbuzz")<<endl;
>>
>>52511913
Additionally
>>52511941
>Their
Confirmed for idiot.
>>
File: 14457039361390.jpg (7KB, 232x197px) Image search: [Google]
14457039361390.jpg
7KB, 232x197px
>need to read raw image data from files for my toy program
>not sure if I should write a small single file format reader or use a third party library with all the formats
>third party library is very big and has 100 page documentation
>writing png readers is hard
>other formats make too large files for what I want to use
>not sure what to do
>start procrastinating
>get depressed
>haven't programmed in 5 days
Why is my willpower so weak?
>>
>>52511941
>So you are admitting you are stupid.
No, i'm talking about experience in every project that used dynamic languages I've worked on.

>Good luck finding a job.
I actually have a great job, and I actually write a lot of JS in it.

>Not having to build type abstractions actually SAVES time, didn't you know?
What kinds of abstractions are you talking about? There's nothing about dynamic typing that saves any time at all.
>>
>>52511913
>Precisely. Static typing saves a lot of development time.
not according to studies.
>>
What's with everyone fizzbuzzing? that shits fucking worthless as fuck, here's a cool project for those aspiring game designers:

>Noise function to make a light flicker realistically

The aim was to have a light source "flicker" on and off, with rapid flashes but also with periods where the light is completely on. A linear combiantion of sine waves is my first attemp at this, suggestions welcome.

    private static float base = 0.6f;
private static float r;

// Tune these to adjust flicker
private static float min_cutoff = 0.25f;
private static float max_cutoff = 1f;

private static final float[] freq = {0.25f, 3.5f, 2.2f, 1.15f, 14.2f, 30f, 68.01f};
private static final float[] ampl = {0.3f, 0.5f, 0.25f, 0.25f, 0.125f, 0.125f, 0.0625f};

public static float flicker(float t) {
return flicker(t, 0f);
}

public static float flicker(float t, float offset) {
t = t + offset;
r = base;
for (int i = 0; i < freq.length; i++)
r += ampl[i] * MathUtils.sinDeg(t * freq[i]);

// Cutoff frequencies
r = r > max_cutoff ? 1f : r;
r = r < min_cutoff ? 0f : r;
return r;
}
>>
>>52512042
probably some shitty ass studies that didn't include maintenance and continued development
>>
>>52512044
>suggestions welcome
use a better language for game dev
>>
>>52512042
No, according to common sense. I can easily explain many ways that static typing saves time. No one can explain any way that dynamic typing saves time that makes any sense.

Studies neither prove not disprove that static typing saves time, because setting up a way of measuring language productivity is incredibility difficult.
>>
>>52512044
such math
much object oriented
wow
>>
>>52512140
reddit is down?
>>
how can i delete my embarrassing memories, /dpt/?
>>
File: listerino.jpg (15KB, 256x197px) Image search: [Google]
listerino.jpg
15KB, 256x197px
>>52512140
>epic maymays

go diddlyfuck yourself
>>
>>52512164
memories are what defines you
>>
File: 1452092658416.jpg (20KB, 460x276px) Image search: [Google]
1452092658416.jpg
20KB, 460x276px
>>52512164
there is only one way
>>
>>52512164
a generous dose of cyanide.
>>
>>52512183
we don't really know what "consciousness" is, anon
>>
>>52512125
>common sense
apparently not common enough...
well then what's YOUR reasoning?
>>
File: neat.png (9KB, 325x345px) Image search: [Google]
neat.png
9KB, 325x345px
Never knew VS was so user friendly. Only used shit editors up until now.
>>
>>52512262
epic b8
>>
>>52512262
You are still using a shit editor though
>>
>>52512125
>I can easily explain many ways that static typing saves time. No one can explain any way that dynamic typing saves time that makes any sense.
then feel free to enlightening us.
>>
>>52512262
basically any ide can do this
>>
>>52512260
>>52512296
Only among dynamic typing advocates who are simply ignorant about type theory.

And obvious one is static typing catches many kinds of bugs at compile that, and provides a lot of information about the source of those bugs at compile time. These same bugs would otherwise happen at run time in a dynamic language. When these happen at run time they can often take a long time to track down the source of the bug, because undesirable behaviour may only start far away from the code that caused the problem.

Seeing things like a UI field showing "Undefined" or seeing a run time error like "typeerror: undefined is not a function", which are very common in most dynamic code bases are impossible to happen in statically typed languages.
>>
File: 1452125095649.jpg (152KB, 1280x720px) Image search: [Google]
1452125095649.jpg
152KB, 1280x720px
I'm going to order a bunch of programming books from Amazon within the next hour.

I prefer books I can feel over pdfs.

Any suggestions?
>>
>>52512549

i prefer dicks i can feel over pictures of them
>>
>>52512549
What programming topics do you want to read about?
>>
Does anyone know anything about Lainchain? Trying to get it's board catalog JSON, and it just repeatedly throwing exceptions when I try to grab it.

The exact same code works perfectly fine for 8ch and 4chan. Literally no idea why it isn't co-operating.
>>
>>52512670
are you using the vichan API?

https://github.com/vichan-devel/vichan-API/
>>
File: Dlqmnzs.png (36KB, 878x353px) Image search: [Google]
Dlqmnzs.png
36KB, 878x353px
>>52512670
>>52512705

Yup, I've already got it working perfectly for 8ch and 4chan, but I'm failing to even get a response from the server when it comes to Lainchan, it just immediately throws this exception.
>>
File: 1452124713854.jpg (51KB, 879x879px) Image search: [Google]
1452124713854.jpg
51KB, 879x879px
>>52512576
JavaScript mainly, but books for other languages are welcome.
>>
>>52512670
>i heavily rely on someone else's JSON library and have no clue how to trouble shoot it when it stops working

~just webdev things~
>>
File: snake movement.gif (41KB, 652x578px) Image search: [Google]
snake movement.gif
41KB, 652x578px
Labels, whitespace and increased self-knowledge of masking is making development very smooth lads
>>
>>52512743
Literally nothing to do with the JSON, it's purely an issue of an exception being thrown when I try to even download the data

Low quality shitpost, 2/10 for not even reading or correctly understanding the post you were responding to.
>>
File: 1413139477993.jpg (170KB, 850x1100px) Image search: [Google]
1413139477993.jpg
170KB, 850x1100px
Did you make your CV in LaTeX, /g/? Or maybe as a web page? Care to show for inspiration?

Found some decent ones in the archive
>>
>>52512722
As the message says, you have a task which threw an unhandled exception.

Turn on Break on All Exceptions (Debug, Exceptions) and rerun the program.
This will show you the original exception when it was thrown in the first place.

try {
// your code
} catch (AggregateException e) {

}
>>
>>52512352
I know enough type theory. There is no benefit to catching errors at compile time rather than runtime if the scripts are short and execute quickly. Which is exactly the use case of dynamic languages. most development time analysis shows for small programs dynamically typed languages fair better (this may be connected to language feature, but intuitively specifying types take more time than not). this is not the case in large programs however. static typing has advantages there, like you said.

So its all about cost, static typing is a tool which keeps large software from getting unrulely.

Saying static is the only proper method is the unrealistic idealist academic opinion. AKA worthless.
>>
>>52512722
I see the problem but I'm not going to tell you.
>>
>>52512203
it's being conscious.
>>
File: resume1-fs8.png (124KB, 797x896px) Image search: [Google]
resume1-fs8.png
124KB, 797x896px
>>52512785
>>
So, I'm working on a program that constructs random names from a list of phonemes, but I'm fairly newish to software development, so I'm unsure of how to proceed in certain areas.

I want to, somehow, "weight" different phonemes and multi-phoneme constructs to be more likely at the beginning, middle, or end of a name. For example, "son" is more common at the end of a name (eg, "Jackson", "Wilson") than it is at the beginning (eg, "Sonny"). My intention is to give middle, beginning, and end, each their own weight variable as a decimal value, with a total value of 1. Anyone see any issues with this plan?

Secondly, I want to also weight different phoneme and phoneme-constructs to be more/less likely to appear following one another, up to 100% weight (eg X always is followed by Y and only ever Y), and in a way that can be modified programmatically on the fly. An example (from Wikipedia): in English, the sound of "ng" as in "sing", occurs only at the end of a syllable, never at the beginning. However, it can appear at the beginning of a syllable in other languages, such as Māori, Swahili, Tagalog, and Thai. So, I want to be able to say to the program, "This instance treats "ng" as end-of-syllable only, but this other instance treats it as either-or".

Suggestions? I'm having a hard time even figuring out exactly how to store the data on these relationships.
>>
Just started learning php. How can I search an sqlite table for an id and get the info from the columns of that specific id? I basically want to generate a random number between 1-30 and grab the info of the columns that correspond to the number that gets generated. I've set up the database already and have the random number working.Just want to be pointed in the right direction as I have no clue what to do.
>>
File: 1305404915402.jpg (6KB, 159x200px) Image search: [Google]
1305404915402.jpg
6KB, 159x200px
>>52512808
>>
>>52512738
Eloquent JavaScript
Secrets of a JavaScript Ninja
are my recommendations, I've read them and they were pretty enjoyable.
>>
>>52512793
Can't even get the thing to handle the exception properly.

Can't wake up.
>>
>>52512816
Looks god. What did you use? Moderncv?
>>
>>52512800
>making small scripts
>programming
what you're doing is 'scripting' or 'coding'
>>
>>52512822
>each their own weight variable as a decimal value, with a total value of 1.
That's how it's usually done, yes.

>rest
You'll just need to have different likeliness-fields for every single language.
>>
How do you guys structure C projects?

I would ideally use GNU Make to build the project, and have some mechanism for doing unit-level testing.
>>
>>52512936
Go read a book on programming.
>>
>>52512894
I don't recommend Eloquent Javascript, it's written by a male feminist and his ideology seeps into his writing in surprising ways, you will probably not enjoy it.
>>
>>52512961
kill yourself python shitter
>>
>>52512984
while (1):
goto reddit;
>>
>>52512894
>Secrets of a JavaScript Ninja
Why did it have to have such a cheesy name?

>>52512962
I remember seeing [sic] next to "he" when he was quoting someone, I got triggered by it, but it's still a good introduction into JavaScript.
>>
File: 1452802632148.png (17KB, 418x359px) Image search: [Google]
1452802632148.png
17KB, 418x359px
>submit Bash script for class right at deadline
>realise in one of the cases I put a space before the equals sign
>>
>>52509857
stop wasting your time. also kill yourself.
>>
>>52512936
Maybe if you're autistic
>>
>>52512997
literally no u
>>
Working on an android app
>>
>>52510107
Not if the values passed around are inaccurate.
>>
>>52513005
does the professor even run your code?

mine doesn't
>>
>>52513008
what do you even do all day that requires these small """"""""programs""""""""? write web/mobile app shovelware?
>>
>>52512936
there's no difference.
>>
>>52512932
check out creddle.io
>>
File: chip8.gif (80KB, 961x491px) Image search: [Google]
chip8.gif
80KB, 961x491px
>>52513035
useful helper tools
>>
>>52513039
the difference is that your trivial little scripts run like ass and have very poor functionality compared to full-fledged programs
>>
Reminder that dynamic types can be encoded in a static (& dependently) typed system but not the other way around.
>>
What are the comments with male pronouns used for?

I don't think I've ever felt the need to include comments with pronouns in it, but I really want to because of the people who object to them.
>>
>>52513077
>I don't think I've ever felt the need to include comments with pronouns in it, but I really want to because of the people who object to them.

That's just going to make them object more and louder, which is literally the opposite of "ignore them and they'll go away".
>>
Implementing quick sort in java
>>
IT'S OFFICIAL

DYNAMIC TYPING A SHIT

STATIC TYPING MASTERRACE

https://strawpoll.me/6398631
>>
>>52513047
Those are some ugly stars, m8
>>
>>52513090
Ignoring them would be to continue using them, not by giving into their demands.
>>
>>52512962
Why the fuck would someone care about the personal ideology of the maker of the product they are using?
>>
>>52513113
I'm not davinci you melt
>>
>>52513041
>check out creddle.io
Great, hadn't heard of it yet. Thanks
>>
>>52513118
>Ignoring them would be to continue using them, not by giving into their demands.

But you said yourself you've never felt the need to use such comments. So, you're obviously not ignoring them.
>>
>>52510110
I wouldnt waste money on a book. There's plenty of free resources on the web to get acquainted with a new language.
>>
>>52513098
>fags unironically voting for dynamic typing
kill yourself python pisskids and web dev tards
>>
>>52513119
It is a bit sicking when they push their ideology in a programming book.

Is it really necessary to say "he [sic]" when quoting someone? "[sic]" is for spelling mistakes, not to show it's not being inclusive to women.

It is a good book though.
>>
>>52511041
You only need to count up to sqrt(x). If there's any divisor of x, say y, greater than sqrt(x), then x/y is a divisor of x less than sqrt(x) so it's already checked, and you don't need to check for y separately.
>>
>>52513142
>everyone right now are voting for dynamic
KILL YOURSELVES YOU ARE CANCER
>>
>>52513133
Just tell me what those comments are generally used for, anon.
>>
File: 41PO1bThFJL.jpg (23KB, 304x500px) Image search: [Google]
41PO1bThFJL.jpg
23KB, 304x500px
>>52509824

So I spent the last year as a software developer trying to get a sense of perspective. I was pleased to find that Architecture is a sister subject of sorts and most of the things that are happening in software have already happened in architecture.

Has anyone else studied this?
>>
>>52513169
now they're just doing it for the lulz haha very funny
>>
I wish my code wasn't so feminine.
>>
>>52513119
>he [sic]
wow
so progressive
down with men
maybe if i put women on a pedestal i'll get laid

this shit doesn't belong in a programming book
>>
>>52512808
>>52512722

Alright, I'm clean out of ideas, mind giving me a hint?
>>
>>52512800
>There is no benefit to catching errors at compile time rather than runtime if the scripts are short and execute quickly.
That's utterly retarded. Why does it make a difference how short the program is?

>most development time analysis shows for small programs dynamically typed languages fair better (this may be connected to language feature, but intuitively specifying types take more time than not)
No it doesn't.

>So its all about cost, static typing is a tool which keeps large software from getting unrulely.
And also helps you get small scripts working faster.

You still haven't explained a single reason why dynamic typing is useful at all.
>>
>>52513182
I haven't, but the patterns, restrictions, things to consider and general workflow of development can kind of imitate the decisions you make in architecture. Not that it's useful, but it's interesting
>>
>>52513034
yeah he does

it was only one of the bash scripts, just fixed it and submitted it late. it takes a directory as an arg and then if it finds any files that are duplicates it deletes all but the one w/ "lowest lexicographical" name and then creates hard links to the lowest named one
>>
How to architecture:

Pass dependencies explicitly and you will tend to produce a good architecture that is well-decoupled and cohesive, because anything else is a pain in the arse to write.
>>
>>52513234
>anything else is a pain in the arse to write.
Don't forget a pain to maintain as well
>>
>>52513213

The patterns, restrictions, things to consider and general workflow are almost exactly the same and both can be viewed as a series of interconnected patterns that build a living structure.
>>
>>52513234
and use explicit types
>>
>>52513240
Of course, but the point I'm trying to make is that you pretty much have to be starting off working with crutches (e.g. making systems global singletons) to produce a bad architecture.
>>
in terms of required effort to write:
nominal typing > (structural typing = dynamic typing)
in terms of things you have to keep in your head at once:
dynamic typing > structural typing > nominal typing
in terms of required effort when refactoring:
dynamic typing > (nominal typing ? structural typing)
(nominal typing vs. structural typing depends on the kind of refactoring you do: structural typing yields the benefit of being able to change stuff more easily while it imposes a higher risk that you get mismatching things that are not enforced by the compiler, while refactoring dynamic typing is a pain either way since you have to check every single path of execution)
>>
>>52513276
True, I think bad design decisions like those are usually created due to poor foresight and present convenience.
>>
How come realloc is corrupting my arrays after resizing them?

Here's my array
5 4 9 10 7 3 2 1 6

The number of items is 9.
So if I do
arr = (int *) realloc(arr, 9);

the array becomes
5 4 9 10 7 3 134561 0 6
>>
>>52513234

You could inject them! State and all - like beans!
>>
>>52513245
with software the sky is the limit of what you can do with it

architecture is just buildings

the data processing you can do with a program can be far more complex than whatever the building gets used for
>>
>>52513306
Hey guise why don't we use a DI container and turn a large portion of our statically typed code into an ugly dynamically typed scripting language which only works within XML?
>>
>>52513302
>9
>>
>>52513333
oh nevermind i'm dumb
sizeof(int) * 9
>>
File: 8MmVHVZ.png (10KB, 808x143px) Image search: [Google]
8MmVHVZ.png
10KB, 808x143px
>Try
>Catch
>Implying
>>
>>52513331
>implying this has anything to do with statically or dynamically typed languages at all
But you sure do love shitposting.
>>
>>52513318

Architecture isn't a fine art because buildings have to be lived in, the same as Software isn't an art because programs have to be useable.

A buildings data processing is the way that it is perceived and the way that it interacts with the people that use it. The form is slightly less malleable but the constraints remain as abstract.

'A house is a machine for living in' is one of the most damaging ideas in the modern world.
>>
File: 1286228503366.png (359KB, 698x563px) Image search: [Google]
1286228503366.png
359KB, 698x563px
>Apple
>App
>Apple
>mfw Apple is a cleverer name than i first thought
>>
>>52513452
nvm it's fucking retarded

>In the just-published Steve Jobs biography, Jobs told Walter Isaacson he was “on one of my fruitarian diets” and had just come back from an apple farm, and thought the name sounded “fun, spirited and not intimidating.”
>>
>>52510370
>promoting sepples
no
>>
>>52513480
>fruitarian diets
no wonder he died of cancer
>>
>>52513302

An array of 9 ints will not take up 9 bytes; you probably want at least 18 bytes for them
>>
>Java
>not shit
>>
what's wrong with mint?
>>
>>52513001
>Why did it have to have such a cheesy name?
because JavaScript ninja is an actual profession.
>>
>>52513605
yes
>>
>>52513546
yep he probably would have been cured but he had to go with the fruits and homeopathy instead
>>
>>52513635
Another sweet victory for the gene pool.

Wait.. he already had a kid. Fuckit.
>>
>>52512894
those books are outdated
>>
>>52510037
If you've got an android device check out ShaderEditor on f-droid

Helped me get some valuable practice
>>
>>52513204
>Why does it make a difference how short the program is?
If the program has a runtime loop, or takes a long amount of time to run the type error takes longer to show? Are you dumb?

>No it doesn't.
Lets do a thought experiment. Two languages are exactly identitical, but one has dynamic typing, while the other is statically typed. The difference is then:
Statically typed:
int c = 0;

Dynamically typed: c = 0;
Which one takes more time to write? You must actually be dense...

>And also helps you get small scripts working faster.
Completely implementation driven. you really comprehend enough to be arguing this. Let someone else do it, please. I'm getting annoyed.

>You still haven't explained a single reason why dynamic typing is useful at all.
> most development time analysis shows for small programs dynamically typed languages fair better
You addressed my point, but don't refuse to realize this, correct or not... Shill detected. I'm out.
>>
>>52513819
anon, statically typed languages can be structurally typed and have type inference
>>
>>52513819
>writing 'int' is too hard!
Use a staticly typed language with type inference then. You won't have to write 'int'.
>>
>>52513616
>JavaScript ninja is an actual profession.
nah m8

Javascript developer is a profession (or sorts.) "Ninja" is a way to indicate that you're a rancid pile of discarded labia.
>>
>>52513819
>what is OCaml
>>
>>52513006
Jeez, did Haskell shit in your cereal this morning or something?
>>
>>52513368
Try putting another try around it.
>>
>>52513933
No, but haskell users are pretentious assholes. The fact of it is, the only useful functional languages are: Erlang, OCaml, and Clojure.
>>
Reminder that the collection of studies most dynamic typing babbies cite actually point towards dynamic typing being worse (or point to it being better, but have obviously flawed methodology)

http://danluu.com/empirical-pl/
>>
>>52513963
I see the "pretentious asshole" accusation levied far more than I actually see pretentious asshole Haskell users.
>>
Trying to do the game 2048 on Pascal.
The array doesn't move.
I want to kill this lenguage.
>>
>>52513923
>JavaScript developer
>rancid pile of discarded labia
What is the difference?
>>
File: losing snake.gif (45KB, 647x552px) Image search: [Google]
losing snake.gif
45KB, 647x552px
Death works
>>
File: nHnd3Gh.png (10KB, 607x377px) Image search: [Google]
nHnd3Gh.png
10KB, 607x377px
>>52513950
Here goes nothing...
>>
>>52513819
Not all statically typed languages are nominally and manifest typed.
>>
>>52514006
>Pascal
I'm so sorry.
>>
>>52514019
Lookin' good. Glad to see some actual progress here.
>>
>>52513921
Dynamic languages can also have type inference for on-the-fly type checking during byte-code compilation, but default to dynamic when it's indeterminate. This is how most JIT compilers work.
>>
>>52514041
I figured out the error, had to disable pretty much all of my exception "break when thrown" settings just so I could get passed it and then I could output it to the console.

As far as I can tell I need to deal with HTTPS certificate bullshit because Lainchan forces it, and fuck that for a laugh.
>>
>>52514006
>It's the language's fault
classic
>>
>>52513986
haskell user detected

when is the last time you wrote useful software??
>>
>>52514070
What does that have to do with anything?
>>
>>52513819
>If the program has a runtime loop, or takes a long amount of time to run the type error takes longer to show
>mfw dynamic dumb fucks can't write programs that work so they just fire them off and look for errors
>>
>>52514206
What was said was not an advantage of static typing, just an implementation.
>>
>>52514206
he wasn't alone
>>
>>52514213
>imyplying that you don't have to run programs compiled from statically typed languages as well to look for errors
Sometimes I wonder how fucking retarded you even have to be to come up with an arguement like yours.
>>
>>52514226
He's saying that manifest/nominal typing are not disadvantages of static typing.

lrn2logic
>>
>>52514237
You literally just fucking said that you dumb cunt. I'm glad you stupid shits won't be allowed to program anything that touched the automotive field, my fucking job is secure.
>>
>>52513368
i'm no coding expert by any means,
but taking a property (.Result) of a function that returns something (getXX), is that the correct way of doing things?
>>
problem of static typing is not the syntax, it's the handcuffing of the programmer forcing him to think about types when its unneeded most of the time. also, it's shit for a dynamic language to be statically typed.
>>
>>52514273
First, that wasn't me.
Second, no, that's why you write unit tests.
And third, if your static typed program takes a long time to run there can still be errors that you didn't find.

The point is that you have to run the program for that long anyway. There is no way around it.
You not being able to grasp this simple thing makes me worry about the computers built into cars.
>>
>>52514334
dynamic typing + tests > static typing + test
>>
NEW THREAD!!

>>52514324
>>52514324
>>
>>52514304
>that's right, we'll do all the thinking for you, wouldn't want you to hurt your brain thinking about complicated things such as types
>>
>>52514364
Dumbass
>>
>>52514378
And that could be turned around to say static-typed languages baby you by forcing you to make sure your types are correct
>>
>>52514354
>>52514378
It doesn't fucking matter. How fucking hard can this be to understand.
Static typing helps one find a single type of error during compile time. It also adds an insignificantly small amount of forced documentation to the code (which is never enough for anything anyway). Whoop de fucking doo. This is nothing to the actual amount of problems that might actually be in the code. You have to run it and you have to write tests for it, the language you use doesn't fucking matter. There is no way around it. Making up stupid arguments makes you look like some fucking 20 year old "1337 hacker" who doesn't actually have a fucking clue about anything.
>>
>>52514364
too early faggot
>>
-----------------------------
PUBLIC PROGRAMMER SANITY ANNOUNCEMENT
-----------------------------

DYNAMIC TYPING is harmful. Do not use it.

Ordinary statically typed programming languages allow statements such as "x.foo()", which stand for invocation of method "foo" on a receiver object named "x".

This same statement, in a dynamically typed programming language, is NOT method invocation.
Instead it is the realization of 2 operations in sequence:
1) look up the value for "foo" in the dictionary of object "x"
2) apply the functional value to the list of arguments

The systematic use of such mechanisms is slow and prohibitive to reasonably efficient static compilation.

These languages typically run under virtual machines compiling just-in-time under unstable hypotheses, which may power so-called "fast" languages such as Javascript.

Compiling dynamically-typed programs is a part of execution which spends processing power into proving properties and reifying the dictionaries into efficient structures.
The CPU power and memory for JIT compilation is needlessly wasted, because the programmer has this knowledge as he thinks his program, and it would have required little effort for him to simply write it.

Therefore:
1) Use STATICALLY TYPED programming languages. Or, use a language of the LISP family: in LISP objects are actually objects, and not dictionaries. LISP can be statically compiled to efficient programs.
2) Do not use the harmful Objective-C programming language. Objective-C has static types, yet compiles its objects to dictionaries.

Do your part now and help to stop the proliferation of harmful programming languages in the Free and Open Source Software ecosystem.
>>
>>52514432
Haskell Curry and Bill Howard would like to have a word with you.
>>
>>52514432
k tard
>>
>>52514242
>He's saying that manifest/nominal typing are not disadvantages of static typing.
That's not at all what he was saying... He's saying structurally typed languages can have inference. I explained that type inference is not an advantage of statically-typed languages alone. And that the difference between statically and dynamically typed languages is still obvious unless the inference mechanism can perfectly infer the type of everything in a program, for every program. When it cannot determine the type of something the compiler requires the programmer to explicitly state it. On the other hand, a linter could be created for a dynamic language for inferred type checking of untyped source code. When it couldn't determine a type it would treat it as dynamic instead of requiring typing. So inference is not an advantage of static languages. Static checking is not anti-dynamic, requiring type unambiguity at every stage of the life of an object is.
>>
>>52514449
integer faculty(positive integer n)
return 5;
CODE CORRECTLY TYPED, MUST BE CORRECT, NO TESTING NEEDED
>>
>>52511965
If it's a toy program you might as well use python and PIL or pillow or whatever it's called... Another thing you could use is JavaScript.
>>
>>52514288
.Result() returns the value of the asynchronous task that gets the information.

It's exactly how it's supposed to be done, I could remove the .Result() if my method was asynchronous, but it isn't.
>>
>>52514432
when have you last done a large refactoring on a large code base in a dynamically typed language?
compare that to the amount of effort refactoring the equivalent code base in a statically typed language.
especially when refactoring, a lot of the errors are type errors. that's a whole branch of errors (and it arguably isn't small) that you do not have to write tests for anymore to ensure correctness, you can focus on the actual behaviour instead of writing tests for things that do not need to be tested for behavioural correctness, but for type checks.
>>
>>52509990
It depends on how the language handles the display of floats, they all have exactly the same issue
>>
>>52514524
>that's a whole branch of errors (and it arguably isn't small) that you do not have to write tests for anymore to ensure correctnes
You still have to do it. Just because the types were fine doesn't mean that the refactoring was okay.
>>
>>52514582
you cut that out of context.
to ensure correctness in regards to type errors, obviously you should still write tests for behavioural code.
>>
>>52514524
>you can focus on the actual behaviour instead of writing tests for things that do not need to be tested for behavioural correctness, but for type checks.
>you can focus on the actual behaviour instead of [...] type checks
Sounds like dynamic typing is right up your alley.
>>
>>52514622
And when you write those you automatically have type problems covered as well.
>>
>>52510615
I'm thinking when we get Swift 3.0, I'll start using that on Linux servers for web/API stuff.
>>
>>52513819
>Dynamic typing advocate is ignorant.
incredible stuff.
>>
>>52515250
>using meme languages
If you really want something like Swift for webdev, use F# with ASP.NET or Suave.io
>>
>>52514633
>Sounds like dynamic typing is right up your alley.
Dynamic typing is up no ones alley, except maybe idiots.

He's exactly right when he says
>you can focus on the actual behaviour instead of [...] type checks
with static typing. Dynamic typing means the programmers has responsibility of keeping track of these things instead.
>>
>>52514582
>Just because the types were fine doesn't mean that the refactoring was okay.
In a very wide scope of ways it does. So the amount of test you need to do if far less. I do not need to check i renamed everything properly, and didn't misspell a function anywhere, I don't need to make sure I changed all the code the refers to a function i changed the signature of was adjusted to work with the new signature. And of course I don't need to verify all the types I'm passing around are the ones that each piece of code is expecting. All this can be guaranteed by the compiler.

This is all stuff that can break in dynamic typing and it can take a lot of effort to have a high degree of confidence you didn't break something when refactoring reasonably large codebases.
>>
>>52513819
>Statically typed: int c = 0;
>Dynamically typed: c = 0;
>Which one takes more time to write? You must actually be dense...
Dynamic typing advocates

yes, they are actually this stupid.
Thread posts: 328
Thread images: 53


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