[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: 356
Thread images: 38

File: 1486854282119.png (1MB, 790x960px) Image search: [Google]
1486854282119.png
1MB, 790x960px
Previous Thread: >>60449063

What are you working on, /g/?
>>
>>60455882
Lisp is the most powerful programming language.
>>
tfw no non useless lisp dialect to use
>>
>>60455895
True but what is the most powerful race?
>>
File: the elusive programmer (male).jpg (126KB, 331x510px) Image search: [Google]
the elusive programmer (male).jpg
126KB, 331x510px
Has anyone ever met the elusive programmer (male)?
>>
>>60455910
Common Lisp is plenty useful.
>>60455921
Lispers.
>>
>>60455925
>boys
>on the internet
kek
>>
>>60455930
>Common Lisp is plenty useful.
for what?
>>
>>60455979
how come no one uses it then
>>
File: dlang_chan.jpg (139KB, 470x545px) Image search: [Google]
dlang_chan.jpg
139KB, 470x545px
Threadly reminder that dlang-chan is not dead; she's going to have her GC tumor removed (eventually); and she's super duper cute and easy to prototype in! Say something nice about her, /dpt/!

>>60455925
>he isn't a programmer (loli)
Get off my board.
>>
>>60455996
Everyone does.
>>
>>60456003
lies
>>
>>60455998
stop posting that ugly boy
>>
>>60455998
>she's going to have her GC tumor removed
that's the dumbest thing they could possibly do, so i fully expect it
>>
>>60456020
stop posting, ugly boy
>>
>>60456016
Lisp is a programmable programming language. Therefore, Lisp can take on the shape of any other programming language. Every programming language is therefore a Lisp in disguise.
>>
>>60456060
nice meme
>>
File: no i must not leave.jpg (36KB, 350x464px) Image search: [Google]
no i must not leave.jpg
36KB, 350x464px
Reminder: Anyone who doesn't use java is going to be rounded up in the upcoming purges.

Comply or face execution for your crimes.
>>
theres better (you) bait than pretending to use Lisp you know.
>>
File: 1491996727161.png (2MB, 1500x1333px) Image search: [Google]
1491996727161.png
2MB, 1500x1333px
>memed a colleague into learning C++ instead of Python
>asks me for a tutorial
>send him a sample fixed point iteration code that calculates the critical point of an Ising ferromagnet
>"omg anon where are all the comments? This is so dense!"
>"how do I compile and run this? Apparently I need a 'GCC'?"
>"I-I think I'll stick to Mathematica for now."
>mfw
>>
>>60456098
Who's pretending, friendo?
>>
>>60456034
I believe they're going to make it fully optional in the standard library; so you can still use it if you'd like.
>>
Should I just fucking kill myself? I hate web dev with a passion and just want to program in C but none of the demonstrable skills I have through work experience are useful for these jobs, it's all just fucking web dev. I have a graduate interview with a company for something and it's still fucking webdev this time in C#. I'm thinking of cancelling but have been without a job for a few months now and don't see any positions in anyhing interesting coming up soon.

I don't even care about money. There's nothing I want to buy or do so bothering with this annoying shit doesn't seem worth it.

How do I get a nice job programming in C or even C++? What skills do I need? What projects should I do?
>>
>>60456110
you are, or else post a snippet of your current lisp project.
>>
>>60456127
Learn Lisp.
>>
>>60456088
as an end user whenever I see a piece of software was made in java I cringe, knowing that it will be shit.
>>
>>60456088
dumb frogposter
>>
>>60456118
they can't make it optional. there are a bunch of features in the language itself, like closures, that rely on gc.
>>
>>60456127
Management Information Systems
Bridge the gap between business and IT. Get paid a fucktonne for doing basically nothing in whatever language you want so long as you can talk shit and make excuses for working at your own pace.
>>
>>60456131
Nice try, you might steal my ideas.
>>
(((60456198)))
t. shitposter who doesnt even use lisp
>>
>>60456160
>Work is in progress to make the D standard library, Phobos, usable without any use of the garbage collector. Eventually Phobos will be fully @nogc compliant.
>>
How do I into marketing my project? I just released a game on ios
>>
>>60456127
Heavylifting gamedev? Like consoles, engines. It's still c++ field
>>
>>60456218
This isn't valid Lisp.
>>
>>60456221
they're retarded, i already knew this
>>
>>60456088
We got Kotlin, Scala and Closure
we no need no jave my lad
>>
((60456255))
)implying you would know(
>>
Can someone explain this line to me?

for(char op; cin >> op;)


Apparently it is supposed to read inputs continually but how does it work logically?
>>
>>60456235
How would I even get in to something like this? I'm working on a game engine now but I can't just fuck around for months to finish it before working can I?

>>60456170
I was thinking maybe do some nothing job for money but I just don't care, it doesn't motivate me at all. I have hundreds of thousands sitting in a bank account that I don't even care to know how to access.

>>60456137
I already did anon, employers just don't get it.
>>
>>60456278
I must ask you to refrain from using parentheses ever again.
>>
File: 1491882995065.png (100KB, 245x333px) Image search: [Google]
1491882995065.png
100KB, 245x333px
>>60456234
Do it the /dpt/ way: dress up in a sailor uniform; put on your thigh-highs; and go out onto the streets and suck some delicious, sweaty, stinky, and smegma-covered cock.
>>
(60456294)
When you post some original lisp i will
>>
>>60456293
>I'm working on a game engine now but I can't just fuck around for months to finish it before working can I?
live the neet life
live on rice and beans. Put something out there to distinguish yourself from the hoard of millennials, pajeets and millenial pajeets with meaningless degrees.
>>
>>60456298
Thats my sunday routine
>>
is rust any good?
>>
>>60456354
>not everyday
wow what are you a faggot or something
>>
>>60456290
It just reads from cin instead of providing some end of loop check so the loop never terminates and just keeps waiting for a character.
>>
>>60456359
no, its a m*m* language
>>
>>60456387
Yeah I understand but to my understanding the 2nd condition in a for loop is the end condition, so if cin >> op is met the loop terminates, so why does this always read from cin instead?
>>
>>60456311
Never. I will give you only my obfuscated read-time evaluated fizzbuzz.
#.(loop for i from 1 to 100 do
(format t "~:[~:[~a~;Buzz~]~;Fizz~:[~;Buzz~]~]~%~@*" (zerop (mod i 3)) (zerop (mod i 5)) i))
>>
>>60456335
I've been living the neet life and have a meaningless degree. It hurts, I can't stand the feeling of being useless.
>>
>>60456423
what's your degree?
>>
>>60456293
>How would I even get in to something like this?
What stops you from sending a resume to gamedev companies now? If you are proficient in C++ they will consider you I believe. AI/graphics/geometry algorithms knowledge certainly won't hurt.

My bud got a job as a junior C++ dev like that, made a a showreel of his engine. It was not much, but it was clean, showed his C++ and algorithm skills.
>>
>>60456429
phd in cocksucking
>>
>>60456420
The loop ends on false, not true. cin >> op will evaluate to true.
>>
>>60456386
A faggot with only 25 downloads
>>
File: awful.png (154KB, 720x1131px) Image search: [Google]
awful.png
154KB, 720x1131px
((60456422))
>>
>>60456453
Yes, those are my posts.
>>
>>60456429
Generic Bachelor of Computer science.

>>60456438
What if I'm actually stupid and can't do it?
>>
>>60456470
What was your coursework like?
>>
>>60456452
Try using your boipucci then.
>>
>>60456444
Okay that makes sense. Thanks.
>>
(60456466)
Doubt it lisposter
>>
>>60456423
Then make something. Make a game if nothing else.
it's easy as piss to get on steam greenlight these days. You should see the shovelware on there.
>>
>>60456423
Being a NEET is fantastic. Why are you complaining?
>>
>>60456494
You can believe what you want, anon. No one is stopping you.
>>60456508
>easy as piss
Not anymore.
>>
>>60456513
>no pussy
>>
>>60456534
it's not like programmers get any pussy even if they're employed....
>>
>>60456484
The course was lax in that I could do almost any course I wanted aside from some core units. I did mostly electrical engineering with microcontrollers, parallel computing, systems programming etc. I still don't feel confident in any of those areas though.

>>60456513
Crushing depression from isolation and being reminded how worthless I am.

>>60456508
I guess? Maybe I'll try that.
>>
>>60456545
Should have majored in business.
>>
>>60456554
Learn Godot engine. It's free.
>>
>>60456545
Programmer can be paid enough to buy pussy tho. I know a guy who takes yearly vacations to Thailand to get laid for like the entire week.
>>
>>60456470
>What if I'm actually stupid and can't do it?
Can't do what? You earned a degree, it means something. Stop overthinking, get some books and get grinding https://github.com/miloyip/game-programmer
>>
>>60456534
>3DPD
I pity you.

>Crushing depression from isolation and being reminded how worthless I am.
And? Cope like rest of us. Drown yourself in vidya, anime, manga, programming projects, music, etc. You should be cherishing your time as a NEET instead of moping.
>>
>>60456545
Totally their fault, girls actually dig programmers who bother to wash their hair once in a while
Well-paid, stable, creative, intellectual job with no retarded side effects like cocaine addiction or crushed skulls
>>
>>60456634
Ok, you smart ass. And what I am supposed to eat
>>
>>60456638
Girls dig rich people. That is the bottom line. In fact cocaine addiction is a plus. Those investment banks always have the hottest girls
>>
>>60456634
>Drown yourself in vidya, anime, manga, programming projects, music, etc
I've tried but I'm finding myself almost sickened by the idea even though I enjoy it while I'm doing it. I also have an incredibly hard time deciding on projects which is probably why I'm having this problem.
>>
>>60456659
Dakis.
>>
>>60456673
smoke dmt if you're lacking direction
>>
>>60456673
Cry. It cleanses the soul.
>>
File: 1460007604920.jpg (27KB, 241x257px) Image search: [Google]
1460007604920.jpg
27KB, 241x257px
>>60456711
Drugs are for losers!
>>
>>60456711
Degeneracy. >>>/trash/
>>
There are no men on /dpt/, only women. This is good, because women are superior programmers to men.
>>
>>60456748
There are no women on /dpt/, only lolis. This is good, because lolis are superior programmers to women.
>>
>>60456760
But that's wrong, femanon.
>>
>>60456760
There are no lolis on /dpt/, only anons. This is good, because anons are superior programmers to lolis.
>>
>>60456359
Pretty good, actually. I like cargo and RLS, easy to maintain and do a project. Still learning it though, it's quite big as it is
>>
Is go good to develop a web application?
>>
>>60456869
Yes
>>
>>60456869
No.
>>
>>60456869
Maybe
>>
>>60456869
Can you repeat the question?
>>
>>60456277

>No primitive types, only classes

Fuck off meme language, pure java is the best
>>
>go to interview at tech company
>dudebro asks me how to invert a binary tree
>do it, because I know basic CS
>get rejected because knowing basic CS means I'm a bad cultural fit
>turns out the company uses Python
>>
>>60456554
mate, you seem smart enough to do anything, you just need motivation and, prolly, social pressure. would say confidence, but... while I don't even have a degree, I feel like I can put myself in your feet and say, we are fucked, we can't get confidence out of air

>>60456731
this. no joke. cry if you need it.
>>
>>60455882
>>60456869
Yes, absolutely. Start here if you want to learn Go:
https://tour.golang.org
https://www.golang-book.com
>>
>>60457410
How can I implement a generic Fibonacci heap in Go?
>>
File: 1472860069099.png (185KB, 600x979px) Image search: [Google]
1472860069099.png
185KB, 600x979px
>>60457403
Maybe I just need some project I actually care about so I won't just stop working on it because I can't be bothered.
>>
>>60457410
You aren't welcome here. Please leave.

>>60457440
Apparently, "m4" is an acceptable answer for Rob Pike.
>>
>>60457459
>Apparently, "m4" is an acceptable answer for Rob Pike.
Um. Well then.
>>
programming is just a fucking meme. this thread is literally for posting memes at this stage.
>>60456734
>>60456742
reminder that the only way to become a 10xer is opening your third eye by boofing webscale DMT crystals
>>
>>60457502
You're a meme.
>>
File: 1494879371379.jpg (76KB, 1280x720px) Image search: [Google]
1494879371379.jpg
76KB, 1280x720px
>>60457448
I've said this countless times to other anons in similar situations: what you need is to instill discipline in yourself. Eventually motivation and passion run out; that's when you need to kick yourself in the ass so you can finish things. Starting a project, but then dropping it later because you stopped giving a shit is a terrible feel.
Also, cry and cry a lot.
>>
>wake up
>continue trying to wrangle Treehouse project into code I've been working on for six hours
>get frustrated, decide I need to drop acid
>pop a few tabs
>get back to business
>get distracted by the music, vaguely remember someone sometime saying Udacity is better than Treehouse (lmao?), decide to switch
>reboot from square one
>spend all day following step by step instructions throwing tantrums every time I mess up my copy pasting
>finally start getting somewhere when I realize I have no idea what I'm doing

But goddamnit I'm going to do it all over again tomorrow until I figure something out!
>>
>>60457589
>Taking hallucinogen instead of a stimulant
Well done
>>
>>60457589
fuck off druggie
>>
Inverting a binary tree in Rust!

use std::mem::swap;

pub struct BinaryTree<T> {
data: T,
left: Option<Box<BinaryTree<T>>>,
right: Option<Box<BinaryTree<T>>>
}

impl<T> BinaryTree<T> {
pub fn new(value: T) -> BinaryTree<T> {
BinaryTree::<T> {
data: value,
left: None,
right: None
}
}

pub fn invert(&mut self) {
swap(&mut self.left, &mut self.right);

if let Some(ref mut subtree) = self.left {
subtree.invert();
}

if let Some(ref mut subtree) = self.right {
subtree.invert();
}
}
}
>>
>>60457604
It's what was at hand. Besides, I thought I needed more creativity to figure out HOW THE FUCK TO UNWRAP AN OPTIONAL but turns out all I needed was more copy paste :)
>>
>>60457613
You mutated the tree. Why would you do that?
>>
>>60457625
>HOW THE FUCK TO UNWRAP AN OPTIONAL
You, uh, don't. That's the whole point.
>>
>>60457440
Just like you would in any C-like language that has pointers...
>>
>>60457631

Because that's what you're supposed to do when inverting a binary tree. I don't suppose you are the sort of person who would allocate an entirely new tree like some sort of barbarian, are you?
>>
>>60457631
>not taking advantage of safe mutability
>>>/java/
>>
what language should I teach my gf?
>>60457552
agreed
>>
>>60457643
Well if we're not shitposting anymore that's what I thought too:

``` if (item.inscription?.contains("THE ETERNAL STAR")) {
``` return item

(wild guess at the code syntax hopefully I'm right kek)

but it throws the error Value of optional type Bool? not unwrapped; did you mean to use a ! or a ?
>>
>>60457613
what the fuck I didn't realize u can implement a struct, i've been creating retarded traits the whole time
>>
>>60457645
Even C++ gives me more type safety than fucking Go, then.

>>60457653
Yes, I am. Persistence for life.
>>
File: my bike.jpg (49KB, 625x417px) Image search: [Google]
my bike.jpg
49KB, 625x417px
What's a good algorithms book for plebs? I want to read about skip lists, heap sort, etc. without getting bogged down by sets, formal proofs, and shit.
>>
>>60457667
flatMap that shit
>>
>>60457684
I don't know what that means but I'm pretty sure that's not what the answer is for part 1 of a beginners swift series
>>
File: 1476332577555.gif (59KB, 600x400px) Image search: [Google]
1476332577555.gif
59KB, 600x400px
Updated.
// Assuming there's a live /dpt/, love (<3) every "unique" anon in it
foreach (auto anon; chan4.boards[CH4_BOARD_G].thread("/dpt/").uniquePosters) {
if (anon.tripcode == "!Sempai.oWA") {
me.bully(anon, assetManager.getRandImgRegex("smug_anime_girl."));
continue;
}

me.cleanSmegma(anon.dick, assetManager.getRandImgRegex("lewd_anime_girl."));
me.suckDick(anon.dick, assetManager.getRandImgRegex("lewd_anime_girl."));
me.drinkCum(anon.dick, assetManager.getRandImgRegex("lewd_anime_girl."));
}
>>
File: faceistired.jpg (91KB, 1280x720px) Image search: [Google]
faceistired.jpg
91KB, 1280x720px
Man, I just spent like the last couple of hours way overthinking this really simple practice exercise that could be written in like under fifteen lines of code. Finally got it though
>>
File: 1366164021384.png (5KB, 473x454px) Image search: [Google]
1366164021384.png
5KB, 473x454px
Hi /dpt/, I've been programming for lisp in the few years and have gotten started with C++ just recently. It's a bizarre experience, and probably as hard as people saying going the other way around is. What I want to know is: how the hell do C++ programmers deal with packages? There's no modules, and there doesn't seem to be any canonical package/library source or even a package manager. Do you guys just google "C++ library for [thing]" and hope for the best? Do you guys download them into one big directory like C:/bin/cpp/libs/? Does everyone use git sub-modules + github/etc. for package management? Forgive me for the probably stupid question, but it's tripping me up.
>>
>>60457734
This made me laugh VERY hard and i'm not really sure why
>>
>>60457734
kek
>>
Is Python endlessly-bloated-to-hell-and-back with libraries overkill to just automate some browser shit vs. Javascript? I am much more versed in Python than JS, but I feel like it's performance would be much worse.
>>
>>60456106
Mathematica is a legitimately good language for doing mathematical programming in though. The libraries are much better developed, the m-expr base syntax is much easier than C++'s syntax, it's interactive by default and supports a journal-style system, and you never have to wonder what the difference is between passing pointers, references, or copies between procedures is.
>>
>>60457781
t. Stephen Wolfram
>>
>>60457677
>Even C++ gives me more type safety than fucking Go, then.
wut
>>
>>60457807
lolnogenerics
>>
>>60456359
Yes
>>
>>60457744
You're exactly right. C++ was used back when programming was supposed to be hard
>>
>>60457677

>Persistence for life.
You know what's better than persistence? Performance! Let's not allocate memory unless we need to.
>>
>>60457971
>back when programming was supposed to be hard
it was hard not because "it was supposed to be hard", but because it wasn't developed as it is now... lots of smart people (and no, not "computer scientists") had to contribute to the field to get us where we are now
>>
>>60457653
>mutable state
>>
>>60457971
>how the hell do C++ programmers deal with packages?
>"You're exactly right."
Hmm?
>>
What is /dpt/'s opinion on C#? Is it really a better version of Java?
>>
>>60458297

Yes.
>>
>>60458297
Who cares?
>>
>>60458297
Depends on which Jew you prefer
>>
>>60458297
Microsoft garbage as opposed to Oracle garbage.
>>
>>60458115
I was talking about the comforts of package managers for programming languages
>>
>>60458156

>Wasting performance on copying and memory allocation
>>
>>60458199
Responding to his (or (you)r) guesses
>>
>>60458411

*wasting time
Got performance on my mind. Words coming out wrong.
>>
>>60456255
(define 60456198
(lambda () (lambda () (lambda () 'faggot))))
>>
>>60458434
So it was "all of the above"? I see.
>>
Which language can /dpt/ agree on that is not shit?
>>
>>60458594
Nolang
>>
File: 1491656447184.png (12KB, 112x112px) Image search: [Google]
1491656447184.png
12KB, 112x112px
>Work solution consumes web services
>Thing has been working since forever since i implemented it
>Have to do some changes to output more descriptive messages for some corner cases
>When debugging the webservice always return null
>If i run the expression myself it returns as it should but only 10% of the time
>If i just let the code run over that part without any breakpoints it works
I'm not even pausing the thing anywhere before it returns as to interrupt the transaction or something, really makes me ponder
>>
>>60458606
Looks good.
http://nolang.com/
>>
>>60458739
>>60458606
>Features
>- Object oriented
It's absolute trash.
>>
>>60458761
this
>>
>>60458739
>Object oriented - everything is a object.
n-no thanks
>>
>>60458594
Rust if you are a Hindi speaker
>>
sincerity preserved !!!!

fuck the rest of you
>>
>>60457781
Mathematica is great for what it's set out to do, but not for hardcore number crunching. My colleague was complaining that his i7 laptop takes hours to run finite element in Mathematica for the Einstein field equations, which is a system of 10x10 nonlinearly coupled differential equations for the metric tensor, while I sit here with my i3 running finite temperature DMRG for a 100-site lattice within minutes on C++.
Dude thinks Python is too hard, imagine my surprise when he couldn't read C++.
>>
>>60455910
Typed Racket looks pretty cool.
>I said “non useless”
Yeah yeah.
>>
>>60459105
So I assume Ran-chan is your waifu.
>>
>>60447843
>>60447861
>>60447886
I mean files that the program actually needs to mess with. It would be determined by some “header file”-like thing, so of course it wouldn’t work out-of-the-box with any program. I’m just wondering if the idea is good other than getting it to support a lot of programs.
>>
>>60459105
>Python
>Too hard
Tell him to commit soduku
>>
>>60459105
You shark has been imagined
>>
File: ran's_DMRG.png (1MB, 900x1440px) Image search: [Google]
ran's_DMRG.png
1MB, 900x1440px
>>60459142
Ran-sama is my role model.
>>60459168
I don't know anon he seemed disheartened when I told him that Python is literally just English.
>>60459221
Thanks anon.
>>
>>60459261
You will be surprised at how retarded people can be. Once I let my cousin play on my PC, so she wanted to know how to climb a ledge, I told her to use space to jump and she said she couldn't so I walked over to look. Turns out she was pressing space but not holding W. Some people just don't have the sense of connecting ideas together.
>>
>>60459261
He's skilled in math, so English probably isn't his main interest. Seriously though, imperative looks like ASS
>>
File: 16 - 1.jpg (32KB, 530x530px) Image search: [Google]
16 - 1.jpg
32KB, 530x530px
>>60459261
Glad I could help
>>
>>60459261
>Any questions?
Can I nibble on those tails?
>>
anyone know a better place to talk about programming? because this thread sucks

>inb4 reddit
>>
>>60459291
Being able to write well is a basic requirement in academia though, and I've seen some of his papers.
>>60459325
Nope. Only I can do that.
>>
>168 posts
>42 posters
the samefag is strong in this one
>>
>>60459343
Discord
>>
>>60459385
dont you mean irc?
>>
>>60459368
That is pretty typical for a /dpt/, idiot. People usually don't just post once and leave.

>>60459385
Get your proprietary garbage out of there.
>>
>>60459401
kys
>>
Legitimate question:
Software/Games that allow people/modders to add their own content/modify already existing content regularly use LUA instead of Python, why is this?
>>
>>60459598
Python is trash
>>
>>60459598
Lua is super easy to embed
>>
200 pages in and I am hit with expressions, term and primary. I don't quite get it. Any help?
>>
Can anybody give an example of a function/method where the return of the method is a call to itself?
>>
>>60459626
fix f = f (fix f)
>>
>>60459598
Python is trash for modding, Lua is perfect.
Check out Factorio, they're doing the modding integration very well
>>
>>60459636
looks like your doing the opposite there. you're passing the function as a parameter unto itself
>>
>>60459298
Who is this man
>>
>>60459679
The function is called to create another function which is then passed back
>>
Cryptography in the most secure language ever
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <time.h>

extern int printf(const char *format, ...);
extern double pow(double x, double y);
extern int atoi(const char *str);
extern time_t time(time_t *t);
extern double log10(double x);
extern int abs(int x);

long generate_crypt_key(int seed)
{
int seedlen = (int)log10((double)seed)+1; char keystr[seedlen+7]; long key;
int b = 1; int c = 0; int *a = &seed; int a_1 = ~(int)a & c; int a_2 = 1;
for(int i = 0; i < 7; i++) { a_2*=i; } if((int)a == a_1) *a = 0;
int a_3 = (!a)?(c=1):(b=0); int a_4 = (int)a | (b+~c);
(int)a >>c ; (int)a&0xF8; (int)a << ((int)pow(b,c)+(int)pow(c,b));
if(*a == 0) return -1; (int)a ^ ((a_1|a_2)&(a_3|a_4));
sprintf(keystr, "%d", *a);
sprintf(keystr, "%s%d", keystr, &a);
key = (long)abs(atoi(keystr));
free((void*)a); return key;
}

int main(int argc, char **argv)
{
if(argc != 2) return -1;
int seed = atoi(argv[1]);
long key = generate_crypt_key(seed);
printf("%ld", key);
return 0;
}
>>
https://pastebin.com/gaMJYvQS
i need some help figuring out how to get all this dumb shit into a loop or something. i have 20 maximum callable scripts and they need to be divided by the list element number among each element there is in result_array (if it hits something like 3 scripts/2 elements the example is in the code)
>>
File: miku poop.jpg (103KB, 500x500px) Image search: [Google]
miku poop.jpg
103KB, 500x500px
This mick comes up to you and splatters you with Principles of Object Oriented Programming!

wat do?
>>
>>60459598

Lua was designed as an embedded language first, so it's easier embed into a C or C++ program. Also, Python is slow as balls by comparison.
>>
>>60459742
>Declaring standard library functions manually
>Shitloads of useless casts
>Multiple statements per line
Your code is bad, and you should feel bad.
>>
Someone link me a good generic C/C++ Makefile that while work with any tree structure with src/include dirs and put all .o in the dir obj/ and also build in the folder bin/
must also create .d for header dependency
>>
File: aya_hatate_face.png (153KB, 315x219px) Image search: [Google]
aya_hatate_face.png
153KB, 315x219px
>>60459742
>>
>>60459794
https://github.com/Dako300/BasicTV/blob/master/Makefile
I wrote this Makefile for another anon on here a while ago.
>>
File: 14768213401020.jpg (307KB, 533x799px) Image search: [Google]
14768213401020.jpg
307KB, 533x799px
Is there any way to shorten this code?? (C#)
https://ideone.com/6XMfx5
>>
>>60459814
>>60459794
Actually I forgot to mention that it doesn't do everything you're asking for, so it'll need to be modified, but it's a start.
>>
>>60459794
>>60459814
nevermind I finally found this one
https://github.com/StewBC/cc65-Chess/blob/master/Makefile
that I've been using for some time but lost somehow
this shit is the best
>>
>>60459825
>C#
use C++
>>
>>60459842
>Replacing AIDS with cancer
But why?
>>
>>60457613
>data: T,
>left: Option<Box<BinaryTree<T>>>,
>right: Option<Box<BinaryTree<T>>>
It's
data :T,
left :Option<Box<BinaryTree<T>>>,
right :Option<Box<BinaryTree<T>>>
>>
>>60459825
Store the markers as numbers instead.
"x" and "o" as 1 and 0.
sum of all fields == 0 means o got a line
product of all fields == 1 means x got a line
>>
>>60459742
Improved.
Forgot assignments cause im tired and should really go to bed:
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <time.h>

extern int printf(const char *format, ...);
extern double pow(double x, double y);
extern int atoi(const char *str);
extern time_t time(time_t *t);
extern double log10(double x);
extern int abs(int x);

long generate_crypt_key(int seed)
{
int o_seed = seed;
int seedlen = (int)log10((double)seed)+1; char keystr[seedlen+7]; long key;
int b = 1; int c = 0; int *a = &seed; int a_1 = ~(int)a & c; int a_2 = 1;
for(int i = 0; i < 7; i++) { a_2 *= i; } if((int)a == a_1) *a = 0;
int a_3 = (!a) ? (c = 1):(b = 0); int a_4 = (int)a | (b + ~c);
*a = (int)a >> c ; *a = (int)a & 0xF8; *a = (int)a << ((int)pow(b,c)+(int)pow(c,b));
if(*a == 0) return -1; *a = (int)a ^ ((a_1|a_2)&(a_3|a_4));
*a = ((int)a | (o_seed ^ 0xF2)) & ((int)&a);
sprintf(keystr, "%d", o_seed);
sprintf(keystr, "%s%d", keystr, *a);
sprintf(keystr, "%s%d", keystr, &a);
key = (long)abs(atoi(keystr));
free((void*)a); return key;
}

int main(int argc, char **argv)
{
if(argc != 2) return -1;
int seed = atoi(argv[1]);
long key = generate_crypt_key(seed);
printf("%ld", key);
return 0;
}
>>
>>60459879

That's elegant.
>>
>>60459825
>https://ideone.com/6XMfx5
What the absolute fuck is wrong with you? That code is worse than anything I've ever seen
>>
>>60459857

All of the language documentation places the colon on the side of the field name, not the type name.

https://doc.rust-lang.org/book/structs.html

When in doubt, the creators of the language got the style right the first time.
>>
>>60459944
And as evidence to your shittyness; i wrote this:
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <time.h>

long generate_crypt_key(int seed)
{
int o_seed = seed; int seedlen = (int)log10((double)seed)+1;
char keystr[seedlen+7]; long key;

int b = 1, c = 0, *a = &seed;
int a_1 = ~(int)a & c; int a_2 = 1;
for(int i = 0; i < 7; i++) a_2 *= i;
if((int)a == a_1) *a = 0;

int a_3 = (!a) ? (c = 1):(b = 0);
int a_4 = (int)a | (b + ~c);
*a = (int)a >> c;
*a = (int)a & 0xF8;
*a = (int)a << ((int)pow(b,c)+(int)pow(c,b));

if(*a == 0) return -1;
*a = (int)a ^ ((a_1|a_2)&(a_3|a_4));
*a = ((int)a | (o_seed ^ 0xF2)) & ((int)&a);

sprintf(keystr, "%d", o_seed);
sprintf(keystr, "%s%d", keystr, *a);
sprintf(keystr, "%s%d", keystr, &a);

key = (long)abs(atoi(keystr));
free((void*)a); return key;
}

int main(int argc, char **argv)
{
if(argc != 2) return -1;
int seed = atoi(argv[1]);
long key = generate_crypt_key(seed);
printf("%ld", key);
return 0;
}

Yet still feel justified in bashing yours.
>>
>>60457613
>Arms length recursion
You're fucking shit.
use std::mem::swap;

pub enum BinaryTree<T> {
Leaf,
Node {
data: T,
left: Box<BinaryTree<T>>,
right: Box<BinaryTree<T>>,
},
}

impl<T> BinaryTree<T> {
pub fn new(value: T) -> BinaryTree<T> {
BinaryTree::Node {
data: value,
left: Box::new(BinaryTree::Leaf),
right: Box::new(BinaryTree::Leaf),
}
}

pub fn invert(&mut self) {
if let &mut BinaryTree::Node{ref mut left, ref mut right, ..} = self {
swap(left, right);
left.invert();
right.invert();
}
}
}
>>
File: 1452039202160.png (46KB, 286x324px) Image search: [Google]
1452039202160.png
46KB, 286x324px
I started doing algorithms today. How's my insertion sort implementation? It only operates on an array of longs. p-pls bulli

void ins_sort_lint_arr(size_t len, long arr[len]) {
if (!len) return;

for (size_t i = 1; i < len; i++) {
long key = arr[i];
long j;

for (j = i - 1; j < len - 1 || j >= 0; j--) {
if (key >= arr[j]) break;
arr[j + 1] = arr[j];
arr[j] = key;
}
}
}
>>
>>60459954

Hrm... you cast a pointer to an int, which automatically suggests you're going to have different behavior based on whether you're on a 32-bit platform or a 64-bit platform. You also return a long, which suggests that either you've only programmed on one OS, or you don't really give a damn about the actual size of the return value.
>>
>>60457744
Your distro has a lot of C++ libs with headers, presumably. And if they are unavailable you install them out of the package manager or you make a personal-use package. That's how I've always done it. This is a system language after all.
>>
File: chen_pirate.png (86KB, 398x286px) Image search: [Google]
chen_pirate.png
86KB, 398x286px
>>60460067
>arr
>>
File: 1474349724498.jpg (12KB, 236x265px) Image search: [Google]
1474349724498.jpg
12KB, 236x265px
>>60460129
???
>>
File: 1461737108240.png (860KB, 841x720px) Image search: [Google]
1461737108240.png
860KB, 841x720px
>>60460129
>Not writing all of your code like a pirate would
>>
>>60460168
God I want to cum in Machi-chan's little cunny. I want her to yell my "My clitty, my clitty!" over and over again. UUUUUUUUUUGHHHH
>>
>>60460191
can't believe i hang out with you freaks
>>
Quick!
What warning do you use for your C applications?
>>
>>60460329
-Wall -Wextra -Wno-unused
>>
>>60460349
>-Wno-unused
Wew, lad, just use __attribute__((unused)).
>>
>>60460375
>Non-standard shit
If I was going to do it in code, I would just cast it to void.
It's just when you're developing shit, there are often variables that you know you're going to use, but haven't done it yet. They're just useless warning messages for the mean time.
I usually remove the warning later once I'm done, and see if it comes up with anything.
>>
>>60460191
Dude, that's my daughter you're talking about.
>>
File: oldschoolanim.webm (3MB, 640x360px) Image search: [Google]
oldschoolanim.webm
3MB, 640x360px
/dpt/-chan, daisuki~

Ask your much beloved programming literate anything (IAMA)

>>60455882
Please use an anime image next time.
>>
>>60460458
Why haven't you killed yourself yet?
>>
>>60460458
When will you finally commit sudoku?
>>
File: pixel_rain.gif (51KB, 500x376px) Image search: [Google]
pixel_rain.gif
51KB, 500x376px
Let's say I have 1 month to get good with a language so I can get a job.

I currently have:
>Very good python
>Very good SQL
>A little C (Up to chapter 3 of K&R, built some basic gameboy games with it)

If I have a month, and I want to go for software engineering jobs, do I:
>Double down on C and hope that's enough to show I can program
>Switch to C++/Java/C# and hammer that for a month (and if so, which one)

I know it's retarded, but if it had to be done, which would you do?
>>
File: 1486479783772.jpg (564KB, 1680x1268px) Image search: [Google]
1486479783772.jpg
564KB, 1680x1268px
Friendly reminder that if you can't trivially implement a kernel in your language of choice, it's useless meme trash.
>>
>>60460458
>Ask your much beloved programming literate anything (IAMA)
Why do faggots exist?
>>
>>60460481
I don't think there are enough pure C jobs to justify double downing on it, why don't you focus on Python instead? Learn Django and get into webdev, for example. Or switch to Java, there're lots of Java vacancies out there.
>>
File: 1415858731885.png (509KB, 480x488px) Image search: [Google]
1415858731885.png
509KB, 480x488px
>>60460481
You can make gameboy games with C

damn, that's what I want to do, time to learn C
>>
File: 1495098628600.jpg (113KB, 1192x580px) Image search: [Google]
1495098628600.jpg
113KB, 1192x580px
>>60459879
it doesn't work, help me please
>>
>>60460481
Go for either Java or C# for increasing your employability, they're also trivial to learn for the most part
>>
>>60460511
https://github.com/avivace/awesome-gbdev

Enjoy

Bear in mind most of the tools were developed for windows, and can be a pain to run on Linux, but things like GBTD and GBMD run fine with wine
>>
>>60460481
if you are good at python and SQL why not go into webdev?
>>
>>60460483
what do you mean by trivially?
Like, print "Hello, world!" on the screen by writing to video memory?
>>
>>60460522
thanks anon
>>
>>60460527
I hadn't considered Web Dev too much, it doesn't appeal to me quite as much for some reason

I'll look into it more though, I've used a little Django in the past but never bothered finishing a whole project in it for some reason, there's so much fiddling you need to do with it
>>
>>60460458
what is the best implementation-oriented, practical compilers book?
>>
>>60460441
I'm sorry, anon, but you're daughter is so fucking sexy! Her face is just prime material to ejaculate on. And have you seen her stomach? FUUUUUUUCK That midriff makes my penis dance like no other. To make her lewd belly button a swimming pool full of my cum is my dream.
I WANT TO FUCK MACHI-CHAN
I WANT TO FUCK MACHI-CHAN
I WANT TO FUCK MACHI-CHAN
I WANT TO FUCK MACHI-CHAAAAAAAAAN
>>
File: 94fMJPU.jpg (105KB, 734x960px) Image search: [Google]
94fMJPU.jpg
105KB, 734x960px
>>60460562
Modern Compiler Design is what you want but it's not free. otherwise, have a look at Writing a compiler in Ruby, bottom up

more importantly, an umara-chan OVA just got released.
>>
>>60460528
Can use pointers freely.
No runtime, or at least runtime not required.
Can implement the entire standard library from scratch.
Runs natively, i.e. no virtual machine.
Makes a clear distinction between static memory, stack memory, and heap memory, and allows you to allocate in either, freely.
Allows you to explicitly allocate and free memory.
Those are just some main points. Feel free to add to the list if I missed anything important.

C, C++, and Rust fulfill all the above main points.
>>
>>60460601
>an umara-chan OVA
Does it hambugga-chan in it?
>>
>>60460612
C, C++ and Rust can't implement a kernel without using another language: asm... I think?
>>
>>60460630
Assembly does not count as another language.
It's just a textual representation of the architecture specific instruction set. All (non meme) languages compile to it.
And yes, that's a pretty important point I missed in my list:
You must be able to easily write inline assembly in the language, and it must be able to easily interop with assembly code.
>>
>>60460520
So, you want to check if an entire row or column are all equal to some value, right?
>>
Can somebody please explain to me when bit shifting/unshifting could be useful?

How often is it really used on a day-to-day basis?
>>
>>60460655
>Assembly does not count as another language.
This is only possible if assembly accepts all the same programs as those other languages. Which is a blatantly retarded statement.
>>
>>60460934
>This is only possible if assembly accepts all the same programs as those other languages.
And the other way around too.
>>
>>60460934
>>60460943
Fucking retard. I mean it's not really a single seperate entity. It's a common base used by many languages.
>>
>>60460961
>I mean it's not really a single seperate entity.
It is, by definition, you retard.
>It's a common base used by many languages.
Which doesn't somehow make it the same language.
>>
>>60460877
shifting is used a lot in certain cryptographic applications

also shifting bits left/right allow for quick multiplication/division by powers of 2

>>60460934
assembly is just a set of mnemonics for machine code - it translates literally into machine code, there is no abstraction like in C or any higher level languages, so from that point of view it's not a 'language' of its own - assembly is just a machine's instruction set.
>>
>>60461008
>assembly is just a set of mnemonics for machine code - it translates literally into machine code, there is no abstraction like in C or any higher level languages
That's entirely irrelevant to the discussion.
>so from that point of view it's not a 'language' of its own
This is probably the most retarded thing I have heard today.
>assembly is just a machine's instruction set
That alone makes it a language.
>>
>>60461027
>That's entirely irrelevant to the discussion.
It's my whole fucking point you nigger.

You need to fuck off and stop sperging out. You are taking this tiny detail way too seriously.

>This is probably the most retarded thing I have heard today.
You must of just woken up.
>>
File: maxresdefault[1].jpg (116KB, 1920x1080px) Image search: [Google]
maxresdefault[1].jpg
116KB, 1920x1080px
>>60460890

Guess who's back
>>
>>60461050
>You are taking this tiny detail way too seriously.
You claimed that assembly (I'm assuming any one of them), C, sepples and Rust are the same language. This is clearly retarded and only someone mentally ill would say this even as a joke.
Saying that assembly is a base for most languages isn't the same as saying that it's literally the same language.

>You must of just woken up.
>must of
I see.
>>
>>60461098
>You claimed that assembly (I'm assuming any one of them), C, sepples and Rust are the same language
What the fuck are you smoking? Please point out where I said that.

>Saying that assembly is a base for most languages isn't the same as saying that it's literally the same language.
I only said the former. I never fucking said the latter you stupid cunt.
>>
>>60461027
assembly *is* machine code. C, C++, Rust etc all compile to machine code.
Would you say they compile to another language, or that they simply compile to machine instructions/machine code?
>>
>>60458761
>>60458768
literally this, why do people like OO-languages so much? It's unnecessary and bloats the whole program
OOP was a mistake
>>
>>60461147
Care to explain why instead of muh feelings
>>
>>60461119
>Please point out where I said that.
see >>60460655 "Assembly does not count as another language."
Not counting as another language is the same as counting as the same language. Which means they are somehow the same in your twisted mind.
>I never fucking said the latter you stupid cunt.
A dirty lie.

>>60461137
>assembly *is* machine code.
This is a blatantly retarded and illiterate thing to say. I'm pretty sure there isn't a single processor which runs assembly without first actually assembling it. Something being machine code would mean it requires no further translation to be interpreted directly by the processor. A one to one mapping is still a translation.
>C, C++, Rust etc all compile to machine code
In what way does this imply that these language are the same language as assembly?
>>
>>60459879
this guy got his shit figured out
>>
>>60461008
thanks hombre.

>also shifting bits left/right allow for quick multiplication/division by powers of 2

modern compilers usually do this optimization automatically for you though?
>>
>>60461180
>modern compilers
What is a "Modern" "Compiler"? And for what language?
>>
File: 1408868852143.jpg (84KB, 400x295px) Image search: [Google]
1408868852143.jpg
84KB, 400x295px
Teach me something new, senpai.
>>
File: cat_girl.png (341KB, 500x566px) Image search: [Google]
cat_girl.png
341KB, 500x566px
>>60461147
I like OOP because it is fun to program in. It is fun to manipulate objects and I like the rigid structure of OOP.
>>
>>60461197
>What is a "Modern" "Compiler"?
https://www.wikiwand.com/en/Optimizing_compiler
>>
>>60461211
Alright I guess I cant really say anything against personal preference, but I think it actually just complicates things.
>>
>>60461230
>Optimizing_compiler
That's not "Modern" "Compiler", and I'm pretty sure those have existed for a long time now.
>>
>>60461147
object is the most powerful data abstraction technique and allowed humanity to design very large softwares while keeping the complexity viable.
>>
>>60461252
>object is the most powerful data abstraction technique
no, java is trash redditor. leave. just fucking leave and spare yourself from further embarrassment.
>>
>>60461252
>object is a powerful data abstraction technique
FTFY

It's not the only abstraction technique out there, but it certainly is a handy one. I agree with the rest of your post.
>>
>>60461268
>but it certainly is a handy one
>>>/r/india/
>>
>>60461244
have you read the history part?
A modern compiler is an up-to-date optimizing compiler, otherwise it's obsolete. Optimizing compilers became viable around mid 90's. If you look at video games before that, most of them were still programmed in assembly.
>>
>>60461264
>java
Who said anything about Java, shit for brains?

Java is a poorly designed programming language. It doesn't even allow proper polymorphism or multiple inheritance.
>>
>>60461275
>A modern compiler is an up-to-date compiler
Oh, so that's what you meant. Why didn't you say so then?
>Optimizing compilers became viable around mid 90's
How is that "Modern"?
>>
>>60461173
> A one to one mapping is still a translation.
If I mapped all the keywords in C to some spanish keywords, would I have made a new programming language? Or is it still just C just with a spanish interface for the programmer?

This is the same as asm. Yeah no shit a processor doesn't 'run' the text based mnemonics, it runs the binary representation of those mnemonics.

>In what way does this imply that these language are the same language as assembly?
When did I ever say that? Stop sperging out and putting words in my mouth, I'm not that other poster, and I don't think he even said it either.
>>
>>60461275
>If you look at video games before that, most of them were still programmed in assembly.
I'm pretty sure that up to the 1990s, 80% of videogames were programmed in Atari BASIC, so no.
>>
>>60461287
>proper polymorphism
Subtype """""polymorphism""""" isn't proper polymorphism.
>multiple inheritance
>>>/g/wdg/
>>
>>60461290
>Oh, so that's what you meant. Why didn't you say so then?

some other anon talking to you anon but thanks for the answer

I was a bit unclear
>>
>>60461315
>Subtype """""polymorphism""""" isn't proper polymorphism.
That's what I fucking just said you sperg.
>>
>>60461298
>If I mapped all the keywords in C to some spanish keywords, would I have made a new programming language?
Yes. That language doesn't accept all the same programs and C, that would by definition make it a different language.
>This is the same as asm.
Nope.
>Yeah no shit a processor doesn't 'run' the text based mnemonics
Indeed, so assembly isn't machine code.
>it runs the binary representation of those mnemonics.
Which is a translation and therefore not machine code.
>When did I ever say that?
Why are you even replying to me then? It's clearly obvious you agree with him and are just closeted.
>>
>>60461180
Maybe, but not in all cases. If you know that bit shifting works as quick mult/division, you can structure your programs better so that the compiler can definitely pick up on it.

Also, you can use bitwise shifting to check if data is aligned properly, such as memory addresses, or to clear portions of a number/register.
>>
>>60461324
The level of "enterprise best practices" brainwashing everywhere is astounding. It's like people have had mantras drilled into their heads so long that they believe they're self-evident truths and that asking for proof is some unspeakable sin.
Never ever recommend usage of objects or OOP here.
>>
>>60461305
even commercial video games? i highly doubt that.
>>
>>60455930
>A.1.2.1.
>Why is CLISP using menorah as the logo?
>Whimsical
>If you must have some answer and you do not care whether it is correct or not, you may simply think that Common Lisp brings the Light to a programmer, and CLISP is a vehicle that carries the Light.
>Accordingly, CLISP enables you to see the truth, thus you can pronounce it as see-lisp. Alternatively, if you are a seasoned expert, you might pronounce it as sea-lisp.
>Historical
>CLISP has been using the menorah for the logo since the project was first started in the late 1980-ies by Bruno Haible and Michael Stoll. This probably reflects the authors' affection toward the Jewish people, Judaism or the State of Israel (neither of the two original authors is Jewish by birth). You may ask the original authors for details yourself. Both of them are very busy though, so do not expect a prompt reply.
I hate kabbalist jews
>>
>>60461356
>video games
Please return to your containment board
>>>/v/
>>
>>60461368
t. butthurt linux user
>>
>>60461368
video games are probably the hardest kind of programs to design and implement.
>>
>>60461394
I don't use anything even remotely related to GN*, sorry.
Now return to your containment board.
>>>/v/
>>
>>60461344
I don't see the relevance of your reply to my posts. I understand that you have some beef with Java, but that is fucking irrelevant to my original reply ( >>60461268 ).
>>
>>60461405
>game programming
>___programming___
>not /g/
t. even more butthurt linux user :^)
>>
>>60461404
It's irrelevant since games aren't merely programming. And this thread discusses just programming.
Off you go now : >>>/v/

>>60461411
>video games
>:^)
>>>/v/
>>
>>60461419
> >>>/v/
>>>/c/ancer
>>
>>60461419
>since games aren't merely programming
The discussion is about game programming, not game development in general.
>>
>>60461410
OOP is fundamentally flawed. I realize that, being a poor programmer, you may lack the cognitive capacity to understand this.
>>
>>60461437
>game """development"""
Off you go now, "gamer" "kid".
>>>/v/
>>
>>60461437
>>>/vg/agdg/
There is a special thread for your kind. Fuck off.
>>
>>60461444
Can you start using a tripcode please? I want to filter you out so that I don't have to read your shitposts.
>>
>>60461444
Clearly you were implying that we were talking about game development in the "It's irrelevant since games aren't merely programming." part of your previous post, were you not?
What would you call it then?
>>
File: rms-in-a-dress.jpg (407KB, 1152x1536px) Image search: [Google]
rms-in-a-dress.jpg
407KB, 1152x1536px
>>60461438
>say it is fundamentally flawed but offers no argument as to why, except an ad hominem intentionally vague Java references

Obvious shitposting / 10
>>
>>60461462
Yes, join me on >>>/r/abbit/ where we all have tripcodes. I believe you have an account there.
>>60461463
>What would you call it then?
I would call it "shit". Just like most "video games". Fuck off back to your containment board and learn your place in the world.
>>
>>60461468
OOP encourages shared mutable state.
>>
>>60461472
>What would you call it then?
>I would call it "shit".
edgy af
>>
>>60461468
It's subpar for safety and reasoning because of shared mutable state, it's subpar for efficiency because of virtual calls and bad cache layout, and its common usage is subpar for abstraction and code reuse because inheritance is mathematically nonsensical, subtype polymorphism is not polymorphism in general, and composition of objects rather than pure data leads to lots of boilerplate methods.
>ad hominem
Do you not have access to a dictionary or are you just that unwilling to learn / retarded?
>>
>>60461476
No, it doesn't. It encourages encapsulated state only mutated by a well-defined interface.
>>
File: 14679054799560.jpg (183KB, 780x1080px) Image search: [Google]
14679054799560.jpg
183KB, 780x1080px
http://ideone.com/dyLv6K
what am I doing wrong?
>>
>>60461488
This is why you shouldn't start using OOP. The student's brain becomes encapsulated in poo.
>>
>>60461488
This video goes into more detail that I can be bothered writing myself right now:
https://www.youtube.com/watch?v=QM1iUe6IofM
>>
>>60461472
>Yes, join me on >>>/r/abbit/ where we all have tripcodes. I believe you have an account there.
You sound like an obnoxious /r/unixporn arch user
>>
>>60461486
>it's subpar for efficiency because of virtual calls and bad cache layout,
I don't understand instruction caches - the post.
>>
>>60461500
>/r/unixporn
What the hell is that and why would a non-plebbitor know about it? You have proven beyond any doubt that you are indeed from rabbit. You can fuck off now.
>>
>>60456127
Embedded?
I just applied for one, haven't used C in 5 years and am scared as fuck
>>
>>60461492
As soon as I saw that if statement, I was like, nope.
>>
>>60461287
>Java doesn't allow multiple inheritance.
Which is a good thing, because composition is the better option anyway.
>>
>>60461492
Not wrapping at the 80th column.
>>
>>60461510
what do you mean?
I found it on google and it's filled with people exactly like you
It sounds like you're the one who belongs there
>>
>>60461524
Why the fuck were you searching for something from plebbit on google? Clearly you're a filthy rabbitor.
I want to see the reasoning why you're not from reddit, which you obviously are.
>>
>>60461524
>it's filled with people exactly like you
Oh, so you went on that website? As I said, it's clear that you are a plebbitor and you're not trying to hide it anymore.
>>
>>60461498
It is an interesting video, thanks. But its premise is that objects are in essence state, and that passing objects around means passing state around. I'd argue that objects are merely interfaces, and that it is possible to pass these around as more than simply state modifiers.

>>60461514
>a good thing
Can be argued, but I'm in the camp where I think it is bad. But since it doesn't have proper polymorphism anyway, then yes composition is a better option.
>>
>>60461503
Jesus fucking Christ I've never seen a thread filled with so many incompetent retards. These threads should seriously be banned from /g/.
Literally making people drop sepples or whatever crap you use because nobody wants to have anything to do with that ugly as sin piece of degenerate shit.
>>
>>60461419
On my business card, I am a corporate president. In my mind, I am a game developer. But in my heart, I am a gamer.
>>
>>60461557
Backpedalling and damage control - the post
>>
>>60461556
>proper polymorphism
What is a "Proper" "Polymorphism "?
>>
>>60461556
How on earth are objects NOT state?
>>
>>60461565
I know it may be hard for you to face and accept reality; with all the effort and time you've put in mastering your chosen POOlang.
But the sooner you accept it, anon. The better you'll feel.
>>
>>60461566
It is a type that inherits traits from multiple types and is able to be all those types simultaneously. Java-style subtyping means that you can cast a subtype to whatever supertype it inherits from, which is obviously an attempt at polymorphism.


>>60461575
I write C for a living, but nice try basing your entire argument upon the assumption that Java is the equivalent of object orientation. Also, if you use Linux later than 3.10 and you use TCP, you already are using my code ;-)
>>
>>60461606
>It is a type that inherits traits from multiple types and is able to be all those types simultaneously.
So a "Polymorphism" is a "Type"? That doesn't make a whole lot of sense.
>>
>>60461621
>>60461621
>>60461621

New thread
>>
>>60461606
>Java
A POOlang is something which features POO. Sepples (what you for some reason called "C") features POO and is therefore a POOlang.
>Java is the equivalent of object orientation
How can a POOlang be equivalent to a set of POOlangs?
>if you use Linux
I'm not subhuman, so no, I don't.
>>
I have an array of indices for opengl, but every second index number is not for drawing the actual mesh. Any way I can specify a stride for the indices? I know it's possible for the vertex buffer, but I can't find anything about what I need. Please send help
>>
>>60461606
>It is a type that inherits traits from multiple types
How is this """inheriting""" traits from multiple types?
id = \a : Type -> \x : a -> x
>>
>>60461567
Objects represent types and data, and classes define the interface for instances of those types.

Java is bashed a lot here, but I'll use some examples using it because apparently it is the only OOP language some of you know about.

You can instantiate an object that doesn't contain data, which would merely be an interface. This is how you would implement methods as first-class citizens in Java before version 8, for example.

You could also define an object that doesn't require you to call methods in any specific order, or that rely on current values of the internal data. Integers, for example, is a type that is data combined with a set of operations. This is not a state.

And for the sake of pissing Haskell fanboys of, I'd even argue that certain factory and builder classes are what is known as monads (at least in essence), because they allow you to build generic types and define their interface as well as defining their internal rules.

>>60461614
No, polymorphism is the ability to have traits and behaviour of be multiple types. In essence, to "be" multiple types simultaneously.

>>60461627
>Sepples (what you for some reason called "C")
I don't use C++ except for userland stuff, I use C for 90% of my programming.

>How can a POOlang be equivalent to a set of POOlangs?
That's your argument, not mine.
>>
>>60461665
I don't know what that syntax means, so I can't answer that question.
>>
File: tyson.jpg (84KB, 960x960px) Image search: [Google]
tyson.jpg
84KB, 960x960px
>>60461696
>AbstractFactoryBuilderBean is in essence a monad
Brace for incoming shitstorm
>>
>>60461696
>In essence, to "be" multiple types simultaneously.
No.
>>60461706
It's a function which takes a type, then takes a value of that type and returns the value.
>>
>>60461696
>And for the sake of pissing Haskell fanboys
Why would that be "pissing Haskell fanboys of". "Monads" in Haskell have about as much to do with category theory as POOshit has to do with Haskell, which is to say not much at all.
>>
>>60461730
>No.
That is what polymorphism means in regards to object-orientation, no matter if you disagree or not.

https://en.wikipedia.org/wiki/Polymorphism_(computer_science)

>It's a function which takes a type, then takes a value of that type and returns the value.
That would be an example of generics.
>>
>>60461754
>comparing Java to Haskell
>"Why would that be pissing off Haskell fanboys?"

Hello, newfriend.
>>
>>60457613
puta zorra gorda y estupida que eres subnormal hdp callate ya y dedicate a otra cosa
>>
>he doesn't use trigraphs in his code
>>
>>60461757
>That is what polymorphism means in regards to object-orientation
That doesn't make any sense. Parametric polymorphism is no no way even remotely related to POO. POO bastardizing something doesn't somehow change the original meaning of the word.
>That would be an example of generics.
What is a "Generic" though? Is it some other retarded word which has no meaning upon closer inspection?

>>60461768
He didn't compare it to H*skell. He compared it to category theory. Monads aren't a H*skell thing.
>>
>>60461777
>I enjoy quarrelling about semantics instead of accepting the consensus surrounding paradigm naming
I see no point in discussing this with you when your complaint is essentially about naming conventions, rather than the actual programming concepts.
>>
>>60461853
>I enjoy quarrelling about meaning
Yes, I do. Only a retard would find it acceptable to use words in a way in which they have no meaning.
>actual programming concepts
You obviously think two programming concepts (one of which isn't even real) are somehow the same when they aren't.
>>
>>60461882
>I use alternative definitions and refuse to accept the definitions everyone else use
You clearly have severe autism. Have a nice day.
>>
>>60461928
Only if your idea of an alternative definition is the original definition which makes the most sense even without any context.
"generics" is a non-word, "polymorphism" being a "type" doesn't even make syntactic sense.
>>
>This value is called EOF. We must declare c to be a type big enough to hold any value that getchar returns. We can't use char since c must be big enough to hold EOF.
If EOF is most often -1, and signed char goes from -128 to 127, was this written just as a precaution in case EOF is something else on other systems?
>>
>>60461944
>"generics" is a non-word
It is a well-defined programming concept, you autistic sperglord.

https://en.wikipedia.org/wiki/Generic_programming

>"polymorphism" being a "type"
I never said that, learn how to fucking read. I said it is the act of being multiple types at the same time.
>>
>>60462037
The C standard allows the implantation to choose whether char defaults to signed or unsigned.
>>
>>60462216
>It is a well-defined
I highly doubt it. You haven't provided a definition yet, it should be pretty easy if it's well defined.
>https://en.wikipedia.org/wiki/Generic_programming
Wikipedia isn't a valid source of truth, didn't even bother clicking the link. Also "generic programming" (which is also a retarded word) isn't the same as "Generics".

>I never said that
You got asked: 'What is a "Proper" "Polymorphism "?'
You replied: 'It is a type that...'
How the fuck is this not saying that polymorphism is a type?
>I said it is the act of being multiple types at the same time.
Which is also wrong. That is literally impossible in any type system. A term can't have multiple types.
>>
>>60462275
You clearly are just arguing for the sake of arguing. You are just being a deliberate cunt. I've argued my case and provided you the well-known definitions, and you choose to ignore them because of some broken inner logic you might have due to severe Dunning-Kreuger. I'm not going to reply to you anymore, and wait until this thread is archived.
>>
>>60462366
>I've argued my case
Poorly.
>provided you the well-known definitions,
Did I miss something?
>you choose to ignore them because of some broken inner logic
Wikipedia isn't a valid source of truth, if it points to a valid source of truth then it can be linked to without involving wikipedia. This is one of the main axioms which govern my existence and I have very good reasons to believe that it should be this way.
>I'm not going to reply to you anymore
Obviously, since I have shown how laughably wrong you were by saying that something can be multiple types at the same time or that "polymorphism is a type" (that might have been a simple typo on your part but you didn't acknowledge it so I'm treating it as a legitimate point).
>>
>>60462366
ANSWER ME!!!!!
>>
COME ON ANSWER ALREADY! I guess you can't, since you're laughably wrong about everything.
>>
>>60456139
Same here. I actually appreciate when developers are self-conscious enough to try and hide that they use java. Being rid of the negative expectations is good and software that does hide that it's java trash is often better than the software that embraces the ideas of java openly.
>>
>>60461641
https://learnopengl.com/#!Getting-started/Textures
Under the header 'applying textures' there's a visual representation of what glvertexattribpointer does. If you hover over the function call in the code (just below the picture) you get a nice description of the function.

This might help if the opengl docs weren't enough.
>>
>>60462450
Ignore POO programmers. They don't know enough to hold a constructive conversation and often assume that general concepts are POO specific because of this ignorance. Polymorphism is one such prime example. Other topics include: misunderstanding of how inheritance relates to POO, what a virtual function is, what the stated goals of POO is and how it fails to deliver in most cases, how retained mode api work and why POO is popular in gui because of this.
And many more.
It's best not to talk with these people at all. Ostracizing these members of the programming community will force them to adapt or be obsolete.
>>
>>60463335
>>60463402
Why are you posting as if you were me? Is this what mental illness does to you?

>>60463721
>It's best not to talk with these people at all. Ostracizing these members of the programming community will force them to adapt or be obsolete.
I agree. My curiosity about how their animalistic mind works got the better of me.
Thread posts: 356
Thread images: 38


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