[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: 329
Thread images: 25

File: daily programming thread2.webm (2MB, 600x338px) Image search: [Google]
daily programming thread2.webm
2MB, 600x338px
old thread: >>52664756

Return of the Hime edition!
What are you working on, /g/?
>>
>>52682123
D
>>
File: cs.jpg (1MB, 1904x4706px) Image search: [Google]
cs.jpg
1MB, 1904x4706px
Welcome to /dpt/.

# New & Revised /dpt/ Code of Conduct #
We want to ensure that the /dpt/ community, while large and diverse, remains
welcoming and respectful to all participants. To that end, we have a few
ground rules that we ask people to adhere to.

- *Be friendly and patient.*

- *Be welcoming.* We strive to be a community that welcomes and supports
people of all backgrounds and identities. This includes, but is not limited
to members of any race, ethnicity, culture, national origin, colour,
immigration status, social and economic class, educational level, sex,
sexual orientation, gender identity and expression, age, size, family
status, political belief, religion, and mental and physical ability.

- *Be respectful.* Not all of us will agree all the time, but disagreement
is no excuse for poor behavior and poor manners. We might all experience
some frustration now and then, but we cannot allow that frustration to turn
into a personal attack. It’s important to remember that a community where
people feel uncomfortable or threatened is not a productive one. Members of
the /dpt/ community should be respectful when dealing with other members as
well as with people outside the /dpt/ community.

- *When we disagree, try to understand why.* Disagreements, both social and
technical, happen all the time and /dpt/ is no exception. It is important
that we resolve disagreements and differing views constructively. Remember
that we’re different. The strength of /dpt/ comes from its varied community,
people from a wide range of backgrounds. Different people have different
perspectives on issues. Being unable to understand why someone holds a
viewpoint doesn’t mean that they’re wrong. Don’t forget that it is human to
err and blaming each other doesn’t get us anywhere. Instead, focus on
helping to resolve issues and learning from mistakes.
>>
>>52682144
Trolling is against the rules, anon.
>>
>>52682123
>>52682124
>counting the number of seconds it takes to evaluate fib(n)
>25 - 1s
>26 - 2s
>27 - 3s
>28 - 5s
>29 - 8s
>30 - 13s
110% spooked rn
>>
>>52682240
>he fell for the recursive meme
recursion has it's place, and fibonacci is literally the worst possible use for it
>>
>>52682263
you didn't read my last post did you?
>>
File: 1MxvGVT.png (194KB, 1199x624px) Image search: [Google]
1MxvGVT.png
194KB, 1199x624px
Simple WPM cheat for a game called CS:GO

Using GetPrivateProfileString to read strings in an ini file, really simple, just using it to let me edit and update the cheat quicker.
>>
>>52682123
kill yourself
>>
Can I get some assistance?
Trying to make a symbolic link - here is my code.
MPD_ARTIST=$(mpc current -f %artist%)
MPD_ALBUM=$(mpc current -f %album%)

COVER_PATH="Music/$MPD_ARTIST/$MPD_ALBUM/Cover.jpg"

echo ~/$COVER_PATH

ln -fs ~/$COVER_PATH ~/.config/conky/aa-image.jpg

And here is my output.
[pied@piper conky]$ sh aa-linker.sh
/home/pied/Music/Death Grips/The Money Store/Cover.jpg
ln: target ‘/home/pied/.config/conky/aa-image.jpg’ is not a directory
[pied@piper conky]$

What's going on here?
>>
>>52682144
god damn it. Stop making me resent the fact that I wasn't born during the golden age of programming.
>>
>>52682144
>also, zed shaw
REEEEEEEEEEEEEEEEEEEEEEEEEE
>>
>>52682456
SYNOPSIS
ln [OPTION]... [-T] TARGET LINK_NAME (1st form)

did you mean
ln -sT TARGET LINK
>>
Does any one have any ideas for projects that are difficult? Preferably something low level but not to the level where I'm building a compiler or something?hj
>>
>>52682569
fizzbuzz
>>
>>52682513
>>52682456
nvm fixed
I should have used
ln -fs ~/"$COVER_PATH"  ~/.config/conky aa-image.jpg
>>
>>52682144

>gender identity and expression, age, size, family
status, political belief
>size

Wait, are we talking dick size here? Am I not allowed to call into question the size of other anons dicks for not programming in assembly? What the fuck, Anon? Your code of cockduct is shit!

>religion

On a more serious note, I reserve the right to criticize all people for their religion, regardless of their religion. Magic isn't real... except for Lisp. Lisp is real.

>mental and physical ability.

https://www.youtube.com/watch?v=eOBoKxEcVAA
>>
>>52682578
edgy
>>
>>52682263
> recursion has it's place, and fibonacci is literally the worst possible use for it
Okay, let's see your non-recursive function for calculating fib(10^10) mod M.
>>
>>52682123
Sorry if I'm retarded, but wouldn't packing the struct be something that GCC does, not the kernel?
>>
>>52682339
VAC will detect that shit so fast it's not even worth it.
>>
>>52682606
Lisp isn't magic.
>>
>>52682339
>Spaces in parameter names
Disgusting, kill yourself.
>>
>>52682899
Not him but VAC is actually pretty garbage at detecting cheats that aren't used by everyone, I made a shitty wallhack just for myself a year ago and still haven't been fucked.
>>
>>52682899
How exactly does VAC even detect these things?
>>
/dpt/
what is wrong with nim
I see people complain about it, but what's bad about it?
>>
>>52682666
Transcoder of that webm here, yes it's wrong, the kernel doesn't know what structs even are.
>>
>>52683026
>what is wrong with nim
I don't use it, I've never used it and I never plan on using it, therefore it's shit.
My reasoning is perfect.
>>
File: t-thanks microsoft.png (404KB, 640x582px) Image search: [Google]
t-thanks microsoft.png
404KB, 640x582px
Why don't programs compress their memory usage using gzip?
>>
>>52683022
player gets banned -> they check his files -> detect alterations -> check for the same alterations in other people's files
>>
>>52683152
>get banned
>the contents of my hard drive get automatically uploaded to valve servers
BOTNET
>>
>>52683026
it hasn't fully matured yet
>>
File: 1427508469680.jpg (10KB, 270x321px) Image search: [Google]
1427508469680.jpg
10KB, 270x321px
>Certain arrangements of C operators and variables/literals are patented.
When will this age of software patents end?
>>
>In parallelism class that is part of some multi-university shared class thing
>Basically, we all get access to a bunch of online lectures, the same assignments, and time on the stampede supercomputer for all of our programming assignments
>Class has "assignment 0" released, basically requiring us to describe one aspect where parallelism has been used in computing, what challenges it has faced in becoming parallel, etc...
>But worth 0 points, so can't be fucked
>Several days later
>Assignment weight changed to 5% of grade
>Shit, gotta think of something for this, quick
>Game engines
>Pretty much everything I needed to answer the assignment was in a couple of articles online anyways

Easy shit.

>>52683068

Because that's retarded.

>>52682942

Neither is Haskell.
>>
>>52683216
>Neither is Haskell.
Of course, no functional programming language is magic. Memes they are though.
>>
>>52683068
Because the overhead is way too high.
Somewhat related though, the Linux kernel can compress swap pages, zswap I think it's called.
>>
>>52682123

Source on that anime?
>>
>>52682123
I don't really know what to work on. I can't really find things to do that would be hard, just things that would take long. I'm looking for projects that are small, but will improve my skill as a programmer.
>>
>>52683268
Boku no Hime.
>>
>>52683022
its a WPM, so basically it will look like this (very unlikely he will actually get banned if he keeps his cheat private)
VAC scans for open process handles to the protected process
finds out what process opened said handle
check if its an unknown process or not (antiviruses do this shit all the time, so they have a "whitelist" of processes)
if its unknown, it opens the process, copies a bunch of diagnostics data which it sends off to valve
valve engineer opens your cheat on his own computer, sees that its a cheat and adds it's signature to the banlist

this is for EXTERNAL cheats (aka WriteProcessMemory/ReadProcessMemory)
the process is a lot different for cheats that inject themselves into the protected process
>>
>>52683268
sexual harassment, the animation
>>
>>52683280
>its a WPM
words per minute?
>>
>>52683280
Why the fuck does Windows allow a process to read another processes memory?
What a pile of insecure garbage.
>>
>>52683342
you can do this on linux too you mongoloid
>>
>>52682144
That picture. I hate that so fucking much. Eveywhere I look trying to get beter at programming, all I see is bullshit like Mark Fuckerberg, fucking Steve Jobs, and tutorials for complete fucking retards.

Where are the modern versions of books like SICP and The Little Schemer? The Dragon Book? Why does modern programming cultutr suck so much ass?

I'm looking for some Book recommendations, something out of the ordinary, that will really make you a beter programmer, or even just about compsci in general.

Speaking of which, in the SICP lectures it is stated that CS has a bad name; it's not about computers, nor is it a science. It's a mathematics based craft.

However, I'm at a university where most studens (and even one of the profs I've spoken to) think CS is a science, and it's about computers. (That prof msy just have been mad because I told him his classes should be removed from the curriculum)

It's about fucking time we switch this bullshit around where we cater to the biggest fucking retards around. I'd rather be associated with autistic nerds that these fucking people.
>>
>>52683342
Are you serious? You can't be this dense right?
>>
>>52683342
>what is proc/PID/mem

wew laddie
>>
>>52683400
god i can smell your aspergers through the fucking screen
how about you stop sperging out about inane shit on taiwanese imageboards and go write some fucking code so you'll actually get good at some point in the future?
>>
>>52683449
honestly even Android and iOS have a better security model than windows and desktop linux distributions.
>>
>>52683494
couldn't you just run a program in kernel mode and bypass any safety measures imposed by the OS anyway?
>>
is there any reason why i couldn't/shouldn't compile my main application into a dll which is launched by the updater app (which is the actual .exe)
that way i just have to update dll files when im patching
>>
>>52682659
not him but
>mod M
faggot
mod has nothing to do with a fucking recursive fibonacci function
>10^10 special case because % 2 = 0
integer fib(n) {
n -= 2;
integer a = 1;
integer b = 1;
for (integer x = 0; x < n/2; x++) {
a += b;
b += a;
}
return b;
}


now fuck off
>>
I have a bout a thousand swf files with one frame. What software can I use to convert them all into a png or jpg file?
Gnash seems to crash and that that kurst renderer 1.0 works but I have 1,000+ files here and im not gonna pay up for a task like this.
swefrenderer in sweftools seems to crash with it too.
Here's a sample
https://my.mixtape.moe/hbfxoc.swf

If you get a red "Width: 612 Height: 720" that's just the action script protection making the swf delete it-self because it wasnt loaded within the proper "viewer"
>>
>>52683494

Android has /proc/xxx/mem (it literally is Linux), and iOS had more security vulnerabilities in 2015 than Adobe Flash.
>>
I'm learning to program in Java right now. Please tell me if I'm right...

 
public class DogLicense {
private int licenseYear;
private int licenseNum;

public void setYear(int yearRegistered) {
licenseYear = yearRegistered;
return;
}

public void createLicenseNum(int customID) {
licenseNum = (100000 * customID) + licenseYear;
}

public int getLicenseNum() {
return licenseNum;
}
}


DogLicense is a class.
Integers licenseYear and licenseNum are objects.
So is setYear() and createLicenseNum() creating methods??
Integer getLicenseNum() is an object?
>>
>>52683697
DogLicense is a class
ints licenseYear and licenseNum are primitives
setYear(), createLicenseNum() are methods (setters)
getLicenseNum is a method (getter)
>>
File: dfdisklinux.png (19KB, 677x342px) Image search: [Google]
dfdisklinux.png
19KB, 677x342px
Linux disk image support!
>>
>>52683709
createLicenseNum isn't really a setter, just a plain method that could be part of a constructing the object
>>
>>52683709
I haven't learned what a primitive is. How is that different from an object? I thought objects included instance variables
>>
>>52682123
>What are you working on, /g/?
I've been on a train for 44 hours learning about assembly and making various programs to translate binary numbers into hex and decimal and back again all because I didn't have internet. I also made some other programs that I don't remember out of sheer boredom. Also read some of the works of Lovecraft and Sapho. Both are overrated but love craft was at least entertaining.
>>
>>52683725
objects have instance variables (also called fields or member variables) which can be either objects or primitives

a primitive is a simple data type which on its own can fit in a CPU register and be operated on by built in CPU instruction. for example adding two ints would be done in a single CPU instruction. objects on the other hand can be much more complex and an object variable is an indirect reference to an object.
>>
>>52683777
I see. Thanks for the help.
>>
>>52683777

>which on its own can fit in a CPU register
Not necessarily. The "long" data type still exists on 8-bit and 16-bit CPUs, and requires multiple registers to fit it. It is nonetheless considered to be a primitive type.'

It would be easier to say that a primitive has no instance variables, and isn't an array.
>>
>>52683541
Yeah, but first you have to get your program to run in kernel mode dummy.
>>
>>52683370
>>52683414
>>52683449
I know I was wrong, I was just waiting for someone to tell me how it's done in Linux.
I still think being able to read other's memory is retardedly insecure though.
>>
>>52682123
Here's a code sample :
void test () {
int x[2];
x[0] = x + 1;
x[0][0] = 1;
printf("%i\n", x[1]);
}

What I am trying to do here:
-Allocate an array that may contain both pointers and integers.
-Store a pointer to the second element of the array in the first element of the array.
-Use the pointer stored in the first element of the array in order to set the value of the second element of the array.
- Display the value stored in the second element of the array.

Now, GCC complains and refuses to compile my code because it believes that the first element of the array doesn't contain a pointer.
Is there a solution to my problem?
>>
>>52683972
just... no.
>>
>>52683920
>merely pretending
sure buddy
>>
>>52684013
Ah, fuck me. Well, I'll just une an array that contains pointers to integer and pointers then.
>>
>>52683972
Your code make the horrible assumption that ints and pointers are the same size. Also, C will not convert between pointers and integers without an explicit cast.
#include <stdio.h>
#include <inttypes.h>

int main()
{
intptr_t x[2] = {0};
x[0] = (intptr_t)(x + 1);
*(intptr_t *)(*x) = 1;
printf("%"PRIdPTR"\n", x[1]);
}
>>
>>52682144
>also, zed shaw

He did nothing wrong, at least not compared to what came after.
>>
>>52684024
Aaaaaand that's not a solution. I'm retarded.

>>52684034
I'm working on a virtual machine where pointers and integers are the same size. Thanks, Anon.
>>
>>52683400
>Where are the modern versions of books like SICP
http://www.composingprograms.com/
>>
>>52684046
>I'm working on a virtual machine where pointers and integers are the same size
That's still incredibly non-portable. (u)intptr_t is the type you should use if you want an integer that is guaranteed to be the correct size for a pointer.
>>
>>52683920
>I know I was wrong, but I posted it anyway
Good job retard.

>Reading other's memory is insecure.
Well it's been that way for a long time, it can't be that bad can it.
>>
http://strawpoll.me/6670165
>>
http://strawpoll.me/6670188
>>
File: amp.png (61KB, 718x584px) Image search: [Google]
amp.png
61KB, 718x584px
This happens when I close the thing
How should I interpret it? Does C++ AMP need some sort of cleaning up, sort of like std::threads need to be joined/detached before main thread exits(otherwise they call std::terminate)?
>>
Dear /dpt/.

I barely knows programming langs, as 90% of code I make refuse to work properly. The only things I can remember are basis of C++, since my university was forcing way too much programming related subjects and at every single one approach was basically "you can use any langauge you want, but we will be able to help you only, if you will be using C++".

Now, in near future, I might need to make some software for measurements control in laboratory (various devices connected to PC with mostly RS-232 or 482). What language would be best for that purpose, so I could try to start learn it right now?

I will probably run on some Linux distro and for longer periods of time (like few days straight).

Thank you for reply.
>>
>>52684107
>Good job retard.
Thanks, it takes courage to knowingly make retarded posts.

>>52684046
What VM?
>>
>>52682942
Yes it is
>>
>>52684367
>I will probably run on some Linux distro and for longer periods of time
Why?

Linux doesn't make you better at programming.

Best case is that you're having to research so many inane fixes to problems, so you become better at googling things.
>>
>>52684452
Prove it.
>>
>>52684295
>sort of like std::threads need to be joined/detached before main thread exits(otherwise they call std::terminate)?
I sure love when UNIX behavior gets pushed into language standards. /sarcasm
>>
>>52684463
http://www.gigamonkeys.com/book/
>>
>>52684477
Just be thankful it's UNIX and not some other OS's behaviour.
>>
>>52684477
unix or posix ?
>>
Hey guys, very new python learner. Using this code to project an imagine of a mountain range.

I'm getting this:

*
*
*
*
*
*
*
*

when it should be:

*
*
*
*
*
*
*
*

num = eval(input("How high is your mountain range? "))
for i in range(num):
print(i*" ","*",sep=" ")
for j in range(num):
print(j*" ","*",sep=" ")

[code/]
>>
>>52684684
Nice splats.

Put those in code blocks if you want to keep whitespace.
>>
>>52684684
What are you shoving into num?
>>
>>52684704
>>52684705

So basically, it's making a little mountain.

if you enter 4, four stars will make a slope.
But it also needs to come back down but I'm
not sure how to do that.
>>
The whole picture is that all of this happens in the destructor of std::threads, which checks that you've either done
thr.join()
or
thr.detach()
. In your case, this is after main returns because that's when the destructor is called, but it's not always the case.
>>52684477
This is RAII, the std::thread class wont let go of a thread implicitely so it's easier for programmers to keep track of them.
Nothing to do with UNIX.
>>
Shitposting on the /dpt/ because my probability teacher is a dumbass and I learn more here.

Please, tell me what the probability of selecting 10 senators randomly and them being from different states. Then I'll tell you what he thinks the answer is.
>>
>>52684936
62% ?
>>
r8 my fizzbuzz
#include <iostream>
#include <Windows.h>

int main() {
for (int i = 0;;i++) {
!(i % 3) ? (!(i % 5) ? std::cout << "FizzBuzz" : std::cout << "Fizz") : (!(i % 5) ? std::cout << "Buzz" : std::cout << i);
std::cout << std::endl;
}
}
>>
>>52685037
I got 60.7%, but close enough. you probably solved it sort like this
product of ( number of senators left not from picked state ) / ( number of remaining senators )

He explained it as the combined probability of events like
Pr(A^B^C^D...^J) = Pr(A|B^C^D...)Pr(B|C^D^E...)...Pr(I|J)Pr(J)
Which is correct. Starting at the end you get the Pr(J) is 1/50 because there at 50 different states to start with. The next is (49/50)*(1/99) because you have 49 states left to pick from and there are 99 senators left. And so on.

I told him that was inconsistent, as did most of the class, but he wouldn't accept that. So the total probability is 1.2%, which "makes sense".
>>
>>52685120
i resolved it with https://en.wikipedia.org/wiki/Birthday_problem

with 10 senators and 50 sates, there 38% that at least two of them share a sate therefor there 62% that none of them share one.

def f(senators):
p = 1
for i in range(senators):
p *= (50-i)/50
p *= 100
return p, 100 - p

print(f(10))

# (38.1706680558551, 61.8293319441449)
>>
>>52685081
Really ugly use of the ternary operator. I've done stuff like that for compile time eval though :)

How does this make you feel

            constexpr assign_mode mode = (
(dst_traits::bits_r==0) ? assign_mode::no_op :
(src_traits::bits_r==0) ? assign_mode::sub :
(src_traits::is_int_type && !dst_traits::is_int_type) ? assign_mode::int_to_float :
(!src_traits::is_int_type && dst_traits::is_int_type) ? assign_mode::float_to_int :
(!src_traits::is_int_type && !dst_traits::is_int_type) ? assign_mode::float_to_float :
(dst_traits::bits_r > src_traits::bits_r) ? assign_mode::upscale : assign_mode::downscale);
>>
File: quite a ruff victory.jpg (46KB, 653x510px) Image search: [Google]
quite a ruff victory.jpg
46KB, 653x510px
>>52685191
>>
>>52685191
so I should have done it with ifs?
>>
What's the best option for setting up a simple local database in ios? In Android I use Ormlite.
>>
>>52685239
Yes absolutely. Far more clear for someone reading your code.
>>
>>52682123
I wouldn't call it work at this point but I just started looking at that book named "Learn Python the Hard Way".
>>
>>52685325
I'm so sorry.
>>
>>52685310
isnt the goal to make it as short as possible?
>>
>>52685360
No, the most important thing is either clarity or performance based on your application.

Making the actual code short isn't related to performance and makes your code harder to read and understand.
>>
>>52685337
I have to start somewhere. I know the book isn't very good but it is better than doing nothing.
>>
>>52684367
It depends upon the data rate and what you actually need to do.

If the data rate is high, or you need to do a lot of online processing, you may be limited by performance constraints.

Otherwise, you can use pretty much anything. You don't need to use the same language to capture the data and to process it.

Depending upon the communication, the capture part may be as simple as copying from a device to a file (no programming involved).

All other factors being equal, do as little processing as possible when capturing the data. That minimises the opportunities for failure.

If something goes wrong during off-line processing, you can fix the problem and try again. If something goes wrong during capture, you may end up losing precious data and having to re-run the experiment.

Low-level languages are less likely to suffer from heap fragmentation or gratuitous memory consumption causing the program to terminate due to memory exhaustion. But they provide other opportunities for abnormal termination (segfault, division by zero, etc) which would produce catchable exceptions in higher-level languages.
>>
Wake the fuck up /dpt/
>>
so im having a couple problems with this code right now:
1. cin.get is only getting one character. for some reason cin.getline isnt working in Visual studio.

2. the frequency that each word length appears isnt being copied to the corresponding array subscript.

any help or feedback would be appreciated.

using namespace std;

#include <iostream>
#include <string>
#include <cctype>
#include <iomanip>


void CountValue(int Count, int CharCount,int FrequencyArray[]);

int main() {

const int MAX_SIZE_OF_ARRAY = 16;
int FrequencyArray[MAX_SIZE_OF_ARRAY] = { 0 };
int CharCount = 0, WordLength = 0;
char ch;

cout << "Enter words:" << endl;
cin >> ch;
cout << ch;


cout << "Word Length Frequency" << endl;
for (int i = 1; i < MAX_SIZE_OF_ARRAY; i++) {
cout << setw(6) << right << i << " "
<< setw(8) << right << FrequencyArray[i] << endl;
}
while (cin.get(ch))
if (isalpha(ch))
WordLength++;
else {
CountValue(WordLength, CharCount, FrequencyArray);
WordLength = 0;
}




// add average
}
void CountValue(int Count, int CharCount, int FrequencyArray[]) {
const int MAX = 16;
if (Count > 0) {
if (Count > (MAX - 1))
Count = MAX - 1;
}
FrequencyArray[Count]++;
}
>>
>>52683400
Is the situation that bad today?
>>
>>52683400
>Speaking of which, in the SICP lectures it is stated that CS has a bad name; it's not about computers, nor is it a science. It's a mathematics based craft.
>However, I'm at a university where most studens (and even one of the profs I've spoken to) think CS is a science, and it's about computers. (That prof msy just have been mad because I told him his classes should be removed from the curriculum)

CS is a science and it is about computers.

"Science" is an open-minded way of looking at the world. Nothing is "superior" or "inferior" in the eyes of science. It only is.

"Computer" doesn't just mean an electronic digital machine. You can think of any physical process as a computer.
>>
>>52686601
http://www.ww.amc12.org/sites/default/files/pdf/upload_library/22/Ford/DonaldKnuth.pdf

computer science is a shit name, it should have been named computing science.
>>
We're having a plotting challenge at /sci/ and I thought some of you would be interested.
>>>/sci/7819684

t. /sci/ crossposter
>>
>>52687120
Why is /sci/ such cancer?
>>
>>52686601
It's not a "science" in the sense of discovering the mechanisms by which the universe operates through generating testable hypotheses then testing them with experiments.

It's fundamentally a branch of applied mathematics.
>>
File: 1300643272510.jpg (109KB, 445x500px) Image search: [Google]
1300643272510.jpg
109KB, 445x500px
Programming newbie here.
The only real programming skills I have are 3 years of C#, which was back in 2009, so I highly doubt I still retain any of those.

I was looking to get into C++ because I eventually want to consider going into vidya, and an anon once told me that if I'm going to do C++ for that reason it'd be wise to start with C and from there move on to C++ if I would feel like I need to.

How much of this is actual wisdom and is it a good idea to start with C rather than dive into C++ instantly?
>>
>>52687356
>going into vidya
professionally or hobby wise?
>>
>>52687450
Hobby mainly with friends. I'm currently studying system and network engineering, but if the situation ever arises where I could go pro I would take it.
>>
>>52687296
it isn't a physical science but you could consider it to be a science in some sense depending on how you define science. like is human psychology a science? i mean you could form hypotheses and test them with psychological experiments and statistics. i guess you could say that computer science isn't a science in the sense that math isn't a science, but it still works with the very nature of the universe, albeit the non-physical aspects of it.
>>
File: 1422442112144.jpg (29KB, 299x265px) Image search: [Google]
1422442112144.jpg
29KB, 299x265px
Should I learn LUA? is there any use other then game related??
>>
>>52687356
Literally never start with C before you go into C++

It's the worst possible advice anyone could give you
>>
>>52687494
Stick with C#, and use Unity or Monogame. C++ is only a good idea for triple a games.
>>
File: OpenGL-ES-2_0-Reference-card.png (2MB, 1944x1320px) Image search: [Google]
OpenGL-ES-2_0-Reference-card.png
2MB, 1944x1320px
>>52687356
start with C++ straight away. Ctards never learn how to write proper C or use OOP (not that OOP is strictly required for a game). use raw opengl especially if it's for a hobby and you have time to learn.
>>
>>52686601
>Nothing is "superior" or "inferior" in the eyes of science.
That's wrong, though.

A scientific study can show superiority or inferiority on a number of things, based on objective fact, such as the effectiveness of a drug, or a particular strain of a crop.
>>
>Ctards never learn how to write proper C
*proper C++
>>
>>52687516
I use Lua for scripting on OpenWRT devices where python isn't a good option. It's a fun little language and will not take a lot of time investment for you to learn.
>>
>>52687356
Yeah, go into C and go through basics. It will help you understand how do the different languages work and you might find out that you prefer it over C++ (a lot of vidya programming is done in C as well. And going from lower language to higher is way easier than going from higher to lower).

>>52687516
S/LUA/Lua/
It's a scripting language.
You can embed it into anything very easily.
And it's easy to write in.
If you're writing small things then you might use it as well instead of e.g. Python.
So ... Up to you :^)
>>
>>52687553
They do though. And if you want anyone to learn proper C++ (which right now would be understanding perfect forwarding and magic with rvalues, smart pointers, lambdas, templates and other cool stuff introduced in C++11) from scratch, then I have no idea how you're going to explain them that that's the way they want to write.

This, as well as writing proper OOP, comes from experience and is an acquired skill. Knowing how all this works low-level can help one appreciate the tools and understand why they want to use them (or even whether they want to use them).
>>
File: buisnessman-ascending-to-heaven.jpg (119KB, 1178x1300px) Image search: [Google]
buisnessman-ascending-to-heaven.jpg
119KB, 1178x1300px
>tfw finally fixed the rolling hadoop outages
>>
>>52687356
Honestly, the best thing you could do for yourself is to sharpen your skill with C#, since you already have experience using it.

C# will allow you to actually be able to do solo projects within a reasonable amount of time. There's also a massive amount of jobs for it presently, and the outlook is that it continues to grow.

That being said, going into C++ would also be great for vidya and your career in general. The reason why I suggest C# over C++, is that you can 'get into' C# stuff quicker, as well as the fact that you've already learned the basics. This will actually let you break the barrier that forces most potential programmers to quit; they feel like they can't *do* anything.
>>
>>52687516
Lua isn't an acronym. It's Portuguese for moon.

I use it as a scripting language. If you (like me) build up a library of common functions and use the multitude of available luarocks it's ability as a general purpose scripting language rivals Python. Use the JIT, it's much faster than Pypy and the C FFI is fucking awesome.
>>
>>52687654
ooga booga por favor
>>
>>52687654
themoreyouknow.gif
>>
>>52682123
Sauce Nao
>>
>>52687666
himegoto, now go back to your containment board
>>
>>52687552
That's outside the realm of pure science.

Neutron stars are not "superior" or "inferior" to black holes. Neither are apples "superior" or "inferior" to oranges.

These properties can only be measured in relation to something else.

Haskell is not "superior" nor "inferior" to Java. They are just systems that follow certain rules.

You have to go to applied science to see which one is easier to learn, runs in less RAM, etc. You are studying their relationship to human beings, compilers, or digital computers, not their inherent properties.
>>
>>52687666
nice facebook filename fag
>>
>>52687688
>applied science isn't science
>>
>>52687688
You're basically arguing about the semantic implications of the word 'science'.

You said the phrase:
>Nothing is "superior" or "inferior" in the eyes of science.

Most reasonable people would disagree with this, but it cannot be proved to be true or false without agreeing on a definition of what the 'eyes of science' are.

We shall agree to disagree.
>>
File: mind_blown.gif (2MB, 320x180px) Image search: [Google]
mind_blown.gif
2MB, 320x180px
>>52687684
I just walked into that trap. The world's most uncomfortable chubster right now.
>>
>>52687688
Haskell is alright, but Java is objectively the best language
/dpt/ will back me up on this
>>
>>52687851
I'm not annoyed by the content of your post, so much as the intention to bait/troll angry responses.
>>
>>52687850
kek

but seriously rule 2
>>
>>52687851
>Java is objectively the best language
this
>>
>>52687895
I'm sorry if I implied Haskell was remotely decent
>>
File: 1258554765435.jpg (52KB, 640x480px) Image search: [Google]
1258554765435.jpg
52KB, 640x480px
>>52687534
>>52687526
>>52687535
>>52687632
>>52687575
Thanks for the advice. Looks like I'll be working on either a fresher upper for C# or C++. Also opinions seem divided on the C/C++ thing. I know one isn't a super or subset of the other, but what's the similarity/ difference?
>>
>>52688186
Unless you're an OS developer or working on software maintenance already written in C don't bother and such with C++.
>>
>>52688186
Some will say that C is better because it's super low level and gives you a better insight to how programming languages work.

While this is true, it's very difficult to do even the most menial tasks in C.

C++ gives you libraries and abstraction that will give you more options out-of-the-box to do things and interface with softwares and services.
>>
>>52688186
in broad terms you could say that C++ is a higher-level language almost like C# whereas C is the bare minimum with primitive types, structs, control flow statements, pre-processor macros and functions
>>
>>52688263
and pointers of course but that's pretty much it
>>
>>52688217
>gives you a better insight to how programming languages work.
not really
>>
>>52688278
C++ and C# both have pointers
>>
>>52688364
i'm talking about what C has. C++ and C# have things that C doesn't have.
>>
>>52688467
Oh, I see, carry on.
>>
How do I get into the demo scene guys
>>
>>52682123
Please stop this programming trap meme.
Thanks.
>>
What would cause my program to stop working on windows? I copied the code from my server which running ubuntu. It works fine on Ubuntu and it worked fine in windows for a while. Now when I try to run it nothing happens. I have tried compiling with mingw and using visual studio. Both cause the same problem.

#include <iostream>
#include <iomanip>
using namespace std;

double start, elap;

void fact(int input)
{
double x = 2; //start at 2
start = clock();

{
if(input % x == 0)//Check if input / x has a remainder
{
cout << x << " ";
input /= x;
}
else// if it has a remainder add 1 to x
x++;
}while(input > 1);
elap = (clock() -start)/ CLOCKS_PER_SEC;
}

int main()
{
long long int input;
cout << "Please enter an integer: ";
cin >> input;

fact(input);
cout << endl;
cout << "Run Time: " << setprecision(4) << elap << " seconds";
cout << endl;
return 0;
}
>>
>>52688525
these might help for music:
http://milkytracker.org/docs/Vhiiula-TechniquesOfChipping.txt
http://opengameart.org/forumtopic/kickin-it-old-school-setting-up-nes-style-chiptunes
>>
>>52684459

We cant afford buying several keys for Windows and we have large number of PC dedicated to handle single measurement stations. In such case, light Linux distros are the best.

>>52685777

>Depending upon the communication, the capture part may be as simple as copying from a device to a file (no programming involved).

It is not that easy. Program must be able to both collect data and monitor situation, with some processing in the background (plus, being able to show processed data on graphs would be important as well), for feedback purposes.
>>
>>52688587
Oh, I misunderstood, I thought you meant to use Linux as your personal OS in an effort to aid your programming learning.
>>
File: gears.png (21KB, 300x300px) Image search: [Google]
gears.png
21KB, 300x300px
>>52682123
I'm doing a game and want to test things on linux. I heard Ubuntu is no longer on X, hence you can't use GLX and do native Opengl and have to go through OGL ES or something like that(I may be wrong, I have no experience with linux). I tried arch a ***couple*** of times in the past but had issues with nuovo and nvidia drivers and compatiblity shit. So what's the next best distro to soil myself with for development/testing?

Also I'm using a toaster so VMs are not gonna be an option.
>>
>>52688612
Fedora, probably.
>>
>>52688611

I just might have to install the same Linux distro at separate partition to work on it at home, in order to avoid problems. I know I could just compile it at work again, but I have no idea if it wouldnt cause any problems later.
>>
>>52687561
>>52687575
>>52687654

thx, I will give Lua a try.
>>
>>52688665
Just use a VM.

You can give your VM like 20GB and work with it within your OS environment. Much easier than dual-booting.
>>
>>52688539

> input /=x
> input = input/x


You are performing floating-point division and then assigning it to an integer. It will be truncated and so will not be the same value that you test in the if-condition. You are most likely stuck in an infinite loop and x is overflowing and wrapping around.
>>
if i was creating a module to help me with some basic functions that crop up a lot in programs, what should i put in it?
>>
>>52688740
Why does this cause it to break in windows? Does linux handle this differently?
>>
Overheard a hiring manager after phone with potential new dev:
>he sounded too brown
>>
>GNU Guix is written in Go
Oh how the mighty have fallen.
>>
>>52688702

Good to know.

So, which language would be best to begin learning for that purpose?

90% of coding I did so far was total failture, so maybe Im just stubborn failture myself.
>>
>>52688612
Maybe a semi-rolling release distro like manjaro or debian testing? Nearly up-to-date packages with 90% less broken system. It's like arch but for people who aren't autistic.
>>
>>52688810
C++
>>
Oh and one of (rather simple) programs I made was blocked completely by Avast for being "serious malware" (it was just saving data for processing in form of .dat files, creating like 200-300 for each operation, but I had no idea how to delete them. For me, it was not a problem, just 20mb folder).
>>
>>52688821
>manjaro
Ebin. Manjaro is shitware. 99% of the people who say that they used "Arch" and it broke were actually using Manjaro or Antergos.

Arch is relatively stable (especially compared to Gentoo, albeit it's a bit on the edge compared to some of the more hardened distros) and extremely minimalistic.
>>
>>52688842

I learned to hate C++. And how I was forced to use pointers, which I dont understand and had to blindly modify examples, hoping it will work.
>>
>>52688777
Where do I send my resume
>>
>>52688539
it looks like it should work as long as the input isn't very big.

try changing to

void fact(long long int input)
{
long long int x = 2; //start at 2


>It works fine on Ubuntu and it worked fine in windows for a while. Now when I try to run it nothing happens.
very weird. something with your console?
>>
>>52688792
Is it still freely licensed?
>>
>>52688911
What didn't you understand about them?

They're simpler than you'd think. They just represent (or 'point to') a place in memory. The place it points to usually has a value, or sometimes is the first of many values that are all related (in the case of strings and arrays).
>>
>>52688810
I'd give you advice, but I primarily use C#, Python, and PowerShell, as I do lots of work with databases and sysadmin.

I'd imagine you're looking for something like C++, or potentially a functional language like Haskell.
>>
Will I have any issues learning openGL development if my integrated graphics only supports up to opengl 2?
>>
>>52688930
Not really sure if I try to enter 10000 I will get only one 2 for the output and the program wont do anything else.
>>
>>52688757
Why don't you put a breakpoint and debug line-by-line and check the values of your variables as you step through the code?
>>
>>52688958

I usually tend to make a lot of small functions for every single task instead one or few big ones with multiple loops, if that helps. It just feel more organized that way.
>>
>>52689016
>Why don't you use an IDE?
Kill yourself.
>>
>>52689022
The "functions" you've seen so far and the "functions" that Haskell is based off of are very, very different.
>>
>>52689027
>gdb
>>
Hope this one goes through correctly formatted. My project has ballooned a bit.

--------------------------------------------------------------------------------------------------
Language Files Total Blanks Comments Code
--------------------------------------------------------------------------------------------------
JSON 34 34 0 0 34
Markdown 1 5 2 0 3
Rust 56 41167 1423 8182 31562
TOML 1 22 6 0 16
YAML 1 3 0 0 3
--------------------------------------------------------------------------------------------------
Total 93 41231 1431 8182 31618
--------------------------------------------------------------------------------------------------
>>
>>52689045
...All right fine, I forgive you.
You were close there, though. Don't let this happen again.
>>
>>52689027
Is this some sort of new meme?

I think this is bait, but it's more likely that you're a NEET who doesn't understand how projects bigger than 80 lines of code work.

I can just see you at an interview:
>So what IDE's do you normally use?
>You: Kill yourself.
>I think we're done here.
>>
>>52688930
Not really sure if I try to enter 10000 I will get only one 2 for the output and the program wont do anything else.
>>
>>52689093
>doing interviews
>>
>>52689115
Consider asking /a/.

You may like Shimoneta.
>>
>>52689116
this.
>not just showing up to a company and sitting down at a cubicle, pushing all the employees shit on the floor.

>>52689115
On second thought, consider suicide.
>>
File: bleh.jpg (88KB, 600x392px) Image search: [Google]
bleh.jpg
88KB, 600x392px
>>52683400
Here, have some book tips
>>
>>52689044

I can imagine, was just wondering, if there is language that would fit that kind of approach the best.

In our uni group, almost nobody knew how to program properly and the only person, who knew, was enthusiast that loved pointers and "define" command (to create global variables) and switched to Fortran later.
>>
>>52689002
Yes. Modern OpenGL is fairly different from the version number 2, so you'll learn a lot of very outdated approaches.
>>
>>52689170
>loved pointers and "define" command (to create global variables) and switched to Fortran later
He has ascended.
>>
benis
>>
>>52689208
8===================D~
>>
>>52689170
>switched to Fortran

He made an usual, but good, choice.
>>
>>52689143
Nah I don't like /a/ those guys are total dicks

Thanks anyway man,
>>
>learn how to program in C
>learn how to use CUDA
>design application around dynamic parallelism
>make a rough prototype
>find out GPU doesn't have compute capability 3.5 or higher
>don't have the funds to buy a proper GPU that supports it
might as well kill myself
>>
>>52689260

Whats so good about Fortran?

Is it not the same language that used to have punctured cards?
>>
>>52689002
yes. if you can't get a new graphics card or a new computer then if you have a smartphone to work with then opengl es 2.0 is similar to modern opengl (like 3.3+)
>>
>>52688539
ah, now i see what's wrong. you've left out the "do" in the do...while statement. as it is now it's just an infinite loop at while(input > 1)
>>
>>52683400

For compsci, here are two books if you are not reading them already -

Algorithms - http://web.engr.illinois.edu/~jeffe/teaching/algorithms/

Operating systems -
http://pages.cs.wisc.edu/~remzi/OSTEP/
>>
>>52689288
>Is it not the same language that used to have punctured cards?

Many did back in the 50s.

>Whats so good about Fortran?

It was developed for scientific computing because mathematicians wanted to have a go at the whole computing thing without having to learn a specific, usually shitty, low-level language.

Because it's been around for ~1,000 years, there's ton of libraries and shit for it.
>>
Anime newsgroup indexer.
The setup for fetching posts and parsing them is almost done (though only if the post subject is properly formed).

Next is scraping and storing like 100M or more so posts.
>>
>>52689115
http://myanimelist.net/anime/22835/Himegoto/userrecs

>>52689191
These outdated approaches aren't being deprecated and rendered obsolete, right?
It's not like C where you can just ignore the additions to the standard?
>>
>>52689323
>>52689323
oh fuck I didn't even notice that. I must of deleted and not noticed.
>>
Any C++ learning sites/tools people would suggest? http://www.learncpp.com/ is what someone gave me recently and I worked on chapter 0 and 1 for a bit so far
>>
>>52689470
cppreference.com
>>
>>52689426
Technically deprecated but they are still usually implemented by the driver.
>>
>>52689470
Visual Studio 2015 community edition
>>
>>52689426
They are slowly getting deprecated, at least officially.

The thing is that it's not just function names - it's the whole logic that's been changed in ~oGL 3.3. More playing around with shaders and matrices.
>>
>>52689530
Seconding this.
>>
>int getchar ( void );
>>
>>52689530
Being a student I actually have a uni dreamspark account. Should I just download the enterprise version?
>>
>>52689649
Why not. Go for the gold.
>>
>>52689617

What aboot it?
>>
>>52689729
Gets a char, returns an int
>>
does anyone know why commands like grep -o doesn't work at all?

like -o doesn't change colour when I use it but something like -e does
>>
>>52689745
What language is that a valid statement?

You haven't even specified a variable name.
>>
>>52689745

A char is an int. uint8_t.
>>
>>52689773
>int32_t getuint8_t( void );
>gets a uint8_t, returns an int32_t
>>
>>52689745
EOF is int-sized -1.
>>
Are compilers really as bad as people say they are? I mean, like to make one.
The idea of making a compiler (even a stupid one that doesn't do much) has intrigued me for awhile, but I don't even know where to start. It seems like flex/yacc or something would be what I want to use but there's barely any documentation on how to use them.
>>
>>52689967
Check this out:
http://llvm.org/docs/tutorial/LangImpl1.html

Series of tutorials implementing an LLVM frontend on a language of any choice (it showcases it on an artificial one).

If you want to know a bit more about how frontends work, you want to check out the theory of formal languages so that you know how pushdown automatas work and why are they used (as they are essentially how parsers work).

If you don't know much about the theory of formal languages then I'd say you should check it out as well - that will help you understand a lot what it is that flex/yacc do and why are they used.
>>
>>52689844

It's for required magic.
>>
>>52689967
It depends what you're compiling and your prior experience with all sorts of things, as well as what language you're implementing it in and what libraries/tools you're willing to use. If you want a simple compiler project, do a Forth or Lisp (without macros, eval, etc. at first) compiler. You won't need Flex or Yacc to lex/parse them but you can go with all sorts of targets (another high level language, C, assembly, LLVM IR, JVM bytecode, etc.) depending on how much time you're willing to invest, your skill level, etc.
If you want to make a "real" compiler then I'll definitely suggest learning a functional language (one of the MLs, Haskell, or anything remotely related to these) because a lot of what you'll be doing will deal with recursion and tree transformations.
OCaml is a great first choice, since it's distributed with its own version of lex and yacc (ocamllex/ocamlyacc) and has really good alternatives available if you don't want those (sedlex, ulex, menhir, as well as some less conventional parser combinator libraries) plus it's got good bindings to LLVM and official documentation on their website.
If you're not interested in using FP but still want a language that's pretty good for compilers, C# or D are nice (although I'm not sure of the state of their lexer/parser generator libraries) since they make everything a bit safer than in C or C++ (and speed of the compiler doesn't need to be micro-optimized 99% of the time). If you want to go a bit lower level, Rust has a lot of useful features too and pretty good LLVM bindings.
>>
Functional programming is the bees knees.
>>
>>52688867
and 90% of those people are autists. As long as he's not an autist he'll be fine.
>>
>>52690037
That page is pretty nice, thanks.
I'll read up on formal languages too. This is getting more interesting the more I look into it.
>>
>>52690365
Functional programming is for people who like being on their knees.
>>
>>52690387
>not sucking dicks for inherent thread safety

Wow get a load of this faggot
>>
>>52685081
>#include <Windows.h>
-23/10
>>
>>52690504
I like my languages like I like my women.
Real.
>>
>>52690855
I like my languages like I like my women.
Without any side effects.
>>
>>52690855
I like my languages like I like my women
Young and underdeveloped
>>
>>52690855
I like my languages like I like my women.
Interpreted.
>>
>>52690855
I like my languages like I like my women.
Unspecified.
>>
Looking for a project for this semester. I told my Data Structures professor I knew all the shit and he said all I had to do is one of the assignments and I could be excused from the rest of class. Ideally he wants something heavier in theory like parsers, machine learning, advanced algorithms and data structures, etc.

So what should I do? This should clock in around 4k-5k lines based off a previous project I did in half a semester which was 2.5k. Will probably use C, Lua, Go, C++ or some combination thereof.
>>
>>52690855
I like my languages like I like my women.
Concurrent.
>>
>>52690985
truuuuu

>>52690855
I like my languages like I like my women.
Functional.
>>
>>52690855
I like my languages like I like my women.
Object oriented.
>>
>>52690855
I like my languages like I like my women.
Constructed.
>>
>>52690855
I like my languages like I like my women.
Nondeterministic.
>>
shut the fuck up samefag it's not even funny
>>
>>52682263
its
>>
>>52691206
its a meme you dip
>>
>>52690855
I like my languages like I like my women.
Imperative.
>>
>>52690855
I like my languages like I like my women.
Statically typed.
>>
File: gayness.png (7KB, 388x337px) Image search: [Google]
gayness.png
7KB, 388x337px
>>52691271

I like mine languages like I like my coffee.

Black & with a terrible attitude.
>>
File: 1432351996542.webm (1MB, 480x480px) Image search: [Google]
1432351996542.webm
1MB, 480x480px
>>52691049
Bump
>>
>>52691403
MENA masterrace
>>
Really? No activity for nearly a half an hour? It's Friday night, /dpt/ should be shitposting away.
>>
>>52691854

We're too busy drinking, and presumably, fapping to 2d whores.
>>
>>52691854
I'm too busy fapping and drinking to 2d whores
>>
>>52691882
I'm drinking too. What are you drinking?

Also,
>2DPD
No thanks.
>>
>>52682659
fib n m = mod $ (phi^n - (-phi^(-n))) / (sqrt(5)*2^n) m
where phi = (1-sqrt(5))
>>
>>52692163
she puts the PD in 3DPD
>>
>>52692218

FeElS goOd. HiGh TeSt
>>
>>52690855

I like my women like I like my languages -- sexy and youthful.

(Ruby's first release was on December 21, 1995. 20 years old and ideal for making beautiful babies).
>>
>>52692289
20 is young for a woman, but middle aged for a language.

Think about that.
>>
File: D_Programming_Language_logo.svg.png (567KB, 2000x1516px) Image search: [Google]
D_Programming_Language_logo.svg.png
567KB, 2000x1516px
>>52690855
I like my languages like I like my women
With a big D
>>
>>52692163
>Yuengling traditional lager.
Best beer. Drinking some jack.

I don't share your taste in 3DPD tho... I like them young and white.
>>
>>52682144
What is the force of meritocracy?
>>
How is this even working?

(define square-root (lambda (x)

(define square (lambda (x) (* x x) ))

(define average (lambda (x y)
(/ (+ x y) 2)
))

(define improve-guess (lambda (guess x)
(average guess (/ x guess))
))

(define (abs x)
(cond ((> x 0) x)
((= x 0) 0)
((< x 0) (- x))))

(define (good-enough? guess x)
(< (abs (- (square guess) x)) 0.001))

(define sqrt-iter (lambda (guess x)
(if (good-enough? guess x)
guess
(sqrt-iter (improve-guess guess x)
x))
))

(sqrt-iter 1.0 x)
))


Day two of scheme
>>
File: MXph42C.jpg (151KB, 440x680px) Image search: [Google]
MXph42C.jpg
151KB, 440x680px
>>52690855
I like my languages like I like my women.
Old and broken.
>>
>>52692421
Nigga did you read the explanation beforehand
>>
>>52692451
Yes I understand how the code works, but now I'm trying to do 1.8 and it isn't working

; best guess = ((x / y^2) + 2y) / 3)
(define cube-root (lambda (x)

(define cube (lambda (x) (* x x x)))

(define square (lambda (x)
(* x x)
))

(define abs (lambda (x) (
(if (< x 0) (- x) x)))

(define good-enough? (lambda (guess x)
(< (abs (- (cube guess)) x))))

(define improve-guess (lambda (guess x)
(/ (+ (/ x (square guess)) (* 2 guess)) 3)
))

(define cube-iter (lambda (guess x)
(if (good-enough? guess x)
guess
(cube-iter (improve-guess guess x) x))
))

(cube-iter 1.0 x)

))

(cube-root 27)
>>
>>52689967
http://www.eis.mdx.ac.uk/staffpages/r_bornat/books/compiling.pdf
>>
>>52692469
>475 pages
uh maybe tomorrow
>>
>>52691077
I've got an object for her to orientate to ... my dick!
>>
>>52692488
>orientate
>>
>>52692474
desu compilers as with most large projects are more time consuming than brain consuming. Minimum compiler you are going to need for a minimally featureful algebraic syntax language is 10k. Depending upon the amount of free time you have and how fast you work it might take you months. Are you ready to wake up every day for one to two months and program for at least 4 hours a day?
>>
>>52692474
You don't have to read it all
>>52692499
Yeah I wasn't sure if that was correct
>>
>>52692511
>Are you ready to wake up every day for one to two months and program for at least 4 hours a day?
anon i shitpost on 4chan all day
do you really think i have anything better to do
>>
>>52692521
I don't know m8. I shitpost most of the day, but I'm a student and work in my free time, so I didn't want to presume.
>>
hello
how to become a freelancer? and what lang is most $?
>>
>>52692611
Go
>>
>>52692611
Ruby on Rails
>>
>>52692299

C is like... 45 or 46. It's middle aged. It will live another 45 or 46 years before humanity kills itself with nukes or some shit.

>>52692467

Brotip:

(define (square x) (* x x))


Use lambdas when you want to pass anonymous functions as arguments to other functions. Otherwise, just use the simple sugar syntax.
>>
>>52692611
Do you already know some programming languages? If so, just start doing it. Feel free to start off on sites like Freelancer or Upwork, although you'll quickly outgrow those if you're in the first world and you're any good.
>>
>>52690855
I like my languages like I like my women.
Dead, under 10 years old, and filled with bugs :^)
>>
>>52692521
>do you really think i have anything better to do
I know you do. You just lack the motivation or discipline to do them.
>>
>>52692622
Nah m8. C is old. I don't think it's going anywhere for the foreseeable future, but the language shows it's age unless you use C11, which I think is the language morphing into the universal systems language. It might live another 20-30 years. I hope so.
>>
>>52692656
Isn't the market overflown with newcomers?
>>
>>52692661
It took you 2 hours to come up with that... lol, why?
>>
>>52692682
most are retarded normies
>>
File: TLPI-front-cover.png (183KB, 454x600px) Image search: [Google]
TLPI-front-cover.png
183KB, 454x600px
Thoughts on this?
>>
>>52692677

>unless you use C11
I use C11 exclusively unless required to use a different version.

>which I think is the language morphing into the universal systems language
This would probably be good. I just wish we had language-defined preprocessor constants for determining if a system is little/big endian, and other factors, instead of leaving the compiler to decide about it.

>It might live another 20-30 years
I'll give it longer. All of the libraries we depend on every day are written in C.
>>
/dpt/ is so dead on a friday night

what color nail polish will improve my programming?
>>
>>52692682
Define newcomer. What skills do you have?
>>
>>52692818
Well you never know when something that can take place of C will pop up. It's not even difficult to do, C is a simple language. It just has millions of line of code written in it.

I'm in development of Em (E minor) right now. Maybe it's popularity will spiral out of control and it will replace C.
>>
>>52692894
Well what skills do you have? Knowing C++ or Java really isn't much of a skill. Have you developed a large project on a team before? Do you know how to use tools commonly used in Industry like Node.js, a database, etc, Or have in-depth knowledge of a specific area, like writing DSL?
>>
>>52692893
Obviously pink, unless it's sparkly, then you can't go wrong with green..~
>>
>>52692967
sparkly green or regular green?
>>
File: Skeleton-StrongBones.jpg (531KB, 780x3120px) Image search: [Google]
Skeleton-StrongBones.jpg
531KB, 780x3120px
>>52692918
What are Em's features?

>>52692893
No nail polish, no skirts, no drugs, no alcohol. Just programming. That is how you improve.
>>
>>52692981
Sparkly green ofc
>>
>>52692981
Wait do you mean fingernail or toenail polish? This is important
>>
>>52693007
but i program extremely well under the influence
>>
>>52693038
both you filthy pleb
>>
>>52693007
>no drugs
what about ones that keep me alive?

>>52693038
both? or just fingernails I'm not picky
>>
>>52693078
Green sparklies on your fingernails, deep purple on your toenails. Depends also on the skirt's colours and design, but I've never seen these colours go wrong for programming~
>>
>>52693132
>>52693132
>>52693132
>>52693132
>>52693132
>>
>>52693110
thank you! now I can finally be a master programmer
>>
>>52693078

No drugs that are not prescribed. Prescribed drugs should be taken as necessary. My implication was that one should not program under the influence of recreational drugs, or to use performance enhancing drugs as a crutch for programming (I have heard of a few people who rely on amphetamines to be able to program).

My secret to everything is meditation to alleviate stress and obtain focus, and a diet high in protein. Eat a dead animal every day if you can.
>>
>>52693007
>What are Em's features?
Static, but slightly stronger typing than C (castings allow you to violate it, but only explicitly)
Built-in data structures
Threads and coroutines
OOP with multiple inheritance, multiple dispatch, and operator overloading
Closures
Minimal runtime overhead compared to C
>>
>>52693229
Oh shit, forgot to add generics. They mainly operate by code generation, but they are type safe, like type classes from haskell.
>>
>>52692616
Why not Haskell?
>>
>>52693229

>minimal runtime overhead compared to C
C only needs a stack. How minimal are we talking?
>>
>>52693261
Good luck trying to do everything with just the stack. Malloc has pretty big runtime overhead
>>
>>52692622
C is old. Really old. Granted it's still one of the better languages available, but in terms of language-years it's one of the oldest still out there.
>>
File: bach_shades.jpg (16KB, 240x320px) Image search: [Google]
bach_shades.jpg
16KB, 240x320px
>>52692918
> B
> C
> C#
> D
> Em
> F
> F#
Can I already write some fugue with these?
>>
>>52692668
You'd be surprised, anon.
>>
>>52693322
how will you improve it? will you pre-malloc a large block of memory like how java does it?
>>
>>52693229
>coroutines
>multiple dispatch
>Closures
These can never be made efficient enough as a high level language concept to be worth it for a systems language.
Efficient closures and coroutines require assembly (because you need direct control over the stack and what context/registers you need to save - you don't need to save all registers for every procedure for example, so a general solution is suboptimal) - or equivalent low level primitives like in Forth where you can compile in execution tokens directly into the word definition, but then it's not exactly convenient syntax anymore.
>>
Am I losing my mind, or does Python have a function that can take all characters except those you define?
>>
>>52693399
>using python unironically
Yes you are losing your mind.
>>
>>52693412
I am silly
>>
>>52693399
Why can't you just filter them?
>>
>>52693399
if x in "abcd":
print(x)


This will only print x if it's a, b, c or d.
>>
>>52693441
Fuck yes thats how it worked, thank you. How did I forget this simple shit.
>>
>>52693394
Multiple dispatch is compile time
closures a syntactic sugar for class creation, another compile time
coroutines can be done with setjmp. Yeah not super efficient, not bad. If you consider the benefit.
>>
>>52693341
Lol, prolly. Em is C's minor compliment, that's why.

>>52693399
all_chars = {chr(x) for x in range(ord('a'), ord('z')+1)} - set("whateveryouwanthere")
Thread posts: 329
Thread images: 25


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