[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: 321
Thread images: 22

File: CfZiWjQW8AAbYUW.jpg (127KB, 600x863px) Image search: [Google]
CfZiWjQW8AAbYUW.jpg
127KB, 600x863px
What are you working on, /g/?

Old thread: >>59661245
>>
>>59666918
First for D
>>
Rust Or Bust
>>
>>59664980
Reposting.
>>
>>59666941
rust is a meme
>>
>>59666941
>ree why won't more people use rust?!
>*sounds of rust devs not making it work well with VS*
>>
doing some ML on tensorflow-python for my dissertation for school. pretty much babby ML but good enough to graduate with
>>
>>59666941
rust is a joke
>>
Working on my idea web app in Elixir
it's a surprise
>>
>>59666977
Just state your project next time. Someone one is going to come along and say
>Python
>>
File: TiVrXyf.png (13KB, 822x389px) Image search: [Google]
TiVrXyf.png
13KB, 822x389px
>>59666918
>mfw visual studio adds botnet to my binaries
what's your excuse to use this shit instead of Clion in 2017?
>>
>>59667020
>what's your excuse to use this shit
name a better C++ IDE for windows
>>
>>59666918
Working on a WPF app for my dad's business.
I'm trying to make it so TextBox's are generated dynamically based on an ObservableCollection<string> of categories, but I'm stuck on how to populate the TextBox Text with the information in the object selected from a ListBox. It's trivial to do it in the codebehind of the view but I'm trying to stick to MVVM as much as possible.
>>
File: 1490917817524.png (525KB, 842x1000px) Image search: [Google]
1490917817524.png
525KB, 842x1000px
Rust is the future of software development
>>
>>59667020
the telemetry is only present when you compile it for debugging

the telemetry keeps stats of crashes, errors and other shit from running binaries. These stats can be viewed under the Application Insights tab
>>
>>59667064
Only if you're a tranny
>>
>>59667073
>Le Rust is for SJWs meme
>>
>>59667064
real functionals will, rust is a phase.
>>
>>59667069
>telemetry is only present
>telemetry
>only
>IN MY FUCKING BINARIES
just kys
>>
Explain dependent types and provide an example
>>
>>59667109
>Explain dependent types
https://en.wikipedia.org/wiki/Dependent_type
>provide an example
Of what?
>>
>>59667100
it is for debugging. your running binaries can let you know what is going on without the burden of running inside a debugger

>telemetry is bad cuz that is what nsa uses for keyloggers n snit
>keyboards are bad cuz that is what nsa uses for keyloggers n shit
>>
>>59667109
a type made from a value
>>
>>59667095
>"I'm not a SJW, just a progressive liberal feminist"
>>
>>59667148
who "makes" the type?
>>
>>59667109
_<_ : Nat -> Nat -> Prop
Array : Type -> Nat -> Type
index : Array A n -> (i : Nat) -> (i < n) -> A

You can read this as:
< is a predicate on two non-negative integers
Array is a type family (type constructor) taking an element type and a non-negative integer length
index is a function taking an Array of As of length n, a non-negative integer i that is less than n, and returning an element of type A.

When you see (x : A) -> in a function type (there is similar syntax for pair types), it's a dependent function since the next type can DEPEND on x.
>>
>>59667155
you define it.
>>
>>59667178
Yes, "define", not "make".
>>
>>59667151
but I want to genocide all feminists and sjws.
Doesn't stop rust from being a good language.
>>
>>59667064
The future of software development is speed and ease of use for the developer. Till Rust develops a good standard library it will not be the future.
>>
>>59667187
are you the 1/0 = 1 guy?
define and make are synonymous in this context.
>>
>>59667099
Haskell will never take over anything, and nor will any pure FP Lang.
They are just too slow.
>>
>>59667190
you also want to wear knee socks and sit on a mans lap tho
>>
>>59667198
Rusts stdlib is already better than C++'s
>>
>>59667208
Tell me why you think pure FP means slow.
>>
>>59667216
>Implications
>>
File: dpt.jpg (164KB, 800x1000px) Image search: [Google]
dpt.jpg
164KB, 800x1000px
There's the simple test for a programming language. If you can make a search engine, a driverless car AI, a mobile OS and a browser using the language, the language and its paradigm are not worthless. If you can't, the language is a /dpt/-tier useless shit.
>>
>>59667207
>are you the 1/0 = 1 guy?
Not that I'm aware of.
>define and make are synonymous in this context.
Make is a retarded word to use in this context. Types don't get "made".
>>
>>59667209
No I don't.
I despise traps and trapfags.

>>59667222
>Uninformed opinions
>>
>>59667229
>Implications of uninformed opinions
>>
>>59667221
>Haskell
>>
>>59667237
Pure FP is much more than Haskell.
>>
>>59667208
Well Haskell wont because its already ded from not starting with dependent types and not enforcing a real standard. Or it will just become the new C with a million flavors.

The future looks brighter for FP though. Its only just gotten a resurgence, but already well on the way to superiority. The fact that pure FP gets rid of exceptions and the imperative mentality of debugging errors.
>>
>>59667225
hey, man
someone made a sorta useful user interface layout thingamajig for Linux using Haskell
it basically meets all your criteria right there!
>>
>>59667260
>tiling wm
>useful
>>
>>59666941
This
>>
>spent hours on a sudoku solver
>4 nested for loops
>2nd loop keeps randomly incrementing by 1 and fucking up my algorithm
WHY WHY WHY
>>
>>59667472
Remove the extra y++ you have somewhere that isn't in the for loop declaration.
>>
>>59667520
>y++
I think you mean ++y.
>>
>>59667536
>>59667520
Any well made soduku solver will use recursive functions anyway
>>
>>59667472
Check if variables named in for loops are as expected.
>>59667536
Any sane person uses y++ in for
>>
>>59667546
Recursion is an inefficient meme
>>
What is everyone's thoughts on Ada?
>>
>>59667520
I compiled with -O2 and suddenly the random incrementing is gone.
I don't know where it could be coming from.

>>59667551
Here's the whole function, there's no way l could be incremented randomly.
unsigned i, j, k, l;
for (k = 0; k < pz->size; k += 3) /* 3x3 box */
{
for (l = 0; l < pz->size; l += 3)
{
int lut[9] = { 0 };
for (i = 0; i < 3; i++)
for (j = 0; j < 3; j++)
lut[pz->arr[k+i][l+j]]++;
for (i = 0; i < 9; i++)
if (lut[i] != 1) break;
if (i == 9)
box++;
}
}
>>
>>59667561
She was pimped out by Babbage and didn't actually write anything on her own.
>>
>>59667558
Not if you are using it for a Sudoku solver.
>>
>>59667585
What does sudoku involve that would make recursion a suitable solution?
I can understand that there are some situations where recursion would be the best solution, but it's still a massively overused and masturbated over meme.
>>
>>59667558
Tail recursion is elegant and as efficient as loops.
Bad recursion means stack overflow.
>>
>>59667161
Thanks, very helpful. I'm slowly learning. Would haskell be fine for playing with this or should I jump to Idris?
>>
>>59667607
Because the idea of sudoku is many small puzzles coming together to form a huge puzzle. (no repeating numbers in a row, no repeating numbers in a column, solving a number results in other puzzles having another piece). The point of recursive is breaking down a large problem into smaller problems solving them and then putting it all together again. That is soduku
>>
>>59667615
Tail recursion is just an ugly and inelegant way of looping.
Go back to writing your recursive fizzbuzz
>>
>>59667642
>recursive fizzbuzz
it's funny because you'll never see output unless you restrict the domain
>>
>>59667472
use a language with vectorized operations and free yourself from that madness
>>
>>59667636
Ok, I understand that
I just hate it when people use recursion as a substitution for loops.
>>
>>59667567
>lut[pz->arr[k+i][l+j]]++;
If I had to guess it would be from this.
>>
File: 62e964c2f924cc9d2c8200013f86cba0.jpg (615KB, 848x1200px) Image search: [Google]
62e964c2f924cc9d2c8200013f86cba0.jpg
615KB, 848x1200px
Does it make sense to use libraries in the STL for basic usage? For instance, using std::vector and std::strings because they are safer and more convenient than using array pointers.

It feels weird using those stuff when using a language for runtime efficiency.
>>
File: bad-smell-plugging-nose.jpg (48KB, 500x333px) Image search: [Google]
bad-smell-plugging-nose.jpg
48KB, 500x333px
Have you guys noticed you can actually tell from a distance, someone who primarily codes using OOPs principles?
>>
>>59667899
Unless you really need the runtime efficiency i.e. working in/with big data, just do whatever is easiest.
>>
File: 1479577002186.jpg (72KB, 720x690px) Image search: [Google]
1479577002186.jpg
72KB, 720x690px
how the fuck do i understand tensorflow or machine learning at all?

ive been hitting my head against a wall for weeks and i just wanna make ai that can play video games
>>
>>59667921
I can also actually smell an unhirable NEET over the internet.
>>
>>59667927
i'm trying to get into that stuff too but no luck
>>
File: babycar-5.jpg (43KB, 500x417px) Image search: [Google]
babycar-5.jpg
43KB, 500x417px
I'm working on dealing with the debilitating alcoholism that comes with living at home, working two jobs, and making under 50k a year.
>>
>>59667927
>>59667945
I thank my lucky stars I have a math background, and this exciting topic is fairly difficult to just "black box" (at least with any kind of consistent results). Suck it, losers, review your maths.
>>
>>59667960
i'm >>59667927

i am starting college soon after years of neetdom, going into mathematics for the purpose of AI - is this something you would reccommend?
>>
>>59667951
get your priorities straight my man
I work 10 hours a week and earn about $40k
but even if I only made $20k, I'd still only work 10 hours a week
having free time is more important to me than money, and I don't care where I live

this whole
>LOL He still lives with his parents!
meme is literally 'the man keeping you down'
only sheep fall for that
>>
>>59668002
Is what something I'd recommend? I'll suggest, don't have the outlook of studying math for the purpose of AI, or some specific purpose, because you might get bogged down by feelings of "why do I care about generating functions (for instance), it's not related to my interests"

The mathematics involved in most AI/ML in common use you will have in your 2nd or 3rd year. You can get very far with basic linear algebra and multivariable calculus. Don't fall for the meme of lin alg coming "after" calc, there's no explicit dependency on calc and it's great to start lin alg as early as you can if you're doing anything CS related. That's my advice. Oh also don't be a sperg, and take some "soft" classes, they will surprise you, even in how they inform your main interest (for instance, maybe linguistics)
>>
pure dchar switchCase(dchar c)
{
import std.ascii;
return !c.isAlpha ? c : c.isLower ? c.toUpper : c.toLower;
}

void main(string[] args)
{
import std.file : write, read;
import std.algorithm.iteration : map;
import std.functional : partial;
import std.array : array;
(cast(char[]) "test.txt".read).map!switchCase.array.partial!(write, "out.txt");
}


Reads a file, switch the cases of all letters, and write to an output file
>>
>>59667633
Haskell doesn't have dependent types, Idris does.
>>
>>59668049
>this whole
>>LOL He still lives with his parents!
>meme is literally 'the man keeping you down'
>only sheep fall for that
This. It's a core component of guaranteeing wage-slavery.

Source: I live on my own. And my attempts to pay the bills, with the assistance of food stamps of course (a means to more rapidly drain the upper and mid middle class), dictates the entirety of my everyday. You don't feel the leash, but you can be sure it's there.
>>
File: 1481265439003.jpg (20KB, 600x450px) Image search: [Google]
1481265439003.jpg
20KB, 600x450px
>>59668066
thanks, sorry about such an open-ended question. i guess it was just about math as an academic pursuit. i also want to take some classes on psych, linguistics or even philosophy.

i fucked off in high school so i have been re-learning math through khan academy. right now im working on trig but its all stuff i vaguely remember up to now so i dunno where I really wanna go from here.

ok im starting to blog now, sorry
>>
>>59667064
> no explicit type declaration
> inconsistent naming
> redundant & stupid keywords
> le future of le software development
>>
>>59668121
Top 2 are blatantly incorrect.
Third is subjective and I don't think so at all.
Fourth is correct
>>
>>59668155
>Mixing implicit and explicit type declarations
Positively haram
>>
>>59668179
>Moving the goalposts
>>
>>59668179
yeah? So then don't do it. Stick to 1 style.
Implicit is prefered though unless explicitly is required.
>>
>>59668186
>Look at this shitty feature
>Well actually Anon, it's much worse
Whatever
>>
File: Alonzo_Church.jpg (39KB, 235x314px) Image search: [Google]
Alonzo_Church.jpg
39KB, 235x314px
>>59668102
It's cool things are pretty slow here right now. I came to math late, and out of pure love, rather than any like "oh I'm good at this, I'll pursue it" or "big money here". So I'd of course say it's very worthwhile as an academic pursuit. It underlies everything, it's the language of patterns. Definitely check out philosophy, yeah.

This gets advanced quickly, is probably meant for physics graduate students, but I absolutely love his treatment of the fundamentals in the first couple videos. He's very good at presenting, even though his audience is more advanced, I felt like sharing it anyhow https://www.youtube.com/watch?v=V49i_LM8B0E&list=PLPH7f_7ZlzxTi6kS4vCmv4ZKm9u8g5yic

Good luck man, it's a great time to be into both math and CS. A lot of things are moving quickly.
>>
>>59668196
>Implicit is preferred
Sure it is
>>
>>59668202
>A lot of things are moving quickly.
Too bad the human species doesn't have much time left. Waste of potential.
>>
>>59667032
code::blocks
>>
How can I create two vectors in c# and finde their dot prodcut, the vectors needs to have about 1000 dimensions.
>>
>>59668202
>24:00
>going over some basics that everyone knows already as an introduction to new material
>that one nerd who raises one finger and asks an advanced question just to prove he knows more than everyone else
>>Yeah, we could do that, but it's fucking pointless now shut the fuck up ok?
lmao this guy is awesome
>>
https://github.com/Arefu/Wolf
>>
File: Screenshot (614).png (106KB, 1600x900px) Image search: [Google]
Screenshot (614).png
106KB, 1600x900px
Hey guys, I'm creating a basic interpreter in c++, the idea at first is to let me calculate basic stuff such as an area, volume, etc but with a little of natural spanish language, the project involves searching for words in strings, then deciding what functions to call and then get the data from that same string or ask the user to specify it.

I just started minutes ago, this very first version just prints whatever I write, the problem is when using strings with more than a word because it prints n times (one per word), I want it to print just one time with the whole string in it. Any ideas?

#include <iostream>
#include <string.h>
#include <stdlib.h>
#include <chrono>
#include <time.h>
#include <windows.h>

using namespace std;

float calcula(void);
float genera(void);
float cambia(void);
int ayuda(void);


int main(void)
{
string comando;
SetConsoleOutputCP(65001);
system("CLS");
cout << " Пeлaгeя 1.0\n Cyкa влyaт" << endl;
do
{


cout << ":::~ ";
cin >> comando;

cout << "El comando fue " << comando << endl;
} while (comando != "salir");
}
>>
>>59668433

Are you using Visual Studio?
>>
>>59668539
Yes, I think I could use arrays? But I would need to dedicate certain places in the array to certain genres.
>>
>>59668469
Cyka
>>
>>59668469
English, faggot

>>cyka bylat
>>
>>59668552

Assuming you are coding from scratch

public Vector(
double x,
double y
)


This 2 dimension vector can be multiplied with other vector (by using dot product) with the following instruction

public static double CrossProduct(
Vector vector1,
Vector vector2
)


Example

private Double crossProductExample()
{
Vector vector1 = new Vector(20, 30);
Vector vector2 = new Vector(45, 70);
Double crossProduct;

// crossProduct is equal to 50
crossProduct = Vector.CrossProduct(vector1, vector2);

return crossProduct;

}


The problem is creating an n-dimensional vector, maybe you need a dynamic array that stores the dimensions of your vector.
>>
>>59668559
>>59668563

Welp, there's a bunch of libraries and stuff I'm planning to use.
>>
File: 1471657575181.jpg (24KB, 640x480px) Image search: [Google]
1471657575181.jpg
24KB, 640x480px
I'm losing motivation to continue. I've been learning programming for 3 months now. I have this problem every time I try to learn something new. At first I was spending like 8 hours a day learning and was excited to learn something new. Then my excitement began to gradually dwindle and for the past month I've been forcing myself to just spend 2 hours a day at it. And I'm procrastinating and skipping days now.

I know that if this continues for much longer I'm going to give up. But I don't want to give up. How can I get motivated to continue learning again?
>>
>>59668624
From what I have gathered the dot product can be found between two arrays by just * them. So I could use arrays, but I really don't know how to dedicate a certain spot in the array to a certain genre.
>>
>>59668646

1. Exercise
2. Why don't you help to the others in this thread? You can regain some of your interest by doing it.
>>
>>59668661
The dataset with the genres I am using is set in such a way that the the genres have an id, but said sometimes the data set skips a number in the ids, so I can't just iterate through them.
>>
>>59668646
You just haven't found what you're truly interested in. Learn a bunch of different languages and do a bunch of different shit.
>>
>>59668646
Start a project you really care about. Drop all manner of formalism and preplanned expansion, and learn according to demand. Refactor your project as necessary when you learn better ways of doing things.

You need to take programming out of a vacuum. Use it for something. A project and active use is the only way. Know what most of my projects started out as? test.cpp.
>>
>>59668082
using System.IO;
using Extensions;

static char Translate(char c) => c.IsAlpha() ? c.IsLower() ? c.ToUpper() : c.ToLower() : c;
static void Main() => File.CreateText("out.txt").Using(fs => fs.Write("in.txt".ReadAllText().Select(Translate)));


wew
>>
>>59668677
>cpp
Opinion discarded.
>>
>>59668082
>Not global imports
>>59668682
That's basically the same thing
>>
>>59668646
oh well, time to move onto the next subject that piques your interest
I strongly suggest cooking, because you will continue to benefit from it for the rest of your life even after you no longer enjoy it
>>
>>59668674
Maybe I am missing something, but genres? Could you use proper terms or at least post some code so we actually know what you're talking about.
>>
>>59668692
C++ is literally the best language ever created.
>>
>>59666941
>*autistic screeching *
>>
File: 1478282187384.jpg (993KB, 1182x1581px) Image search: [Google]
1478282187384.jpg
993KB, 1182x1581px
>>59667020
Stop asking too many questions goyim
>>
>>59668756
I need to find the cosine between two artist, bound to these artists are some tags/genres. The different artists needs to have a static spot in the array so two artsits can be compared.
>>
>>59668857
The different genres* needs to have a static spot in the array so two artsits can be compared.
>>
>>59668865
You're speaking way too vaguely, what is your data, how is it stored, where are you getting it from and how, what do you actually want to do? is an "artist" a numeric value with some tags attached such as:
struct Artist
{
public float Value;
public Information Info; // tags/genres;whatever
}


Do you want to compare 2 artists from the same array and then sort them or store the values in a different array, or what?

Show us some code or at least give us a proper explanation.
>>
What's a good book on database design?
>>
File: 1490151551068.jpg (79KB, 640x640px) Image search: [Google]
1490151551068.jpg
79KB, 640x640px
>>59667020
>tfw too intelligent too link notelemetry.obj
>>
>>59668928
The artists are the arrays, the arrays should contain the tags. The cosine I want to calculate is the comparison between the artists. The dataset is from last.fm. The dataset contains an id for a couple thousand artists, the artists id id corresponds to an artist name. Each artist has a varying amout of tags, these tags also have an id, that corrosponds to a genre. All this is needed to make a content based recommendation. The recommendation is based on the cosine between the artists.
>>
Are types like List a impossible without HKTs?
>>
>>59668987
>not using VS 2017
>>
>>59669020
Ok, so what do you currently have, and what are you struggling with?
>>
>>59669095
Currently I have the classes for the artists and tags. I am struggling with figuring out how to represent the artists as arrays containing the tags, mostly because the tags needs to be in the same spot in all the artist arrays so they can be compared.
>>
>>59669127
I could most likely give you some suggestions, but it's pretty difficult thinking about it abstractly.

Post a screenshot of your classes/data.
>>
File: Udklip.png (15KB, 407x521px) Image search: [Google]
Udklip.png
15KB, 407x521px
>>59669127
>>59669152

Oh I forgot to mention that the artist can be tagged with the same genre mutiple times, so the spot in the artist array that corrosponds to a certan genre needs to be incemented for every time they have been tagged with that genre. E.g if an artist has been tagged 3 times with hiphop the spot in the array where hiphop lays needs to be incremented to 3. The weight is set to 55.5 right now because another person is working on calculating the weight of each tag in the artist.
>>
>>59669186
bool booltest = false;
//Create a vector from Artist
for (int i = 0; i < BaseID.Count(); i++)
{
booltest = false;
for (int j = 0; j < testArtist.TagIds.Count(); j++)
{
if (BaseID.ElementAt(i) == testArtist.TagIds.ElementAt(j).Id)
{
VectorTestArtist.Add(4.2/*testArtist.TagIds.ElementAt(j).Weight*/);
booltest = true;
}
}
if (booltest == false)
{
VectorTestArtist.Add(0.0);
}
}

Console.WriteLine(BaseID.Count());
Console.WriteLine(VectorTestArtist.Count());

This is what I have so far, sorry for the weird formatting. Right now to many tags are added
>>
>>59669054
List isn't higher kinded, but polymorphism in which you could substitute List would be
>>
>>59668469
use std::getline instead of std::cin desu
>>
so in Laravel I'm trying to update a table like this
$thing->fill($this->request->all())->save();

but it is connected to a pivot table and I get a duplicate entries error. Do I detach it first and then reattach or is there an alternate solution?
>>
File: 1480281242483.jpg (11KB, 318x313px) Image search: [Google]
1480281242483.jpg
11KB, 318x313px
how do I connect to an IRC though a proxy using python
>>
>>59669661
http://socksipy.sourceforge.net/
>>
How do I compile a C 64-bit program on windows with gcc so that printf recognizes %zu. Neither c99 nor c11 seem to work. However it seems to work for 32-bit. Is the 64-bit gcc so far behind that they haven't implemented this?
>>
>>59669829
Do you have the 64-bit version of GCC/MinGW?
>>
>>59669834
I tried both the pure gcc and minGW versions that are on cygwin. I haven't tried yet the MinGW stand-alone one. Maybe cygwin is fucking this up?
>>
What's better, and why?

void Sub_Fun(){}

or
namespace Sub{
void Fun(){}
}
>>
>>59669829
I think that's an issue with Windows' C library which GCC links again even when using Cygwin.
>>
>>59669961
Namespaces don't have any overhead and allow for more convenient modularity. The former is only good if you plan to build with a C compiler.
>>
>>59670017
I suspect you are right.
So I guess true C portability stops at c89.
>>
>>59668646
You don't like programming. You have a deeper problem and you should either engage in self-inspection or get a shrink.

Also exercise and or meditate.
>>
>>59670029
Thanks.
>>
http://www.fosspatents.com/2011/07/judge-orders-overhaul-of-oracles.html#sovietstyle

One of the most interesting passages in today's order quotes from an October 2005 email by Google's Android boss Andy Rubin:

"If Sun doesn't want to work with us, we have two options: 1) Abandon our work and adopt MSFT CLR VM and C# language - or - 2) Do Java anyway and defend our decision, perhaps making enemies along the way"

>mfw we could have used .NET instead of Shitdroid
>>
>>59670114
They should have just programmed it in c.
>>
>>59670145
this desu
>>
>>59670145
If Android was written in C then at this point it would be nowhere near usable and full of security issues with more severity than the issues that currently plague Android so no thanks.
>>
>>59670145
Please no.
There are enough security exploits in Android already. I suggest that you back to your cartoons.
>>
>>59670055
You can still use a decent standard library implementation instead.
>>
What can a CPU do that a modern GPU can't?
>>
>>59670280
do general processing?
>>
>>59670280
GPUs shine at parallelism but CPUs do still have many more features, ability to manage memory, handle hardware...
>>
>>59670295
Can be done by modern GPU cores
>>59670280
https://www.quora.com/Can-GPUs-evolve-to-replace-a-CPU
>>
I need to finish learning R after starting in Uni.

What's the dryest, most technical, intensive resource there is? I can't fucking stand those datacamp things. I just want a thorough explanation of what everything is and how to do it right.
>>
>>59667007
?
There shouldn't be any problem with it being in python. Python is just a language and on top of that the libraries are built on top of C and C++ code.

It makes a fuckton of sense to code in python on top of such libraries as its easy to interpret and you can push out code far more quickly. Plus if you compile it, it runs just as fast as C code.
>>
>>59670280
Actually do branching and not be completely shit at it.
>>
>>59669603

/wdg/ is this way:
>>59634728
>>
>>59670339
>I need to finish learning R
Stop learning R
>>
>>59670495
What then? It's the defacto standard in econ. Even professors who teach stata use R for themselves.
And ggplot2 is powerful tool
>>
>>59670339
>I just want a thorough explanation of what everything is and how to do it right
I'm quite afraid there is no such thing. I learnt R the same way I learnt C++, domain specific things which gave an overall idea of how to proceed in different tasks.
>>
>>59670505
Rule 1 of /dpt/: discard these comments.
>>
>>59670505
Don't bother, must be a dumb C tard
>>
>>59670479
oh
>>
>>59670495
R is arguably the best programming language out there, only dumb brainlets who don't understand math think otherwise.
>>
>>59670566
This is as dumb as saying R is worthless. It's domain specific at best.
>>
Can I disable the Haskell type checker?
>>
>>59669829
-D__USE_MINGW_ANSI_STDIO=1
>>
What's your opinion on Typescript?

So far i am learning .NET and i'm quite satisfied with it. I don't know anything about javascript except it's shit
>>
>>59670531
>Le super scary C boogeymen D:
>>
>>59670694
It works. Thanks.
>>
>>59670645
>t. Has never used R
>>
>>59670753
>>59670783
Who are you guys quoting?
>>
>>59670753
>Le super scarey C defender white knite D:
>>
>>59670794
who said this and why are you quoting it?
>>
>>59670803
>hurr durr im tarded
-you
>>
What a bunch of autists you are.
You even can't take joke answers not seriously.
>>
>>59670817
I never said that!
>>
>>59670844
You and your ebic trole joke answers belong to >>>/b/
>>
>>59670863
History is written by the victors, pal.
>>
>>59670863
You said it
>>59670788 <-- here
and
>>59670803 <-- here
>>
>>59670867
>ebic trole
What language is this?
>>
>>59670867
You've brought up on yourself various implications about the author of the post.
Maybe you should take a break from 4chan?
>>
>>59670896
I never said
Quote begins here :
(tab character) hurr durr im tarded
Quote ends here.
>>
>>59670898
C
>>
>>59670926
ebic.c:1:1: error: unknown type name 'ebic'
ebic.c:1:11: error: expected ';' after top level declarator
>>
>>59670949
Sucks being a shitty programmer like you
>>
How do I make a recursion?
>>
>>59670962
I didn't write that program though.
>>
>>59670968
You have to dig deeper
>>
>>59670971
Me neither
>>
is garbage collection a meme?
>>
>>59670968
don't use a strongly normalizing language
>>
>>59670985
No, it's not
>>
>>59670985
>incorrect usage of "meme"
>>>/b/
>>>/v/
>>>/r/ebbit
>>
>>59670985
People make living of garbage collection.
>>
File: 5231.jpg (112KB, 1280x720px) Image search: [Google]
5231.jpg
112KB, 1280x720px
>no option to open a New Window on notepad++
>>
>>59670783
I advise you stop pretending you are smarter than you are on anonymous online boards.
>>
>>59670972
That's great! It means neither of us is retarded!
>>
>>59671008
what did she mean by this?
>>
>>59666918

COBOL because I need to make actual money
>>
>>59671035
actual money? what's that? like "unactual" money but the opposite?
>>
>>59671030
she meant that she's installed a french virus onto her computer and needs your help deleting it
>>
>>59666918
That's a cute girl.
>>
>>59671062
For you
>>
>>59671084
What did I mean by this?
>>
>>59671008
Please stop posting pictures of my daughteru
>>
>>59671011
>t. Has never used R
>>
>>59666930
>2017
>D still can't read a single character input from stdin
This is literally killing me inside out

Just WHY
>>
>>59671160
>2017
>worrying about I/O
This is literally killing me inside out

Just WHY
>>
>>59671160
D stands for Dicks XD
>>
>>59671175
>2017
>worrying about usefulness
>>
Is it valid/safe to call SQL stored procedures from a program if said program is going to be workplace specific? I have:
dbConn.Open();

string query = "select * from followup";
SqlCommand getInsureds = new SqlCommand(query, dbConn);

Can I have:
dbConn.Open();

string query = "Execute followup_GetItems";
SqlCommand getInsureds = new SqlCommand(query, dbConn);

I'm not going to have users provide any input to modify the query since the query itself will only change based on what I want to do with it; the user will just select a version of the query to use from a combobox.
>>
>>59671192
>2018
>thinking that "usefulness" is a valid and applicable word in this context
>>
>>59671192
>worrying
>>
>>59671175
>Doesn't worry about I/O
Stop using stdin and throw away your mouse and keyboard
>>
>>59671205
How can I stop something I'm not doing?
>>
>>59671196
ofc you can call stored procedures. sometimes its even the preferred method, to abstract the implementation even further
>>
>>59671249
You are using stdin
>>
>>59671256
Hell yeah. Thanks.
>>
>>59671191
You know it only makes it better, right?
>>
>>59671266
I'm not.
>>
>>59671289
Yes you are
>>
>>59667032
Eclipse
>>
>>59671298
Nope. I'm not.
>>
>Download Bjarne's book
>Written for w**dows
Is Learncpp a good place to start?
>>
>>59671367
c++ is to c as lung cancer is to lung
>>
File: bait-max.gif (92KB, 600x600px) Image search: [Google]
bait-max.gif
92KB, 600x600px
>>59671317
>Eclipse
>>
>>59671387
C itself is a cancer so I don't really care
>>
>>59666918
>>> anon = Life(ugly, talent=None, dick_size=14)
>>
>>59671522
Not all living things have penises.

Women, for example

>inb4 >implying
>>
>>59671571
>implying
>>
>>59671522
You forgot to put a decimal point between the 1 and 4 there, pal.
>>
>>59671522
>>>>
post discarded.
>>
>>59671047

It means I'm tired of making shit and having to compete with pajeets

COBOL is a niche but its a well-paying one with tons of demand and too little competition
>>
>>59671522
14 what???
>>
>implying that I implied
>>
>>59671917
Plank units
>>
>>59670708
typescript is quite comfy for someone with solid C/C++ background desu

Now I can write "javascript" and I never think about killing meself ^_^
>>
>https://azure.microsoft.com/en-us/pricing/details/functions/
is data included or do you pay extra for bandwidth?

if i use 200000 GB-s over 500000 executions, passing 10MB of data on each execution, how much will it cost?
>>
>>59671982
>https://azure.microsoft.com/en-us/pricing/details/bandwidth/
>Inbound data transfers
>(i.e. data going into Azure data centers): Free
so it's literally free if the outbound data transfers are low enough? or are there other fees involved?
>>
>>59670187
>this meme again
There is nothing wrong with C you ungrateful piece of shit. Have some respect for the technology that powers literally every electronic device in the world
>>
>>59672033
>falling for the bait
>>
>>59672033
>C
>powering anything
>>
>tfw to tired to dev
>tfw to awake to sleep
fuck
>>
>>59672123
>tfw just awake enough to shitpost on 4chin
>>
Common lisp or scheme for quick prototyping? I heard scheme is very minimal so it could be easier to construct your programs out of basic building blocks, but this could also be a downside as you would have to rewrite complex structures out of those primitives, which could slow down the prototyping
>>
Can anyone redpill me real hard on webassembly

I vaguely remember doing something like
emcc muh.cpp USE_SDL
to my c++ game a while ago and it actually worked pretty nice in the browser. But it wasn't webassembly, right? What was it? It's possible to write WASM=1 now apparently

JS is so overwhelming my dudes, so much stuff
>>
>>59666968
We need to see your actual code. If you wrote code that's not working, and you can't find what's wrong with it, then your word that the untested example code you've supplied here is functionally equivalent to the original code can't be trusted. Especially given that it doesn't look like it would cause that problem, and we can't compile it to be sure because in its present state it's not valid C++.

All that said, here are some things I notice immediately. These problems all seem like they were probably introduced with the effort to write the example code, not carried over from the original code, but I'll point them out just in case, because you never know.

if (num < NUM_MAX) {

NUM_MAX isn't defined.

stuff();

stuff also isn't defined.

++num
This needs a semicolon.

num = 0

This also needs a semicolon.

std::cout << static_cast<int>(num);

It's bad practice for member functions of non-I/O classes to directly perform I/O operations. Just return num instead.

std::cout << test.do_something() << ...

You can't print the return value of do_something because do_something doesn't return anything. (See immediately preceding comment.)

... << static_cast<int>(test.get_num() << ...

Missing right paren.

... << test.do_something());

Again, do_something is not returning a value here. Also, you accidentally stuck it inside the call to static_cast<int>. Also, you should terminate your output with std::endl.
>>
>>59672211
>Common lisp or scheme
It's like C++ or C.
>>
>>59672291
oh thanks, that's a useful analogy
I'll use common lisp then
>>
>>59672033
>Have some respect for the technology that powers literally every electronic device in the world
Ignorant retard.
Your credit card runs exclusively Java.
>>
>>59670280
Run a kernel.
>>
>>59672327
Java runs on C and was inspired by C++. It's basically C++ exactly, except there are no pointers, everything is implicitly a reference, all references are reseatable, there's a garbage collector, and compiled programs run in a virtual machine.
>>
>>59667927
You stop trying to make it look like a human AI and just let it be a statistical system. AI comes later.

Start with ready libraries such as Keras, observe how does this shit work.
>>
>>59671571
Women aren't anons. Anon implies human and so man.
>>
>>59671571
>Women
>Living
You're right about them being things though.
>>
>>59672381
>>59672384
That's sexist.
>>
>>59666918
sauce on the original comic?
>>
>>59672347
>Java runs on C
Tell that to the processors that implement run java bytecode directly in hardware.
Also, Java is a language, it doesn't run on anything. I think you're referring to the JVM, in which case there's no rule saying it has to be in C. You could write a JVM in Rust for example.

Java is not at all reliant on C.

>>59672400
Go cry me a fucking river.
>>
>>59672400
But it has to be said.
It's OK, we won't kick you out - there is no requirement to be human on /g/. We'd let AIs in, so we'll let non-artificial non-intelligences in as well.
>>
Building a simple 2D platforming game for Android. It's mostly a side project, just for fun. If I could ever put it on the app store that would be sick.

Question: is it necessary to use unity? I'm pretty good with physics and wouldn't have a problem implementing my own kinetic motion equations. Stuff like acceleration, velocity, and friction I understand. Basically my question is: how hard is it to implement your own physics engine?
>>
>>59671982
>For me personally, it is not only about the cold start/idle issue, but as I wrote in #529 I think it would be good to have some transparency of the scenarios that are targeted by Azure functions.
lol no wonder they're so sparse with actual information, what a scam
>>
>>59672423
>Go cry me a fucking river.
No.
>>
>>59672455
Yes.
>>
>>59672443
Not for your project. You should be able to code the physics easily.
>>
>>59672429
>But it has to be said.
No, it doesn't. The oppressive social standard you think you're standing up against doesn't exist. You're doing nothing here but reinforcing the one that does.
>It's OK, we won't kick you out - there is no requirement to be human on /g/. We'd let AIs in, so we'll let non-artificial non-intelligences in as well.
But women are non-artificial intelligences.
>>
>>59672474
>GNU/Linux.
Stopped reading right there.
>>
>>59672464
No. I don't feel like it.
All I effectively told you was that you're wrong and I care. I never implied I was sad or angry about it. I'm not. Just disappointed in you.
>>
>>59672443
Not particularly hard. Depends on how derailed it's supposed to be. Generally games have very specific physics. Unless you're doing some very resource intensive physics where you need it well optimised you're probably saving time by doing it yourself if unitys physics doesn't fit you perfectly.

A lot of game let their libraries rule them. They avoid doing features because they'd have to master the physics engine in the game. If you make it yourself you never have to feel such limitations.

Box2d is open source. It's a common physics engine example you can look at.
>>
File: 1479046371710.jpg (320KB, 1080x1080px) Image search: [Google]
1479046371710.jpg
320KB, 1080x1080px
>>59672489
>But women are non-artificial intelligences.
How can they be when they aren't intelligent?
>>
>>59672489
Fuck off and kill yourself you disgusting thing.
>>
>>59672513
They are, you're just a prick.
>>
File: 1480586296118.jpg (95KB, 717x720px) Image search: [Google]
1480586296118.jpg
95KB, 717x720px
>>59672504
You're clearly upset though.
Otherwise you wouldn't have responded so seriously to two ironic posts.

If you can't take the banter then you clearly don't belong here.
Fuck off.
>>
>>59672524
*nods respectfully*
>>
>>59672516
You first, Mr. Java the Hutt.
>>
>>59666941
>>59667064
lol
>>
>>59672540
>ironic
This is 4chan. The year is 2017. Donald Trump has recently won the election. All sexism is to be taken at face value.

>If you can't take the banter then you clearly don't belong here.
If I couldn't take the banter, I wouldn't be engaging with it. I'm engaging with it. Therefore I can take it.
>>
>>59672489
>>59672504
>>59672524
>Feminist/white-knight detected
Go back to tumblr
>>
>>59672429
>we let ais in
No we don't. We explicitly forbid bots from posting here. In fact we have this special pay wall for them and we ban them when they oust themselves.

How is that 'letting someone in'? Its like consciously building stairs to keep wheelchair bound people out.
>>
>>59672580
Give me one good reason.
>>
>>59672569
>all sexism is to be taken at face value
I'm split on this. People seem to be more satirical about these things now. But I agree that there's extra reasons to be concerned.
>>
>>59672582
So humans only?
Should we report&deport all women then? Or are those just trolls who pretend to be women because women can't into technology?
>>
>>59672569
>Waaaaaaaaah muh sexism!
>>
>>59672617
All women are humans.
inb4 "muh female animals": non-human female animals are not called women
>>
>>59672617
Bots are explicitly banned. I'm pretty sure anything else goes. I wouldn't mind women and other extraterrestrials to come here.
It's not like they're gonna make this place any worse.
>>
>>59672569
Feminists are more sexist than men.
>>
>>59672625
Your comment is not meaningful. I'll therefore refrain from responding meaningfully.
>>
>>59672651
Men aren't sexist though. Only sexist men are sexist. Such as yourselves.

Also, feminists, such as myself, aren't sexist. Only sexist feminists are sexist. Such as that lady who wrote the essay on how all men should die. I don't remember her name, but she certainly didn't seem like a very reasonable or level-headed person. Since you're also not reasonable or level-headed, you two would probably get along.
>>
>>59672631
Women are "human" in the same sense a human leg is human or a human property is human.
>>
Anyone able to help me with my Java program? It's shitty but due in soon and all I have to do is implement a betting system.

I can send you the folder of everything you need to have a look at it through email.

Thanks in advance
>>
>>59672699
No, women are human in the same sense that men are human.
>>
Can people who shill rust make their own separate thread now? I got a feeling they're starting to be a disruptive presence here.
>>
>>59672710
If this was true, women would contribute to science and technology. But pajeets contribute more than all women put together, despite being far away and relatively few in number.
>>
>>59672652
Why do you even browse this place? Oh I get it now, you're a troll.
There's absolutely no way a feminist or white knight would browse this place, you're just fishing for replies, it's standard procedure here especially in this general.
You've done well. Lots of replies.

Nothing to see here, move on.

>>59672692
>Only sexist feminists are sexist
Which happens to be all the feminists.

If you're really for true equality, you wouldn't be associating with feminism.
Feminists don't believe in equality.
>>
>>59672705
looks like you're gonna fail rajeesh, should have paid more attention to the classes
>>
>>59672720
If you're referring to the sexism discussion currently going on, it has nothing to do with Rust. Personally I've never used it.

As for making a separate thread to discuss sexism, that would be inappropriate for two reasons:
1) Such a thread would not belong on /g/.
2) It would defeat the purpose. If sexism is not addressed specifically where and when it occurs, addressing it has less of a long-term impact on the cultural climate of this board.
>>
>>59672720
Rust presence here.
I'm >>59672738 going against the retarded feminist who I assume you're referring to.

I know you believed in the meme that Rust is for SJW's, so sorry to let you down.
>>
>>59672765
>>59672775
Well lookie here.

The retarded feminist has never touched Rust, while the superior straight white man telling the dirty feminist off does use Rust.

Ctards BTFO.
>>
>>59672736
>If this was true, women would contribute to science and technology. But pajeets contribute more than all women put together, despite being far away and relatively few in number.
This is not true.

>Why do you even browse this place?
I miss the way it was when it wasn't full of undeserved hatred directed generally over large demographics.

>Which happens to be all the feminists.
It doesn't though.

>If you're really for true equality, you wouldn't be associating with feminism.
>Feminists don't believe in equality.
I'm a feminist and I believe in equality.
>>
>>59672797
That's not how it works.
>>
>>59672813
>Rust
die faggot
>>
>>59672748
I did, programming isn't my strong suit
>>
>>59672821
>I miss the way it was when it wasn't full of undeserved hatred directed generally over large demographics.
Uh, this place has always been like this, in fact it was even more extreme in the past.

>>59672821
>I'm a feminist and I believe in equality.
You're an outlier, and you're in bad company.
>>
>>59672813
C is quite adequate. I don't care whether Rust is better or not, why would I bother learning it when assembly, C, C++, Java, Ruby, Scheme, Python, and Lua are already good enough.
>>
>>59672851
Go back to working on your shitty bug ridden linked list implementation for the 500th time you retarded luddite.
>>
>>59672881
Go back to compiling bloated and slow programs that use jemalloc by default, which is a shitty memory allocator.
>>
>>59672858
>Uh, this place has always been like this, in fact it was even more extreme in the past.
No it wasn't. This place has always LOOKED like this. But back in the good ol' days, it was always a joke. People here weren't ACTUALLY haters, they were decent individuals who MASQUERADED as haters because it was funny.

>You're an outlier, and you're in bad company.
I know a lot of outliers, then. I don't care if I'm in bad company, this place rules. I wish it wouldn't be so needlessly exclusionary, but it's an issue I can overlook when it doesn't rear its head. Today it did. So be it.
>>
>>59668692
nobody gives a shit if you're discarding his opinion, doesn't change anything
>>
>>59672881
Care to elaborate on breaking points of a structure, consisting of value field and pointer to the next element?
>>
>>59672902
don't bother, I think about 50% of these are bots, 40% are rednecks that learned about the internet 2-3 years ago, and 10% have always believed.
>>
>>59672956
Tsk. Sounds about right.
>>
>>59672868
>I don't care whether Rust is better or not
Yes, I agree that all those languages you listed are good enough, but they're still lacking.
Rust is better than C++ (I'm not mentioning the other languages because they don't compete in the same domain that Rust does, and C can coexist with Rust) in a lot of ways. It's basically a cleaner C++, and someone like me who has programmed in C++ for a long time and is really fed up with C++'s retarded design choices, Rust is really refreshing and interesting.
Rust is a better designed C++, it's what C++ should have been.

>which is a shitty memory allocator.
By what metric? It's apparently faster than most system provided allocators.

>>59672902
>they were decent individuals who MASQUERADED as haters because it was funny.
And that's exactly what happened >>59672381 and >>59672384, I know because I'm one of them.
It was all fun and games until you had to come in and ruin it all.

>I wish it wouldn't be so needlessly exclusionary
Fucking no one cares, deal with it or fuck off forever.

>>59672919
Come again? I've implemented plenty of linked lists in C if that's what you're asking.
I've probably got more experience in C than you do. I still love C, I just love Rust too, and despise C++.
>>
>>59672902
Your earlier posts looked like light-hearted trolling, but now I'm worried that you might actually be for real.
>>
New thread:

>>59672986
>>59672986
>>59672986
>>
>>59672984
>I've implemented plenty of linked lists in C if that's what you're asking.
I ask what kind of bugs can appear in a structure, consisting of two fields: value and pointer to the next element.
>>
File: malloc.png (86KB, 644x579px) Image search: [Google]
malloc.png
86KB, 644x579px
>>59672984
>By what metric
musl's native allocator is better
>>
>>59672984
>Yes, I agree that all those languages you listed are good enough, but they're still lacking.
>Rust is better than C++ (I'm not mentioning the other languages because they don't compete in the same domain that Rust does, and C can coexist with Rust) in a lot of ways. It's basically a cleaner C++, and someone like me who has programmed in C++ for a long time and is really fed up with C++'s retarded design choices, Rust is really refreshing and interesting.
>Rust is a better designed C++, it's what C++ should have been.
Well, perhaps I'll give it a look next time I'm fed up with C++'s design choices. I'm not, though. Especially since I've recently taken up doing all my compiled OOP in vanilla C, using ADTs instead of classes.

>And that's exactly what happened >>59672381 and >>59672384, I know because I'm one of them.
>It was all fun and games until you had to come in and ruin it all.
Things have changed around here. I respect your intentions, but masquerading as a hater as a joke doesn't work anymore now that real haters abound who aren't in on the joke.

>Fucking no one cares, deal with it or fuck off forever.
No. I'm taking the third option: sticking around because I like it here, and fighting it when it crops up. YOU can deal with it or fuck off forever, because I'm not going anywhere.
>>
>>59673034
>>59672984
There is no "one fits all" allocator. glibc's advantage is to behave well in many real world case, that doesn't mean it is not worth reimplementing for your specific use case. I'm assuming jemalloc is more of a runtime constraint.
>>
>>59673018
None in the structure itself. That's not how bugs work.

If there's a bug, it would appear in the implementations of functions handling the structure, not in the structure itself.
>>
>>59673018
Not in the structure itself but in the implementation of it's operations, such as insertion and deletion.
I'm not saying it's hard to implement a linked list, it's not, I've written plenty in my kernel.
It's just a lot more bug prone than say using std::vector. It's also more time wasting and limiting for no good reason.
Also, I know the linux kernel does it a lot, but I question the widespread use of linked lists in the kernel. I know it's good for some situations such as queues and stuff, but I feel that it's slightly overused.

>>59673034
And that's just musls, not glibc's which is the dominant allocator on pretty much every GNU/Linux system, which is the majority of Linux desktops and servers.
>>
>>59673111
>It's just a lot more bug prone than say using std::vector. It's also more time wasting and limiting for no good reason.
The simple degenerate case of the linked list is indeed a lot more time wasting and limiting than std::vector for no good reason. However, it's still an important data structure, because it serves as the conceptual foundation for trees and graphs -- which can also be implemented in terms of std::vector, but doing so makes operations upon them more difficult to conceptualize, and therefore prone to more frequent and devious bugs that are more difficult to repair.
>>
>>59673156
>However, it's still an important data structure, because it serves as the conceptual foundation for trees and graphs
I fully agree.
>>
>>59669696
Figured it out.
Thread posts: 321
Thread images: 22


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