[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: 340
Thread images: 31

File: trap programmer4.png (2MB, 1696x2467px) Image search: [Google]
trap programmer4.png
2MB, 1696x2467px
old thread: >>56097145

What are you working on, /g/?
>>
if it haskell it ain't haskell
>>
A wild pajeet appears!
>>
>>56103011
Nothing right now, although I am starving for an idea. Really racking my brain trying to come up with something.
>>
>>56103011
Reading The Practice of Programming, so far shit I already know.
>>
>interface{}
>GC
>>
File: nani 92.jpg (393KB, 950x720px) Image search: [Google]
nani 92.jpg
393KB, 950x720px
I want to work on several source files at once.
Should I be opening several screen/tmux windows with a nano instance in each of them, or should I be looking at something else?
>>
>>56103011
Go (golang) 1.7 has been released!
https://go.googlesource.com/go/+/go1.7

People are reporting big performance/binary size/compile time improvements:
https://twitter.com/mattetti/status/763913903600349184
>.@rakyll Go 1.6 vs 1.7rc6
>Test suite from 3:34 => 1:48
>Docker image building 3:05 => 1:50

Can't wait for those sweet, sweet benchmarks, Go vs C/C++ :^)

>>56103061
u mad bro? ;-)
>>
>>56103087
>C/C++
Why are you grouping two completely different languages together?
Also:
>Garbage collected
>>
>>56103120
Go doesn't has GC.
>>
File: 1449700279793.png (74KB, 300x256px) Image search: [Google]
1449700279793.png
74KB, 300x256px
>>56103167
>>
File: 1469561417736.png (317KB, 600x637px) Image search: [Google]
1469561417736.png
317KB, 600x637px
>>56103226
If it had GC, it would collect itself.
>>
File: das_it_mane.jpg (149KB, 1920x1080px) Image search: [Google]
das_it_mane.jpg
149KB, 1920x1080px
>>56103011
>code giving weird ass results
>turned out it's due to a typo in one of the functions defined and machine error is obfuscating the actual calculations
>mfw spent 3 days mulling over this problem that's resolved by closing a parenthesis
>>
A cute vim plugin
https://github.com/metakirby5/codi.vim
>>
>One of the biggest sources of bookkeeping in systems programs is memory management.
>One of the biggest sources of bookkeeping in systems programs is systems programming.
>Go developers
>>
>>56103081
Vim or emacs
>>
File: miyako_code.png (2MB, 1280x720px) Image search: [Google]
miyako_code.png
2MB, 1280x720px
>>56103081
EMACS
M
A
C
S
>>
>>56103267
Super neat.
>>
import System.Environment(getArgs)
n = read . head <$> getArgs
main = mapM_ putStrLn . plot cross =<< n
cross x y = abs x == abs y
plot f n = range (range . point)
where
range = flip map [-(n-1)/2 .. (n-1)/2]
point y x = if f x y then '*' else ' '

{-
*Main> :load cross.hs
[1 of 1] Compiling Main ( cross.hs, interpreted )
Ok, modules loaded: Main.
*Main> :main 5
* *
* *
*
* *
* *
*Main> :main 8
* *
* *
* *
**
**
* *
* *
* *
*Main>
-}
>>
>>56103011
Pls gib next page
>>
#define pi 3.14

What variable type is that? Could I possibly run into rounding errors if I use it with floats, doubles, ints, etc.?
C++ by the way.
>>
Yo /g/ I'm a lowly tier II shit desk technician and I'm looking to get into programming and stop being a shitter. I've been looking into C# partly because I wanted to make a game in unity and because a senior tech/buddy suggested it. He says C# is a very capable language and worth learning over java. I've already installed VS and about to pull the trigger on 2 books from Amazon. Any tips /g/?
>>
>>56103515
CuteSharp is pretty good senpai, read Visual C# step by step.
>>
Does anyone else enjoy doing pointless shit like this?
int main(void) {
int number = 5;
int guess;
puts("Enter 5: ");
int correct = 0;

do {
guess = get_int();
match_compare(guess, number,
less, puts("that's too low"),
greater, puts("that's too high"),
equal, puts("you've got it!"); correct = 1;);
} while (!correct);

return 0;
}
>>
time to fix parametric polymorphism
>>
>>56103513
It's a literal.
>>
I'm learning C right now. As practice, I'm making a super simple window manager based off TinyWM that has buttons, groups windows and can tile. I'm going to be using it in the custom DE for Gentoo on my OPO.
>>
>>56103546
Thanks bossu!
>>
>>56103515
learn Go: >>56103087
you can become very productive easily and fast. it supports many OSes
C# is good too, though.
>>
>>56103569
That's pretty ambitious, I hope you're at a point where it's challenging but still doable. Have fun!
>>
>>56103555
That's hideous.
>>
>>56103590
Thanks anon!
I feel like I have enough skill to take it on but still learn new things. TinyWM is written in like 30 lines of C so it shouldn't be too challenging. I'm hoping to aim for RAM usage <1MB.
>>
>>56103555
That's not a real program. You can't program.
>>
>>56103167
It's literally C with garbage collecting.
>>
>>56103621
What? I've defined the match_compare macro, it works fine.

>>56103597
Obviously I'd never do anything like that in a real program, it's just for fun
>>
>>56103640
Post the macro.
>>
>>56103721
There's nothing to it dude.

#define match_compare(l, r, op1, op1_do, op2, op2_do, op3, op3_do) \
if ((l) op1 (r)) {op1_do;} \
else if ((l) op2 (r)) {op2_do;} \
else if ((l) op3 (r)) {op3_do;}
>>
>>56103759
Seek psychiatric help.
>>
Some other cool ones:
int main(int argc, char **argv) {
char ch = argv[1][0];
int i = 10;

r_switch(ch) {
r_case('a', 'z') {
puts("lowercase");
break;
}
r_case('A', 'Z') {
puts("uppercase");
break;
}
} r_end;

with (FILE *f = fopen(argv[1], "r"), fclose(f)) {
if (!f) break;
for (char ch = fgetc(f); !feof(f); ch = fgetc(f)) {
putchar(ch);
}
}

until(i == 0) {
printf("%d\n", i);
i--;
}

interval(i, 100, 150, 2) {
printf("%d, ", i);
}

printf("top %d\n", getpid());

detatch {
printf("child %d of %d\n", getpid(), getppid());
detatch printf("grandchild %d, child of %d\n", getpid(), getppid());
printf("child %d again\n", getpid());
}
printf("top again %d\n", getpid());

int input;

puts("Enter a number greater than 5.");
do {
scanf("%d", &input);
} until_valid(input == 5, puts("try again!"));

return 0;
}
>>
syntastic + hlint/hdevtools is really awesome
>>
>>56103759
LMNFAO
>>
>>56103802
Go fuck yourself.
>>
File: 1457048474018.png (236KB, 500x281px) Image search: [Google]
1457048474018.png
236KB, 500x281px
Hey brahs the first anniversary of my friends unfortunate passing is coming up and I wanted to program something helpful for a community or anyone in general in his memory.

Taking any suggestions (I have my own projects but they're not very useful to anyone other than me). If a specific language is necessary I'll pick it up too.
>>
>>56103853
Code a security alarm for your friend's grave.
>>
Last one:

int main(void) {
pthread_t foo = thread("foo") {
char* str = (char*) arg;

printf("Thread #%u says: %s\n", pthread_self(), str);
return NULL;
} endthread;

pthread_join(foo, NULL);

return 0;
}
>>
Reminder if your code hasn't been unit tested, it's already legacy code
>>
Hi i hope you can help me guys, i'm doing a basic alarm from an API

I have this datetime format "2016-08-16T04:11:30.000Z"and this will be the "expiry"

how can I convert this into a long to subtract it into the current time?

thank you
>>
>>56103906
>>56103862

that was quick
>>
>>56103911
wow, that's purely coincidental anon.
>>
File: IMG_20160816_000851.jpg (2MB, 3264x1836px) Image search: [Google]
IMG_20160816_000851.jpg
2MB, 3264x1836px
Deep learning algorithm, this project is getting out of hand. Been working on it for three years now, this is the eighth (?) iteration. Getting pretty good at debugging though.
>>
File: 1453682348430.jpg (47KB, 358x350px) Image search: [Google]
1453682348430.jpg
47KB, 358x350px
>>56103942

I thought deep learning algorithms were supposed to learn the best feature sets themselves. What's all that paper for?
>>
>>56103953
Planning out the modules and the dataflow for a prediction assembly.
>>
>>56103977
Can you elaborate more on your project? Post pics of paper and stuff, this is interesting.
>>
>>56103081
just use vim and use the viewports and buffer features
>>
>>56103862
Keep it simple and make it a library or api, something like todo.txt in such a way that it just has an organic and constant grow.
>>
>>56103906
help me please
>>
>>56103977
To elaborate, you cannot just make one giant net and throw all the data into it. Each input has its own modules depending on the data type, dimensions, and purpose. For example, your eyes have their own processing center which is then connected to the multisensory constructs in you mind that work with abstractions from the lower tier raw sensory constructs. Depending on what you are doing the modules interact in different ways, in my program chrono constructs store lower tier constructs from past iterations and link then with current ones. In this way you can search chronologicaly, whereas a raw construct can do simple object recognition.
>>
File: IMG_20160816_003722.jpg (2MB, 3264x1836px) Image search: [Google]
IMG_20160816_003722.jpg
2MB, 3264x1836px
>>56104017
I am going to be cautious as to what I post for pics, I plan on building a business when I finish and do not want to expose the inner workings. I hope you understand.
>>
>>56104117
Also, these are my personal notes, they get messy.
>>
>>56104117
>using sepples comments in handwritten notes
Don't be a Pajeet.
>>
File: IMG_20160816_004247.jpg (1MB, 1836x3264px) Image search: [Google]
IMG_20160816_004247.jpg
1MB, 1836x3264px
>>56104017
My algorithm uses a type of artificial neural network to process data. Each blue circle is a construct, a class containing a network and the tables for input and output. This allows for easy programming of them without rewriting the whole damn thing for each application like earlier versions.
>>
>>56104218
You need to pick you up a high polymer eraser and a drafting pencil.
>>
>>56104194
One time I took notes with parentheses as if it were a lisp.
>>
>>56103906
is there any way to convert this format to long 2016-08-16T04:11:30.000Z?
>>
>>56104280
If there's a way from long to that format (there is), then there's a way back.
Figure it out.
>>
File: received_727132637425860.jpg (68KB, 1184x888px) Image search: [Google]
received_727132637425860.jpg
68KB, 1184x888px
I want to impress muh gf by making a memory card game for Android with politicians.

But in the same time I learn web dev so it's hard to make multiple things happen.
>>
>>56104318
This is why we make fun of web devs

Among other reasons
>>
File: IMG_20160816_005512.jpg (1MB, 3264x1836px) Image search: [Google]
IMG_20160816_005512.jpg
1MB, 3264x1836px
>>56104229
Paper is cheap, when it gets to a certain point I just grab a new piece and pick out the pieces that still need work. The images I posted are a progression of the current part I am working on.

>>56104194
They are my notes, I can use whatever convention I please.
>>
File: sda_copy.jpg (99KB, 576x768px) Image search: [Google]
sda_copy.jpg
99KB, 576x768px
>>56104325
I have to learn web development, internship wants it and I can help out around the uni and dorm, cause their pages is beyond Hell. Only thing I hate about it is the designing part, I am autistic and not acoustic I don't give a shit about how a page looks and layed out, I just want to write code behind it.

Also t. Ungarn, web devs make a lot of money here as well as other programming related jobs, shit our sys admin back at highschool made around $1100/month
>>
>>56104384
Are you learning to program or not?
>>
File: Hypocrisy-Abducted1996.jpg (15KB, 300x300px) Image search: [Google]
Hypocrisy-Abducted1996.jpg
15KB, 300x300px
>>56104401
Yes, I am, what are you talking about? I have mentioned that I do Android apps as well.

My major is Software Information Technology(Szeged, Hungary).
>>
>>56104384
That motherboard looks pretty gross, senpai
>>
>>56104333
Yes, you can poo in whatever street you please.
>>
>>56103246
The joys of coding
>>
>>56104484
How exactly does that commenting style relate to Indians? Is it common among them? I am American, always have been, always will be.
>>
>>56104713
(not him) No idea, especially because it's from C++, and pooinloos are known for Java and C#.
>>
>>56104435
Then why can't you program games?
>>
>>56104280
i found the answer, i parse the date string back to DateTime object and used the duration class of JodaTime.
>>
File: g_Construct.png (53KB, 1920x1080px) Image search: [Google]
g_Construct.png
53KB, 1920x1080px
>>56104736
Yeah, that's why I do it, been programming in c++ for years now and I relate those to a comment.
>>
>>56104739
because he cannot program anything that wasn't explicitly taught to him

college education doesn't encourage independent learning at all
>>
>>56103011
That's nsfw...
>>
File: 1461032696889.png (337KB, 485x446px) Image search: [Google]
1461032696889.png
337KB, 485x446px
>purely applicative, nonmonadic parsers
>>
>>56104929
explain what part of that is NSFW
>>
>>56104942
It's a crossdresser masturbating.
That's it.

Now fuck off
>>
>>56103011
Just finished a thread scheduler based around a fixed set of threads and a priority queue of N tasks. I managed to get the worst-case start-to-finish latency of a task down to about 30000 CPU cycles, and about half of that being overhead to the calling thread.

Also did a simple generic object pool system for fast allocation/deallocation. Features are auto-expansion, thread-safety, arbitrary memory alignment, and memory leak-resistance.

Language is C11.
>>
>>56104739
The fuck are you talking about?

Doesn't matter actually, here is your (you).

>>56104924
Hello my friend across the Atlantic! Things are different here in Europe, education is actually working here.

Especially in CentralEU, many unis are company dependent so they train student to be able to work in company environment.

My uni(SZTE) is supported by Nokia, we have to do our internship there. Also they usually hire students to actually work there even if you haven't got your degree yet. It is very easy to find jobs and be able to do future jobs.
>>
>>56104989
>The fuck are you talking about?
>Doesn't matter actually, here is your (you).
Are you fucking retarded?
If you can program you can program games
>>
>>56104977
>It's a crossdresser masturbating.

No it isn't. He's just showing his monitor.
>>
File: 686251nkoreapoliticskim.jpg (28KB, 650x366px) Image search: [Google]
686251nkoreapoliticskim.jpg
28KB, 650x366px
>>56105001
Look up my original post.

I never fucking said I cannot program games, just I do not have the time to invest into the project which was mentioned in my post.

Fucking peasant
>>
>>56105044
You mean you can't invest time in learning to program while learning to pretend program
>>
>>56105056
Here is your another very own (you) pal.

It's all yours :^>
>>
>>56104989
That's not education, it's training. Like a monkey.
You're just confirming what the guy you replied to said.
>>
>>56103011
An EDID parser but I don't fucking know hexadecimal...
>>
>>56105110
>not knowing hexadecimal
what
>>
>>56105074
I will explain this further.

The edu here requires and encourages us to be creative and come up with our ideas.
This is why most of us get a job immediately after and during uni.
>>
>>56104980

Are you using C11 threads or no? I seriously have not used them in any projects I've done so far since support is sparse and OpenMP/pthreads are just more familiar and has better support.
>>
>>56105145
Nope. Pthreads is what I use at work, so I use it here too.
>>
>>56103298
>Windows
>uBotnet
>Chrome
>foobar2000
>>
>>56105186
Im not too familiar with c++ threading. Whats the difference between pthreads and std::thread?
>>
>>56105196
I have never used std::thread; it's been years since I've done serious programming in C++. I use C, Java, Python, Tcl, and a few others.
>>
>>56104384
Do NOT go into programming if you are only in it for the money, if you do not fucking love programming you will hate it as a job. When you get beyond simple projects the bugs get exponentially harder to find. I have literally spent weeks tracking down one fucking bug. It was all I could do not to punch my monitor. I am not saying do not go into programming, but if you find you hate it your life will be hell. It can get very tedious and boring as well. Just make sure you know what you are getting into, working a job you hate sucks. If you love it, go for it, just make sure it is what you want. Make the politition game, squeeze it into your schedule somehow, an unstructured project will get you a real taste of programming. Every time you get stumped ask yourself seriously if that is what you want as a career. I have seen several friends of mine move on from school to work and end up wasting all the time spent because they found out being a code monkey fucking sucks.
>>
>>56105186

I suspect that C and C++ threads will never catch on at their current state. There are just too many better supported alternatives even if they have deficiencies.

>>56105196
std::thread or thread.h is built into the language directly, meaning non-POSIX systems can support them vs needing to be POSIX compliant to use pthreads.
>>
>>56105252
Meaning pthreads for linux/bsd and std ones for portability?
Whats nicer to use?
>>
Just switched to Linux and started using clang. How the FUCK do I change the output filename? I run clang helloworld.c and I just get an "a.out".
>>
>>56105328
clang++ main.cpp -o readMANPAGES
>>
>>56105328
man clang
google
etc
>>
>>56105295
winpthreads is ubiquitous, so that covers pretty much any desktop-style system. Anything smaller generally needs system-specific threading and interrupts, anyway.
>>
>>56105365
So you can use POSIX threads on windows? Interesting
>>
>>56105372

Oh never mind its external library for mingw, i thought windows supported them out of box, silly me
>>
File: 1470897979210.jpg (12KB, 215x237px) Image search: [Google]
1470897979210.jpg
12KB, 215x237px
>>56103555
>performing ! on an int
>>
>>56105416
>what is C
>>
>>56103759
bait
>>
>>56105440
Honestly I wasn't baiting, I just like fucking around like that. I know there's no point to it, but it's fun.
>>
>>56105467

You really shouldn't screw around with C preprocessor like that.

Besides using X macros, variadic macros, _Generic, the __LINE__ and __FILE__ defines, and OS specific defines and pragmas, I really personally avoid using the C preprocessor as much as I can. Although _Generic is like the powerhouse feature of C11 that basically unlocks a ton of awesome and scary stuff that you could do with it.
>>
Rate my hex converter!
#include <stdio.h>

size_t strlen(const char *str)
{
size_t i = 0;
while (*str++) i++;
return i;
}

int powi(int base, int exp)
{
int result = 1;
while (exp--)
result *= base;
return result;
}

char hex_value(char c)
{
c -= (c >= 'a' && c <= 'f') ? ' ' : 0;
if (c >= '0' && c <= '9')
return c - '0';
else if (c >= 'A' && c <= 'F')
return c - '7';
else
return 0;
}

unsigned parse_hex(const char *str)
{
unsigned result = 0;
int i, j = 0;
for (i = strlen(str) - 1; i >= 0; i--)
result += hex_value(str[i]) * powi(16, j++);
return result;
}

int main(void)
{
char *str = "ABCDEF";
printf("%u\n", parse_hex(str));
}
>>
does GHC use SSA like Go 1.7
Does rust or ocaml use SSA
>>
>>56105426
>why is the reaction image laughing evilly
>>
>>56103240
I want to fuck a miko.
>>
>C++ is bad switch to Rust!
>what? No a c++ compiler backend is fine! (LLVM)
>>
File: 1470406403119.jpg (100KB, 764x680px) Image search: [Google]
1470406403119.jpg
100KB, 764x680px
>>56103555
D has a function for this called predSwitch

>>56105601
Don't worry, I am here to improve your post quality!

>>56103555
>! :: int -> bool
>C
>>
>>56105583
As I said, I would never do anything like that in an actual project, it's just for shits and gigs.

But I do love the magical stuff you can do with it, like this:
#include <stdio.h>

/* Template for a function, takes an array of T, returns a T */
#define define_get_minimum(T) \
T get_minimum_##T(T* nums, int len) { \
T min = nums[0]; \
int i; \
for (i = 1; i < len; i++) { \
if (nums[i] < min) { \
min = nums[i]; \
} \
} \
return min; \
}

/* Make three functions using the template */
define_get_minimum(int)
define_get_minimum(double)
define_get_minimum(float)

/* Preprocessor picks the function to use depending on what type X is */
#define get_minimum(X, len) _Generic((X), \
int*: get_minimum_int, \
float*: get_minimum_float, \
double*: get_minimum_double \
)(X, len)

int main(void) {
int iarr[] = {3, 2, 5, 2};
float farr[] = {3.2, 8.45, 10.54};
double darr[] = {4.67834, 3.454, 8.959};

printf("int: %d\n"
"float: %f\n"
"double: %g\n",
get_minimum(iarr, 4), /* No longer have to specify type */
get_minimum(farr, 3),
get_minimum(darr, 3));

return 0;
}


I made a generic vector (std::vector, not {x,y}) with that 'technique' as well and it worked perfectly, I just can't seem to find it...
>>
>>56105667
>D has a function for this called predSwitch
I actually felt like doing it after seing number.compare(othernumber).match (? on syntax) in Rust
>>
>>56105668
>lol C++ is completely unnecessary
>#define define_my_function(T) my_function##T
>>
>>56105583
Don't forget compile-time constants.
>>
>>56105681
Where did I even mention C++?
>>
>>56103011
is that from hinemosu notari?
>>
>>56105694
>>
>>56105685
#include <stdio.h>

typedef struct _node node;

struct _node {
char *s;
node *next;
};

#define cons(x, y) (node[]) {{x, y}}

int main(void) {
node *list = cons("this",
cons("is",
cons("a",
cons("compile-time",
cons("linked",
cons("list",
NULL)))))),
*l = list;

do {
puts(l->s);
} while (l = l->next);

return 0;
}
>>
>>56105681
There is one instance where I needed template-style macros (to make a generic object pool), and the end-use looks like this:

typedef OBJECT_POOL(ScheduledTask_t) TaskPool_t;

DEFINE_POOL_FUNCS(ScheduledTask_t, TaskPool_t, static, initTaskPool, closeTaskPool, popTask, pushTask);


It's generally useful, if you have fully tested the implementation prior to macroizing it.
>>
>>56105667
>don't worry, I'm new here
>>
File: ;D.png (57KB, 800x334px) Image search: [Google]
;D.png
57KB, 800x334px
>>56105691
when you didn't use it :^)

>>56105680
Predswitch is a lot more like that, but match expressions are from functional programming

case (guess `compare` number) of 
GT -> "that's too low!"
EQ -> "you've got it!"
LT -> "that's too high!"


and Haskell has pattern guards (lets you put a boolean predicate on a case)
response number guess | guess  < number  =  "that's too low!"
| guess == number = "you've got it!"
| guess > number = "that's too high!"


response guess number |
>>
I made a C compiler that does automatic UB detection:
#include <stdio.h>
#include <stdlib.h>

int main()
{
fprintf(stderr, "Error: Undefined behavior\n");
exit(1);
}


Works pretty well so far.
>>
>>56105731
I remember this meme. Always wondered, why does "a % b == 0" have to be a string? is it just so you can pass it as an argument and not have it evaluated before predSwitch is called? I guess that's the way to do it then.
>>
>>56105729
don't worry, I am here to help newcomers like yourself

>>56105718
>the end use
that's not particularly pretty either

why not try interfacing C++ with C?
you could declare specific template instances and then use them from C, e.g.

template <typename T>
T myFunction(T* array, int) {
...
}

myFunction<int>;
myFunction<float>;
myFunction<char>;

>>56105765
I think you could also do
(auto a, auto b) => a % b == 0
>>
Is this the proper way to write a strlen?
size_t strlen(const char *str)
{
const char *start = str;
while (*str++);
return str - start - 1;
}
>>
Are there any non meme functional languages (or languages good at pattern matching) that can interface cleanly with C/C++ code?
I just want to use it as a compiler frontend and export the AST to the rest of the compiler written in C++.
flex + bison is a piece of shit.
>>
File: 1470470813476.jpg (38KB, 312x298px) Image search: [Google]
1470470813476.jpg
38KB, 312x298px
>>56105701
im going to jack off to that.
>>
>>56105778
size_t strlen(char *str) {
size_t ret = 0;
while (++*str) ++ret;
return ret;
}

I think I did that right.
I also think yours is more efficient, though.
>>
>>56105778
I don't think you don't need to reassign str to start
>>
>>56105777
>that's not particularly pretty either

Maybe not, but it's fast and compiles quickly. I do agree that if you need more than a couple of that type of construct, you're better off using C++.
>>
>>56105808
He does it for the subtraction at the end.
>>
>>56105804
*(str++)
is what I meant in the while cond
>>
>>56105802
Http://caml.inria.fr/pub/docs/manual-ocaml/intfc.html
>>
>>56105848
put the trip back on nv
>>
>>56105802
You can write reasonably functional code in C++, though it's not ideal
Pretty sure there's a pattern matching template bullshit library for C++

GHC?Haskell has some FFI stuff
https://wiki.haskell.org/Foreign_Function_Interface
>>
>>56105128
Yes I am dumb as a pajeet shit. :\
>>
>>56105887
each digit is 4 bits
eg 0x4B
4 = 0100
B = 1011
hence 0x4B = 0100 1011 = 01001011

hooray
>>
>>56105802
>>56105865

Oh I should also say

D might be a very good candidate, but it doesn't have pattern matching (beyond predSwitch) and is only multiparadigm "functional", not _really_ functional
>>
>>56105904
I don't understand a single word... :\
I will probably use an already made EDID parser.
>>
File: 1457824840881.jpg (47KB, 621x502px) Image search: [Google]
1457824840881.jpg
47KB, 621x502px
So I sold my piano today and ended up chatting with the guy who bought it while he disassemble it.
He was a programmer, and well, he wasn't white.
Race was probably a white + black mix, he had a somewhat clear skin and niggerish hair.

So while he was disassembling the piano I talked with him and apparently he was a CS and Music double major, and a San Francisco company had hired him in february for programmer job.

So I asked him if the interview was hard despite being his first CS job and he had no experience.

He said no. I asked why, and he said "They just wanted to know whether I fit the culture of the company and they thought I did so they hired me"

>he fit culture of the company
What did he mean by this
>>
>>56105974
4 (0100)= 0 * 2^3 + 1 * 2^2 + 0x2^1 + 0 x 2 ^ 0
B = 11 dec (1011) = 1 * 2 ^ 3 + 0 x 2 ^ 2 + 1x2^1 + 1 x 2 ^ 0

0x4B = concatenate 0100 to 1011
>>
>>56105974
holy shit dude
at least fucking try
>>
>>56105997
Sorry but it's like gibberish for me.
Is OSHI good enough?
https://github.com/dblock/oshi/blob/master/oshi-core/src/main/java/oshi/util/EdidUtil.java
>>
>>56106033
knowing how binary and hex works is fucking fundamental shit. Students learn it before learning any programming at all. It's easy as hell too.

There is no hope for you.
>>
>>56106047
Rude but it's probably true.
However it's for a silly script on a windows machine.
>>
>>56105802
>non meme
what did he mean by this?
>>
>>56106066
Yeah, sorry. But learning how number base systems work takes all about 10 minutes.
>>
>>56105295
std::thread is easy enough to use desu.
You might find it annoying to figure out the correct syntax to return (or not return in case of void) a value from a thread, or message passing in general, but that's all threading libraries.
>>
>>56106083
not Haskell
>>
>>56106033
in primary school you're taught "hundreds, tens, units, tenths"
in binary it's "4s, 2s, units, 1/2 s"
in hexadecimal it's "256s, 16s, units, 1/16 s"

the pattern is powers of b, where b is the base


>>56106083
you can ignore this part of his post, because he probably doesn't do FP and is in no position to judge what is or isn't a meme FP language

>>56106112
Haskell is the most functional functional language
>>
>>56105982
>SF
You knew the answer all along
>>
>>56105982
How the fuck do you double major in CS and Music?
You'd be around for nearly a decade.
>>
>>56105982
unless you're applying as a master of the arcane arts at google or something like that, your resumee usually suffices as a proof of skill.
at the interview they want to see if you can talk to people without pissing them off, which is quite a useful feat, as most teams consist of people who dislike being pissed off.
>>
>>56106112
Can confirm that this is exactly what I meant.
>>
>>56106096
he's probably a webdev shitter
>>
File: 1396593096529.jpg (51KB, 500x502px) Image search: [Google]
1396593096529.jpg
51KB, 500x502px
Pleb here, thinking of starting my first project.
So I learned the basic of C++ and Java, and I know data structures, but I really have no idea how I would even start a program of my own. It's like knowing a bunch of tools but not knowing how they integrate together.

I'm thinking of making a dictionary in java for android.
Should I just google "how to make android apps" and try to work with what pops up, or does /g/ have a better advice to tackle this?
>>
>>56106116
lazy kills it
>>
>>56105904
this is actually really neat, no need to fuck around with exponents anymore
what are some other bit-level hacks that save time like this?
unsigned parse_hex(const char *str)
{
unsigned result = 0;
int i, j, k = 0;
for (i = strlen(str) - 1; i >= 0; i--)
{
char val = hex_value(str[i]);
for (j = 0; j < 4; j++)
{
if (val & (1 << j))
result |= (1 << k);
k++;
}
}
return result;
}
>>
>>56103011
Should I learn Haskell?
I have started reading learnyouahaskell, but I doubt that it's useful for anything.
>>
>>56106245
learnyouahaskell isn't recommended anymore since it was found to not work

use http://haskellbook.com/
or
this is the recommended (free) way
http://www.seas.upenn.edu/%7Ecis194/spring13/lectures.html

then after that this
https://github.com/NICTA/course

then after that this
http://www.scs.stanford.edu/14sp-cs240h/
>>
>>56106198
No.
Don't do that.

Making an application opens up a can of worms that you're not nearly prepared for.
You would only get confused by software engineering methodologies, design patterns, and architecturing at this stage.

If you want to write a program, then just do what works.

You start out in the main function (entry point) and then branch out by calling other functions.
Keep it simple. Do I/O from the console or command line.
>>
>>56106204
{-# LANGUAGE Strict #-}
>>
>>56106260
Okay, but can haskell be used for things that aren't exercises, does the language have good libraries, frameworks?
>>
>>56106232
result |= (((val & (1 << j)) ? 1 : 0) << k++);


fixed that for you
>>
>>56106312
>good libraries, frameworks
a million
>>
>>56106312
yes, it is a general purpose language

you can even interface with C/C++
https://wiki.haskell.org/Foreign_Function_Interface

you can do cool parallel and concurrent shit as well
http://chimera.labs.oreilly.com/books/1230000000929
>>
So what are the disadvantages of Cython?

From what I've read it sounds great.

t. C programmer only now properly learning Python
>>
>>56106419
You have to write in Python
>>
>>56106424
I meant compared to Python, not compared to C.
>>
>>56106419
It's a bunch of fuss and bother, Python isn't a performant language. If your code needs performance, write it in C (or another language) in the first place, don't try and bodge performance with Cython.

I mean nothing wrong with it, but in my opinion PyPy is the more interesting project when it comes to making Python faster.
>>
>>56106644
>if your code needs performance use C
and if you don't, use Haskell
>>
>>56106341
>>56104484
>>56104194
Indian take your job or something? You sure are butthurt about Indian programmers.
>>
>>56106644
The project I'm doing now involves swinging/splicing around loads of list/tuple stuff which is vastly easier to express in Python than most languages.

But it also has some very tight looping in a few spots which was the main performance bottleneck but it became much faster under Cython; now it's just I/O that's the bottleneck and all is right in the world.

I suppose it could be that this is a very specific scenario where Cython was simply the better tool.
>>
Anyone familiar with batch scripting?
I need a code which with net view lists all hostname in a domain without the "\\" before it.
The output file should look like this:
PC1
PC2
PC3

Thanks!
>>
>>56106744
t. pajeet
>>
How would you go about writing malware? Not that i would, im just curious
>>
>>56107002
Don't release the source code to any program you distribute.
>>
File: mpv-shot0002.jpg (240KB, 1920x1080px) Image search: [Google]
mpv-shot0002.jpg
240KB, 1920x1080px
Should I pick Javascript now that I have a good grasp on C and Python?
>>
>>56107082
Is this from New Game? Maybe I should pick it up after all.

No, you shouldn't just pick a new language. Get proficient with few.
>>
>>56107002
same way you'd make normal software, except it's more "meta", you're dealing with the system you're on more directly, you're looking for exploits and ways to hide from the user
>>
>>56107206
and it depends on the type of malware of course
>>
>>56107206
So basicaly i would need to know win32 api? Heh no way.
>>
>>56107002
int main() {
system("sudo rm -rf --no-preserve-root");
}
>>
>>56107240
that wouldnt work since you'd need root access, it wouldnt right? Unless someone is installing my sw... hmm
>>
>>56107240
sudo rm -rf what?
>>
>>56107303
it's a trojan posing as malware
>>
>>56107278
it would work if the user running the program had no-password sudo privileges
>>
>>56107303
he meant / its a typo

so lets say i write malicious program for instalation i would need
chown root:root
chomd -s
so it runs as root

Now i also need to send data i get to my server which makes it pretty easy to find me, and what could i do make keylogger? or just get root password
>>
>>56107309
I think he was pointing out that it's missing an argument.
>>
>>56106982
Lolno, try harder.

>>56106789
Save as ntv.bat
@echo off
if "%1" == "strip" goto :strip
:main
net view>ntv.dat
for /f "skip=3" %%i in (ntv.dat) do call ntv.bat strip %%i
goto :end

:strip
set cur=%2
if "%cur:~0,2%" NEQ "\\" goto :end
echo %cur:~2%

:end


Save in system32 and you can use it from the console like a normal command. Actually anything you throw in system32 can be called from the console. If there are errors its because I typed it on my phone.
>>
File: v&.png (35KB, 475x122px) Image search: [Google]
v&.png
35KB, 475x122px
>>56107323
I've already backtraced you to the NBA, it's all over. Ambulances have already surrounded your kitchen.

It's too late for you, hacker known as 4chan
>>
>>56107340
Hahaha

Tbh making malware seems like too much pain. Even if you manage to get keystroakes for e.g chances are you wont find anything "Big" and you would need to affect thousands computers. Also avoiding detection...

Its fun to think about
>>
>>56107336
Anyone else start their programming career in good old batch?
>>
>>56107336
And i thought bash was bad...
>>
>>56107326
That's why it's a trojan. It makes you think it's malware but actually it's just broken.
>>
>>56107354
But ransomware could be more feasible, if they install your proggram as root you have acess to shadow files and you can get password, change all user passwds and demand bitcoin and encrypt /home
>>
>>56107082
I'm assuming that humor was made off of her tanned complexion, making the other characters assume she's an Okinawan or other country bumpkin that has never used a computer in her life.

>>56107361
Unfortunately.

Luckily, PowerShell and other easily-scripted languages are mainstream now.
>>
>>56106096
Any tutorials for noobs?
>>
>>56107432
Not familiar with powershell, after batch I combined it with vbscript. That was actually a pretty potent combination for how simple they were.

>implying country bumkins can't be programmers.
>>
>>56107480
I did the same for a while as a sysadmin. Used the batch files or general command line stuff to push and execute more complex VBScript.

Now I just use an RMM tool to push C# executables to do literally anything and everything across all my systems.
>>
>>56107500
Sysadmin always sounded like a fun job. After highschool I got into c++ and never really did much else with scripting. The most complex thing I created in highschool was a console based messenger. You entered messages in the console and vbs msgbox opened the message on the other end. I had user authentication, private chats, and public irc style chats. The teacher of my computer class took it down after they found out I could run any script on their end, not just msgbox. I thought it was funny when peoples disktrays autoejected continuously, those were good times. Those languages were not meant to be used like that though, that thing was pretty hacked together.
>>
>>56107610
Sysadmin can be a fun job, but I wouldn't necessarily recommend it to anyone as anything other than a stepping stone.

I don't do much sysadmin stuff anymore; I've moved into BI and data warehousing, which is (in my opinion) infinitely more interesting, and also way more lucrative.

I get to do more actual programming now, combined with making actual business decisions that effect change. There's certainly a god-complex that comes with doing business intelligence. Depending on what data you show, and how you show it, you can affect major change in an organization. It's interesting seeing your thoughts manifest into the world due to a CFO/CIO being persuaded by pretty charts and gauges.
>>
how to practice my programming skills, /dpt/?

after you get the syntax down language cookbooks doesn't work anymore, and projects are either simple math problems or too hard
>>
>>56107646
>and projects are either simple math problems or too hard
>too hard

What do you mean? Break the project down into 35 simple problems and you're good to go.
>>
>>56107336
thank you my friend!
>>
>>56105584
UB and unportable, fag
>>
>>56107652

The thing is I don't even know how to start.
>>
>>56107743
I'm not sure how far along you are, but making a working 4chan viewer is a great exercise for working with JSON APIs, building a GUI, and multithreading (image loading, thread auto-update, etc.).
>>
>>56107336
>>56107690
It works fine, but the output file still has all the stuff I don't need. It looks like this:
Server Name Remark

-------------------------------------------------------------------------------
\\PC3
\\PC2
\\PC1
>>
>>56106419
>>56106574
It's a vastly superior language to Python thanks to static typing alone.
>>
>>56107644
The draw for me was the control over a physical network such as a school. It seemed like it would be pretty cool, but the novelty would wear off I imagine.

That sounds pretty awesome, you are like the senses of the business organism telling the executive portion what is going on influencing its decisions to see the ripples of your influence travel through the company creature.

>>56107785
I thought you wanted it echoed to the console.

echo %cur:~2%

Change to


echo %cur:~2%>thereyougopickymotherfucker.dat
>>
>>56107767
Ill give you example of a game. You want 2D platformer okay

First you look up game design, you realize yu need to init stuff, and have 3 main functions, update, draw, handleInput. Great you go and create those preferably within a class and you mess with OOP for a bit. Now you need to put stuff on a a screen, you google libs and decide for SDL, check tutorial and now you have something on screen. You kinda implement draw and handle input but update is too fast. You check how to lower fps so it doesnt take 100% cpu, now you go on creating object class, you add update, draw methods, you figure out coordinate system. You check google on vector math so you can do stuff like gravity, acceleration, you google also basic trig so you can get an angle between player and mouse.

You basically have 100 lines of code at this point and you have spent maybe few days depending on your skill but you have learned something. Next time it will take half as much, third time 20 minutes.

You go one step at a time. Final solution doesnt come into it too much,
>>
>>56107852
Shit
2%>
Should be
2%>>

> is wipe the file and then write the data, whereas >> appends the data.
>>
>>56107767
wanted to reply to >>56107743
>>
>>56107865
And add
 echo>thereyougopickymotherfucker.dat
after :main
>>
>>56107719
how so?
>>
>>56107865
Sorry for being a
>pickymotherfucker
but the output is still the same.
Could you paste what's in the output for you? Maybe the problem is at my end.
>>
>>56107888
c <= 'f'
and
c >= 'A' && c <= 'F'
do not make any kind of sense.

Redefining strlen is UB and stupid.
>>
>>56107884
Fuck

echo.>
Not echo>

The period is important or your first line will be "ECHO IS OFF"
>>
>>56107903
@echo off
if "%1" == "strip" goto :strip
:main
echo.>ntvclean.dat
net view>ntv.dat
for /f "skip=3" %%i in (ntv.dat) do call ntv.bat strip %%i
goto :end

:strip
set cur=%2
if "%cur:~0,2%" NEQ "\\" goto :end
echo %cur:~2%>>ntvclean.dat

:end
>>
is it the haskell power hour
>>
>>56107926
Perfect! Thank you senpai!
>>
>>56103011

Would you like the code to this?

http://45.55.174.18:8080/
>>
>>56107899
>c <= 'f' and c >= 'A' && c <= 'F' do not make any kind of sense.
sure it does, 'a' to 'f', and 'A' to 'F', are sequential integral values

>Redefining strlen is UB and stupid.
he's not including string.h so it's not redefining it
>>
>>56107936
You are welcome. I am curious, what is the purpose?
>>
>>56107949
>sure it does, 'a' to 'f', and 'A' to 'F', are sequential integral values
C doesn't guarantee that.
You're making the assumption that the character set is ASCII.
>he's not including string.h so it's not redefining it
I not 100% sure that this is correct, but you're not supposed to declare reserved identifiers with external linkage. This includes all of the standard library functions.
If he used a static function or an inline function, it would have been fine.
>>
File: not portable pt 2.png (206KB, 686x780px) Image search: [Google]
not portable pt 2.png
206KB, 686x780px
>>56107985
I'm pretty sure C guarantees 'a'-'z' and 'A'-'Z' are in order

might be in this pic
>>
>>56107953
It's for another script which reads the hostnames from the clean file and checks the installed softwares on each PC with wmic. I could do it with all the registered computers in the domain but if they are offline it takes quite while to check them all.
>>
>>56108007
>>56107985
Oh wait, I think it's just digits, sorry
>>
>>56107949
>sure it does, 'a' to 'f', and 'A' to 'F', are sequential integral values
Who told you that asshat?

>he's not including string.h so it's not redefining it
It does not matter at all.
>>
im using interpolation to generate a list of vectors based on a start and end. it only has 10 steps so i'm using step = step + 0.1 to move to the next one, but i was told using step = step + (1 / steps) would give me 0.1 anyways. this would be helpful for other projects but i get a math error. where can i read about why i'm failing at something that should be rather simple?
>>
>>56108010
Alrighty, glad I could help.
>>
>>56108022
What language are you using?
If it's C or C++ you'll want
step += 1.0 / steps
rather than
step += 1 / steps
>>
>>56108032
lsl (second life). be gentle. specifically, this vlin function: http://wiki.secondlife.com/wiki/Interpolation/Linear/Vector
>>
>>56108018
Not that guy, but I've been told this by American Standards Association (ASCII) and by Ken Thompson and Rob Pike (UTF-8).
>>
>>56108063
could you post your code?
>>
>>56108073
You are delusional.
>>
>>56108073
I'm pretty sure C doesn't guarantee ascii
>>
>>56108078
colors = [];
float step;
float steps = 10;

while(steps--)
{
vector diff_color = vLin(start_color, end_color, step);
colors = colors + diff_color;
step = step + 0.1;
}
}
>>
>>56108121
you decrease steps each time, so if you did +1/steps each time it'd be

+1/9
+1/8
+1/7
etc

I think by steps the other person meant steps per run or frames or something, not your steps variable
>>
>>56108121
>>56108141
e.g.
float framesPer = 10;
colors = []
float step;
float steps = 10;
while (steps--) {
...
step += 1.0 / framesPer;
}
>>
just put some static asserts if you are this anal about portability, or if you really have nothing better to do then make two separate implementations where you only do the more efficient solution if the character set allows it
>>
>>56108141
>>56108154
thanks, adding the frames per and just a chat command to spit out the numbers per step shows it working. will mess with it more.
>>
>>56108257
Retard
>>
>>56108257
>just make it fail immediately if you don't want it to fail
>>
>>56108315
the person who's compiling it could easily fix it himself or bring it to the developer's attention, if the person even exists on some ass-backwards shit platform
>>
>>56107646
>>56107743
This is where having a job comes in super handy; gives you a lot of opportunities to stretch your understanding, especially if there are lots of little things that don't have easy solutions.

I will say that >>56106265 has a very valid point if you're just starting out; avoid making something that would be a "full scale" or feature-packed program because there's lots of shit that goes into making a "traditional" program. I just went down this road myself; my program right now is simple but I'm pretty sure that if someone who's been in the game for a while evaluated it, it would look pretty gross since I don't have the slightest clue what software engineering methodologies even entails; part of it is probably that one buzzword "agile" that webdevs love so much.
>>
>>56106198
make it in java on desktop to start with, android is a whole clusterfuck on its own
>>
>>56103634

Which is funny, because there's a decent third party GC for C if one really wants one.
>>
>>56108526
>there's a decent third party GC for C
No, there is not.
>>
>>56103011
Best language for writing web bots?
>>
>>56108657
Doesn't matter.

All major languages have libraries that make this very easy.

Consider Python or C#.
>>
>>56104384
Your thermal-paste looks nasty, the CPU isn't mounted, you're missing a standoff screw, they don't have any caps, and you have a chip missing.

2/10, would not fuck.
>>
File: asuit.jpg (113KB, 634x968px) Image search: [Google]
asuit.jpg
113KB, 634x968px
I just used a reentrant mutex for the first time.
>>
So I have a fairly complicated form full of controls. I want a version for people who have bad vision where everything is scaled up. An easy solution would be to just copy the entire form and keep the code in 2 places. But I would rather just have the second form without code, and then have the original form copy the looks of the new form when switching. Is there a neat way to do this, without changing every control with code manually?
>>
>>56103513
That's a double literal. You should surround it with parentheses for safety though.
>>
>>56108781
Assuming all the controls are accessible in code and all derive from base types which expose the size value, all you have to do it find a way to get all the controls on your window and iterate through them applying a percentage scale.

But I have no idea what UI framework or language you're working with so that's the best I can do for you.
>>
>>56108781
If you're referring to something like WinForms or WPF, then you can do what >>56108857 says and essentially do (psuedocode):
foreach ( var control in controls)
{
control.Size *= 2;
}


They would just need to inherit from a base class with something like a Size property, which WinForms and WPF controls do.

There are various methods laying around for getting all controls on a form into a collection.
>>
>>56108781
KISS method.

Just let the user know they can use Windows key + (+) key to access the built-in magnifier.

Worry about something so trivial another day.
>>
Anyone use footpedals
>>
rate my fizzbuzz
for i in range(100): print([i,'fizz','buzz','fizzbuzz'][(not i%3)+2*(not i%5)])
>>
File: justright.jpg (22KB, 500x500px) Image search: [Google]
justright.jpg
22KB, 500x500px
>when it turns out the bottleneck is embarrassingly parallel
>>
>>56109088
No, that's fucking retarded.
>>
>>56109120
Why, I don't want emacs pinky
>>
>>56109088
Yes. I use them to drive my car.
>>
>>56109128
>emacs
>>
>>56109141
vim comfy but viml a shit
>>
>>56109152
>vim
>>
>>56109089
Unreadable/10, would not hire
>>
>>56109129
I mean for typing modifier keys

>>56109157
What wrong with vim or emacs
>>
>>56109089
>dynamic language
Shoo shoo bootcamper
>>
>>56109227
shoo shoo pahjeeet
>>
>snowden tweets pic of mark twain
>twain is on almost every computer in the world (search your C: drive)
fugg
>>
>>56109296
>twain is on almost every computer in the world (search your C: drive)
?

i use linux
>>
>>56109287
Bootcampers are actually worse than pajeets
>>
>>56109296
Ha? Am i missing something?
>>
>>56103087
>over a minute to compile a program is somehow "acceptable"

I have a 1.2mLOC project at work written in C that takes 15 seconds to compile, and we're seriously thinking about taking steps to fix this. How the fuck do you live with yourself when you have time to get up and make coffee before your code is done compiling?
>>
>>56105855
if I'm gonna shill I'll keep my tripcode on
>>
>>56109547
>recompiling your code every 15 seconds
Why doesn't your boss just make you to learn to program?
>>
>>56109573
>he argues against frequent recompilation because his meme language is too bloated to make it anything but inconvenient
>>
>>56109573
Do you seriously write hundreds to thousands of lines at a time and only then do you check to see if it compiles without warnings?
>>
>>56104384
I hate guys like you!
>>
>>56109603
I don't write hundreds of thousands of lines in 15 seconds
>>
>>56109572
Haskell > OCaml
>>
>>56109615
>he never learnt to touch type
>>
>>56109628
I think LOC is generally negatively correlated to quality
>>
>>56109615
>hundreds of thousands
I said "hundreds to thousands". That's a range, not a number.
>>
>>56109636
I never said my LOC delta was huge.
>>
>>56109643
I don't write hundreds to thousands of lines in 15 seconds
>>
>>56109636
Any serious program is going to get up to a few hundred thousand LOC. If you have 30+ programmers working on a project, then a million isn't much.
>>
>>56109573
kill yourself
>>
>>56109653
Again
>he never learnt to touch type
>>
>>56109659
Have you ever thought that maybe the reason it's 1.2m lines of code is because it's written in C?
>>
>>56109659
this

>>56109684
KILL YOURSELF
>>
Im working on game engine of sorts and I have trouble with lua api, so far i have exported following functions http://pastebin.com/ZcLTpMwf

Problem is i have no idea what I'm missing, maybe i should just try and make something with this and fill blanks in process...
>>
>>56109684
>muh "one line of Haskell is worth 1000 lines of C" meme

Nice, haven't seen that one this thread.
>>
golang is SHIT
>>
is -pedantic the strictest checker?
>>
CS first year here, what object oriented programming language should I pick. My options are
>C#
>C
>C++
>Java

Asking here as I assume you guys have been around the block and back in the work field. And what's in demand and better to work with.
>>
>>56109719
>Haskell
quote me

>>56109674
>>56109689
>>>/general/rules/6
>The quality of posts is extremely important to this community. Contributors are encouraged to provide high-quality images and informative comments.
>>
>>56109727
>object oriented programming language
>C

Pick C. It's the best language for OOP, aka the best paradigm.
>>
>>56109727
C. You can easily transition to any of the other langauges from C.
>>
>>56109727
Scala or CL.
>>
>>56109727
Well for jobs Java and C# but Java is awful and C# is windows centric. C++ can do all but its kinda complicated. I started with C++ and i use it regularly.
C is not OOP
>>
>>56105802

Erlang/Elixir for sure. It has an FFI, and plenty of useful libraries. The nature of the language also opens up the potential to do some really interesting stuff across multiple machines.

I'm using Erlang/Elixir in this project:
http://www.raskie.com#mememe

And this one:
http://www.raskie.com#on-notice
>>
>>56109753
He said non-meme
>>
Proficient in: Java, C

Need a new language. No functional languages for now. No Rust (tried it, didn't really like it), no C++, and no Python.
>>
>>56105802
Guile scheme is designed to be embedded with C/C++
>>
>>56109766
Scala
>>
>>56109766
Learn GO its easy and pretty decent.
>>
>>56109727
>CS first year
C, hands down, especially since you're in university. Further down the schooling line you can move to any of the other 3 before you graduate. C# and Java are really in demand these days in the market.
>>
new thread when ? :3
>>
>>56109729
as if being smug and elitist about your slow compilation times is making high quality posts
>>
>>56109811
>>
>>56109719
Any language with a decent standard library set is going to be 1/10 the size of C.
>>
>>56109754

No other language/runtime pairing with the same capability.
>>
>>56109727
absolutely java, don't listen to these stupid neckbeards, and C is definitely not suited for OOP
>>
>>56109781
No, golang is retarded and designed for idiots, even according to its creator
>>
>>56109809
>slow compilation times
>anything more than 15 seconds for 1.2m lines of code


>>56109825
He wanted /dpt/s advice, not the advice of some faggot who strolled in and pretended Java was acceptable
>>
>>56109766
>Need a new language.
for what purpose
>>
>>56109727
http://www.tiobe.com/tiobe-index/
>>
>>56109954
>linking that dumb shit

That is in no way a ranked of languages you should learn.

The fact that C is so high up pretty much proves that. Not enjoyable to use and no jobs.
>>
>>56109954
>Microsoft supports C++

based
>>
>>56110001
>wahhh I flunked out of my C class
>that language is shit! shit I say!
>>
>>56110034
Are you responding to the wrong post?

I didn't say C is shit.

I said it's not enjoyable to use.

It also objectively has fewer jobs than Java, Python, C#, C++, and Javascript.
>>
>>56110050
>not enjoyable to use

That's why it's the SECOND MOST POPULAR LANGUAGE right?

C is the only enjoyable language to use imo. Every time I tried to learn programming through Python or Java or Javascript I bounced off, but I stuck with it once I met C.
>>
>>56109954
>we automatically googled
+"<language> programming"[\code] over the course of the last few years and the one with the most results is the best programming language
great link, anon!
>>
>>56110077
>SECOND MOST POPULAR LANGUAGE
Yeah, for CS first-years, which make up a massive portion of TIOBE via StackOverflow posts and social media mentions. Not to mention that they completely erroneously grab C++/C# mentions under the C set in some cases (have you looked at their data? it's atrocious.)

Again, C is not even in the top 5 for jobs right now, and it's only going to shrink; even TIOBE admits this.

C is objectively a poor choice if you are trying to expose yourself to modern programming functionalities (mobile dev, modern CRUD and graphics) and larger job pools.
>>
>>56110166
I've never seen a program that teaches C to first years except my own, because I'm CE.
>>
>>56109620
in most ways, yeah
but the ecosystem is mostly garbage so it doesn't really matter
Thread posts: 340
Thread images: 31


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