[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: 335
Thread images: 43

File: &&.png (7KB, 272x130px) Image search: [Google]
&&.png
7KB, 272x130px
Previous Thread: >>55938046

What are you working on, /g/?
>>
First for C++ is shit.
>>
>>55946711
C++11 is actually good though
>>
>>55946747
>lying to anon
rude
>>
File: 1460899891386.gif (48KB, 2034x1491px) Image search: [Google]
1460899891386.gif
48KB, 2034x1491px
>>55946747
>>
>>55946752
Java is bad
it's not Java
it's not bad
qed
>>
>>55946796
>Can't even into basic logic
Jesus christ, Sepplesfags are retarded.
>>
>>55946809
Java === Bad
C++ =/= Java
C++ =/= Bad
>>
>>55946829
Yes, as I said, your logic is completely wrong.
"Denying the antecedent" is the particular fallacy, if I'm not mistaken.
>>

int get_version(int version)
{
if (version == 1)
return 1;
else if (version == 2)
return 2;
else if (version == 3)
return 3;
else if (version == 4)
return 4;
else if (version == 5)
return 5;
else if (version == 6)
return 6;
else
return -1;
}

>>
>>55946861
(λJava.
if (Java == C++) then Java
else (C++)
)(Bad)



->
C++
>>
Is nurses portable?
>>
>>55946796
Humans are mortal
it's not human
it's not mortal
qed

toop cake
>>
>>55946919
No, if they were portable they'd be called paramedics
>>
>>55946932
What about ncurses? Thanks autocorrect
>>
>>55946885
Excellent
>>
>>55946925
>is
>are
Dumbass
>>
>>55946885
for i in itertools.permutations("wew lad"):
print(''.join(i))
>>
>>55946885
I see you have a master's
>>
File: 83421.png (14KB, 203x248px) Image search: [Google]
83421.png
14KB, 203x248px
>>55946956
>''.join(i)
>''.
>>
>>55946970
I know bait when I see it, kys.
>>
>>55946991
>python
>everything is bait
>kys
could you be any more obviously from reddit?
>>
Why are types necessary? Why not just halt execution if no further reduction of an expression is possible?
>>
>>55946954
I don't know if 4chan is going to strip any of these symbols:
∀x(is_java(x) → shit(x))
¬is_java(a)
¬shit(a)

has exactly the same structure as
∀x(human(x) → mortal(x))
¬human(a)
¬mortal(a)
>>
>>55946954
Wew anon. Please teach me you logician ways. Is "is" haxxor-logic code for "this and only this"?

What is the square of opposition? What is the difference between "Every S is P" and "Some S are P"?
>>
>>55947012
But humans are the only mortals, anon.
>>
>>55946711
>be on 4chan
>see faggy /dpt/ filled with dev wannabes
>read their opinions
how's that career going, anon?
>>
FUCK GODDAMMIT THE WORST PART OF PROGRAMMING IS USING OTHER PEOPLE'S SHITTY CODE

WHY THE FUCK CAN'T THEY DESIGN THEIR APIS IN A WAY THAT ISN'T TOTAL DOGSHIT

I swear to fucking christ if I'm given the option of trying to adapt my shitty fucking coworker's code into a general-purpose API one more fucking time I'm going to go postal

Why are curryniggers so fucking obsessed with global state everywhere? It is impossible to detach this code from its context and I don't want to rewrite 5,000 LOC on my own time
>>
>>55947008
[spoiler]types aren't necessary[/spoiler]
>>
>>55947022
You can't just make assumptions like that in logic.
>>
>>55947012
>∀
dumbass

>>55947013
x is x means x is x
>>
>>55947008
They aren't necessary, but being able to actually reason about programs is nice.
>>
>>55947050
>>∀
>dumbass
Please elaborate, fuckwit.
>>
>>55947061
>I am Steve
>I am anyone called Steve
>>
>>55947057
You can reason about untyped code too.
>>
>>55947047
But humans are the only mortals, ever since they were cast out of Eden.
>>
>>55947090
>>I am anyone called Steve
∀x(steve(x) → x = me)

Idiot.
My statement said, "Everything that is java is shit".
>>
File: simplified for idiots.png (9KB, 461x454px) Image search: [Google]
simplified for idiots.png
9KB, 461x454px
>>
What's a good name for a functional wrapper for WPF UI? I'm giving >>55943561 a go.
>>
>>55947028
>Why are curryniggers so fucking obsessed with global state everywhere?
I thought Java discouraged global state?
>>
>>55947126
Exactly you fucking retard
>>
>>55947131
 wpf_ui_wrapper 
>>
>>55947105
Not feasibly. Without types, you can't use what you know about programs A and B to reason about a composition of A and B.
>>
>>55947131
CuckUI
>>
>>55947050
Yeah anon, you sure got me there with your inductive logic programming, if only I could "into unicode" as much as you could. I get what you're saying, Java IS shit in that they perfectly overlap and as a consequence anything that is not Java cannot be shit, yes. While your formal logic is spot on, your informal fallacies are off the charts as the many anons have tried to underline.
I recommend you get in a squatting position then rapidly snap into an upright position. That popping sound you will hear is the sound of your head being dislodged from your cavernous asshole.
>>
>>55947134
OOP encourages shared state.
Also, singletons are literally thinly veiled global variables.
>>
>>55947134
>one god object with 10,000 methods that all call each other
>no methods have any arguments, they're all fucking public void

It's hell.
>>
>>55947153
I have commited no fallacies and am guilty of no crimes save for the correct usage of the English language
>>
>>55947148
Those statements aren't similar at all, you fucking idiot.
Is there only one thing that qualifies as 'shit'?

Jesus christ, learn logic before you try to argue about it.
>>
>>55947105
>>55947150
Eh, maybe that's not quite the right way to go about saying this.

Types are a useful mechanism for reasoning about code, and internalizing them in the language lets the compiler act as a proof assistant.
>>
File: 1469116714414.png (98KB, 800x1029px) Image search: [Google]
1469116714414.png
98KB, 800x1029px
>>55947127
Nice informal fallacy fagtron, you sure convinced me with those hot opinions
>>
>>55947179
Learn English and then you might be capable of Logic

Java <-> Shit

Shitty quantification tier
forall x. Java(x) <-> Shit(x)
>>
>>55947188
>misunderstand basic english
>accuse opposition of 'informal fallacy'

The "informal" in informal fallacy is code for "argument I don't like but isn't really fallacious"
>>
#include <stdio.h>
#define kek(s,t,u,m,p) m##s##u##t
#define top kek(a,n,i,m,e)

int top()
{
printf("no main needed!\n");

return 0;
}
>>
>>55947190
>Java <-> Shit
The original statement did not say that.
I don't know how the fuck you would extrapolate that from "Java is bad".
>>
>>55947233
Java IS bad
They are one and the same

>>55947223
>only 2 levels of indirection
0/10
>>
>>55947243
>They are one and the same
>Java <-> Shit
So the only thing that is bad in the world is Java?
Fucking idiot.
>>
>>55947208
Your whole argument falls apart is Java is NOT indistinguishible from shit. You have yet to prove this. A sound argument is a valid argument in which ***each premise is true***. I sure hope you didn't waste learning all this in a bachelors or masters.
>>
>>55947272
>Java is NOT indistinguishible from shit
>>
>>55947278
Shit is isomorphic to Java.
>>
>>55946796
>>55946829
>>55946904
Lmao, fucking retarded currynigger
>>
Can someone help me with django?
I'm creating my first app, from django doc, 'pools' app.
This shit aint working.
mysite urls.py
urlpatterns = [
url(r'^polls/', include('polls.urls')),
url(r'^admin/', admin.site.urls),
]

pools/urls.py
from django.conf.urls import url

from . import views

urlpatterns = [

url(r'^$', views.index,name='index'),

]
>>
>>55947303
>make joke at the expense of Java
>called currynigger
>>
File: 1469310869749.png (458B, 391x391px) Image search: [Google]
1469310869749.png
458B, 391x391px
Build your own dreams, or someone else will hire you to build theirs.
>>
>>55947300
o :: shit -> java
o' :: java -> shit
(o, o') = (id, id)
>>
File: le_maymay_dawg.jpg (24KB, 369x500px) Image search: [Google]
le_maymay_dawg.jpg
24KB, 369x500px
>>55946704
I'm working on dockerizing a small Django blog. I've never done this, but I'm sold seeing how infinitely easy my deploys have become. inb4 deploy scripts. The irony is I still need some kind of basic install script in order to set up some packages (mainly Docker.io and Make). Momentarily all my Docker image building and running is being managed by my Makefile, but I would like to migrate that functionality to a Bash script. Any tips on writing Bash?
>>
>>55947350
>"dockerizing"
Literally why
>>
>>55947350
>reddit.jpg >but it's ok because le ironic name
>Django
That sounds like a web thing
You're not talking about web things, right?
>>
>>55947350
>Bash
write it in perl
>>
why do people on /g/ hate java
>>
>>55947329
you include('polls.urls') but the filepath is actually pools/urls.py
A pool is an artificially made body of water, a poll is the process of voting. Get it right
>>
>>55947380
Verbosity mainly
>>
>>55947359
xD
>>
>>55947380
have you used ANY language besides java?

You will quickly come to realize why java is a bad language
>>
>>55947380
Because they have taste.
>>
>>55947399
Maybe he tried Go

>>55947397
>>55947380
dear newfags

we're not going to explain shit to you every fucking thread you fucking cunts get the fuck out

no regards,
/dpt/
>>
>>55947413
>dear newfags
>we're not going to explain shit to you every fucking thread you fucking cunts get the fuck out
>no regards,
>/dpt/

fuck off you fucking NEET
>>
File: friendly advice.png (100KB, 715x611px) Image search: [Google]
friendly advice.png
100KB, 715x611px
>>55947436
>attacking NEETs
clearly you don't belong here
integrate or leave
>>
>>55947399
Pascal and C

Java is more usable than either
>>
>>55947444
top kek

come back to this thread when you have written a compiler to a programming language, or a fucking raytracer
>>
>>55947445
are you from the 70s? Start here

http://www.seas.upenn.edu/%7Ecis194/spring13/lectures.html

then
https://github.com/NICTA/course

install haskell platform (haskell.org) if on windows

You still have time to reach Satori
>>
>>55947356
Portability mainly, because I can just 'docker build meme/website && docker run meme/website -p 80:8080' and have it up on any leenux box that can get Docker, without going full autismo with some shit server provider about what kind of box I want

>>55947359
No, anon, it's not web things, I'm writting the backend; I know it's written in memethon, that /g/ dislikes, but whatever, this is a programming thread after all. Some other guy is writing the frontend

>>55947365
Should I worry about portability? Or is no sane provider gonna not have perl on their box. I guess you're right anon. If I am gonna be full autismo about "muh portability" I really should have considered sh, not bash
>>
>>55947495
Docker is a disgrace and immensely wasteful
>>
>Haskell will never be as performant as C++
>C++ will never be as comfy as Haskell
Why live?
>>
>>55947515
why don't you kill yourself then?
>>
>>55947528
i'm immortal
>>
>>55947512
We had to choose between Docker and a full blown VM for containerization / compartmentalization of the project. Docker is just Linux Containers on steroids. Yes, while more wasteful that a good deploy script I prefer it to a fucking VM
>>
>>55947565
Or you could just not fall for the containerization meme.
>>
>>55947580
Management fell for it. I don't care. I can work on my other shit while docker builds. What do you recommend for a good server deploy, anon?
>>
>>55947596
rsync
>>
File: frog.png (236KB, 1400x1400px) Image search: [Google]
frog.png
236KB, 1400x1400px
Daily reminder that windows is not open source because their code is a horrible mess and they don't people to see it.
>>
>>55947623
>>not wanting to rewrite your entire OS
>>
>>55947601
That's a genuinely good alternative, thanks anon. However, if I have multiple projects on the same dev machine, how would I go about isolating them then? Vagrant and the like is the same shit from a different asshole
>>
>>55947632
You... write them so they don't conflict? I'm not sure I understand the problem.

At my last company we had multiple different apps running on each of our blades, and we didn't use any sort of containerization or anything.
>>
>>55946704
Working on a hardware renderer abstraction library in C/C++, starting with DirectX and a little bit on Vulkan. Currently working on the Matrix and Quaternion library, SSE intrinsics of course.
>>
File: costanza newspaper.gif (2MB, 384x352px) Image search: [Google]
costanza newspaper.gif
2MB, 384x352px
>>55947484
>ask direct question
>don't get a direct answer
>instead get told to learn academic bullshit

is this incomprehension the reason why everyone here is stuck with 'hello world' and 'fizzbuzz'?
>>
I made a extremely basic pong clone.
>>
>>55947762
>tfw been programming for 2 years and i don't even know how to make something like this
>>
>>55946711
C++ isn't shit. It's the OOP methodology that's shit.

I can't rage enough at the autists who decide to, in proffessional long term products even to make thousands of files and put literally god damn everything in classes no matter what it is. They have absolutely no idea of what a virtual table pointer is yet still get amazed when a memcpy crashes and act as if everything that happens on the assembly level is 'just magic' and that makes my blood boil.

Modern C++ programmers act like they want it to be Java or C# instead but still talk shit about those languages because '''its not as good as C++'''.

Also fuck the STL.

Christ.
>>
>>55947674
I could have been more explicit. I just received some bullshit app written in python 2.4 with some quirky versions of some libraries. Luckily, all of that is hidden in an virtual-env. This month we were working on another bullshit python app that ran on 3.3 with some other shit. Sadly, it required odd versions of ubuntu packages for compatibility reasons so just chucking the python shit into a venv wasn't gonna cut it, the packages would bleed out system-wide so the team-lead and the autism squad experimented with linux containers. And here we are now where we had to choose between containing our projects with Vagrant or Docker. Docker had the added benefit that your contained dev space is also a valid 2-command deploy image. Our workflow is that every member of the team has 2-3 of these projects runnable on their dev machine and as such you can't crap it up (and after wipe it) with whatever bullshit packages the next app needs.
>>
>>55947702
fizzbuzz has never been done well
>>
>>55947793
I always end up messing up the collision detection math, everything works except for collision detection. I never understand why, and never found an actual solution to it.

Not that op btw
>>
>>55947795
Why don't you just keep your sanity and write C?
>>
>>55947795
C++ is shit, but compared to most languages it's amazing
but yes, C++ is not an OOP language but a multiparadigm language and the OOP bandwagon is trying to ruin C++ like it did C# and Java
>>
>>55947820
because i'm insane.
>>
>>55947820
Because the game industry uses C++ as a standard and I actually want to use some of the useful features such as thread local variables, templates or the beautiful alignas operator.
>>
>>55947623
And most open source OSes have good code? The Linux kernel is pretty impeccable, but I can't say as much for glibc or the GNU coreutils.
>>
>>55947879
what are templates use for?

never understood
>>
I am new to C.

I made a code that read a formated .txt and store strings in an array of strings (char *array[16])

I'm not sure but the 16 in this is the size of the array as in it's the number of variable, right ?
I'm allocating 1024k for every strings (they're description) so char *array[16] is the same as char array[16][1024], right ?

Also, i need to hold other descriptions in different arrays because they describe different things.
Is it retarded to use my code multiple times like a copy/pasta or should i make a function ?
Isn't it a bit tricky to return an array from a function? or can i return nothing and have my array filled with the descriptions from the text file just fine ?

(maybe i'll just have one big array and know exactly where the types of descriptions are stored)
>>
>>55947913
type generic libraries?
>>
>>55947563
iktf :(
>>
>>55947929
>*array[16] is the same as char array[16][1024]
No. The first doesn't specify that memory should be allocated for the array members.

>should i make a function?
No idea what your code is like, but if you are repeating yourself then yes, split it off into a function.

>Isn't it a bit tricky to return an array from a function?
No. All that returns is a pointer. As long as you know how big the array is, or pass that back as well then there is no issue.

>or can i return nothing and have my array filled with the descriptions from the text file just fine ?
This is the idiomatic way. Pass the array into the function, let the function fill the array by side effect, return nothing from the function.
>>
File: here.png (36KB, 1264x462px) Image search: [Google]
here.png
36KB, 1264x462px
>>55947913
This is an example.
>>
>>55947982
>not Matrix<4,4>::Identity<T>
>>
>>55947797
That sounds like hell.

I take it you can't put any pressure on the app devs to behave sanely?
>>
>>55947333
it was a retarded joke
>>
>>55947982
>system("pause");

When will people unlearn this.
>>
>>55948069
Yes, your "currynigger" post was a retarded joke
>>
>>55947982
Also, the register keyword is meaningless in C++.
>>
File: here2.png (19KB, 896x287px) Image search: [Google]
here2.png
19KB, 896x287px
Does anyone here by the way know of a more efficent way of doing an SSE dot product?

This is my current way of doing it.
>>
>>55947965
ty anon, i'm going to make a function without returning anything, for now it should be fine.

>The first doesn't specify that memory should be allocated for the array members.
it doesn't but if i allocate memory for each array members when i fill the array it'll be the same no ? *array[] is like array[][] ?
or does it mean i can allocate different memory for each array members?
I feel like i don't understand that part very well actually i'm going to search on it
>>
>>55948083
looks pretty efficient to me
>>
>>55948078
kys
>>
Haskell is the language of expert beginners
>>
>>55948079
just checked
deprecated C++17

>>55948096
I don't want to kiss you
>>
>>55947702
oh you are one of those people
ok here it goes
- java is needlessly verbose
- no Hindley Milner type inference
- it doesn't have typeclasses
- it doesn't have HKT
- it doesn't have GADT
- no pattern matching
- EXCEPTIONAL PROGRAMMING
- it's mutable by default
- It runs on a VM
- it's forced OOP
- horrendous syntax, can't even do partial application properly

And some more not mentioned. All in all you just can't express yourself properly in Java compared to other languages (like scala).


That first link is short, you should be able to understand haskell pretty quickly. Once you do you will see why the points addressed matter.
>>
>>55948137
>(like scala)
XD
>>
>>55948142
scalaz is a lot better than java
>>
>>55948137
kill yourself

>>55948148
literally being a memeing hipster fag
>>
>>55948148
Its typeclass hierarchy is better than Haskell's, too.
>>
>>55948160
>I looked at scalaz and couldn't understand it so it's bad
>>
>>55947380
/g/ is fucking retarded as shit and falls for ridiculous memes
>>
If I know how to program (sort of decently) in C++, how hard is the transition to C?

I'm thinking of picking up "The C Programming Language" to learn it
>>
>>55948205
why would you want to transition to C

it's not hard at all if you come from old C++
>>
Gotta love that 600 - 800 megabyte download just to get a haskell environment up and running.
>>
>>55948229
Are you a poor?
>>
>>55948229
Haskell Platform is ~229 MB
>>
>>55948061
We're in a weird state of making apps for new clients and taking up "maintenance" for Django apps that our shop wrote way back when. While we can enforce a One True Way for writing our own Django apps (and reuse the same cookie cutter container for any new project) by pure dev pressure, the maintenance for the shit apps written before we came is what's killing us; one of those bastards has dev-implemented wsgi spaghetti-code, others have no csrf for ajax requests and so on. Upstream, other dev are pants on head retarded and their shit gets passed on, yes. It sounds like hell because it is. The team-lead as almost had enough of their bullshit, and forced containers so that all the bullshit codebases don't turn into a bigger dumpster fire than they already are.
>>
>>55948214
It seems a bit more useful for lower-level projects I want to do. Plus, I heard the book is really good
>>
>>55948278
C++ is fine, use a C-style subset if you have to
>>
>>55948278
>It seems a bit more useful for lower-level projects I want to do
Unless you're writing a kernel or are working on some embedded platform, I would use C++.
>>
>>55947380
we don't
>>
>>55946704
I'm trying to make an ODE solver in Haskell.
>>
>>55948085
>does it mean i can allocate different memory for each array members?
Yeah, exactly. What you are saying when you say char *array[] is that you are allocating an array of char*, pointers to other places in memory where the string is actually located.

Like so:
array = | 0x01 | 0x0A | 0xCC |

memory:
0x00
0x01 p
0x02 l
0x03 s
0x04
0x05
0x06 k
0x07 i
0x08 l
0x09 l
0x0A
0x0B
...
0xCB
0xCC m
0xCD e
0xCE
...
>>
File: Tempest.jpg (31KB, 650x300px) Image search: [Google]
Tempest.jpg
31KB, 650x300px
Are there any tutorials to begin working with vector graphics?
>>
Is C# superior to Java?
>>
>>55948723
>Is _ superior to Java?
Yes.
>>
>>55948723
absolutely not. at best it's a matter of opinion and dependent on your use case.
>>
>>55948753
epic meme
>>
>>55947820
OOP features are useful, there are indeed data types that should be tied to some methods. A lot of the paradigm might be extremist and crippling, but there's parts of it that are legitimately quality of life improvements.

Oh and templates are fucking golden. They may produce a lot of code at compile time but their utility outweighs it greatly.

>>55947828
Pretty much yeah. C++ works best as simply C with Classes, templates, and function overloading; Not as another UML simulator.
>>
File: 060816-1657.png (1MB, 4000x2560px) Image search: [Google]
060816-1657.png
1MB, 4000x2560px
>>55946704
Reverse engineering Pokemon Go.

So many windows open...
>>
>>55948823
Windows 10 has multiple desktops
>>
>>55948714
you could "emulate" it in opengl, drawing a bunch lines will be extremely efficient since they're not taking up many pixels on the screen

http://www.codeproject.com/Articles/226569/Drawing-polylines-by-tessellation
>>
>>55948823
>madara

Is there a character that could even possibly EVEN TOUCH Madara Uchiha? Let alone defeat him. And I’m not talking about Edo Tensei Uchiha Madara. I’m not talking about Gedou Rinne Tensei Uchiha Madara either. Hell, I’m not even talking about Juubi Jinchuuriki Gedou Rinne Tensei Uchiha Madara with the Eternal Mangekyou Sharingan and Rinnegan doujutsus (with the rikodou abilities and being capable of both Amateratsu and Tsukuyomi genjutsu), equipped with his Gunbai, a perfect Susano’o, control of the juubi and Gedou Mazou, with Hashirama Senju’s DNA implanted in him so he has mokuton kekkei genkai and can perform yin yang release ninjutsu while being an expert in kenjutsu and taijutsu.
>>
>>55947381
as i said, i'm new to python/django
What do you mean by
>you include('polls.urls') but the filepath is actually pools/urls.py
What should i change?
>>
>>55948823
Yeah but what do you need htop for?
Also pls, you're just looking for response forgery, you'll never do anything with ida.
>>
>>55948992
when you ran django-admin startapp blabal you misnamed your app as pools instead of polls, you sould have a folder named polls, not pools, check you directory structure
>>
File: Selection_027.png (5KB, 421x23px) Image search: [Google]
Selection_027.png
5KB, 421x23px
>>55949051
>>
>>55949051
oh oh, i think i know why i fucked up :D
after looking at ss >>55949085
>>
>>55949085
>>55949100
OK, fair enough. If it still doesn't work show the error message, it speeds debugging tremendously.
>>
>>55948723
Yes.

Obviously not in absolutely every case, but generally yes.
>>
File: 060816-1732.png (536KB, 4000x2560px) Image search: [Google]
060816-1732.png
536KB, 4000x2560px
>>55949030
Ida is for hunting the Unknown6 response. As I'm not obviously going out, but capturing packets from my emulator (which runs the game fine).

htop too see what proc keeps eating up my resources and bringing the vm to a halt far too often
>>
Question:

can you do any kind of mobile development if you don't have a smartphone / iOS ?
>>
>>55949196
yes. You don't need a smartphone. You can use simulators.

But a real smartphone makes shit easier. How do you now have a smartphone? You can get a shitty second hand android for like $10
>>
>>55949186
invite me to your discord fammo
>>
>>55949196
at the very least you should have one or two physical devices if you want to get serious about it
>>
>>55949220
well, i use a flip flop phone, never had a smartphone in my life.

Guess i'll use my brother's phone
>>
>>55949220
This. VM-ing a smartphone will be taxing on your hardware if you don't have at least a decent dev box. So you can't slum around it either way.

>>55949241
Also this. Seconding the multiple device path. Developing with only one device on hand will blind you to multiple resolution layouts.
>>
>>55949260
>VM-ing a smartphone will be taxing on your hardware if you don't have at least a decent dev box.
I find it's not really that bad. The biggest problem is for android at least, little things behave different in the simulator. And it's impossible to gauge performance meaningfully in a simulator.
>>
>>55949139
hah, i had urls.py in polls/ and mysite, but that was root of app, urls.py needed to be in 'mysite/mysite'
>>
>>55949186
>>55948823
how does it feel knowing microsoft is seeing every thing you do on your windows 10 computer?
>>
File: 1462666392038.jpg (57KB, 415x440px) Image search: [Google]
1462666392038.jpg
57KB, 415x440px
>>55949324
>some microsoft employee is having to watch every single smug reaction picture I download or upload
>>
File: 1.png (22KB, 631x68px) Image search: [Google]
1.png
22KB, 631x68px
when was the last time a method described your life?

pic related
>>
>>55949339
>more
go on
>>
>>55949301
Good to hear you got it working anon, yeah, the "master" urls.py redirects to the other. Also, theDjango namig scheme is retarded, where $projectname is both the name of the whole project and the name of the file containing the configs and wsgi, but you get used to it.

>>55949339
Well, at least I have an id
>>
How does I make a GUI in HTML for my desktop app?
>>
What programming language should I learn in 2016?
>>
>>55949386
Electron is nice
>>
>>55949386
https://github.com/nwjs/nw.js
>>
>>55949396
Haskell
>>
>>55949396
F# of course
>>
>>55949410
kek
>>
>>55949417
try Haskell and you'll forget about F#
>>
>>55949324
how does it feel knowing that nobody cares about what you're doing on your linux computer?
>>
>>55949398
>>55949405
No Javascript please. I said HTML.
>>
>>55949410
ahahahah
>>
File: 64d0.jpg (14KB, 640x320px) Image search: [Google]
64d0.jpg
14KB, 640x320px
>>55947819
>>55947793
>>55947762

literally followed this udemy tutorial
>https://www.udemy.com/join/login-popup/?next=/course-dashboard-redirect/%3Fcourse_id%3D387820

>look mom I made a game all by myself!!1!
>>
>>55949434
i don't even use linux, you nerd
>>
>>55947819
>everything works except for collision detection

are you retarded lmao? you literally just need to check if the ball is in the same place as the paddle, how hard is that?
>>
>>55949428
Haskell is religious garbage. F# is for getting shit done.
>>
>>55949435
You can't make a functional UI in HTML without backing it with JS.
>>
File: 640.jpg (14KB, 640x320px) Image search: [Google]
640.jpg
14KB, 640x320px
>>55949516
>F# is for getting shit done.
>>
File: fizzbuzz.png (24KB, 735x314px) Image search: [Google]
fizzbuzz.png
24KB, 735x314px
>>55949516
Trust me, I was THE /dpt/ F# shill
>>
>>55949371
Do you find django good for building RESTful services and dynamic websites?
What would you say php vs python?
>>
>>55949530
Why not?
>>
I got my hand on TIS-100. I'm also looking up embedded systems, since seems to be what I would enjoy the most. Will TIS-100 help me learning assembly?

The first thing the game tells you is to print a manual. I must admit, I was aroused.
>>
>>55949533
I've looked into Haskell. It's cool. But it makes it painfully hard to break out of purely functional code when it's better for your project to do so. That's what's so retarded about it for real work imo.
>>
>>55949569
>But it makes it painfully hard to break out of purely functional code when it's better for your project to do so. That's what's so retarded about it for real work imo.

Just make all functions IO functions.
>>
>>55949540
because you can't?
>>
>>55949540
Because HTML only properly supports JavaScript as a language.
>>
>>55949583
But HTML has nothing to do with Javascript. I'm looking for a way to design the GUI in HTML, nothing else.
>>
>>55949582
like I said, painful. In F# i can very easily use pointers, classes, mutation etc etc as I need to. If I want to port a C++/C# code base to F# it can be done line for line without any big issues and I can make stuff functional as I see fit. Haskell tries too hard for purity.
>>
>>55949626
>painful
Not at all. Just affix IO to all the result types.

>pointers, mutation
IO, IORef, NativePtr, etc.

>tries to hard
You mean tries at all.
The advantages are great and people are just too used to being able to do side effects wherever they please.
>>
>>55947495
don't ever use bash on web dipshit, not even backend
>>
https://m.youtube.com/watch?v=Bxcz23GOJqc

What did he mean by this?
>>
>>55949653
It's because they're babby-tier programmers, mouth breathers. Anesthetists who still use ether because they don't understand modern anesthetics. Would you trust a doctor who swears by medieval medicine?
>>
>>55949670
>that i've already popularised
even if it's true, kind of a shitty thing to say
>>
>>55949536
I guess it depends on the scale of your REST service, you could get away with something smaller like Flask if your project is not too big. Django itself is good for REST, its like a Perl server, only I can still read what I wrote a month ago.
However, I would not advise the usage of Django for dinamic websites. Django was made for request-response. Last time I checked, there was no support for server push (like you would use in a messaging app) so unless all you need is ajax I would stay away.
If you know php and don't know Python + Django, it's gonna take a long time to get something off the ground, stick to php. If you know Python, learn Django.
I couldn't tell you much compared to php. I left the php train way back when it was a dumpsterfire, all memes aside, I hear it's workable nowadays if you get a decent framework, but I wouldn't know.
>>
>>55949658
Calm your autism, it's for the deployment script only. The backend is pure python, I'm not stupid enough to glue some shit up in bash for the actual server.
>>
Please explain to me monads. I have a basic grasp on functional programming already but I want to feel smug and superior to everyone on /dpt/.
>>
>>55948755
>it's a matter of opinion
i.e.
>I'm a huge cowardly faggot and can't take a stance on anything
>>
>>55949653
Hmm, maybe I'll look into it more. Every haskell programmer i talk to here makes a big deal about being locked into purity being a good thing.

I probably won't use it seriously simply because F# targets so many platforms that I use. Games, Mobile apps, cross platform desktop, servers etc and has an excellent library ecosystem.
>>
>>55949792
Watch the video in >>55949670, it explains what monads are, among other things.
>>
>>55949799
Java does generics better than C#. Parametricity is a good thing. A shame it allows instanceof and reflection
>>
>>55949792
effects that depend on effects
side-effecting computations
contextful computations
>>
>>55949836
>Java does generics better than C#.
huh? How so?
>>
>>55949850
Type erasure is a good thing.
>>
>>55949752
Rest service that i want to "edit/upgrade", has ~100 users, every user is making about min 300-400 requests per day.
It is made in php and number of users is increasing
I wanted to build it in other lang so i can see if it will work better, but cant really decide in which one
>>
>>55949859
Why?
>>
>>55949799
C# is shit, more so than java but people with their shitty opinions may disagree
>>
>>55948278
don't listen to these people. C++ knowledge is a good entry into C, and that book (the second edition at least) is extremely good. Doing C will not just teach you the language but since you'll have to use OS APIs to do some extra stuff, you'll also learn some POSIX from using it (or win32 if you're a masochist).
>>
>>55949865
It stops you from cheating and being dishonest.
>>
>>55949889
Are you being serious?
>>
>>55949875
c++ maybe the greatest language ever.
im serious
>>
If I know python does that make me a programmer?
>>
>>55949836
Java's """generics""" is absolute dogshit. Because it was tacked on later, it's all erased at compile time and replaced with downcasts to Object.

But that wasn't my point anyway. I wasn't saying anything positive or negative about Java as opposed to C#, it just pisses me off to see people say "it's just a matter of opinion" or similar to cop out.
>>
>>55949915
No, it makes you a coder
>>
>>55949792
i look on them as types with meta data on top that is used to change execution
but i am no expert i am just functional n00b
>>
>>55949923
>it's just a matter of opinion
Every programmer who's ever said this to me regarding programming langugaes is shit tier. Especially with clear cut cases with Java and C#.

Of course it is a matter of opinion ultimately, but most programmers who point it out are doing so to hide the fact that they can't explain the advantages of one language over the other.
>>
>>55949925
thanks for clearing that up
>>
>>55949895
Yes. Suppose you have a function with the signature

T first<T>(T a, T b)


With type erasure, the function can't cheat and change its behavior based on the values of its arguments.
>>
>>55949952
kill yourself, there are plenty of subjective reasons to prefer one over the other, e.g. one might prefer the "comfiness" of C# while another might prefer the "strictness" of java
>>
>>55949925
Would scripter be a good description?
>>
>>55949971
I strongly disagree with any characterisation of C# as comfy.
>>
>>55949960
>With type erasure, the function can't cheat and change its behavior based on the values of its arguments.
It can't do that without type erasure either. Do you know what type erasure is? Type erasure is just the absence of run time type checking.
>>
>>55949971
what's it like having the IQ of a woman
>>
>>55949987
"babby" would be better
>>
File: turbo_c_borland.jpg (10KB, 460x246px) Image search: [Google]
turbo_c_borland.jpg
10KB, 460x246px
What was your 1st language anons?
>pic mine
>>
>>55949971
I don't disagree. That doesn't contradict anything I said.
>>
>>55949864
Yes, Python *can* go faster than php, just like Java *can* go faster than php, as long as you optimize it out the ass. I don't have experience with making REST going fast, you'll have to look around for benchmarks and the like.
>>
>>55950000
If you have type information at runtime (necessary for runtime type checking), you can inspect the values.
>>
File: FizzBuzz.png (13KB, 578x461px) Image search: [Google]
FizzBuzz.png
13KB, 578x461px
>>55950011
>>
>>55949991
it's "comfy" in the sense that python is "comfy", i.e. absolutely disgusting. just the other day someone characterized C# as comfy as a good thing.

>>55950001
kill yourself idiot
>>
>>55950021
only on the object on the heap. The type the references refer to is lost after compilation.
>>
>>55949897
This.

C is like the red power ranger, C++ is the white one that has a special suit and appears on special occasions.
>>
>>55950045
C++ is a stitched-together Frankenstein's monster that is only barely kept alive by artificial life support and in constant agony. We should put it out of its misery.
>>
File: just hold it in.png (676KB, 480x549px) Image search: [Google]
just hold it in.png
676KB, 480x549px
>>55949859
>can't create an array of generic types
JUST
>>
https://archive.rebeccablacktech.com/g/thread/S55910998#p55915025

the opposite of this statement is equally true, i.e. that C# is subtly worse than java in a million little ways. hence, if you want to claim C# is better, then at best it's a matter of opinion and dependent on your use case, you can't make an objective case to explain why C# is better than java in absolute terms.
>>
>>55950030
says the faggot who keeps insisting on calling programming languages "comfy"
>>
>>55949897
I agree, but it's not the comfiest.
>>
>>55950131
why do you think i put "comfy" in quotes? it's just the lingo that faggy shitlang (python, C# etc) users are using.
>>
>>55949897
this. java and C++ are literally the best programming languages.
>>
>>55950148
>>55950132
I'm using it since 3rd year of high school, that is like 7 years. You can make magic in C++ if you want.
Java is ok too, i find it a bit slow, but it is better then other meme languages.
>>
Move over fa/g/gots. Emoji lang is obviously the best programming language around. It runs on top of the ruby virtual machine so you know it's good. The only reason you would knock it is that your gahnew/leeducks free as in antifreeze terminals still don't suport coloured svg fonts.

fizzbuzz.emoj

1
100
15 0
"fizzbuzz"
3 0
"fizz"
5 0
"buzz"



1


>>
File: le pointing penn.jpg (116KB, 1516x892px) Image search: [Google]
le pointing penn.jpg
116KB, 1516x892px
>>55950240
>>
I'm trying to use LD_PRELOAD to do some game skidding but the game I want to mess with is written in python. How would I go about loading my own results from random numbers? Do I substitute random_random from Python's underlying C?
>>
>>55950011
Unfortunately, Java
>>
>>55950240
Wow that's a pretty minimalist language
>>
File: (17KB, 248x319px) Image search: [Google]
17KB, 248x319px
>>55950240
Image for reference
>>
File: 1461388282016.png (736KB, 1050x870px) Image search: [Google]
1461388282016.png
736KB, 1050x870px
>>55950351
Absolutely disgusting.
Glad I can't see the text version.
>>
What are you currently studying, /dpt/?
>>
>>55950365
your mom's pussy
>>
>>55950085
C# is better than Java. It's the JVM that is better than the CLR.

C# has keywords that are contextual, enabling LINQ in a really nice syntax. C# has better support for using legacy DLL's that were made for and by other languages, even enabling the user if he wants to. You can have properties that are a language construct, not having a get/set using 'standards' that can mean nothing. C# enables you to pass a reference and have 'out' parameters in functions, so you can return more information.

Really, maybe the only thing that Java has over C# as a language is its enums.
>>
>>55950011
Python, but just for small stuff. Then x86 assembly using MASM, for reverse engineering and creating cheats for games.
>>
File: 1448669112662.jpg (3MB, 2560x2880px) Image search: [Google]
1448669112662.jpg
3MB, 2560x2880px
>>55950375
damn doode
>>
>>55946932
LOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOL!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
>>
File: Untitled.png (121KB, 1597x807px) Image search: [Google]
Untitled.png
121KB, 1597x807px
Im making a script to chop up a image into blocks. Right now I have it just changing the color of the pixels so i can see how its working. what I cant get to work is the horizontal axis to chop up every 10 pixels.
>>
File: carlos.png (272KB, 560x560px) Image search: [Google]
carlos.png
272KB, 560x560px
>>55946932
>>
>>55946932
KEK
>>
File: BICKsDxCAAAcvXl.jpg-large.jpg (137KB, 768x1024px) Image search: [Google]
BICKsDxCAAAcvXl.jpg-large.jpg
137KB, 768x1024px
>>55947515
Learn Rust and use that when you need performance. You have ML constructs (Option/Maybe, Either/Result), typeclasses, lambdas, first-class functions, abstracted loop constructs (map, folds, etc), and so forth.

Use Haskell when you can be 100% comfy.
>>
>>55950728
Rust is shit and nowhere near compares to Haskell
I'd rather use C++ than Rust
>>
File: pooInTheLoo.jpg (22KB, 325x326px) Image search: [Google]
pooInTheLoo.jpg
22KB, 325x326px
>>55946885
>>
File: 1450579257106.jpg (96KB, 800x437px) Image search: [Google]
1450579257106.jpg
96KB, 800x437px
>>55950738
Very convincing argument you have there, "it's shit!!!!!"
>>
Reminder to optimize your micro-optimization habits.
>>
working on some website to showcase research my lab is doing. pretty boring, mostly just django templating.

thinking about doing some project eulers or something in le maymay functional haskell
>>
reminder to thoroughly micro-optimize all your fragment shader code
>>
>>55946704
[code
if(1==1){
print("OP is a faggot");
};
[/code]
>>
>>55950011
>C
but i think pascal is better for learning first
>>
>>55950787
syntax error: Line 1: ya dun gooft
>>
>>55950756
>micro-optimization
pointless shit that makes code harder to read and doesn't affect run time at all?
>>
>>55950787
>if(1==1)
nice language
>>
>>55950754
You're the one that has to convince me you stupid faggot
>>
>>55950809
Hence why I said to optimize it.
>>
>>55950787
>Can't even use code tags
>>
File: yablewit.png (218KB, 500x374px) Image search: [Google]
yablewit.png
218KB, 500x374px
>>55950787
>>
>>55947793
Nigger there's no excuse for this unless you dropped out of high school and can't into math as a result.
>>
>>55948085
> i'm going to make a function without returning anything
Even though you'll probably get called a Pajeet by the functional autists here, this is really quite common practice in C.
>>
>>55948714
A high school education anywhere outside of India
>>
if( programmer.getName().equals( "Pajeet") ){
programmer.moveTo( Places.STREET);
programmer.poo();}
>>
>>55950919
What about Pakistan?
>>
sql boys
Do you think it makes sense to add an extra column on a table wich is the concatenation of 3 other columns to have a speed trade off at the price of space?
>>
>>55950928
>object oriented programming
>not Pajeet status
>>
>>55947028
FYI your code probably also sucks to modify. Part of the game friendo
>>
>>55950928
>.equals
>methods

OOP IN LOO
>>
>>55947512
>Runs docker hello world container once
>"Docker is immensely wasteful"

/g/
>>
File: 1260799623812.jpg (62KB, 435x450px) Image search: [Google]
1260799623812.jpg
62KB, 435x450px
>>55951050
>>
>>55950991
Only if the speed gain is significant. Redundant data in a database is a bad idea generally.
>>
probably a dumb (C++) question:

if m is a object of MyClass (a templated custom class)
and MyClass has a member variable "map<char, T> theMap"
is there any way to have decltype(m) always return map<char, T> rather than what it normally would return
>>
At what point did people who wanted to be original or otherwise actually contribute to threads and boards on 4chan get replaced by idiots that can do nothing but aimlessly repeat catchphrases, often in wildly meaningless circumstances, and without any kind of wit?

>>55951078
>is there any way to change decltype
No
>>
File: 1385450568758.gif (2MB, 308x214px) Image search: [Google]
1385450568758.gif
2MB, 308x214px
>>55947512
>I haven't extensively used or even briefly researched X.
>Regardless, here's my opinion on X.

/dpt/ in a nutshell
>>
>>55951090
When normies from reddit went to the mainstream boards and then spilled into lesser known boards.
>>
>>55951121
>>55951057
>no actual refutation
>>
>>55951212
There is nothing to refute.
>>
>>55951212
>"it's shit"
>No it's not

What were you expecting?
>>
>>55951234
Nothing else really, just lazy devs whinging. Docker is a crutch for bad programmers
>>
>>55951248
In what way is it a crutch, anon?
>>
>>55951248
Extremely useful tools are crutches now?
>>
>>55949792
Read 'Notions of Computation and Monads' by Eugenio Moggi.
>>
How do I SICP, when Scheme is not a thing anymore?
>>
>>55951305
1) Implement your own LISP
2) Read SICP
>>
>>55951248
I imagine you're the kind of person who thinks high level languages, libraries and frameworks are signs of weakness as opposed to a necessary part of productive development.
>>
>>55951323
Can't really, but is Racket compatible?
>>
>>55951386
yep
>>
>>55951305
SICP is a meme. Read PPP.
>>
>can't use inline asm when targeting x64 in visual studio
why?
>>
>>55951335
Not at all, there is a world of difference between libraries and containerization.
>>
>>55951688
I know your pain :( Separate .asm files sadly
>>
>>55951524
What is PPP?
>>
>>55951705
Pajeet's Poogramming Pocketbook
>>
>>55950819
I don't give a fuck what you end up doing. I've already pitched reasons why Rust is a good choice versus C++, you've said nothing because you actually know nothing.
>>
>>55951705
http://www.stroustrup.com/programming.html
>>
>>55951740
No, you've given the same shitty false features that all non-functional languages are giving these days.

>option result typeclasses lambdas fcfunctions map fold

C++ has all of those.
>>
Linking new bread since its retarded OP didn't do so: >>55951615
>>
Absolutely retarded question here, but is there an order of operations guide to C programming or anything? I thought that the modulo operator took prescedence over the addition operator since it's essentially division but apparently I was wrong and now my program's fucked because of it.
>>
>>55951305
Scheme anyway queer, once you're done with SICP moving to other lisp dialects (like Clojure)
>>
>>55951932
http://en.cppreference.com/w/c/language/operator_precedence

Almost 2 seconds on Google.
>>
Haven't used C++ in forever (haven't really programmed anything meaningful in a while either), damn this shit is cool
#include <iostream>
#include <string>

using namespace std;

int main() {
int a = 10;

string names[] = {"Bob", "Billy", "Harryman", "Keller", "Jeniffer", "Julie", "Augustus", "Winston"};

auto isa = [a](auto arg) -> auto { return arg == a; };

auto printNamesThatStartWith = [names](char letter) -> auto {
for (string name : names) {
if (name[0] == letter) std::cout << name << std::endl;;
}
};

puts(isa(5) ? "yes" : "no");
puts(isa(a) ? "yes" : "no");
puts(isa(10) ? "yes" : "no");


printNamesThatStartWith('J');

return 0;
}


no
yes
yes
Jeniffer
Julie
>>
typedef struct _Data {
uint16_t a;
uint8_t b;
} Data;

std::vector<Data> src;
std::vector<uint8_t> dst;

How can I copy the contents of src to dst with std::copy? I'm not sure how to cast this.
>>
>>55951688
not even with x64 asm?
>>
Get in here fagits
>>55951615
>>
File: QYcaDFv.jpg (32KB, 258x259px) Image search: [Google]
QYcaDFv.jpg
32KB, 258x259px
I got a $25 gift card to Barnes and Noble using my good boy points. What are some books on more advanced subjects in Java that someone can recommend (e.g, machine learning using Java) or other languages if you think Java is a shit. (I use it because my University prefers it)
>>
File: explain this bullshit.jpg (59KB, 471x694px) Image search: [Google]
explain this bullshit.jpg
59KB, 471x694px
>have vector vec_1
>push vec_1 into vector of vectors, big_vec
>push item into vec_1
>doesn't get processed
>instead, push item into big_vec[0]
>gets processed
>>
>>55952868
>write code with faults
>call it the compiler's fault
/dpt/ will defend this
>>
>>55951248
Lazy devs or devs who actually want to spend time adding functionality to a product and not waste time writing masturbatory environment setup scripts that add no value?
>>
>>55952166
That "isa", is that a lambda?
Thread posts: 335
Thread images: 43


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