[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: 377
Thread images: 35

File: 1480590811928.png (389KB, 934x1000px) Image search: [Google]
1480590811928.png
389KB, 934x1000px
What are you working on, /g/?

Old thread: >>58793783
>>
Thank you for not using an anim-
>>
first for rust
>>
How bad for performance would it be if you used gc like mps on your C project and then called that library in you higher level language that has it's own gc?
>>
>>58799254
>no built in hashtable
>>
>>58799240
>being a doggorinoposter
>>
>>58799276
>being an animekinoposter
>>
>>58799271
>std::collections::HashMap
>>
File: 1483840168570.jpg (899KB, 1699x1653px) Image search: [Google]
1483840168570.jpg
899KB, 1699x1653px
>>58799240
Go back to /r/eddit, doggy.
>>
File: IMG_0067.jpg (1MB, 3000x2000px) Image search: [Google]
IMG_0067.jpg
1MB, 3000x2000px
>port project from attiny13@1MHz to atmega8a@8MHz
>multiplexing 7-segment-display is now smooth as fuck
feels good mang
>>
I'm going through a basic CUDA tutorial and for some reason it doesn't get faster when I increase the number of thread blocks. This code is straight from Nvidia's website without any modifications. I should be getting <1ms when profiling add but it's always around 3.5. I know someone here was asking about CUDA yesterday, maybe they know.. GTX 1080 btw. Bug with the card or is there an error in the code somewhere?

#include <iostream>
#include <math.h>

// Kernel function to add the elements of two arrays
__global__
void add(int n, float *x, float *y)
{
int index = blockIdx.x * blockDim.x + threadIdx.x;
int stride = blockDim.x * gridDim.x;
for (int i = index; i < n; i += stride)
y[i] = x[i] + y[i];
}

int main(void)
{
int N = 1<<20;
float *x, *y;

// Allocate Unified Memory – accessible from CPU or GPU
cudaMallocManaged(&x, N*sizeof(float));
cudaMallocManaged(&y, N*sizeof(float));

// initialize x and y arrays on the host
for (int i = 0; i < N; i++) {
x[i] = 1.0f;
y[i] = 2.0f;
}

// Run kernel on 1M elements on the GPU
int blockSize = 256
int numBlocks = (N + blockSize - 1) / blockSize;
add<<<numBlocks, blockSize>>>(N, x, y);

// Wait for GPU to finish before accessing on host
cudaDeviceSynchronize();

// Check for errors (all values should be 3.0f)
float maxError = 0.0f;
for (int i = 0; i < N; i++)
maxError = fmax(maxError, fabs(y[i]-3.0f));
std::cout << "Max error: " << maxError << std::endl;

// Free memory
cudaFree(x);
cudaFree(y);

return 0;
}


from from https://devblogs.nvidia.com/parallelforall/even-easier-introduction-cuda/
>>
I want to make a program that parses json entries and adds them to an xlsx document, skipping entries that are already in the list. I want to be able to build a static executable so I won't have to worry about runtime dependencies so I'd rather not use python/similar.

What's the best way of doing this, (apart from just extracting the xml, editing the file and then zipping it)?
>>
Anyone have that pasta about the guy who fills CD cases with jizz then bakes it and gives it to his co-workers as 'cake'?

Image of the jizzcakes, too, if you have it.
>>
>>58799760
it's too bad you need an executable because this task is trivial with python
>>
>>58799760
Where are you deploying it?
>>
>>58799791
I've never been happy with python in the wild. It either needs dependencies that are a headache or it needs 2.7 but the client has 3, etc. So I'm happy putting in a little extra work to make an executable that will work for basically ever without worrying about what is installed.

>>58799802
several peoples lap/desktops, including the elderly. Simple (for them) is key here.
>>
File: 1473405310611.png (138KB, 800x1050px) Image search: [Google]
1473405310611.png
138KB, 800x1050px
What's fast (in terms of execution speed) scripting (in terms of common acceptance) programming language?
REXX is dead as far as I know, isn't it?
>>
File: comf.png (12KB, 331x172px) Image search: [Google]
comf.png
12KB, 331x172px
Maximum comfy mode reporting in.
>>
>>58799831
>nano
Could use notepad.exe as well.
>>
>>58799830
LuaJIT my dude
>>
>>58799840
Sure, but nano supports syntax highlighting and linting.
>>
>>58799842
Isn't Lua embeddable language?
>>
>>58799849
How about mcedit?
>>
>>58799859
lua can be used as a application language.
>>
>>58799824
yeah python isn't good at a distribution (creating .exes)

>dependencies are a headache
pretty easy actually
`pip install -r requirement.txt`

>or it needs 2.7 but the client has 3
I think something like 94% of top 360 most popular packages work on Python 3 now. I've been using Python almost 3 years and have never had to use, or even encountered 2.7 in the "wild"

tl;dr
Just felt like saying this. I agree with you though - Python is not gonna work for your situation with the elderly. Good luck
>>
>>58799859
It's a great scripting language embedded or standalone, but it really shines when it's embedded.
>>
>string concatenation isn't overloaded +
Nice.

>>58799872
So, does it have something like CPAN for Perl?

>>58799944
That's what I am talking about.
I'm looking for standalone language, so maybe Lua doesn't suit for such task.
>>
I'm learning Ruby and after a few simple online "classes", I've moved onto Ruby Koans. I'm liking it more as I feel it makes me solve me owner problems and learn from mistakes.

I just did #154 the triangle project, here is what I wrote for it:
def triangle(a, b, c)
if a == b && b == c
:equilateral
elsif a != b and b != c and c != a
:scalene
else
:isosceles
end
end


Was my way of doing this pants on head retarded?
>>
>>58799285
B-BTFO?
>>
>>58799999
No, Lua is good standalone. It's just that it's even better embedded.
>>
>>58799929
>`pip install -r requirement.txt`

Yes, if they have pip installed and can use it. Otherwise you need an install script and then you need to worry about a whole lot more dependencies/edge cases.

>I've been using Python almost 3 years and have never had to use, or even encountered 2.7 in the "wild"

I've had to fuck around with it on my own machine various times enough for me to say that. Every time there is a python build script for a OSS project I clench my butthole until it finishes, because it seems they always fail. And then when I go to report the issue, there's one that's been open for over a year that's devolved into a holy war over the default python version. It's probably not everyone's experience, but it's colored my view of "easy" scripting languages.
>>
File: 1469909655550.jpg (17KB, 430x307px) Image search: [Google]
1469909655550.jpg
17KB, 430x307px
>>58799929
>I've been using Python almost 3 years and have never had to use, or even encountered 2.7 in the "wild"
And I spent two last years programming in Python 2.7 because there were not enough modules transitioned to Python 3.
>>
>>58799999

checked
>>
How much experience do you need to have with a programming language to put it on your resume?

The whole language proficiency thing seems like a meme considering every language does the same basic things and the only differences are going to be esoteric and minor (unless you're switching from say an imperative language to a functional one). It feels like you could get basic proficiency in a day at most. Is there something I'm missing in a programming language feature-set which would keep me from being proficient that quickly?
>>
>>58800085
>How much experience do you need to have with a programming language to put it on your resume?
None :^)
>>
File: What'.png (60KB, 575x635px) Image search: [Google]
What'.png
60KB, 575x635px
>>58799766
>Anyone have that pasta about the guy who fills CD cases with jizz then bakes it and gives it to his co-workers as 'cake'?
>>
>>58799999
>string concatenation isn't overloaded +
You should try Haskell, you can use ++ for list AND string concatenation. Or <>.
>>
>>58799999
Fucking wasted!
>>
>>58800085
>>58800096

Yep you can just lie and say you're proficient in 10 languages. It's what Indians do. Going on a rant here but my experiences have shown me that Indian guys do this all the fucking time. Either that, or they straight up cheat on their cert tests e.g. the CCNA.

Then when they're hired, they don't know anything and their coworkers have to deal with their ignorance and pick up their slack, it sucks.
>>
>>58799999 (checked)
lua's cpan equivalent is luarocks.
>>
>>58800167
Well maybe a better question would have been, how much experience SHOULD I have before I put it on my resume if I don't want to be an asshole?

Is it enough to know the basic syntax and a couple of their data structure implementations? Is there something complex about programming languages which you should make an effort to learn? Because right now I have a good amount of C++ experience and I feel like I could learn everything pertinent in, say, Java in like a day.
>>
>>58800085
>to put it on your resume
Basically you don't need any, but you should have experience unless you want to be a massive faggot like this guy
>>58800096
Anyways, give this a read: https://shakycode.com/the-story-of-the-fraudulent-coder-d4c6fcf273f7

>>58800096
>cheat on their cert tests e.g. the CCNA.
>CCNA
Dude, CCNA is used by teachers of low level IT related school forms just to give the students something to do.
Everyone just cheats on CCNA and other cisco tests, just to get good grades.
>>
>>58800045
Yeah like I said, python isn't gonna work for a senior citizen who doesn't know what a terminal is. Also pip comes installed with Python 3 now, and has done so for a few years.

I get the feeling you haven't used Python in a while. It's a lot better than it used to be as far as the 2.7 / 3 headaches

Now that I"m done defending a language (lol) I'll say yeah, Python isn't for you. Good luck with your project anon.
>>
>>58799999
If you need Lua for a standalone program then either run it directly in the standard lua.exe or make a simple C wrapper program that just starts the Lua VM and runs your script at startup, you don't have to adhere to any particular convention when deciding the boundary between your C code and your Lua code so chances are you can do it in 99% Lua just fine
>>
>>58800266
>I get the feeling you haven't used Python in a while. It's a lot better than it used to be as far as the 2.7 / 3 headaches


I had a script fail on me literally just last week (it was the build script for emscripten). But sure.
>>
>>58800232
>Well maybe a better question would have been, how much experience SHOULD I have before I put it on my resume if I don't want to be an asshole?
You should be able to program most basic applications without having to look up everything. Although having to look up stuff is common, as you may know.

>Is it enough to know the basic syntax and a couple of their data structure implementations?
Really depends on the job you want to apply for, I'd say.
If it's a junior developer that should be enough. Anything above should know more.

>Is there something complex about programming languages which you should make an effort to learn?
You can always specialize in frameworks for that language (for C# some companies ask for people with WPF knowledge, for example)

>Because right now I have a good amount of C++ experience and I feel like I could learn everything pertinent in, say, Java in like a day.
Just because you know one language, doesn't mean you can just learn another one in a day.
For this to be the case you should like 6+ languages that use different paradigms and implementation patterns.

Just my opinions...
>>
>>58800232
You could do it in tiers - e.g. list all the languages you know a little about, and maybe put your best languages in bold text. When asked about your list you can say "i'm comfortable with x language but I'm always looking to improve"

Or even add in what you're saying - "I'm a fast learner and comfortable learning new languages if need be"

Also I was joking before, definitely don't lie. That's like...the worst thing you can do on a resume
>>
File: steve_jobs_is_angry.jpg (98KB, 546x522px) Image search: [Google]
steve_jobs_is_angry.jpg
98KB, 546x522px
>>58800293
I'm tired of your smart mouth
>>
>>58800236
>Dude everybody cheats and lies, just do it!
lol no thanks. I'd rather know what I'm doing than be a scumbag.
>>
>>58800282
lua can be compiled with luac.
>>
i haven't done any real programming in almost 3 years, and i never got anywhere very far because I just took basic classes.

i used only java, and i probably remember some, but i'd like to try something new. why do people shit on python? it seems like it has a lot of resources, which is why i've been thinking about trying it out, but it's as bad as this board leads me to believe it is, i guess i'll find something else
>>
>>58800353
People here just shit on scripting languages. It's not bad for what it is.
>>
>>58800353
Don't let this board influence your decisions, it's meme & shitposting central.

Do independent research outside of this board to decide what language is for you. Also, different languages are best suited for different tasks.

Do you need to performance? Stay the hell away from Python. Do you need to get something done quickly and efficiently, that's easy to read and share with others? Try Python.
>>
>>58800340
>>Dude everybody cheats and lies, just do it!
Not really what I ways saying, but ok.
>>
>>58800350
luac compiles to Lua bytecode that saves a step during the loading of Lua programs (the Lua VM normally compiles your whole script file to bytecode before it starts running your script), it won't produce a standalone binary of your code
>>
>>58800236
>>58800307
>>58800312
Thanks for all the advice
>>
>>58800372
>Do you need to performance? Do you need to get something done quickly and efficiently, that's easy to read and share with others?
I want both.
>>
>>58800417
don't we all
>>
File: Screenshot_2017-02-04_20-14-19.png (384KB, 578x587px) Image search: [Google]
Screenshot_2017-02-04_20-14-19.png
384KB, 578x587px
Still reading through the 0.01 Linux kernel
>>
I'm starting my GPL-less C library that provides common data structures and algorithms. I'll either license it under zlib or MIT. Fucka you stallman-san
>>
>>58800649
learning anything interesting and/or new?
>>
File: 139035361828.png (190KB, 373x327px) Image search: [Google]
139035361828.png
190KB, 373x327px
>>58800649
>Deathconsciousness
>>
>>58800703
Nothing super surprising in particular, it's just fun seeing how some things are implemented. Might check out the 1.0 kernel when I'm done
>>58800713
Great album btw
>>
how do i unit test
>>
>>58800893
unittest
{

}
>>
spacemacs is comfy
>>
>>58800123
well a string is just a list of chars in haskell
>>
I've found a way to stay productive.
Just switch to tty and fire up that Vim and read PDFs from elinks
>>
>>58801009
Exactly. But you can use <> on Text and so forth.
>>
why do you guys hate Java so much? OOP makes your code easier to understand
>>
>>58801093
>OOP makes your code easier to understand
It also makes programmer suicide easier to understand.
>>
File: lol.jpg (9KB, 289x175px) Image search: [Google]
lol.jpg
9KB, 289x175px
>>58801093
>OOP makes your code easier to understand
>>
>>58801121
>>58801126
It makes more logical sense to classify things as objects in programming so they are relatable to the real world which makes much more sense to programmers
>>
>>58801141
Is that what your professor told you?
>>
>>58801141
It makes more logical sense to kill yourself when shoehorning objects into programming.
>>
>>58801141
No, it doesn't.

>abstract bean object factory factory implementor
This is because some jackass thought that it was smart to think of things in terms of objects.
>>
>>58801214
you guys still haven't given a clear reason to why it is bad and when I have made a real argument
>>
>>58801223
you still haven't given a clear reason to why it is bad to kill yourself and when I have made a real argument
>>
>>58801223
No, you haven't.
You've made an assertion "it's easier to think in terms of real world objects" with no justification.
This is plainly false in many scenarios, I even gave you an example - if you want any level of abstraction at all.
Abstraction is, by definition, further from real world objects.
Aside from performance and efficiency concerns, abstraction is generally considered a good thing in programming.

If you're dealing with arithmetic, does it make more sense to think of it mathematically or "as real objects"?
>>
>>58801249

Numbers are objects.
>>
>>58801398
Wrong
>>
>>58801434

Wrong.
>>
File: 1485547923673.png (429KB, 451x619px) Image search: [Google]
1485547923673.png
429KB, 451x619px
Can someone please tell how you can make a web app without a server?

Where people can just download it and use it client side only?

I have been try to learn make a game using a javascript front end and a C++ backend but I don't fucking have any information for how to do it.
Please help if you know
>>
https://github.com/groovy/groovy-core/blob/master/src/main/org/codehaus/groovy/runtime/ArrayUtil.java

Why
>>
>>58801537
You would need to have some kind of HTTP server because the browser needs something to talk to, but you could probably integrate it with your C++ backend code.

From a quick search, I found this: https://www.gnu.org/software/libmicrohttpd/

You could probably search around more and find better stuff as well.
>>
>>58801537
It's called Electron and it probably just grabs webkit or something
It's also bloat
>>
>>58799596
Nice clock bomb Ahmed.
>>
>>58801578
>This is a generated class used internally during the writing of bytecode...
>>
>>58799824
>>58799929
>>58800058
Why do we call it Python 2 and Python 3? It should be Python Stable and Python Unstable.
>>
File: 1313087574561.jpg (36KB, 493x468px) Image search: [Google]
1313087574561.jpg
36KB, 493x468px
If I made a new OS that was capable of perfectly emulating Windows, and the OS was Open Source and licensed under GPL3, would there be anyway for Microsoft to sue me because it is a perfect emulator of Windows?
>>
File: wrapper.png (38KB, 767x326px) Image search: [Google]
wrapper.png
38KB, 767x326px
>>
>>58800013
require 'set'

def triangle(a, b, c)
count = Set.new([a, b, c]).size - 1
sides = [:equilateral, :isosceles, :scalene]
return sides[count]
end
>>
>>58801537
Why would you use JS? Use Lua if you want a scripting language that badly, that way it will also be much easier to interface between the front and back ends.
>>
>>58801689
My thought process is that since I can use HTML with javascript, I can more easily do graphics.
>>
>>58801698
https://love2d.org/
>>
>>58801698
>graphics with html
>not svg
what did he mean by this?
>>
>>58801673
(You).unwrap
>>
>>58801709
Sorry anon I'm not literate in literally every single API in existence.

All I know is C++, Java, Python and JS
And only enough to solve problems on Project Euler. I have never made any actual apps and I really want to learn.
>>
>>58801650
As long it doesnt contains any code from Microsoft there shouldn't be any problem. Read this:
https://wiki.winehq.org/Developer_FAQ#Who_can.27t_contribute_to_Wine.3F
>>
>>58800013
Looks fine to me. This way you can easily use case statements:

case triangle(3, 3, 3)
when :equilateral then # do shit
# other two cases
end


Another way to do it is by separating each test into methods like equilateral?(a, b, c) and have classify_triangle call them and return the proper symbol. Thus you can test for only one type if that's all you need.

def equilateral?(a, b, c)
a == b and b == c
end

def classify_triangle(*arguments)
if equilateral?(*arguments) then :equilateral
# other cases
end


You could define an object that represents triangles and then have procedures so you could use them in cases:

class Triangle
def initialize(a, b, c)
@a, @b, @c = a, b, c
end

def equilateral?
@a == @b and @b == @c
end
end

equilateral = proc do |triangle|
triangle.equilateral?
end

case Triangle.new(3, 3, 3)
when equilateral then # do shit
end


Ruby is nice
>>
>>58800013
In Haskell this is just
data Triangle = Equi | Scal | Isos deriving(Show)
triangle x y z =
[Equi, Isos, Scal] !! (pred $ length $ group $ sort [x, y, z])
>>
>>58801773
>not using .
>not taking x y z as a list
>>
I don't know if any of you do much arduino, but it's basically c++ so whatever. I'm mildly new to it, and this function is messing with me.
bool avgReader(int r) {
bool isZero;
for (i = 0; i < r; i++) {
if (digitalRead(sens) == 0) {
isZero = true;
}
delay(1);
}
fin = isZero;
isZero = false;
if (fin == true) {
return true;
}
return false;
}


It's supposed to return a boolean, obviously, which gets printed to serial. However, it keeps printing '1'. Is there something wrong with it?
(r is usually 10, fin is predefined as a bool)
>>
>>58801808
>using a list
That's even worse than taking three arguments instead of a triangle object.
>>
>>58801141
Type classes model it better
>>
>>58801834
>not using type indexed lists
???
>>
>>58800649
How do you get started with kernel programming? I mean the latest kernel versions. Seems like an impenetrable subject.

I'm interested in making Linux-only programs that target the Linux system call interface directly and with none of this portability bullshit.
>>
>>58799607
what the hell is blockID and why is it not being passed to the add function?
>>
>>58801827
False is just the integer 0, and true is 1. This is how it is in C.
>>
>>58801611
the whole thing is lost since
>The purpose is the reduction of the size of the bytecode
yet they use java lmao
>>
>>58801622
It's actually just Python and Old Python
>>
>>58801141
I'm not even a huge OOP hater and this is completely the wrong idea
>>
>>58801873
This post doesn't make sense
You can't be saying that's the wrong definition of OOP, because that's literally what OOP is
But if not, why don't you hate it?
>>
>>58801141
"""""""""""""""""""""""""""""""""""""""""""""""""""""programmers"""""""""""""""""""""""""""""""""""""""""""""""""""""

Still, that precludes use for anything that doesn't have a real world analogue. How do you relate a linked list to the real world?
>>
>>58801858
but it's only returning 1, even when it should be 0
>>
>>58801891
OOP is just a different way to structure data definitions versus functionality. OOP makes ad hoc polymorphism natural and relies on it for abstraction. OOP can encapsulate state well for things that constantly have stateful interactions.
I don't adore it, but I don't think it's as bad as OOP likes to thing.

As for >>58801141, I would like to direct you to Dijkstra's "On the cruelty of really teaching computing science" and what he says about "anthropomorphic metaphors"
>>
>>58801858
wrong, 0 is false, any other value is true
>>
>>58801827
bool isZero = false;
>>
>>58801932
a true bool is 1
>>
>>58801932
C standard guarantees that boolean truth is equivalent to the integer 1. Retard.
>>
If bash most bash functions, like wc, awk, sed etc are written in C, why are bash scripts so slow?
>>
>>58801977
It really doesn't take very much thought process to answer this
>>
whats the best first programming language if you want to corrupt your mind
>>
I realized something.
Factories are basically just really obtuse freemonads.
Is OOP what you get when pajeets try to write functional?
>>
>>58802002
C++
>>
File: hipster fedora.jpg (18KB, 236x354px) Image search: [Google]
hipster fedora.jpg
18KB, 236x354px
>>58802003
FP is what you get when OOP is too mainstream
>>
File: job ad.jpg (148KB, 674x648px) Image search: [Google]
job ad.jpg
148KB, 674x648px
How hard would it be to learn:
>ASP.net
>MVC
>LINQ
>Qlikview
>PowerBI
>SSRS

I know some SQL (queries, etc.), and a moderate amount of VBA. I would like to make more money. Are the skills above transferable to other jobs? Is it in demand? I'd love to make $110/hr.
>>
>>58802044

dont learn shitty M$ layered error prone code, that's all i will say. Unless you want to be a sell out and work with poo in the loos
>>
>>58801994
well?
>>
>>58802072
Bash scripts are completely text based which is not very fast. I don't think they even have memory collection.
Bash scripts invoke programs which requires doing syscalls, forking and creating processing, reading executables, piping data around.
>>
>>58802057
>Unless you want to be a sell out

I want to learn skills that will make money. That's it. The job ads I see are a lot of PHP, .Net, JAVA, C#, etc. What do you suggest for skills to make more money? I don't care if that's "selling out". Unfortunately, all software can't be gnu and free. I wish it were, but that's how shit is.

>and work with poo in the loos

Well, that sucks, but it is what it is. Some of them are okay I guess.
>>
how could anyone believe that P=NP? maybe it's hard to prove P!=NP, i don't know what the proof would look like, but there are plenty of problems where it seems impossible for them to have a polynomial time solution
>>
>>58802161
Well you just assigned P to NP so now it is
>>
>>58802161
>how could anyone believe that P=NP?
Almost nobody does. Almost everyone involved with complexity theory is very sure indeed that P != NP, as sure as we are about (say) random facts in chemistry. We just don't know how to prove it.
>>
>>58802044
Not hard at all. You can learn that shit in a weekend. Realize how stupid that company is when they specified a bunch of specific language features and a framework as "required skills". What the shit?

Go reap that $100+ an hour. I know many people who's give a liver to make that much money for doing so little.
>>
>>58802202
>We just don't know how to prove it.
why do people never admit they have faith?
>>
>>58802210
>Not hard at all. You can learn that shit in a weekend. Realize how stupid that company is when they specified a bunch of specific language features and a framework as "required skills". What the shit?

You've got to be shitting me. I could download whatever tutorials (Udemy, etc.) I can find online to learn this shit, and be ready to go (for the most part) from day 1? Are these skills transferable to other jobs? Like if I know ASP.Net, does that mean I'll learn .Net as well?
>>
>>58802213
Because that'd inevitably lead to them admitting that most science around them is bullshit when it comes to asserting universal facts about the universe. It's uncomfortable. The more statistics, the more bullshit - this means healthcare is in trouble, especially evidence-based.

Even the start of the universe is bullshit. If one accepts that there really was a big bang (impossible to prove) then what caused it? Back to the root of the problem. Could've been God.
>>
>>58802161
The usual reaction to an NP problem is that it can't be optimized, even if that's not yet proven, so the belief that P!=NP is pretty widespread.

It would be incorrect to say it holds though until such a proof comes up.
>>
>>58802239
unless you luck out and they make a mistake or they're sorely desperate they're not going to hire you if you don't have decent skills and experience
>>
what is the largest applications you guys have made?

I will start an entire database project with many different functions to manipulate all the different sql commands in an enterprise database
>>
>>58802290
No, I understand that. I'm thinking long-term. Are these skills good to have and transferable to other jobs? Would I learn .Net in the process of learning ASP.Net?
>>
>>58802044
ASP.net is probably not bad, but a little dated. MVC is kind of a joke because it can mean many different things. LINQ seems like an ORM or something for the MVC.

The rest? Possibly difficult. I've worked in that industry (but not in the Microsoft part) for 10 years now. There are no good open source BI tools to learn from, and the industry is fraught with marketing bullshit that companies actually buy because tech illiterate people are in charge of these projects because they are the target audience of the software's output, and the tech people they put on it are generally web developers who have no idea what they're doing because BI is a completely different beast from web dev.

The fact that they're asking you to have SSRS, while saying they haven't picked a visualization tool is... amusing. They don't mention anything about their data warehouse, which is concerning. Then they don't mention how "pulling large amounts of data form their clients" is done, and that is even more concerning.

The most concerning thing is that they're listing a bunch of web development tools as requirements here. Anybody with the slightest understanding of what the visualization tools they're looking at using would know that creating that "portal" for "various KPIs" is entirely possible without any web development and can be done entirely with those tools.

I'd run. It seems like they don't know what they're looking for and the project will fail.

But yes, the actual skills needed to do the project they're describing is very in demand, very misunderstood and very lucrative.
>>
>>58802323
if you want to just make money learn Java it is the most in demand programming language everywhere you go
>>
>>58802354
this

java, C#, C++ would be good to know. web dev isn't my cup of tea
>>
>>58802343

Thank you. Quality post.

>the actual skills needed to do the project they're describing is very in demand, very misunderstood and very lucrative.

What skills and/or languages would you recommend to learn for the sole purpose of making money? What is in the most demand and pays the most?

>>58802354
Thank you. Is it the best paying? If not what other skills and/or languages are the most in demand and highest paying?
>>
>>58801680
I'm lost as to how this actually works?

I mean I tested it and it does but it's kinda blowing my mind.
>>
well really i'm trying to use python to begin understanding machine learning programming, or the theory behind it. Does anyone have any pointers to where i should start looking? I've searched online and found some youtube videos, but i want to hear some of yall's opinions
>>
>>58802239
Yes. All of those are just keywords that you can read about in an hour and be ready to understand whatever their "seniors" have written. In fact if you learn C# you'll master of them. It's a big but easy subject. Let's see:

>ASP.net

A big ass framework. Read a bunch of tutorials and MS documentation. Learn to think in its terms, where in the pipeline your code plugs in. Definitely the biggest requirement.

Legacy codebases can be pretty hellish by the way.

>MVC

It's just a really straigthforward way to organize your project. Controllers receive requests; in the process of responding, they ask models for data and render a view (JSON, HTML, etc) containing that data.

Just read about it.

>LINQ

It's just a language feature that lets you do SQL-like queries on collections of objects. It's really cool innovation from Microsoft.

You'll learn it as you learn C#.

>Qlikview
>PowerBI
>SSRS

A bunch of programs/tools. Read the manual.

You don't need Microsoft's blessing to learn any of this crap. They offer docs, simply make use of them. I learned more Java than my peers by simply reading Sun's Java Tutorials which had literally everything; coworkers didn't even bother to do that.

Just don't fool yourself into thinking you know it all. Keep learning. It's a never-ending hole; you can dig into ASP.NET deep enough that you reach HTTP. You can dig deep into HTTP that you reach the rest of the network stack, the OS. You can do the same for your database; you'll eventually reach the file system and disc sectors. It never ends, and is fun in a pure wizardry kind of way.

But to get through the door, you don't need to do that. Not immediately. Just know that basic stuff and keep learning once you're inside. You'll hit problems and learn new stuff as you solve them.

Learning is the only skill you really need, before getting the job, during the job and after.
>>
File: NVIDIA-GM200-Block-Diagram.png (1MB, 1800x1266px) Image search: [Google]
NVIDIA-GM200-Block-Diagram.png
1MB, 1800x1266px
>>58801850
it's the core block index. the block indices/dimensions/thread indices are handled by the nvcc compiler when add is called with tri angle brackets. they don't need to be passed to the function.
>>
File: 1486129763292.png (310KB, 655x977px) Image search: [Google]
1486129763292.png
310KB, 655x977px
HOW is it possible that a script can just calculate numbers like (pi*10**723624) * (e*10**6231) like it's nothing? It boggles my mind. That is vastly more than there are ATOMS in the observable UNIVERSE.
>>
If I post my waifu with a book will you shop SICP on it for me?
>>
>>58802595
maths
>>
>>58802444
Not him but it's really straightforward.

The Set class is essentially an array that will delete duplicates. So if you create a Set(3, 3, 3) you just get a Set(3).

The number of elements, once converted to 0-based indexing, maps directly into that array of symbols that's created in the 2nd line of the function. If there's only 1 element, then all three must have been equal. If there's two, then one must have been different. If there's three, then they're all different.

Based on the above, the function just returns the appropriate symbol.
>>
>>58802395
It can be broken down into a set of skills - to understand where you'd be going, I'd recommend reading Kimball's books for a start (http://www.kimballgroup.com/data-warehouse-business-intelligence-resources/books/) because they'd give you a history and framework for how the industry works. The books are a little dated in the assumptions being made about how a company works (small-mid sized businesses won't be able to use the "lifecycle" very well) but the way he describes facts/dimensions, ETL and data management is all still a good foundation.

You'll eventually see other tech pop up that doesn't fit into those ideas quite correctly - stuff like data lakes, streaming data, columnar data stores and whatnot. The reality is that they either fall into the concepts that come from that foundation, make an excellent addition to those concepts or are complete garbage with great marketing hype. To cut through those ideas, you're probably best off following Michael Stonebraker and reading the Red Books (http://www.redbook.io/) for some more-or-less unbiased opinions on the new hotness.

If you're looking for good languages, get real damn good with SQL from a normalized database and get into the differences that come about when you have a star schema when you read Kimball's stuff. ETL is usually done with python, Scala, Java or some proprietary shit, but it's not really that difficult to do - just interesting to orchestrate. Some people will try to convince you that you need some magical map/reduce shit to do your ETLs, or in general, but I'm not thoroughly convinced you need it for ETLs and people who say you should do it all the time, for other shit, drank the pre-data-lake-Hadoop coolaid and can be pretty much ignored at this point.

You should also know: this is an industry of really old men. I'm not quite 30, but I'm still the youngest in most rooms of people who do this kind of work by a good 15 years.
>>
>>58802595
HOW is it possible that a 4chan poster can just write expressions like (pi*10**723624) * (e*10**6231) like it's nothing? It boggles my mind. That is vastly more than there are ATOMS in the observable UNIVERSE.
>>
>>58802628
THANKS!

That makes a huge amount of sense is crazy elegant. For some reason until I tested it I kept thinking it was meant to troll me and would only return the 3rd value always, since I didn't really understand what Set was doing to the provided array.

Once I assumed it was meant to troll or trick me I lost sight of being able to understand it.
>>
File: 1363603457247.jpg (178KB, 1024x1024px) Image search: [Google]
1363603457247.jpg
178KB, 1024x1024px
>>58802659
>>
>>58802647
Thanks, I will look into those books. Where I was last (contract just ended), I was doing a lot of ETL from excel to SQL using Access as a mean to import data. Did a lot of VBA in excel to get the data formatted a certain way.
>>
How do you link and set up libraries like SDL on windows? I keep getting random errors even though I've copied the lib/include/bin into my mingw folder, what else do I need to do?
>>
>>58802676
It's cool. In Ruby it's common to be able to do things in many ways. It's encouraged. Keep experimenting.

Set is just a Hash dressed up as an array and with some cool set logic on top. Investigate Hash and its values method.
>>
>>58802721
post makefile or how you're doing it
>>
>>58802721
Fuck it: http://pastebin.com/dCMB8bJ9
I'm using visual c as my compiler, kill me, but it's pretty much the same you just have to use different options and switches with gcc/g++
>>
>>58802647
>data lake

Sounds like object storage
>>
File: 1486247675337.jpg (36KB, 482x427px) Image search: [Google]
1486247675337.jpg
36KB, 482x427px
>>58802766
>>58802792
don't even know how to use a make file
>>
>>58800893
(require rackunit)
(module+ test
(check-true pred)
(check-eq? a b)
...
)
>>
>>58801901
>How do you relate a linked list to the real world?
Links in a chain. That wasn't so difficult, anon.
>>
>>58801743
SVG isn't an API, it's Scalable Vector Graphics; an image.
>>
>>58802840
try this but with gcc/g++'s command-line options and your files
cl -I sdl\include -MD path/to/SDL2.lib path/to/SDL2main.lib src_file.c -o my_prog.exe
>>
>>58802812
It sure does. It's almost like companies that bought Hadoop's bullshit have machines sitting around with the Hadoop file system on them and are looking for some excuse to keep using them because managers would get fired and contracts would get broken if they didn't. Almost like a marketing team somewhere was given the task of finding a buzzworthy name for something that shouldn't be seen as complicated until Spark becomes more mature and, hopefully, useful in a way that people can justify new Hadoop/Spark installs and people can justify learning it.

It is actually pretty useful to be able to capture unstructured data (which is really data that has a structure, but hasn't been described to its storing system) when you don't know what it's going to be used for though - that way you have a history to work with when you do start wanting to use it.
>>
a linked list is just a directed acylic graph where each node only has one child
>>
>>58802840
Oh shit, and don't forget to copy over SDL2.dll into the same directory as your .exe
>>
File: 1462352367324.png (98KB, 632x593px) Image search: [Google]
1462352367324.png
98KB, 632x593px
>>58802897
>>58802920
>more errors
I think I'm gonna go back to java, this reminds me of trying to get something to work in linux
>>
>>58802911
Does it have to be acylic?

https://en.wikipedia.org/wiki/Linked_list#Circular_Linked_list
>>
>>58799607
Did you ask about bionic sort on a YouTube video recently?
>>
>>58802945
>java
Jesus christ anon, post what you're entering into the command line. We'll get through this
>>
>>58802945
>trying to get something to work in linux

It probably didn't work because you had no idea what you're doing and were trying to recite magic incantations to the terminal. Same problem here.
>>
>>58802911
The concept of a linked list is broader than what you've just said there. You've described a type of linked list. Not all of them.

Regardless. The common usage of the word linked list in programming lies in the way you access it.
>>
>>58802945
use a real IDE and a makefile not fucking visual C
>>
>>58802945
>more errors
This is the wrong way to view it. You should consider them different errors.
Not all errors are actual errors you will have to deal with either.
>>
>>58802952
Nope.
>>
>>58802993
Thanks for answering.
>>
>>58802982
He doesn't use VC, I do. And I just use the build tools and GNU make
>>
>>58803003
Anytime.
>>
>>58802907
Well I don't get it. You mean companies have something like an AWS data store full of stuff of all kinds and they can't write a program to scrape that shit?

I adventured in the land of object storage for non-commercial applications. I have 3 computers and 1 server in my home. I wanted to centralize storage so that I could just buy random devices and add them to the network to expand storage; none of this disk array management crap. Software like CEPH seemed like a dream come true, it even has a Unix-compatible FS on top. It just isn't that mature though; it doesn't quite have reliable checking and recovery tools last I checked.

I like hoarding data but well I use a lot of the stuff I have archived, be it for torrents or just personal viewing the content. I have comparatively a lot less "intelligence" data like statistics
>>
>>58802945
GOD DAMMIT ANON YOU GET YOUR CURRY ASS BACK IN HERE
>>
>just some testing
(function(num){
var func=arguments.callee;
console.log(num++);
func(num);
})(0);
>>
>>58802911
Well pretty much every single data structure is a graph of some form.
>>
File: 1443457389164.png (158KB, 633x564px) Image search: [Google]
1443457389164.png
158KB, 633x564px
>>58802956
>>58802961
>>58802982
>>58802991
>>58803024
I'm trying to use netbeans, the editor is telling me everything is fine but the compiler just keeps shitting unhelpful error text at me, build is pretty much just 'gcc -o main.o main.c'
>>
>>58803086
Post the errors goddammit
>>
>>58803086
Your first mistake was using an IDE when learning a new language and its building process. With that said, do >>58803113
>>
>>58803086
you need to link it with SDL
i don't know exactly how to do this on wangblows but try using the -lSDL2 flag and pointing it to sdl.h

it should look something like

g++ nigger.cpp -lSDL2 -o nigger.exe
>>
I'm making a >powershell script to detect duplicate files as I have many duplicates of my smug animus. It's working; I just need to refactor and add more featrues.
>>
>>58803158
But can it detect duplicates in different resolution and generally similar pictures?
>>
>>58803023
Imagine your marketing department wants to know how well a new campaign is converting potential customers. They're going to go and spam everybody with something slightly less intrusive than "grow your d1ck with Vi@gra" emails, and they want you to tell them how well they did.

If you weren't logging the behavior of those customers before, then you have no baseline to compare their future behaviors to, and you run into the shitty, statistically irrelevant "A/B testing for dummies who never took a statistics class" approach you see on blogs everywhere to determine "success".

The information you'd need to be capturing isn't obvious until the request was made - the data you would be capturing on how people were clicking around your site can be described, but there's a very specific set of those behaviors that you need to report on. Theoretically, they want to know that a marketing email pushed people to make purchases. When they make the request, if you've been tracking everybody's behavior up until that point, focus in on their purchasing behavior before/after and compare that with the actions they took on the email itself, to do some actual reporting.

This is an overly simplistic example, since looking at sales is a pretty damn obvious behavior that you can make permanent without putting it in a data lake, but that's pretty much the idea. Maybe something like advertising for feature usage would have been a better example.

"I can store data on this, it doesn't fit into a normalized data structure that would be needed to run my company, and I'm not yet sure why I need it" is the kind of data you'd put into a data lake.
>>
how did you guys get so good at programming?
>>
>>58803212
No, that's outside the scope of this script. It merely checks hashes. I plan to do another project that does check for similar images.
>>
>>58803219
>wear thigh-highs
>program in C and ASM
>install gentoo
>not shitposting on /dpt/
>work ethic
>>
>>58803219
Im not good at all, I just know how to google
>>
>>58803113
>>58803125
>>58803155
I fixed it, I was clicking the wrong linker/dependencies tab in the options
>>
File: 1450069459395.jpg (40KB, 639x747px) Image search: [Google]
1450069459395.jpg
40KB, 639x747px
>>58803255
>>
>>58799760

Autohotkey is your answer.

https://autohotkey.com/boards/viewtopic.php?t=627

https://autohotkey.com/board/topic/84150-can-i-edit-xls-and-xlsx-files-with-ahk/

https://autohotkey.com/docs/Scripts.htm#ahk2exe
>>
>>58803216
That's really interesting. I guess it explains why companies like to collect so much random data.
>>
>>58803086
try gcc -v <your parameters> instead, -v means verbose. try to find solution/problem/etc there
>>
>>58803263
love lain
>>
File: it-just-werks.png (250KB, 1920x1080px) Image search: [Google]
it-just-werks.png
250KB, 1920x1080px
>>
>>58803350
What are you hashing with?
>>
>>58803219
Program a lot. Listen to people who have shit to back up their claims of what are good ways to program. Consider their recommendations critically.
Dismiss suggestions from people who are working at such an abstract level they don't actually know what they're doing.

Works for almost anything I'm sure.
>>
File: [it just werks intensifies].png (3MB, 1920x1080px) Image search: [Google]
[it just werks intensifies].png
3MB, 1920x1080px
>>58803403
SHA-1
>>
used a char as the iterator in a for loop, never really thought to use that before

neat
>>
>>58803219
A lot of mistakes, practice, reading, and pleading.
>>
>>58803219
By thinking critically and challenging yourself. You can "Program a lot", but if all your doing is trivial shit, you're not going to get far as a programmer.
>>
>>58800649
What are these functions used for?
>>
>>58801698
>>58801743
Check out Raphaël, it's an easy to use JavaScript library that you can use to create SVGs.
>>
>>58801845
Just look up a list of syscalls, fcntls and ioctls for common devices and your set.

For example, to draw to the console as a framebuffer in Linux (same thing X did before DRM/KMS):
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <sys/mman.h>
#include <sys/ioctl.h>
#include <stdint.h>
#include <linux/kd.h>
#include <unistd.h>
#include <stdlib.h>

// Change to your consoles resolution and depth
#define FB_SIZE (1920 * 1080 * 4)

int main()
{
// Open the framebuffer device
int fbfd = open("/dev/fb0", O_RDWR);

// Map the framebuffer into our address space
uint8_t *fb = (uint8_t*) mmap(0, FB_SIZE, PROT_READ | PROT_WRITE, MAP_SHARED, fbfd, 0);

// Issue an ioctl to stdout (usually connected to /dev/tty[0-9] on a console)
// Put the console into graphics mode so that it stops drawing it's stuff over our stuff
ioctl(1, KDSETMODE, KD_GRAPHICS);

// Draw some random pixels
for (int i = 0; i < 60; i++)
{
for (int j = 0; j < FB_SIZE; j++)
{
fb[j] = rand();
}
}

ioctl(1, KDSETMODE, KD_TEXT);
munmap(fb, FB_SIZE);
close(fbfd);
}
>>
>>58803783
Looks like I broke the recurse funcitonality in my verify-files script. I'm too tired for this
>>
>>58803783
Sorry bud I didn't mean to (you) you
>>
>>58800013

If you are just taking in 3 side lengths, you are ignoring the case they can't form a triangle.


triangle(1, 2, 10) will return :isoceles even though it is not a valid triangle.
>>
>>58803783
Holy shit that's fucking BASED. I wanted to do something like this for so long! I never knew where to look so I never figured it out...

How does one add hardware acceleration to the mix? I hear the new OpenGL ES supports Linux KMS directly without any X or whatever. How would one make a program that would like run as soon as Linux is finished booting and start displaying graphics?

Another thing I'm trying to figure out is how to allocate stacks for threads. The clone syscall accepts a pointer for the new stack, but how does one get that pointer? I want to do it without having to use syscalls like mmap if possible. Basically I have small, aegmented stacks and need to allocate more stacks at well-defined points. Do you know of a way?
>>
Say something about Assembly.
Why are you not programming in ASM?
>>
>>58804045
why would you?
>>
am making 16 buffers for testing a specific telecommunication chip on fpga
>>
File: 1483429030734.webm (188KB, 694x480px) Image search: [Google]
1483429030734.webm
188KB, 694x480px
Still working on pong
>>
Asynchronous websocket chat server in the butifel C language
Will post link soon
>>
File: 9IaImpL.png (239KB, 632x472px) Image search: [Google]
9IaImpL.png
239KB, 632x472px
Did any of you watch the videos when you read SICP? Was it worthwhile watching them?
>>
>>58804324
the videos are critical to proper understanding
>>
how shit is boost?
>>
>>58804342
Nice, I only did the first set of exercises so I'll start watching them.
>>
>>58804132
Sounds interesting. Is this for your job?
>>
>>58804342
Not really.
>>
>>58804324
I've just started reading and they were already worth it. I can only imagine it gets harder.
>>
>>58804408
about the same level as your family
>>
>>58804507
The exercises are more important than the videos
>>
>>58804525
I don't think anyone will disagree.
>>
>>58804523
rude
>>
>>58804525
Should I do them in Haskell for extra /g/ cred?
>>
>>58804559
absolutely
>>
>>58804559
kys
>>
>>58804599
>not liking Haskell
you kys, nigger
>>
>>58804616
kys
>>
>>58804621
Should I use Stack or Cabal?
>>
>>58801680
What is the point of wrapping up such a simple function in some minor set cleverness though? Why not just write something readable like OP's code?
>>
>>58804627
stack with spacemacs + intero
https://github.com/syl20bnr/spacemacs
https://github.com/commercialhaskell/intero

works well on macOS/linux/windows
>>
>>58804627
I just use the hasklel platform. It's been working fine
>>
>>58804627
KCN
>>
>>58804657
>spacemacs
What's the theme called?
>>
>>58804657
note you only need to put
(haskell :variables haskell-completion-backend 'intero)

to your .spacemacs dotspacemacs-configuration-layers block to use intero (it can also be used with normal emacs clearly)

>>58804683
https://github.com/nashamri/spacemacs-theme
>>
>there are people ITT who think haskell isn't fucking garbage
>there are people ITT who actually use haskell
fucking retarded newfags
>>
>>58804657
>intero
is it better than haskell-mode for regular emacs?
>>
>>58804724
into the trashcan brainlet
>>
>>58804728
Intero is actually made with regular emacs firstly. Spacemacs is just a batteries included emacs with evil mode default and some other vim stuff.
https://commercialhaskell.github.io/intero/

I think it's nice
>>
>>58804750
kill yourself
>>
>>58804762
no u sepplesfag
>>
>>58804724
>2017
>still hasn't caught up with 90s
http://ropas.snu.ac.kr/lib/dock/HaHaJoWa1996.pdf
http://www.esma-artistique.com/admin/db.media/544c149c24ee9.pdf
gramps it's time to leave the 70s
>>
File: 1472270026310.jpg (56KB, 600x800px) Image search: [Google]
1472270026310.jpg
56KB, 600x800px
Studying for a functional programming final

gimme haskell problems pls
>>
haskell is trash

https://www.youtube.com/watch?v=V9SAnPVET7Y
>>
>>58804803
problem: you haven't killed yourself
>>
>>58804803
google some Type-Kwon-Do
>>
>>58804803
implement an interpreter for a simply typed lambda calculus
>>
>>58803219
Google the answers.
>>
Alright guys, I got the problem solved now, the only thing that doesn't work is that I don't know how to remove user inputed numbers, then add them to the correct place in the string. I'm supposed to take some user inputed string, encode it to numbers, then decode it back.

Please help.

Console.WriteLine("Enter a string: ");
string codString = Console.ReadLine();
i = 0;
for(char numb = 'A'; numb<='Z';numb++)
{
i++;
if (i >= 3)
codString = codString.ToUpper().Replace(Convert.ToString(numb), Convert.ToString(i) + " ");
else
codString = codString.ToUpper().Replace(Convert.ToString(numb), (0 + Convert.ToString(i) + " "));
}
Console.WriteLine("Encoded message: " + codString.Replace(" ", ""));


i = 26;
for (char numb= 'Z'; numb>= 'A'; numb--)
{

if (i >= 3)
codString = codString.Replace(Convert.ToString(i) + " ", (Convert.ToString(numb)));
else
kodString = codString.Replace(0 + Convert.ToString(i) + " ", (Convert.ToString(numb)));
i--;
}


Console.WriteLine("Decoded message: " + kodString.ToLower());
>>
File: CpZIRisXEAAvd09.jpg (53KB, 829x675px) Image search: [Google]
CpZIRisXEAAvd09.jpg
53KB, 829x675px
Can someone explain to me how you can know all the programming related tools, APIs and Frameworks that exist and are useful?

Like for example:
In Javascript you have a shit ton of stuff like:
Electron, React, Angular, Node, jQuery, etc
You have extension languages like SASS.
Then you have managers like Bower.
Then you have general frontend frameworks like Bootstrap and Foundation.
You also have stuff like Grunt and Gulp.
In html, graphics are called SVGs
Theres Jade, and MongoDB.

The point I'm making here is that there's all this fucking stuff with all these unique names that is worth knowing if you want to be good at programming. I don't understand how someone is supposed to know all of this stuff. How am I supposed to know that if I want to do a certain thing, I need to use this tool someone else made? How am I supposed to know that the tool exists and what its name even is?
I don't even fucking know what any of the stuff above is. I just know it exists because I have seen the names.

And that's for Javascript alone.
Does C++ have to deal with this kind of bullshit? What about Python? And Java?
>>
>>58805172
>Does C++ have to deal with this kind of bullshit?
Most certainly,

>What about Python?
Yep.

>And Java?
Of course,
>>
>>58805172
Don't think about frameworks before you can program properly.
It will make sense in time. Stick to the standard library for now.
>>
>>58805109
>Console.WriteLine
Stopped reading right there
>>
>>58805172
>what is google
most tools are fucking shit anyway, you should make something that fits your specific needs if you can
>>
>>58805172
>Can someone explain to me how you can know all the programming related tools, APIs and Frameworks that exist and are useful?
you learn whatever flavor of the year is. then it changes, and you learn that. after a few years you know all this shit
>And that's for Javascript alone.
because frontend web dev is bullshit
>>
>>58801009
unfortunately
>>
>>58805208
Would you help regardless?
>>
>>58802003
how so?
>>
>>58800893
http://www.gigamonkeys.com/book/practical-building-a-unit-test-framework.html
>>
>>58804803
Implement variadic functions.
>>
>>58800893
step 1. Use a strongly typed language which eliminates the need for 99% of unit tests
>>
>>58805342
It feels like using a factory is the precomputation phase of a freemonad. Like you describe class whose specific characteristics are described by which provider you use, or you create a function whose characteristics are described by the precomputation phase.
>>
>>58802003
>>58805539

not really
>>
>>58805553
Can you explain?
Maybe it's more like dependency injection is similar to a freemonad?
>>
Anyone who is interested in logic programming should read this:

http://spivey.oriel.ox.ac.uk/wiki2/files/logprog/logic.pdf

Thorough and incremental.
>>
>>58805556
a factory is basically just a collection of constructors
>>
>>58805556
Yes, dependency injection + lots of interfaces is perhaps the closest thing to free monads. I guess factories are part of that as an interface
>>
>>58805684
functions in general are dependency injection
the less you know the more is injected
including type functions (and foralls)
>>
>>58805704
Well, in functional programming everything can be expressed as a function, so... yes?
>>
>>58805725
i don't see what any of this has to do with free monads
>>
>>58805734
The free monad is uniquely determined by the interpreter function(s)
>>
>>58805753
in the same sense that any other data structure is
>>
>>58805756
Not really, in this case it is because a universal property
>>
File: minorities_britain.jpg (44KB, 620x381px) Image search: [Google]
minorities_britain.jpg
44KB, 620x381px
I'm learning about machine learning.

I get the algorithms, will be able to implement them. For example I get how neural networks work, back prop, the equations etc.

But is it considered cheating if I just use ML libraries, considering I will forget the details of the algorithms and will have to re-read them again?

Do you guys actually reimplement your AI algorithms or just use a library when you can?

picture unrelated
>>
>>58799206
Is there a better way to make a c oneliners?
echo 'main() {printf("Hello\n");}' | gcc -x c -; ./a.out

>works, but prints error
>needs a temp file (a.out)
>>
>>58806014
>but prints error
That's because of your implicit int, which is invalid in C99 and C11 (which gcc now defaults to).
But really, why would you need to write C like this?
>>
>>58806009
In Python this is just
import MachineLearning
>>
File: wtf.gif (1021KB, 235x156px) Image search: [Google]
wtf.gif
1021KB, 235x156px
>>58806014
>compiled one-liners
>>
>>58806014
echo 'main() {printf("Hello\n");}' | gcc -w -x c -; ./a.out
>>
>>58806061
top kek

>my program has errors
>solution: hide errors
>>
>>58806051
>>58806032
I'm just curious and thought this could be a neat way to do some quick tests or something.
>>
>>58806086
Most statically-typed compiled languages have a lot of rigmarole for writing programs properly, and aren't suited to writing one-liners at all.
>>
rustaceans report in!
>>
>>58806061
Thank you for playing Wing Commander.
>>
>>58806099
>compiled languages
there is no such thing
>>
>>58806250
"Typically compiled" then, you turbo-autist.
You don't see people running C interpreters particularly often.
>>
>>58806117
This is not an appropriate environment for you; we do not have an official code of conduct.

>>58806250
>not all fruit are thrown, therefore thrown fruit do not exist
>>
>>58806299
>You don't see people running C interpreters particularly often.
y tho?
>>
>>58806299
>You don't see people running C interpreters particularly often.
How does that change anything I've said?
>>58806304
it's simply impossible for a language to be """""compiled """"".
You really shouldn't be in a programming thread if you think "a language can be compiled" somehow leads to "it's a compiled language"
>>
>>58806321
Because running C interpreted loses a lot of its advantages.
>>
>>58799251
/thread
>>
what is meant by functions are data?
>>
File: 1484178855691.jpg (75KB, 630x551px) Image search: [Google]
1484178855691.jpg
75KB, 630x551px
>>58806330
>it's simply impossible for a language to be """""compiled """"".
Just because 'compiler' or 'interpreter' is a classification of implementations, doesn't mean you can't use the words as verbs applied to languages.

The fallacy arises when people try to *classify* languages as interpreted/compiled (i.e. use 'compiled' as an adjective).

That said, that's exactly what our idiot was trying to do. I just love seeing you turbo-autists go full sperg when you think you've identified a flaw in someone's thinking, without having considered the logic yourself.
>>
>>58806388
>doesn't mean you can't use the words as verbs applied to languages.
and I never said you can't.
>The fallacy arises when people try to *classify* languages as interpreted/compiled (i.e. use 'compiled' as an adjective).
which is exactly what i pointed out.
>I just love seeing you turbo-autists go full sperg when you think you've identified a flaw in someone's thinking, without having considered the logic yourself.
yeah, I love blatant shitposters like you too.
>>
>>58806403
>and I never said you can't.
>it's simply impossible for a language to be """""compiled """"".
This is what gave me the giggles.
>>
>>58806413
not only are you a shitposter but you also lack basic reading comprehension. your life must be pathetic
>>
>>58806413
even if we assume you can't read and can't tell the difference between adjectives and verbs, this is technically correct. you can't compile something which doesn't exist in digital form and we can't convert ideas to data yet.
you can compile text written in a language, sure. good luck trying to compile the language itself though.
>>
File: 1484944738532.jpg (35KB, 500x375px) Image search: [Google]
1484944738532.jpg
35KB, 500x375px
>>58806426
Actually, I'm criticising you in the same way you criticised >>58806299

Note that he said 'compiled language', when he meant 'typically compiled language', and you sperg'd out on him despite knowing what he meant.
You said 'it's simply impossible for a language to be """""compiled """""'' when you meant 'you cannot classify languages as interpreted vs. compiled.', and I have sperg'd out on you despite knowing what you meant.

Isn't this annoying and pointless? You tried to communicate something, and got the meaning across clearly, but you used phrasing that was slightly incorrect, and are being teased about it as a result. Is this irony?

>>58806447
Very true: I should have specified 'source code of the language' rather than simply using the word 'language'. See my points above for why I didn't bother.
>>
How do I start programming If every language is shit?
>>
New thread:

>>58806467
>>58806467
>>58806467
>>
>>58806468
>If every language is shit?
You stop listening to other people's opinions and just get started. Eventually you'll form your own opinions, which will be better than everyone else's because they're all wrong and idiots. Then you can post those opinions here.
>>
>>58806466
>when he meant 'typically compiled language'
do you mind sharing your mind reading technology? how does it work exactly? i'm genuinely curious
>Isn't this annoying and pointless?
yeah, your existence itself kinda is.
>and got the meaning across clearly
stop trying to pretend you know what I meant. you are clearly mentally challenged so there's just no way in hell you can tell adjectives from verbs. we know.
>but you used phrasing that was slightly incorrect
it was 100% accurate. if you really have this much trouble reading my sentence, try substituting the last part for "to be a compiled one".
>>
>>58806468
Just start with Python and move on to whatever you consider to be non-shit from there.
>>
>>58806495
>start with shit from the beginning
>>
>>58806493
>it was 100% accurate. if you really have this much trouble reading my sentence, try substituting the last part for "to be a compiled one".
Actually my phrasing means exactly the same as this: 'you cannot classify languages as interpreted vs. compiled.'
Notice how I understood what you meant because you were close enough, despite being wrong! Context helps.

I hope you enjoyed this explanation of why I am just as annoying to you as you were to that other dude :)
>>
>>58806515
If you think Python is shit, then absolutely. You can pick something non-shit when you've got the basics down and know what you want.
>>
>>58806519
>you cannot classify languages as interpreted vs. compiled
which is exactly what my posts were trying to convey. too bad you have trouble with basic English. maybe you shouldn't post here until you gain a better understanding of it? that should help you with not embarrassing yourself in front of 80 people next time.
>>
>>58806547
>it's simply impossible for a language to be a compiled one
This is exactly what you meant, and your frustration at having your poor choice of phrasing is lovely evidence of the same.
>>
>>58806574
>at having your poor choice of phrasing criticised
My bad.
>>
>>58806574
>and your frustration at having your poor choice of phrasing
the phrasing was accurate and anyone who is able to read and comprehend basic English sentences can tell you that. why did your family do such a shit job of educating you?
>>
File: 1484973457026.jpg (110KB, 497x640px) Image search: [Google]
1484973457026.jpg
110KB, 497x640px
>>58806596
Your phrasing, while ambiguous, left the meaning entirely clear from the context.

I'm just picking you apart on the former to draw a parallel with your behaviour toward our friend earlier. Are you enjoying it?
>>
>>58806624
get a trip mate
>>
>>58803350
Why keep the show's name in the filename for unnamed episodes? Its already in the folder, you're repeating yourself and risk hitting the path length cap.
>>
>>58806624
>Your phrasing, while ambiguous
it wasn't ambiguous in the slightest.
>I'm just picking you apart
you're so naive it's adorable.
Are you enjoying it?
yeah, i'm enjoying witnessing this level of delusional thinking and failure to comprehend basic sentences.
>>
>>58806660
>it wasn't ambiguous in the slightest.
It is important that you believe that, otherwise this doesn't work. I'm glad you're having such trouble as a result of meaningless pedantry :)
>>
>>58806673
>It is important that you believe that, otherwise this doesn't work.
that's not how reality works. i know this might be hard to reconcile but that's the truth.
>I'm glad you're having such trouble as a result of meaningless pedantry :)
I'm really thinking right now...
>>
I think I will learn Python because I wanna learn TensorFlow.
Are there any good books or website???
>>
>>58806707
Like I say, you can believe what you like. As I explained earlier, the point of this conversation was to make you jump through pointless hoops, while drawing a parallel with your treatment of our friend earlier. You've risen to this admirably.
>>
>>58806746
>Like I say, you can believe what you like.
yeah, that doesn't come as a surprise to me. that's what you've been doing your whole life.
>the point of this conversation was to make you jump through pointless hoops
who do you think you're responding to?
>your treatment of our friend earlier
i don't believe he was my "friend". do I know you?
>You've risen to this admirably.
is this a new meme?
>>
>>58806777
>yeah, that doesn't come as a surprise to me
>who do you think you're responding to?
>i don't believe he was my "friend". do I know you?
>is this a new meme?

None of this has anything to do with our conversation. Happy hacking, dude.
>>
>>58806807
that's not really a retort to my point.
>>
>>58806816
You didn't make any relevant points in >>58806777
You asked three questions and made a statement about me.

Did you want to talk about bananas, maybe? :)
>>
>>58806844
so you got mad over nothing? whoa, that can't be good for your health!
>>
>>58806868
So a yes for bananas, then? :)

Since you're now trying to talk about other things, I'm quite happy you've realised that these types of conversation are a waste of time - which was my original point.
>>
>>58806921
>So a yes for bananas, then? :)
please return to /r/gaming where you belong.
>I'm quite happy you've realized that these types of conversation are a waste of time
no, they aren't. did you not read the conversation?
>>
>>58806965
I've never been to /r/, but you seem to have given up here. Or did you want to talk about it some more?
>>
>>58806975
Yeah, I wanna talk about anime.
>>
>>58807012
Okay then. See you later!
>>
>>58807018
what sort of retarded question is this?
>>
>>58807027
That's not a question. So, pretty retarded, I guess.
>>
>>58807043
are you being retarded on purpose?
>>
>>58807056
See >>58807027
>>
>>58807068
refer to >>58807056
>>
>>58807082
>Okay then. See you later!
>what sort of retarded question is this?
I'll let you figure it out :)
Then you can refer to >>58807056
>>
>>58807099
look at >>58807012
>>
>>58807160
Oh, but I don't want to talk about anime.
And then you implied a statement was a question, which I thought was funny.
>>
>>58807188
why? let's talk about it. then you can talk about anything else
>>
>>58807212
Oh, but I don't want to talk about anime.
>>
>>58807228
why is that? please... let's talk about it?
>>
>>58807263
Because of this: >>58806921

Now that you're trying to change the subject, I'm happy that achieved my goal :)
>>
>>58807273
mind sharing your "goal"?
was this post also a part of your master plan?
>>
File: fOKizJS.jpg (254KB, 2048x2048px) Image search: [Google]
fOKizJS.jpg
254KB, 2048x2048px
>>58807376
>Since you're now trying to talk about other things, I'm quite happy you've realised that these types of conversation are a waste of time - which was my original point.

>see dude go full sperg on other dude for no reason
>go full sperg on him for the same reason
>becomes entrenched in quagmire of silliness
>explain to him what has happened and why
>gets so frustrated he starts trying to talk about anime instead
Woop.
>>
>>58807407
>this is a non argument
you're doing something terribly wrong
>>
>>58807458
It was never an argument, dude.
It was a pointless pedantry: as I explained, that was the whole point :)
>>
>>58807488
i was very much fucking with you. please calm down.
>>
>>58807708
>i was very much fucking with you. please calm down.
Now you're just paraphrasing me :)
>>
>>58807018
>>58807027
>>58807043
>>58807056
>>58807068
>>58807082
>>58807099
>>58807160
What the fuck is even going on in this thread
>>
>>58807727
everyone else with a brain begs to differ.
>>
>>58807767
>>58807756
See >>58807407

It explains it all fairly succinctly.
>>
>>58807780
my goal is to have people make offerings at the space alien trading post
>>
>>58807819
Cool, good luck with that.
>>
>>58807836
he says you speak to the space alien?
>>
>>58807932
Sorry, what?

I think you're well past 'trying to change the subject' here :)
>>
>>58807966
what do you think of the guy who crashed a cruise ship?
>>
>>58808043
Okay then. See you later!
>>
>>58808053
You like grapes?
>>
>>58808095
Yes!
>>
>>58808129
Actually, I retract that. What I meant to say was: >>58807407
>>
>>58808129
Plums?
>>
>>58808158
Yup :)
>>
>>58808178
got any fun tricks?
>>
>>58808378
Yes, I mimic people's impolite behaviour until they resort to farce :)
>>
>>58808411
none of this has anything to do with our conversation.
>>
>>58808452
Exactly! You've resorted to farce :)
>>
>>58808452
>>58808539
Welp, I hope you enjoyed the pedantry, Anon.
Thread posts: 377
Thread images: 35


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