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

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

Thread replies: 255
Thread images: 32
Old thread >>54231666

What are you working on /dpt/?
>>
Any hackers here
>>
>>54236973
>>>/b/
>>
>>54236973
I hackd ur mum last nite
>>
>>54236973
i'm in ur area
>>
>>54236973
i know the first three numbers
>>
>>54236973
r00t3d a gibson last week
>>
I made a website yesterday.
What do you guys think about it?

http://eolas.xyz/vegetarian/animals.html
>>
>>54237046
Could this website have any more misinformation?
>>
>>54237046
Get this obvious b8 off this thread
>>
File: heh.png (14 KB, 726x392) Image search: [Google]
heh.png
14 KB, 726x392
>>54237046

What an awful way to frame the conversation when people disagree with you.

"You really like killing people? omg!"
>>
>>54237046
>this bait again
literally fuck off to >>>/g/wdg fucking attention whoring retarded fag
>>
>>54237098
people die all the time, it's perfectly natural
>>
File: vomit.jpg (90 KB, 650x650) Image search: [Google]
vomit.jpg
90 KB, 650x650
>>54237098
God damn, your font rendering.
>>
>>54237137

I don't use anti-aliasing on my fonts. It makes text look like its covered in Vaseline.
>>
File: eg1.png (10 KB, 514x211) Image search: [Google]
eg1.png
10 KB, 514x211
Ok, you could get much better syntax than this (and it could be done at compile time, rather than the shitty way it's currently done)
>>
>>54237310
>0: -858...
Elements that are not explicitly initialised should be zero.
>>
>>54237310
0 through 7 should probalby be 0 initialized

also you can just:
std::cin.get();
>>
>>54237343
>>54237346

Nobody requested that though

Also I would've gone with M (no _) but apparently those are reserved now. Also would've liked to overload = but that needs to be done in class, so it wouldn't work with an array
>>
>>54237381
>Nobody requested that though
But that's how it works with C.
>>
>>54237381
>Nobody requested that though
I assume you're doing that as a continuation of the discussion in the last thread.
C initialises all unmentioned elements to zero.
>>
>>54237386
>>54237388
Ok, move the "int x[11];" up 1 line
>>
File: Hacker-silhouette.jpg (53 KB, 1000x664) Image search: [Google]
Hacker-silhouette.jpg
53 KB, 1000x664
>>54236973
I'm professional database hacker, ask me anything
>>
>>54237478
Why do you hate the KKK Mr Ymous?
>>
>>54237489
it's just some fag kid, plenty of anons hate niggers and would support the KKK
>>
File: 1460563464748.jpg (294 KB, 1462x1462) Image search: [Google]
1460563464748.jpg
294 KB, 1462x1462
>seeing an anime wallpaper in c++ lecture
>>
>>54237565
cringe
>>
File: 1453101164289.png (22 KB, 612x253) Image search: [Google]
1453101164289.png
22 KB, 612x253
>>54237046
kek. You probably believe that too
>>
>>54237565
pretty common in college
>>
>>54237595
If Global Warming is real then why is there still cold?
>>
will C ever get C++ style templates?
>>
File: 2016-04-26-151538_885x682_scrot.png (105 KB, 885x682) Image search: [Google]
2016-04-26-151538_885x682_scrot.png
105 KB, 885x682
https://news.ycombinator.com/item?id=11569726

This literally angers me to read.
>>
>>54237638
no because C is obsolete garbage
>>
>>54237656
Yeah but Irish (men) deserve the stereotype
>>
>>54237638
C is a dead language
>>
>>54237656
>random faggot telling others what' s "their responsibility" and "their duty"
>>
Web programming is superior to all other programming
>>
>>54237830
That's not how you spell inferior.
>>
File: 1444549172298.png (26 KB, 1437x770) Image search: [Google]
1444549172298.png
26 KB, 1437x770
>>54237632
Exactly
>>
can someone give a TL;DR explanation of how MySQL works

like if you have web hosting with MySQL, what exactly can you do with it? just upload your website to it or can you also have clients connect to the database and read/write to the database?
>>
>>54237656
lel, are you really wasting your time on that ?
>>
>>54237656
Why would you ever want to read comments on SJWNews? Just skim the headlines for something interesting and ignore all the rest.
>>
>>54237656
the "privilege" shit is retarded

so what if there are differences between whites and shitskins, so fucking what, doesn't mean you owe anything to shitskins just because you're white

but anyway
>eastern europe
>white
>>
>>54237877
To be fair lots of HN users are against the SJW trend, which is becoming more and more rare for modern communities that are not 4chan (probably cause most of HN is **privileged**)
>>
>>54237893
There is no difference you racist we are all equal
>>
>>54237909
>most Europeans and Asians have between 1 to 4 percent Neanderthal DNA
>Indigenous sub-Saharan Africans have no Neanderthal DNA
lol ok bruh
>>
Shot in the absolute fucking dark here.

Anybody here have any experience working with the Digilent PmodACL2 and Zynq PS? I'm just getting a constant stream of 1s back from the driver and I don't know if it's the accelerometer being configured incorrectly or the SPI hardware driver on the Zynq being configured incorrectly. The documentation for both is diffuse, vague, and half the time unexplained. The only way you can do anything on this platform is through tutorials.
>>
>>54237931
>Le evolution meme

fuck off bigot
>>
>>54237893
>>eastern europe
>>white
that's his point though. You get the worst of both worlds, work extremely hard to get out of a shit-tier country due to your skill only - nobody's gonna look at you and go "oh, a romanian/bulgarian/russian guy - we need more of you for diversity! come over and have a job!" - for all intents and purposes you don't enjoy any privilege a western white man has, and if you finally succeed - you're suddenly owe this to your 'white privilege' and now must engage in constant self-flagellation to repel your original sin. Shit's not fair.
>>
>>54237947
>and now must engage in constant self-flagellation to repel your original sin
it's just a faggy tumblr meme, doesn't mean anything in the real world
>>
>>54237656
OK so you're privileged if you're a white male cause someone who would've taken the exact same path as you but who isn't white or male would've had it harder.

Firstly, I disagree. Lots of women would've been privileged in my place for random shit. Same with blacks and companies filling quotas, reverse racism, etc.

Secondly, if it were true, someone who would've had the same path as me but who was better looking, taller, had better voice tone, was more intelligent, etc. would've done better than me? Why isn't there a privilege for all these, and people emphasise the male and white? Did anyone quantify the privilege and compared them? No, because it's impossible to do it.

>Oh, but it's actually about situations where people look at you on the street and think you want to steal because you're black
Yeah well people may look at me on the street and htink I'm a virgin cause I'm ugly, or think I'm a faggot cause I can't grow a proper beard, or think that I'm a nerd cause I need to wear glasses. How come no one gives a shit about these and my "negative privilege" and there's no support group for me?

Where is my reasoning wrong?
>>
>>54237956
>doesn't mean anything in the real world
yeah it's not like anybody ever lost their jobs due to sjw social media rampages right
>>
>>54237978
Simple society treats white males better than anyone else
>>
>>54238010
Based on what? I don't see any evidence of that in the current year.
>>
>>54238010
Show me proof? I see people in the western world treating women and blacks a lot better than they treat white males
>>
>>54238029
based on fortune 500 CEOs
>>
>>54238029
Everywhere you go if you do business encounters people are friendly to you, customer service people are more willing to help you etc
>>
Anyone else really happy that /dpt/ has embraced its anime roots again? Looks like the normies lost.
>>
I was taught java before c++ and the setters and getters were always called getSomething and setSomething, but since I've looked at others c++ code I've noticed the usual name for a method that returns a field of a class is commonly just Field(), although I haven't noticed a pattern regarding setters.

So, what's the most common practice in c++? I mean, I am writing my own code, so I can immediately understand what does class.field(), but am I doing a service to others when I write class.getField()?
>>
>>54238061
whoever thought of setters and getters should be shot
>>
>>54238069
No it makes perfect logical sense for programming design.

Would recommend for OOP / 10
>>
>>54238039
>Society
>F500 companies
Lol? Do they actually think that?
>>
>>54238010

Because we are better than anyone else.
>>
>>54238039
Those were made a while back when racism and sexism existed, and have no relevance on portraying today's society and values. Anon asked you about he current year
>>
>>54238081
Not true skill and intelligence is based on a number of factors. Also, Mr. I love interracial
>>
>>54238061
All I can tell you is that you should avoid trivial setters/getters that only set/return a member and do nothing else. As for the style, it depends on the project, just make sure it's consistent across the project.
>>
>>54238048
Everywhere I go people are extra friendly to women and black people
>>
>>54238112
Where are you from?
>>
>>54237992
'murrica
>>
>>54238117
I live in UK
>>
>>54238105
Well if they have some other side effect like controlling what I set and where then their existence is valid, I suppose. But even if they just get or set a value, how else would I get or set something if those fields are private?
>>
>>54237638
No. Most languages wont. Not even Rust can do the inane shit C++ does with templates. The type system is literally turing complete, and most people don't find that to be something worthwhile to add into a language, namely because it makes building a compiler hell. By contrast, C is supposed to be easy to compile.

>>54237046
The points you make on your website about world hunger are basically completely invalid.

https://www.wfp.org/hunger/causes

Having more food won't solve the problem. The problem isn't that there isn't enough food to go around. In fact, we waste 1.3 billion tons of it a year. The problem is that it's a pain in the ass to get food to certain places in the world. This is combined with the fact that poor weather and a lack of technology make certain places difficult to grow food of their own. On top of that, war often destroys crops AND destroys any of our humanitarian aid. So you can't exactly just throw more food at the problem to fix it.
>>
>>54238039
and look how it goes when they hire women and curryniggers

although marissa meyer might be doing it on purpose to sabotage yahoo (she's a google ex employee)
>>
>>54238135
>But even if they just get or set a value, how else would I get or set something if those fields are private?
You would make those public since there are no wanted nor unwanted side effects nor any special logic that's supposed to run when you use a setter (or sometimes I getter).
>>
>>54238139
Redistribution of wealth and food is the problem
>>
>>54238039
Maybe it's because they would make shitty CEO's? Someone who grew up in the ghetto probably doesn't know how to run a company unless they can get to college and be trained, not to mention black are only a fraction of the population. There are women CEO's but they are shitty as well, because you see companies in the news all the time for making shitty decisions and guess what, they have women CEOs guaranteed.

>>54238048
Based on your confirmation bias? I don't see any other people being mistreated on average.
>>
>>54238150
>curryniggers
idk about women but nadella is doing everything he can with a shit hand he was dealt with
>>
>>54238096
>Also, Mr. I love interracial

What about it? I just said that white males are the best. That doesn't mean I look down on other people, unless they give me a reason to.

You can't honestly look at the world and say that 99% of this civilization hasn't been built by white men.
>>
>>54238153
Ok, so leave them public if tempering with the fields can cause no harm? I'll keep that mind.
>>
>>54238163
Distribution of power
>>
>>54238186
>>You can't honestly look at the world and say that 99% of this civilization hasn't been built by white men.
Up until recently women were discriminated against so it's unfair to compare historical performance when they didn't have a chance to prove themselves. Same with other races
>>
>>54238139
D templates are pretty sweet.
>>
>>54238186
It hasn't only been built by white men. White inventors often stole other inventors and from multiple different contributors not just one person or group
>>
I wish there was a language that would be basically Lua with as big standard library as Python with some features from D and dependency management from Rust. That'd be the best language ever.
>>
>>54238219
>same with other races

Are you retarded??? North Africa is sitting over there totally free of white people except for the people trying to feed them. Did they build great civilizations? Fucking no, it's a guerrilla gangland shithole with no money. South Africa on the other hand...
>>
>>54238234
proof?
>>
>>54238121
>living in Jewistan
>>
>>54238253
Arab civilizations have built great civilizations. Your argument is flawed
>>
>>54238253
There are more variables than race in there, and the sample size is not sufficient to support a generalisation like that
>>
>>54238163

Groups like ISIS are the problem. You can try to redistribute all you like, it won't do shit when people set fire to the crops you deliver as a means of asserting power over people.

>>54238229

D has some interesting shit that I wish was in C++. Namely a static if.
>>
>>54238263
http://www.usnews.com/opinion/articles/2013/03/21/why-thomas-edison-isnt-the-inventor-of-the-light-bulb
>>
>>54238291
Stroustrup shot down a static if for C++.
>>
>>54238313
related http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3613.pdf
>>
>>54238234
>White inventors often stole other inventors and from multiple different contributors

And those contributors were other white men.
>>
>Tfw /dpt/ has become /pol/

We /pol/ noaw
>>
>>54238303
He stole it from a white man

That just makes Edison an asshole
>>
File: eg2.png (16 KB, 696x348) Image search: [Google]
eg2.png
16 KB, 696x348
>>54238291
static if is the lamest part of D templates
there are far better things you can do
>>
>>54238339
tech world has become sjw world so it's natural
>>
>>54238368

So what all can D templates do?
>>
>>54238420

>>/pol/72110767
EQUALITY
Q
U
A
L
I
T
Y
>>
Why is programming for Android so difficult?
>>
>>54238339
No wonder, considering college campuses are chock full of clubs and special interest groups: "Women in IT", "Girls Can Code Too!", "Geek Girl Camp"

It's becoming part of the culture, a big fat statement:
>Hire more women, or you are sexist!
>>
>>54238488
I only want to hire great white men for my small software company tho
>>
>>54238483
Depends on you're going about it.
>>
#include <stdio.h>
#include <stdint.h>

struct b {
union {
uint32_t i;
uint8_t c[4];
};
};

int main(void) {
struct b s;
s.i = 0;
s.c[0] = ~0;
s.c[1] = ~0;
s.c[2] = ~0;
s.c[3] = ~0;
printf("%li\n", (long int)s.i);
return 0;
}


i didnt know you could do this until now
cool
>>
>>54238508
Most companies just want to hire great people.

Just so happens than in a predominantly white country in the tech industry, those great people are white and male.

Or imported via an H1-B
>>
>>54238537
Agreed Pajeet is pretty good at programming
>>
>>54236901
any rustfags here?
I'm struggleing for an our now and about to give up...


fn gen(alphabet: String, n :i32) -> String{
let mut word = String::new();
let len :i32 = alphabet.len() as i32;
let mut chars : Vec<char> = vec!(alphabet.chars());
if n == 0 {
word.push(chars[0]);
return word;
}else {
let mut i = 1;
while n > 0 {
let mut k = n % len;
word = chars[k] + word;
n -= k;
n = n/len
}
return word;
}
}

fn main(){
!println!("{:?}", gen("01", 2));
}
>>
>>54238563
Use code tags, please.
>>
>>54238470
across the board CTFE for almost anything (though I've run into a few things that were irritating and couldn't be CTFE)

almost anything can be a template parameter - not just types and integral constants like C++, but aliases (e.g. to types or even variable identifiers) and compile time constants (which given CTFE could be anything from a string to a database)

plus you can do mixin template!(params...); and it will insert it as code
>>
>>54238567
oh sorry. How do I do it - the faq is no help...
>>
>>54238596
>>51971506
>>
>>54238596
[/code

with a ] in teh end
>>
Is Kotlin worth learning? ya or nah and why.
>>
>>54238577

Sounds pretty sweet. Might consider trying it out, given that the GC is optional.
>>
>>54238596
>>54238610
now do it again
>>
>Tfw no Orb tripfag
>>
[/code
fn gen(alphabet: String, n :i32) -> String{
let mut word = String::new();
let len :i32 = alphabet.len() as i32;
let mut chars : Vec<char> = vec!(alphabet.chars());
if n == 0 {
word.push(chars[0]);
return word;
}else {
let mut i = 1;
while n > 0 {
let mut k = n % len;
word = chars[k] + word;
n -= k;
n = n/len
}
return word;
}
}

fn main(){
!println!("{:?}", gen("01", 2));
}
]
>>54238611
>>54238563
thanks for the help!
>>
>>54238563
what are you trying to do?
>>
File: 1280631254879.gif (131 KB, 147x121) Image search: [Google]
1280631254879.gif
131 KB, 147x121
>>54238681
>>
>>54238681
[ code ] asdf [/ code ]
no space between brackets and letters
asdf
>>
>>54238681
god damn you can't read for shit sake

fn gen(alphabet: String, n :i32) -> String{
let mut word = String::new();
let len :i32 = alphabet.len() as i32;
let mut chars : Vec<char> = vec!(alphabet.chars());
if n == 0 {
word.push(chars[0]);
return word;
}else {
let mut i = 1;
while n > 0 {
let mut k = n % len;
word = chars[k] + word;
n -= k;
n = n/len
}
return word;
}
}

fn main(){
!println!("{:?}", gen("01", 2));
}
>>
>>54238681
lamao xddd
>>
>>54238681
Pajeet my son
>>
>>54238681
>>54238611

>[/code
>]
>thanks for the help!

I don't like this meme
>>
>>54238685
if is suposed to count up variable numeral systems, think of "01" for binary and "0123456789" for decimal. I made a working python prototype:
def gen(alphabet, n):
if n == 0: return alphabet[0]
word = ""
i = 1
while n > 0:
k = n % len(alphabet)
word = alphabet[k] + word
n -= k
n = int(n/len(alphabet))
return word

print(gen("0123456789",12))
i = 0
while True:
key = gen("abcdefghijklmnopqrstuvwxyz00123456789", i)
print(i,key)
if (key == "test"):
break
i += 1

>>
File: thefuck.png (265 KB, 382x358) Image search: [Google]
thefuck.png
265 KB, 382x358
>>54238681
>>
File: F4RN6ET.jpg (72 KB, 640x396) Image search: [Google]
F4RN6ET.jpg
72 KB, 640x396
Working on a video based emotion recognition system for a semester project. Decided to code the neural network myself instead of using a third party library. The problem is that I want to test whether my back propagation code is working properly. Could any kind anon point me towards a worked example so that I can test the values at every stage? Or a simple software with which i could compare outputs for a given system
>>
>>54238681
fn gen(alphabet: String, n :i32) -> String{
let mut word = String::new();
let len :i32 = alphabet.len() as i32;
let mut chars : Vec<char> = vec!(alphabet.chars());
if n == 0 {
word.push(chars[0]);
return word;
}else {
let mut i = 1;
while n > 0 {
let mut k = n % len;
word = chars[k] + word;
n -= k;
n = n/len
}
return word;
}
}

fn main(){
!println!("{:?}", gen("01", 2));
}
>>
>>54238727
>Working on a video based emotion recognition system for a semester project.
That's pretty god damn ambitious.
>>
JS noob here. how do I make an automatic counter in AngularJS?
    $scope.unlimitedShekkles = function() {
$scope.shekkles = $scope.shekkles++;
$timeout(unlimitedShekkles, 1000);
};

I've declared $timeout in my controller and shekkles is a $scope variable.
This does nothing but increment Shekkles by 1. A for loop wouldn't work. I want a counter.
>>
>>54238747
my bad. this does nothing.*
kek
>>
/dpt/ on slack, y/n? also, every telegram channel that's been posted on /g/ is filled with indians. is /g/ filled with indians?

if /dpt/ is on IRC, that is fine too.
>>
>>54238665
>>optional
Soon it'll be optional

Oh, and btw you can import a string at compile time, do arbitrary string processing on it, and then insert it as code.
>>
File: TGm5QAx.png (177 KB, 906x591) Image search: [Google]
TGm5QAx.png
177 KB, 906x591
>>54238629
Just don't program any traffic lights with Kotlin.
>>
>>54238727
no more adderall for timmy.

also, look into openframeworks/opencv and if you're doing this with the kinect, then you'll need the kinectnui library. you should be able to find examples of projects on the openframeworks project using your webcam/kinect. you'll have to set up the anchor points, ofc.
>>
>>54238786
but yellow means speed up, you faggot.
>>
>>54238834
>yellow and green active at the same time
>>
File: Williams-Porno-Mags.jpg (166 KB, 1280x720) Image search: [Google]
Williams-Porno-Mags.jpg
166 KB, 1280x720
Most programming languages have some sort of Holy Bible. THE book that everyone recommends and agrees that is the best (for a certain skill level).

What's the equivalent for Excel/spreadsheets? I wanted to improve at Python or start C/C++ but given the job postings I should master Excel first (fml).

Any ideas? My google-fu doesn't return a reliable answer.
>>
File: help.png (56 KB, 874x401) Image search: [Google]
help.png
56 KB, 874x401
Can someone explain pic related to me? Just kinda walk me through it.
>>
>>54238742
I don't know what you are trying to do here, but it looks like a complete clusterfuck, back to the drawing board.
>>
>>54238879
I can honestly tell you that once you understand the basics of excel functions, there's little that you'll need to do that you can't Google in less than 5 minutes.
>>
>>54238903
https://en.wikipedia.org/wiki/Bitwise_operations_in_C
>>
>>54238903
int st_bf(int o, int v, unsigned s, unsigned e)
{
v <<= e;
unsigned tm = ((1 << s + 1) - 1);
unsigned m = tm - ((1 << e + 1) - 1);
return (o & ~m) | (v & tm);
}
>>
File: eg3.png (18 KB, 674x352) Image search: [Google]
eg3.png
18 KB, 674x352
r8
>>
>When designing using dynamic web-based scripting techniques developers must have a keen understanding of the logical, temporal, and physical separation between the client and the server.
webshitters everyone

>when designing a shitting street developers must have a keen understanding of the separation between the shit and the piss
>>
>>54238977
What is this ?
>>
>>54238977
>
// fill r with 0


Lewd.

Weird syntax / 10
>>
>>54238977
>having to comment everything for people to understand what it does
bad/10
>>
File: Absolute-Madman.jpg (371 KB, 1920x1080) Image search: [Google]
Absolute-Madman.jpg
371 KB, 1920x1080
>>54238915
I like to hear that, but there's so many tricks and quirks for doing weird stuff.

I'd like to start from zero and work my way up to a point that I can firmly say that I've mastered it in an interview without a trace of doubt in my voice.

Is there such a book/site/etc?
>>
>>54239030
>I'd like to start from zero and work my way up to a point that I can firmly say that I've mastered it in an interview without a trace of doubt in my voice.
That's called extensive job experience.

Get a certification to prove that you know Excel:
https://www.microsoft.com/en-us/learning/exam-77-420.aspx
>>
>>54238977
>>54239010
>>54239012
>>54239022

now available as

(rangeOf(arr) = 0)[1_at[4]][3_is = 4][8_is = { 2,3,4 }].iteril(printi);
>>
>>54239061
We're getting closer. Which is the go-to book to prepare for said exam? If there's an exam there's a market for study material. If so, there must be something good out there, and something that blows out most of books?

Sorry if I look strange, but I like to start with all the help I can need. I've been burned in the past by mediocre books/guides/etc and I wish to avoid making that mistake again.

Thanks for the answers thus far, though.
>>
>>54239022
that's just natural with C++ where even the syntax is often unintelligible to anyone that isn't a guru
>>
>>54239166
obv. goes without saying that it also works with std::vectors, std::array std::lists, etc, other ranges. anything with begin() and end()
>>
>>54239166
Yeah but you didn't explain how is that weird syntax implemented.
>>
>>54239183
I was trying to mimic the C thing

int[11] x = { [10]=1, [8]=2,3,4 }

>>54239189
operator overloading
_at, _is are user defined literals
>>
>>54237638
Hopefully never because it's the worst form of meta programming ever concieved.
>>
>>54239213
>operator overloading
Isn't [] a binary operator ? How come you can write [3_is = 4] ? Same with ().
>>
>>54239171
There's a study guide on that page, ya dingus.

It's specifically made to study for that certification.

You're probably able to find a pdf of it somewhere.
>>
>>54239213
Oh, I didn't even know that was a thing.
>>
>>54239246
Because = is also a binary operator

3_is tells the compiler to call
operator""_is (that's the function name) with 3, giving it a partial struct that represents assignment of an index to a value (partial being only index)
that struct has it's = operator overloaded, to give a more complete struct that has the index and the value
(the _at is like this but in reverse)
then the [] operator has multiple overloads for different struct types that do different things - e.g. slice, at, is, partial versions, raw index, etc.

so it desugars to

r.operator[](operator""_is(3).operator=(4))
>>
>>54239262
You're totally right! I missed it.

One last question. Is there an actual difference between MS Excel and Libreoffice Calc aside performance?

Will learning one teach me how to use the other? I've heard Calc has to be tweaked somehow to make it act more like Excel in some instances.
>>
>>54238772

It's already optional -- you must can't use the standard library without it. There are D bare bones guides though.

Also, sounds pretty awesome for metaprogramming.
>>
>>54239317
>Is there an actual difference between MS Excel and Libreoffice Calc aside performance?
Yes.

You can go ahead and forget that Calc exists.

They have many differences in functionality, and they are generally NOT compatible.

I'm all for libre, but I have a co-worker who insists on using Calc and his shit is ALWAYS fucked up on everyone else's machine, predominantly formatting issues.
>>
>>54239301
Ah, I was tricked, I didn't see there wasn't a ; at the end of lines and wondered of r was referenced. Now it makes sense.
>>
>>54239357
Sad to hear that, but glad to know.

Thanks a lot, anon/s.
>>
>>54239386
Wait. What about Google Spreadsheets vs Excel? Does that also cause problems like Calc?
>>
>>54238139

But you also have a perverse situation, where what... like at least 30% of the Earth's arable land is African. Most of the food is grown there first, then transported to other countries,and wasted there.

Meanwhile, niggers starve.
>>
>>54239379
currently trying to fix the map function so I can do .map(cbkop(*)(2)) for instance to multiply all elements in the range by 2
>>
File: tfw retarded.gif (2 MB, 240x180) Image search: [Google]
tfw retarded.gif
2 MB, 240x180
guise I feel stupid for taking so long to understand audio programming. Is it just me, or do you guys find writing file headers, byte streaming, endianess, and encoding/decoding difficult to program? even getting various libraries to work together seems hard unless you change your target language to nodejs or something as popular.

am i retarded?
>>
Pleb here, taking data structures with java

/g/ how much should I stress about learning heaps and binary search trees?

I understand their implementation and I've done the projects that use them, but should I memorize their implementation by the letter?

Are they used a lot that I should really have them on my mind all the time?
>>
File: required reading for (You).png (381 KB, 528x528) Image search: [Google]
required reading for (You).png
381 KB, 528x528
>>54239497
>>
>>54239487
just write a convenient wrapper around those things and you'll make your life easier
>>
>>54238745

There are third party services out there that can do this.
>>
>>54238010
I'm Slav. In our relatively homogebous society there is no white privilege because everyone is white. Don't globalize your racism problem, burger.
>>
>>54239525
Sensei, teach me to squat like they do in Yugoslavia
>>
>>54239400
Same.

There is no competition to Excel, and Microsoft Office formats are proprietary and non-compatible with open standards.
>>
>>54239515
And he specifically said he was doing it himself, instead of using anything 3rd-party.

The easiest thing to do would be to simply call Microsoft's new APIs:
https://www.microsoft.com/cognitive-services/en-us/emotion-api
>>
File: mKJEmQ7.png (977 KB, 1251x845) Image search: [Google]
mKJEmQ7.png
977 KB, 1251x845
>>54239558
AppChan ate my picture.
>>
>>54238727
You are lazy. http://cs231n.github.io/neural-networks-3/
>>
>>54239534
Gondola the best squatter!
>>
>>54239537
Roger. Thanks for the info.
>>
>>54239415
Proofs plz. Their agriculture tech is nowhere as advanced as modern high performance western agriculture.
>>
rust > d > go
>>
>>54239659
>rust > anything
>>
>>54239633
This. African agriculture is nowhere near 30% of the world's production.
>>
>>54239673
compañero your crocodilo mouth is facing the wrong direction
>>
>>54239794
>(>) rust anything
>>
>>54239812
don't get rusty lad
>>
>>54238942
why do C programmers write cryptic shit?
do they get off on it?
>>
>>54239859
Is that cryptic or are you just shit?
>>
>>54238163
kill yourself communist scum
>>
>>54239876
kill yourself capitalist scum
i bet you wear a bowtie to work FAGGOT
>>
>>54239871
>1 letter variables
>let me just shove some operations in the return statement so I can look extra cool
>>
>>54239897
You are literally the embodiment of reddit
>>
>>54239915
Never reply to me again unless you're contributing to the thread.
>>
>>54239924
Never FUCKING reply to me or your wife's son again unless you're contributing to the thread
>>
>>54239932
ok kid
>>
>>54239943
pls no teleport
>>
>>54237478
what should i have for dinner ?
>>
>>54239898
I'm the one who wrote the code, but not the one you replied to.

Just replace the names with the ones in the image, m is a mask, tm is just a reused subexpression, and the rest is in the return because why the fuck not ? I don't need to assign anything after creating the mask, and it's easier to visualize the operations made with the masks.
>>
File: FizzBuzz.png (13 KB, 578x461) Image search: [Google]
FizzBuzz.png
13 KB, 578x461
mods are asleep, post lisp
>>
Is there any develpment tool I can learn in, literally, 2 days? I dont need to develop anything exactly, I just have to kind of give a class about it. It will only be 15 mintues, but I need to have a tool.

Any suggestion? I know java, and Im currently working with android apps.
>>
>>54239991
C is piss simple to understand from a layman's standpoint
>>
>>54239979
8)))))))))B
>>
>>54240005
Then you're doing it wrong
>>
Thinking up a framework for character generation in an RPG I'm designing, right now for the primary purpose of plotting relative strengths at level 1 and as time goes on.
Character charmod(stuff...)(int[] vals...) {
static assert(stuff.length > 0);
assert(stuff.length == vals.length);
Character x;
return CM_GET!(stuff)(x, vals);
}

private Character CM_GET(stuff...)(Character x, int[] vals...) {
static if (stuff.length == 0) return x;
else {
assert(stuff.length == vals.length);
auto y = x;
y.Extract!(stuff[0]) += vals[0];
return CM_GET!(stuff[1..$])(y, vals[1..$]);
}
}

// some example starting traits
static zealot = charmod! ("fth", "intel") (1, -1);
static thick = charmod! ("end", "cha", "intel") (1, -1, -1);



Also Extract does this.
/**
Leverages static reflection to return a member or sub-member, of a variable which matches some name or boolean template operating on a type.

alias E = Extract; // is provided for convenience.
You can Extract on either side of an expression.
Ambiguous matches fail compilation.

Examples:
--------------------
struct Stuff {
string target;
int value;
}
struct Bundle {
string header;
Stuff payload;
}

Bundle foo;
foo.E!"target" = "Hello world"; //E default alias for Extract
assert(foo.E!"target" == "Hello world");

import std.traits : hasMember;
enum hasTarget(T) = hasMember!(T,"target");
foo.E!hasTarget.value = 42;
assert(foo.E!"value" == 42);
--------------------

Returns: The member which matches the given input string or predicate.
*/
>>
>>54238942

Thanks, Anon!
>>
>>54240055
>all those damn assertions
>>
>>54239659
How good are Rust's and D's concurrency primitives?
>>
>>54240113
from what I've heard
rust - amazing
D - concurrency?
>>
>>54240113
D has message passing mechanism (akin to Go's channels).
>>
>>54240184
(Also forgot link https://dlang.org/library/std/concurrency.html)
>>
Java is such a great language you should all try it
>>
>>54240200
Nice joke anon but try to make it more subtle
>>
I'm doing a c beginners course and one of the teachers isnt responding to emails so ill ask here:

The assignment is to make a wordcounter that counts lines/words/letters depending on what flags you use read from a file or standard input.

Thing is, I cant figure out how on earth they decided that we're supposed to count lines in standard input? Thats not how standard input works is it?

Is it reasonable to assume line-counting is for files only?
>>
>>54240109
They literally have no effect on performance on release builds, and the static assertions have no effect on performance on any builds.
>>
>>54240218
i'll give you a hint spaces
>>
>>54240235
They make the code ugly as fuck and are incredibly redundant, serving only to obscure
>>
>>54240113
D has good concurrency and parallelism in the standard library, and other libraries like vibe.d have fiber implementation. IIRC fibers are also on the docket for standard library inclusion.
>>
>>54240257
wat
>>
>>54238229
I also like Nim's approach to generics and metaprogramming, really interesting toys
>>
>>54240218
i use
whatever | wc - l
all the time
>>
>>54240258
The static assert provides an immediate, clear compiler error if you make a silly formatting mistake. Same with the assertion, only at runtime (or during CTFE as in the static variables there). In fact I think I'll change it from an assertion to an if-throw so it cannot get compiled out. The only redundant one is the assertion in CM_GET.
>>
>>54240336
well ive already figured out how to use it on a file

talking about how to read lines in standard input
>>
Why are professors so shit at programming? They give horrible assignment instructions then when you are at a real software development company everything is explained properly in full great detail and your managers actually know what they are doing and explain it so easily that even if you never programmed before you would understand.
>>
>>54240364
Buffer until you get a newline or EOF.
>>
>>54238563
>>54238681
>>54238721
>>54238742

If you're still there, i translated the python code into Rust, although i still have no idea of its purpose:

fn gen(alphabet: &str, mut n: usize) -> String {
let len = alphabet.len();

let alphabet: Vec<char> = alphabet.chars().collect();
let mut word = String::new();

if n == 0 {
word.push(alphabet[0])
} else {
while n > 0 {
let k = n % len;
word.insert(0, alphabet[k]);
n -= k;
n = (n / len) as usize;
}
}
word
}

fn main() {
let mut i = 0;
loop {
let key = gen("abcdefghijklmnopqrstuvwxyz00123456789", i);
println!("{} {}", i, key);
if key == "test" {
break;
}
i += 1;
}
}
>>
>>54240399
I tried both

After exploring my inputs in standard input Ive found no newlines no matter how long I make the standard input text
>>
>>54240420
Then your stdin is all in one line.
>>
>>54240392
if you can't do, teach.
>>
>>54240452
We should have professionals teaching though I learned so much and way more at a real software development firm than at university
>>
>>54240448
Yeah thats where my confusion comes from. I cant even test my code because I cant even make my stdin make more lines than 1.

And thats why I'm thinking its just a poorly defined assignment...and that the line counter is just for reading text files
>>
>>54240452
And if you can't teach, administrate.
>>
>>54240471
How do you feed input into your program?
>>
>>54240497
I just did it through cygwin or cmd desu
>>
Anyone here done any work with Vulkan?
When I create a VkDevice I get a ton of these messages when running the program.
>../../../../../src/intel/vulkan/gen7_pipeline.c:241: FINISHME: VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO

I'm assuming its due to Ivy Bridge having incomplete Vulkan support, and that the FINISHME is a note to the Intel/Vulkan developers.
>>
>>54240463
Universities aren't supposed to be job training.
Otherwise, you would have CERTIFIED JAVA DEVELOPER (TM) degree instead of CS
>>
>>54240526
I think that would be much better than the useless shit you learn in University
>>
>>54237656
>basic rights we take for granted (for example, walking into a store and not being treated as a potential thief
Wow, that's some right. The concept of "earning" someone's trust is so problematic, everyone has a right to be trusted unconditionally! If there's mistrust happening in your brain, you're violating my rights!
>>
>>54239979
>post lisp
>only one set of ()
...
>>
>>54240735
>what are []
>what is syntax
>>
Pajeet here ask me anything I'm on lunch break
>>
>try to edit toolbox in VS2015
>it freezes and crashes
I'm not sure what I was expecting, but I'm not surprised
>>
import std.range:iota;
import std.algorithm:map,each;
import std.conv:to;
import std.stdio:writeln;

void main() {
iota(0,101).map!(a=>(a%15==0)?"FizzBuzz":(a%3==0)?"Fizz":(a%5==0)?"Buzz":a.to!string).each!writeln;
}
>>
>>54240770
What's it like being pajeet?
>>
>>54240770
do you wash your hands after taking a shit and if so, what method do you use to wash them?
>>
>>54240567
Problem solving skills are a lot more valuable than specific knowledge on some topic/language.
>>
>>54240770
How do I instantiate a class factory so that I can inject a dependency into my Bean method?
>>
I'm going to start learning programming today. A friend said I should start with Java, C++ or Python.

/dpt/ thougths?
>>
>>54240818
java preferably, maybe C++ but it can be a bit complicated for a beginner, and if you're interested in C++ then java prepares you for it anyway

ABSOLUTELY DON'T pick python
>>
>>54240818
python
>>
>>54240818
C++
>>
>>54240840
This. Don't pick python. I prefer c++
>>
>>54240818
Python has no performance and no manual memory management and no static typing

Java has less than ideal performance and no manual memory management and no template overloading and inconsistent primitives and meaningless operators and no operator overloading
Thread replies: 255
Thread images: 32

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

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