[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: 344
Thread images: 21

File: Niklaus_Wirth,_UrGU.jpg (62KB, 800x612px) Image search: [Google]
Niklaus_Wirth,_UrGU.jpg
62KB, 800x612px
Old: >>56858161
Working on?
>>
File: snek.jpg (121KB, 600x800px) Image search: [Google]
snek.jpg
121KB, 600x800px
i am snake

how to type fast pls. have no fingers
>>
Again:
Anyone knows a good book/guide on Discrete Mathematics? I don't know shit anything about it but I heard it's like Algebra.
>>
use one of this
>>
>>56864342
>>56864222
is what i meaned haha sorry
>>
>>56864311
https://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-042j-mathematics-for-computer-science-fall-2005/readings/
>>
>>56864222
now this is an s-expression
>>
>>56864222
G-Guido?!
>>
>>56864425
he iss traitor to snakes
>>
>>56864311
discrete mathematics is not really a subject. to write a book on discrete mathematics you look at the tools needed to understand algorithms and for each one you take a random textbook on it and copy the first twenty pages. then you stitch these all together and sell it for $200
>>
So, /dpt/, is Rust actually a cool innovation or is it just a bunch of hot air again? People are hyping it a lot, but to me it just looks like C# with RAII and pointers. What's the big deal?
>>
>>56864611
I mean, it's not completely terrible
>>
>>56864611
It's nothing like C#
it's C with traits, RAII, and compile-time safety checks.
>>
>>56864360
looks like they've nearly got a book
https://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-042j-mathematics-for-computer-science-spring-2015/readings/MIT6_042JS15_textbook.pdf

>>56864425
what's he up to now? you don't hear about him anymore

>>56864471
to be more helpful: i would take a look at "concrete mathematics" by knuth et al. my only concern is that it's pretty long
>>
>>56864758
Concrete Mathematics will be a bit mutch for a beginner.
>>
>>56864639
whats raii
and wich is thos features is a liability?
>>
>>56864758
Still a nameless drone over at Dropbox, apparently. Maybe he'll be relevant again once they finally manage to kill Python 2.

>>56864843
Resource Allocation is Initialization
Basically, the one way to do safe memory management without GC. It has less overhead but can be sometimes be wasteful in non-optimized code.
>>
>safe memory management

malloc and free are perfectly safe
>>
>>56864611
>Innovation
:^)
>>56860442
>>
Any computer science majors here? How is Data Structures?
>>
>>56864908
Until somebody throws an exception...
>>
>>56864814
you're probably right. i guess it depends on what he meant by "algebra"
i think their book is at least exciting. i think that's important
>>
>>56864936
Easy peasy
>>
>>56864936
I heard she and Algorithms broke up last week
>>
>>56864936
anon do you know how many universities there are
>>
>>56864948
Why would anyone ever use exceptions?
>>
>>56864952
I assumed he meant basic algebra not groups and stuff.
>>
>>56864961
A very good question, anon.
>>
>>56864205
writing a basic shell in my OS class. Would like to shoot myself. We didn't cover C very in depth in the pre-req courses. Not used to this pain.
>>
>>56865016
And as of C++ 17, exceptions are part of the function type. Passing a throwing function to something expecting a non-throwing one will fail to compile.
By the end of the century C++ will use be a pure language
>>
>>56864870
it's resource *acquisition* is initialization
and it's not just about safety, it's also a matter of semantics
the primary benefit of RAII is that it ties resource lifetime directly to scope, which is fully consistent/predictable
and breaking the model (e.g. some move semantics scenarios) is done in a standard way which clearly expresses intent

>>56864908
kek

>>56864961
>>56865016
because proper use of RAII and exceptions allows code to operate in a contained memory model, as any library or independent chunk of code should. when resources aren't tied to a scope, memory management work gets passed onto calling code. if a user of a library has to call a function thinly wrapping free when an error code is returned from another library function, that library isn't really memory-safe
>>
>>56864955
It's easy if your professor wasn't time-pressured.
>>
int *n or int* n?
>>
>>56865085
int *n; because aesthetics and safety.
>>
How does someone like me go about learning fasm.
>>
>>56865028
fprintf(stdout, "welcome to shell\n");
while (1)
{
char input[MAX_BUF];
fprintf(stdout, "> ");
fgets(input, MAX_BUF, stdin);
struct ops *ops = lexer(input);
do_things(ops);
ops_free(ops);
}
>>
File: 201607221946411006167005.png (5KB, 238x212px) Image search: [Google]
201607221946411006167005.png
5KB, 238x212px
>Be in 400 level course
>Partner doesn't know C
I remember why we make fun of CS
>>
File: 1473996396192.jpg (362KB, 1106x1012px) Image search: [Google]
1473996396192.jpg
362KB, 1106x1012px
>>56865125
>be in a 400 level course
>classmate doesn't know induction
>>
File: when the D hits you.jpg (23KB, 512x512px) Image search: [Google]
when the D hits you.jpg
23KB, 512x512px
>>56865137
>be in 400 level course
>classmate doesn't know monoids in the category of endofunctors
>>
>>56865096
http://www.nasm.us
>>
If I were alive, this thread would kill me.
>>
>>56865155
I'm sorry i meant FASM
>>
>>56865174
Read the docs and the examples + use Google.
>>
>>56865137
stupid frogposter
>>
#include <string.h>
#include <limits.h>

const char *bitap_bitwise_search(const char *text, const char *pattern)
{
int m = strlen(pattern);
unsigned long R;
unsigned long pattern_mask[CHAR_MAX+1];
int i;

if (pattern[0] == '\0') return text;
if (m > 31) return "The pattern is too long!";

/* Initialize the bit array R */
R = ~1;

/* Initialize the pattern bitmasks */
for (i=0; i <= CHAR_MAX; ++i)
pattern_mask[i] = ~0;
for (i=0; i < m; ++i)
pattern_mask[pattern[i]] &= ~(1UL << i);

for (i=0; text[i] != '\0'; ++i) {
/* Update the bit array */
R |= pattern_mask[text[i]];
R <<= 1;

if (0 == (R & (1UL << m)))
return (text + i - m) + 1;
}

return NULL;
}

Here you go lads, bit string searching
usage:
bitap_bitwise_search(text,pattern)

returns a pointer to a const char that is the matched text.
courtest of https://en.wikipedia.org/wiki/Bitap_algorithm
>>
Is it normal to feel overwhelmed by program problems as a beginner? How can I git gud?
>>
can someone help me figure out how the randomization for password generation in this program works? i know it's not using /dev/urandom or rand() because during debugging it completely skips over that part
http://pastebin.com/dt41xFWY
>>
forgot to add syntax highlighting
http://pastebin.com/Zezantey
>>
>>56865224
>>
File: hackerman.jpg (99KB, 500x500px) Image search: [Google]
hackerman.jpg
99KB, 500x500px
>>56864961
Apparently you've never used or written a library of code before. Which probably means you've only written fizzbuzz and helloworld.
>>
>>56865662
hmm
>>
>>56865662
You actually use built in exceptions?

Fuck you
>>
>>56865874
You have a function which takes a math expression given as a string, and it returns a double. What do you do if the solution is too large and it would cause an overflow error? What do you do if there is a syntax error given in the input?
>>
>>56865910
There are many ways to do this without exceptions.
>>
>>56865927
>There are many

No there aren't lol, that's why I explicitly asked you to name a single one, but feel free to list many right now.
>>
Thinking about smoking a spliff and working through the next chapter of The D Programming Language.

I'm starting to think maybe I should switch to Rust, but it seems so awkward and D feels so natural.
>>
>>56865939
Return a struct containing an error code (if any) and the result.

Return an integer containing the error code and pass the double as an out parameter.

Add a function to register an error handler, call it in the case of an error, and return 0.0 in case of an error.

Return 0.0 in case of an error and have the user unconditionally call another function afterwards to check for an error state.

To name 4.
>>
>>56865939
parseExpr :: String -> Either String Double
>>
>>56865971
>Return a struct containing an error code
The function returns a double idiot

>Return an integer containing the error code
The function could return that same number due to normal operations idiot

>return 0.0 in case of an error.
Same answer above idiot

>Return 0.0 in case of an error
Holy shit you stretched 1 wrong answer into 3 wrong answers
>>
>>56865910
see >>56865990
it's perfectly easy to work with the concept of exceptions without having it built into the language
>>
>>56865996
But Anon, that's not even valid C++ and the function returns a double, idiot.

xD
>>
>>56866013

std::function<std::variant<std::string, Double>(std::string)> parseExpr;
>>
>>56865996
I don't even know what degenerate language that is, not giving it a response as it's not relevant. There is no reason to purposely be retarded when you can just use exceptions.
>>
Is there a reason I should avoid Node if it has by far the best work prospects in my area?
>>
>>56865910
f :: String -> Either Error Double
> if the solution is too large and it would cause an overflow error
Left (OverflowError ...)
> What do you do if there is a syntax error given in the input?
Left (SyntaxError ...)
> no error
Right result
>>
>>56866040
I don't even know what degenerate langugae that is. Use exceptions, cuck.
>>
>>56866031
template <typename e, typename t>
struct Exceptable {
bool thrown;
union Exceptable {
e exception;
t valid;
}

Exceptable<e, u> continue(std::function<Exceptable<e,u>(t));
}
>>
>>56866056
Whoops, didn't mean to call the union exceptable
do
union {
} value;
>>
>>56866056
And unlike with the built in exceptions, you can treat it like a first class value
>>
>>56866031
The Maybe/Either functor actually makes you deal with possible error states, instead of hoping something somewhere will catch all possible exceptions from every function you call.
>>
>>56866056
>>56866081

You could even write a function for the babies using your library:

template <typename e, typename t>
t withExceptable (Exceptable<e, t> mt) {
if (!mt.thrown)
return mt.valid;
throw mt.exception;
}
>>
>>56866056
That looks really fucking ugly and nobody else using your library would know what you're thinking, professionals used exceptions, autistic neets in their basements don't I guess, that's okay.
>>
>>56866056
So every function that can fail should return Exceptable<e,t> ?
>>
>>56866093
oh yes lets mimic rusts .unwrap().unwrap().unwrapw() reeee
>>
>>56866105
>unwrap
"no"
>>
>>56866094
>That looks really fucking ugly
It's C++, what do you expect?

in haskell:
data Exceptable e a = Exception e | Valid a


>>56866094
>nobody would understand
Yes we get it, you need your hand held with exceptions.
After all, no exceptionfag could possibly understand unions let alone tagged ones.

>>56866099
Why are you writing so many functions that can fail?
And yes. You write convenience functions:

valid -- takes a t, returns Exceptable<e,t>
error -- takes an e, returns Exceptable<e,t>

If you've got an error, you do:
return error (...)

otherwise

return valid (...) -- you could even make this the regular constructor

If you want to work with a value that might be an error:

possibleValue.continue([](t value) { ... });
>>
>>56866129
hows that improvement over using std::throw_whatever in function that can fail, and writing int try except? It might even be quicker to type.
>>
File: 1473193365808.jpg (469KB, 1280x853px) Image search: [Google]
1473193365808.jpg
469KB, 1280x853px
>>56866129
>in haskell

Sorry the adults are talking.
>>
>>56866143
fat cow
>>
File: hopf.png (32KB, 872x872px) Image search: [Google]
hopf.png
32KB, 872x872px
> Working on?
Going to update my soundcloud reposting script written in haskell.
Now I'm wondering can I rewrite this better:
scLastItemId clientId userId =
fmap (\r -> (r ^? responseBody . key "collection" . nth 0 . key "track" . key "id" . _Integer)
<|> (r ^? responseBody . key "collection" . nth 0 . key "playlist" . key "id" . _Integer)) $
get [i|https://api-v2.soundcloud.com/profile/soundcloud:users:#{userId}?limit=1&offset=0&client_id=#{clientId}|]

I want lens part to be something like
r ^? responseBody . key "collection" . nth 0 . (key "track" <|> key "playlist") . key "id" . _Integer

Any lens experts here?
>>
>>56866142
>how's that improvement
It's first class, and not built into the language.
You can scrutinise it yourself.
You could write your own try/catch - or a completely different control structure, e.g. a function that takes a bool and a value and throws if it's false.

In C++ obviously it's going to be a lot more verbose than the built in language feature.
>>
What legacy language do I learn? I once heard of a guy who worked ~2 days a year on an oil platform, and that was enough for a yearly salary. Is COBOL good for this?
>>
>>56866174
No, but at the very least you could be using a where clause.

And putting that url elsewhere.
>>
>>56866178
>reinventing a shittier version of the wheel
So basically... autism?
>>
>>56864205
>Working on?
just finished "hello world" a few weeks ago, learning about "regular expressions" now
>>
>>56866197
challenge: write a function that can throw a throw
>>
>>56866197
Plus it's _much_ nicer to be able to have things as library features.
And pre-C++17 (features that have yet to be implemented) you couldn't know if a function could throw.
Plus, didn't someone say exceptions might make you skip a free?

The problem with C++ is just that it's too verbose and ugly and awkward to make these as anything other than language features. Do you want regexes built into the language? Maps? Databases and SQL?

Should everything be a language feature?
>>
>>56866174
Haven't messed w/ lenses, but can't you do something like:
scLastItemId clientId userId =
fmap (\r -> (getById r "track") <|> (getById r "playlist")) $
get [i|https://api-v2.soundcloud.com/profile/soundcloud:users:#{userId}?limit=1&offset=0&client_id=#{clientId}|]
where getById r keyName = r ^? responseBody . key "collection" . nth 0 . key keyName . key "id" . _Integer
>>
>>56866036
bump
>>
>>56862568
>written tests
Generally they don't complain about syntax errors or such things. All you really lose is not being able to autocomplete, read docs or test your code.
Those are big things obviously.
But your programming course was probably not a programming course to begin with. It was likely just a language knowledge course like most programming courses are.
>>
>>56866143
she looks juicy as fuck
additionally an asian looking like an egyptian pushes all my buttons
>>
>>56866308
It's on ehentai
go there and report lewd posts..
>>
>>56866318
can i get a search keyword
>>
double & funct(Type * p){
if(!p){
return p.value;
} else {
//wtf do I do here?
}

I want to return 0 or something but because it returns a reference and any random new int i create will be local, what do?
>>
>>56866209
I would if you could tell me a situation where throwing a throw would be needed.
>>
>>56866359
how about eliminate source of your problem and not return &? Compiler will optimize it anyway so no point
>>
>>56866327
nvm found it
>>
>>56866327
>not recognizing practically all porn on ehentai
You're a disgusting casual.
http://g.e-hentai.org/g/967766/852a9c1d56/
>>
>>56866391
it got taken over completely by furries and newage tumblr trannies and other faggots
>>
>>56866391
found it, you can delet

im not a casual ive had an acc there for i dont know how many years well over five, probably around 7 where i started to develop autism
>>
File: le autism mayne.jpg (103KB, 469x746px) Image search: [Google]
le autism mayne.jpg
103KB, 469x746px
>deliberately extending Object
>>
>>56866407
So filter it if you don't care for that.
>>
>>56866407
>newage tumblr trannies and other faggots
Where do you think you are?
>>
>>56866430
Not on tumblr, >>>/fa/ggot
>>
File: 1468725072421.png (341KB, 500x686px) Image search: [Google]
1468725072421.png
341KB, 500x686px
>>56866412
>inheritance
Not even once

>>56866419
>if you don't care for that.
You do?

>>56866430
>confusing pure C crossdressers with filthy tumblrite transvestites
>>
how can i boner with a program
>>
>>56866455
>You do?
No I'm just expressing that I don't care what others masturbate to.
Like a rational person who understands that it doesn't affect me.
>>
>>56866381
I would do this but it's an assignment and i'm given the function declaration, figured there was some good reason for the & that i havent figured out
>>
>>56866359
There are many ways to do this.
>>
>>56866189
>>56866247
Yes, I know, thanks. Still interested in alternative at Getter level.
>>
>>56866455
imoto?
>>
>>56866475
double& foo() {
double bar = 3;
return &bar;
}
>>
>>56866472
Sure you don't
>>
>>56866494
What language is this?
>>
>>56866507
It's C++, the &bar is a mistake.
>>
>>56866513
That whole function is a mistake.
>>
>>56866506
Well you're clearly not likeminded as you care a lot about irrelevant details.
>>
>>56866494
no problems returnign a reference to a local soon to be gone double?
>>
File: le tranny slut in training.jpg (2MB, 1686x2690px) Image search: [Google]
le tranny slut in training.jpg
2MB, 1686x2690px
>>56866455
<- you irl

also
>C
>pure
>>
>>56866532
ignore that & it was mistake, it wont even compile...
>>
friendly reminder never to use calloc

>>56866520
You'd have 4chan subsumed by /trash/ because
>muh free spee- porn
can you honestly say the quality of that website hasn't dropped significantly since it that trend
>>
>>56866544
ignoring that then, man ill mail the prof and ask what he expects or if i can just remove the & from the function return (because it really doesnt need to be there)
>>
>>56866569
>can you honestly say the quality of that website hasn't dropped
Yes. I can. Because I filter.
And use exhentai
>>
>>56866570
That not what i meant. This will compile and if you assign it immediately it should work

double& foo() {
double bar = 3;
return bar; //no &
}
>>
>>56866584
ah, but again, no problem returning reference to local variable?
>>
>>56866607
thinking in terms of convention, coding practice and such now
if its deemed ok ill just go ahead and use it
>>
>>56866584
What would happen if you did
foo() = 4
?
or

foo() = 4;
std::cout << foo();

>>56866575
>the world is burning down around me, but don't worry, i'm not paying attention
>>
>>56866569
>friendly reminder never to use calloc
Some justification is in order.
>>
>>56866623
dont do that
>>56866607

#include <iostream>

double& foo() {
double bar = 3;
return bar;
}

int main() {
double baz = foo();
std::cout<<baz; //prints 3
return 0;
}

>>
>>56866622
You're not even wrong anon.
>>
>>56866584
Shouldn't bar be static? Does it not go out of scope like that?
>>
>>56866570
Well, before you send that:
double& foo() {
double bar = 3;
return &bar;
}

here's what the function does
double& foo() {

This bit explains that you have a function foo that returns a _REFERENCE_ to a double.
double bar = 3;

This creates a local variable called bar. When it goes out of scope (function ends) it dissappears.
return &bar;

takes the address of bar and returns it (probably will have a compiler error because there's no implicit conversion from pointer to double)

What you may want is:
double foo() {
double bar = 3;
return bar;
}

Which returns the value 3. From the function.
I'm not sure what your assignment is exactly but this would be the most sensible thing to do since we have a function that just returns a constant value. It'd be compiled away and anywhere you put foo() you just get "3" instead (aside from certain circumstances which I doubt are meaningful at this level).
>>
>>56866644
Forgot to mention since you have a reference to something that goes out of scope if you remove the & from the return &bar; that gives you a null reference. Which is bad. Always.
>>
>>56866644
>inlining across compilation units
hello mr fancypants
>>
>>56866662
>his compiler is dumb
Not my fault.
>>
>>56866665
>implying any compiler does this by default
>>
>>56866674
>implying practically all compilers aren't shit
Especially C++ compilers.
>>
>>56866683
>implying I even use C++
It's probably one of the worst languages out there. This whole "implicitly convert values to references" shit is just ridiculous.
>>
File: rofl xD.jpg (52KB, 376x419px) Image search: [Google]
rofl xD.jpg
52KB, 376x419px
>>56866662
>>56866665
>>56866674
>>56866683
>>
>>56866644
seems i understood it correctly, thanks. assignment is to implement a find function for a tree but just boiled it down to the detail I wondered about (he gives the header file, i do the implementation, the & wasn't my choosing)
>>56866653
yeah i was weary of something like this, wonder if it's just a typo at this point why the fuck does a const find function return a reference?
>>
>>56866695
I agree.
But I never implied you use C++.
>>
>>56866715
I've never had a problem with my C compilers. So.
>>
>>56866695
double& foo() { return 4; } // compiler error
const double& bar() { return 4; } // no error
>>
File: bjarne blew it.jpg (353KB, 870x500px) Image search: [Google]
bjarne blew it.jpg
353KB, 870x500px
>>56866744
>not using rvalue references
>>
>>56866744
Well, that might not even be wrong as long as that 4 is put into static memory.

But consider this:

auto f()
{
int i = 0;
return i;
}

int& g()
{
int i = 0;
return i;
}
>>
>>56866727
Do they give you super helpful error messages, allow you to interface with them in a nice way to (for instance) find out what optimizations were ignored because of what reasons?
Do they let you instrument your code easily?
Does your compiler give you functionallity that lets you resolve things like unlinked libraries by searching for potential solutions if you ask it to?

These are all features they could have.

if they weren't lazy shits who spends dozens of years on compilers that do the bare minimum to be acceptable.

I don't know of any languages that do this decently. But I know it's possible and most of it isn't even particularly hard if you tried because I've written compilers.
>>
>>56866784
>Do they give you super helpful error messages
They do.
>allow you to interface with them in a nice way to (for instance) find out what optimizations were ignored because of what reasons?
Maybe.
>Do they let you instrument your code easily?
What do you mean by this?
>Does your compiler give you functionallity that lets you resolve things like unlinked libraries by searching for potential solutions if you ask it to?
I don't know what you mean by this either.
>>
>>56866779
i is an lvalue so there's nothing wrong with this
you could've done
auto& f
to generate g

I don't know if it's undefined that the variable is local to the function, but there are cases where it could be permissible if unusual
>>
>>56866837
>but there are cases where it could be permissible
"no"
>>
Cute programmers make the best programs
>>
>>56866863
I love Emilia.
>>
>>56866854
it complicates the compiler to need to know if it's local or not
>>
>>56866871
Who?

>>56866837
Returning a reference or pointer to a local variable is never excusable. Pass it around all you want, but once it has gone out of scope, it is dead. Any function can overwrite it at any time.
>>
>>56866798
>>Do they give you super helpful error messages
>They do.
What compilers do you use? I suspect you have very low standards for helpfulness.
>>allow you to interface with them in a nice way to (for instance) find out what optimizations were ignored because of what reasons?
>Maybe.
Haven't heard of a compiler that gives you that much insight. To be fair I'm pretty much only looking at open source projects but I suspect this might be a little problematic in proprietary software.
>>Do they let you instrument your code easily?
>What do you mean by this?
https://en.wikipedia.org/wiki/Instrumentation_(computer_programming)
You often find stuff like Intel® Architecture Code Analyzer inserting some (fairly random) set of no-ops to make them able to do stuff with your code. That's a simple way of putting it. But they have to work to do that. A compiler could easily provide ways of making this a lot easier. But I haven't seen any that do. Usually you have very little control over the compiler output.
>>Does your compiler give you functionallity that lets you resolve things like unlinked libraries by searching for potential solutions if you ask it to?
>I don't know what you mean by this either.
It's fairly common for newbies of a langauge to try and set up a library with their language and they happen to link the wrong .lib or generate/have an incompatible .dll with their software when they compile.
Compilers could give you a lot more information about how you're fucking up basically.
>>56866887
>it complicates the compiler to need to know if it's local or not
So fucking what? That's an incredibly minor complication which, ignoring what advantage it has to the programmer, can be a huge time save.
>>
>>56866909
>That's an incredibly minor complication
everything is and then it's impossible to write a compliant compiler in the first place without major backing

... that's why there isn't a single fully standards compliant C++ compiler
>>
>>56866919
>that's why there's not a single fully standards compliant C++ compiler
No that's because C++ is a dumb language which is designed by dumb people who don't understand anything about computers.

So when you try to bring this dream of a programming language to the real world it gets incredibly complicated.
>>
>>56866909
>What compilers do you use?
clang, gcc. I don't write programs that cause warnings in the first place.
>So fucking what? That's an incredibly minor complication which, ignoring what advantage it has to the programmer, can be a huge time save.
Both clang and gcc emit a warning.
>>56866903
>Who?
The best girl.
>>
Tabs or spaces?
>>
>>56866935
empty comments
>>
>>56866929
>emit a warning.
If you think warnings are what I'm talking about or that they'd be sufficient then you're not an experienced programmer.
<5 years experience I bet.
>>
>>56866959
Explain yourself.
>>
>>56866942
#include/*     */<stdio.h>
int/* */main(){
/* */printf("/* */");
/* */return/* */0;
}

?
>>
>>56866929

>Best girl
This another animu girl/trap?

>>56866935

For most languages, prefer language standard.
C has no standard, prefer smart tabs if no standard set for project.

Smart tabs are objectively the best.
>>
>>56866975
Cant comment inside of a string literal, big guy.
>>
>>56866972
There's statically detectable problems that aren't detected well at all. Warnings are usually the most trivial problems imaginable. Often they're not even problems. Compilers usually don't give you nice ways to suppress warnings locally even. You can do it but they're not very convenient. Put all the effort on the programmer.
That's the gist of it. But I'm not interested in wasting more time on you.
>>
>>56866986
I'm intending to print it.
>>
File: Emilia_Anime_2.png (2MB, 1920x1080px) Image search: [Google]
Emilia_Anime_2.png
2MB, 1920x1080px
>>56866985
>This another animu girl/trap?
A pure half-elf girl.
>>56866988
Sounds like you're not an experienced C or C++ programmer and don't know what compilers can or cannot do.
>>
>>56866935
spaces in an editor where the tab key corresponds to 2 or 3 (no more than 3, and no less than 2) spaces

>>56867011
always nice to see someone who is not a remfag
>>
>>56867011
>Sounds like you're not an experienced C or C++ programmer and don't know what compilers can or cannot do.
Well obviously I'd say the same.
What's the point of your comment?
Because what I mentioned is obviously true. It's a statically detectable problem.
>>
>>56867049
1 tab = 4 spaces
>>
>>56867059
There's a special place in hell for people like you
[spoiler]it's twice as far down[/inb4spoilersdontworkong]
>>
>>56867050
I was hoping you'd stick to
>I'm not interested in wasting more time on you.
You're made so many not-even-wrong-tier statements in your last post that it's way too tiresome to respond to them.
>>
>>56867059

1 tab = 1 tab.
>>
>>56867077
Ok? So now I'm responding directly to your claims and you don't even reply.
Nice going there anon.
>>
Its funny how the only languages that are taken seriously use C-style syntax
>>
>>56867095
No, you're using weasel words such as "compilers usually" and "nice way" which allow you to reject all responses.
>>
I'm currently trying to use class inheritance in C++, since I now have a real use case for it.

I learned this whole complex on Ada but it looks way more complicated on C++.
>>
>>56867103
Even more funny is, that I can't find a decent job in my field that doesn't use Python heavily.
>>
>>56867103
Haskell for instance
{-# LANGUAGE CPP #-}
#define int

int main = do {
print "hello";
print "world";
return ();
}
>>
>>56867136
Whoops, I of course meant

print("hello");
print("world");
>>
>>56867116
>compilers usually
Because I don't know all compilers.
Yes of course I'm not saying no compilers do this. I haven't found any.
>nice way
Yes. That's a weastle wordy thing at least. But the thing is we're not arguing specific compilers.
I have not seen a compiler that lets me do the basic thing of inserting a set of operations in the final byte code of a code segment to capture a set of operations between that set. What IACA does.

It's the most simple instrumentation I can imagine really.
So where does that leave us? If they don't even do that then how can I assume there's more complicated things? It'd be foolish to assume.

I don't see why you're defending compilers, something you seemingly know very little about.
I'd expect a "oh yeah code instrumentation is a bitch compilers could really do better there". Or similar.
But you're just blindly defending something you don't know about.
If you're a newbie just embrace that.
>>
>>56867165
>So where does that leave us?
Nobody has ever claimed that compilers allow you to do this. If you reread the thread you'll see that the topic of instrumentation was dropped after the link to wikipedia.
>>
>>56867193
>Nobody has ever claimed that compilers allow you to do this.
No of course not. But you're complaining about me using weasel words and that was the only instance where I see that I genuinely did. And with good reason which I motivated just now.

Why can't you even follow your own posts?
>>
>>56867222
>Warnings are usually the most trivial problems imaginable.
>usually

>Often they're not even problems.
>often

>You can do it but they're not very convenient.
>not very convenient

Maybe rewrite >>56866988 properly and I'll bother.
>>
>>56867257
>usually
There's good warnings.
>often
Things like signed unsigned comparisons. Any time you hit that in lets say a simple for loop that's just a distraction.
>not very convenient
Because I'm talking about a broad set of compilers that act differently I can't be specific.

The
>nice way
Was a genuine problematic use of these words. But as explained I had good reason.

Anon you're literally being retarded now and we're not even talking programming. You're moving the discussion into places where you seem to know even less.
>>
>>56867274
Don't wait for a reply.
>>
>>56867283
it's difficult to respond to something you know nothing about I know
Fucking shithead shouldn't even go to /dpt/ yet. Follow your damned school forums or something.
>>
File: C vs C++.png (126KB, 2374x868px) Image search: [Google]
C vs C++.png
126KB, 2374x868px
>avg(2015,2017)
>people still use C++
>>
>>56867314
This pic is low quality, only someone sticking to C could have done this
>>
>>56867329
>sticking to C
I don't remember ritchie ever acknowledging a successor to C
>>
>>56867340
I don't remember Ritchie doing anything lately.
>>
>>56867402
ayy
>>
>>56867402
Really? I can hear him spinning in his grave all the way from England
>>
std::map<key, type*> map;
type *p = map[(unset value)];
p => ?
>>
>>56867662
what
>>
Hey /g/, I wanna work through an operating systems book soon, but I was thinking of doing it in a newish language instead of C. I was thinking D w/o the GC, or Rust. Any recommendations?

I was gonna pick one of these to work through:
Operating Systems Design and Implementation
Operating Systems: Internals and Design Principles

Unless /g/ has better ideas for learning OS.
>>
>>56867859
D > Rust
>>
>>56867859
C or Javascript
>>
>>56867859
>Operating Systems Design and Implementation
>Operating Systems: Internals and Design Principles
These are good books, but if you're going to write your own OS I will suggest starting here:

http://wiki.osdev.org/Main_Page

Also, if you plan on using anything else than C, be prepared for hell on earth:

http://wiki.osdev.org/Languages

tl;dr you need to bootstrap your own runtime because constructors and destructors, virtual functions etc don't call themselves, so you need to write vast amounts of C code anyway
>>
>>56867859
>Rust
http://os.phil-opp.com/
>>
>>56867919
>http://os.phil-opp.com/
>This post explains how to create a minimal x86 operating system kernel. In fact, it will just boot and print OK to the screen.
Kinda drastic to call a bootloader a "minimal x86 kernel", don't you think?
>>
>>56867933
It would be, but that isn't a bootloader, at all.
>>
>>56867933
quit mansplaning, SHITLORD

https://www.rust-lang.org/en-US/conduct.html
>>
>>56867919
>the current year - 5
>writing 32 bit x86 kernels
I seriously hope you do not do this.
>>
>>56867972
Literally the 2nd post
>>
>>56867983
>the current year
>writing anything but RISC-V kernels
I certainly shiggidy.
>>
>>56867950
>bootstrapping a system, setting up protected mode, partially bootstrapping a boost runtime and jumping to a rust function that calls standard print
>not a bootloader at all
wtf?

>>56867951
Quit it with the memes, will ya? This isn't /b/.
>>
>>56867998
>>bootstrapping a system, setting up protected mode
None of which he does, he uses Grub, so he starts in protected mode, all he does in the first post is set up the multiboot header(you know, for the actual bootloader) and write some bytes to the vga buffer, aka. bare minimum bootable kernel that writes some text to screen.
>>
>>56868028
>he uses Grub
My mistake then, I assumed he did his own minimal bootloader since it's like 400 lines of assembly to bootstrap that and Grub is what 512B + atleast 2 MB for stage 2?
>>
Hell,

template <std::size_t dimensions>
using point = std::array<typename double, dimensions>;


top line produces a syntax error and lower line throws
expected unqualified-id before using
in compiling
I don't see what I made wrong, it's the first own line in the header file and there can't be a missing semicolon towards the top.
>>
>>56868162
it sounds pretty clear to me
it has a problem with you using std:: in the template
>>
Am I doing a beginners mistake here?
def is_prime(n) :
if n % 2 == 0 :
return True
else :
return False
>>
>>56868399
yes

some numbers are odd and prime
>>
>>56868399
>is_prime
>Just checks if it's even
>>
>>56868399
>>56868416
also you presumably meant /= or != or whatever it is in python
>>
>>56868397
still same errors.

>>56868399
the only prime number n with n % 2 == 0 is 2. You're checking wether numbers are even.
>>
What is the most elegant fizzbuzz?

import std.range:iota;
import std.algorithm:map,each;
import std.conv:to;
import std.stdio:writeln;

void main() {
iota(0,101).map!(a=>(a%15==0)?"FizzBuzz":(a%3==0)?"Fizz":(a%5==0)?"Buzz":a.to!string).each!writeln;
}
>>
>>56868451
private static fifteen extends fizzable implements buzzable
>>
>>56868399
def is_prime(n) :
return False

ftfy
>>
In C, is it good practice to have init_thing and free_thing functions for most structs?

also, should I have separate alloc and init functions for each?
>>
>>56868596
C gives you many choices. That's why it's passed the test of time. Other languages takes choices away from you.
>>
>>56868614
yeah, my problem is the amount of ways I can go about my project
>>
>>56868614
>C gives you many choices
Yes, and all of them are bad. How's the array decay going anon? :^)
>>
I'm not trying to sound like a "le I want to be a super l337 hax0r" faggot here, but I am curious
How are viruses written and how do they work?
I apologize in advance if this isn't the right thread for that, I figured since it was programming related it'd be fine.
>>
>>56868644
Not having any issues senpai.
>>
>>56868162
Fixed that. Needed to enable the c++11 standard by hand.
>>
>>56864311
book of proof
>>
>>56868416
>>56868425
>>56868430
>>56868434
>>56868517
Sorry about that it was my lack of english I knew it shouldnt be that easy thats why I asked. How is this?
def is_prime(n) :
count = 0
for i in range(1, int(math.sqrt(n)+1)) :
if n % i == 0 :
count += 1
if count < 2 :
return True
else :
return False
>>
What's the better book for a complete beginner? HTDP or SICP?
>>
>>56868719
HTDP, unless you're really really really into math
>>
>>56868688
better, but still issues.
follow the program's way for 2.
>>
>>56868688
Start forloop higher, return False as soon as a divisor is found
>>
>>56868688
can n be negative?
>>
>>56868756
It's Python, n could be your password for all Python cares
>>
>>56868804
Should be fine.
>>
>>56868719

TAOCP
>>
>>56865085
int * n
>>
>>56868451
rate:
#include <stdio.h>
#include <tgmath.h>

int main()
{
static const double a[15] = {
2.9999992128302893,
426.53975988532704,
-1283.891706647546,
1589.9391461570085,
-1101.805607990222,
484.3346171275082,
-144.23559440871685,
30.195082922957262,
-4.529247930621594,
0.4893654583514787,
-0.03777487278040992,
0.0020318982233923665,
-7.232856842317282E-5,
1.5308283537393815E-6,
-1.457931765471448E-8,
};

char s[][9] = {"", "Fizz", "Buzz", "FizzBuzz"};

for (int i = 1; i <= 100; ++i) {
double sum = 0.0L;
for (int j = 0; j < 15; ++j)
sum += a[j] * pow(i % 15, j);
sprintf(s[0], "%d", i);
printf("%s\n", s[lrint(sum)]);
}
}
>>
File: Forever-alone.png (95KB, 1500x1521px) Image search: [Google]
Forever-alone.png
95KB, 1500x1521px
>>56865137

>Be in 400 level course
>I don't know any of my classmates
>>
C11, footnote 256:

>Among other implications, atomic variables shall not decay.

What do they mean by this?
>>
>>56868650
a program can do almost anything, and a virus is just a program that does malicious things that weren't intended by the user
>>
>>56868879
You can't write a nuclear missile guidance system in C
>>
>>56868682
>fixed problem 1 and 2
>problem 3 to 67 arises

I love programming unironically. I just need to tell this to myself from time to time.
>>
>>56868738
range(1, 2) gives only 1, program correctly returns 2 as prime

>>56868746
Something like this? I couldnt manage to add 2 and 3 in the for loop.
def is_prime(n) :
if n == 2 or n == 3 :
return True
else :
for i in range(2, int(math.sqrt(n)+1)) :
if n % i != 0 or i == None :
return True
else :
return False


>>56868756
Nah primes are natural numbers
>>
>>56867972
There's no VESA framebuffer mode in x64, which is kind of shit.
>>
>>56868951
that
or i == None 
part is unneccessary it was an attempt to include 2 and 3
>>
>>56868956
Just write an arm kernel and run it in qemu, nerd.
>>
>>56868972
ARM is even worse, there's no standard.
>>
>>56868997
That's why the qemu generic arm implementation (what whatever) comes with a nice UART mapped at 0x100000 (or wherever.)

Just write to the UART, nerd.
>>
>>56869015
LONG MODE
VESA LFB MODE
WHEN
>>
>>56868951
>range(1, 2) gives only 1, program correctly returns 2 as prime
really? 2 % 1 is 0, 2 % 2 is 0, that makes the count 2.

>Nah primes are natural numbers
which doesn't keep me from asking prime(-217) or prime("potato").
>>
What is you linux nerds preferred uncompressed audio file format?
>>
>>56869119
wav
>>
>>56869051
>really?
yea really

>which doesn't keep me from asking prime(-217) or prime("potato")
for you
def is_prime(n) :
if type(n) == int and n > 0 :
if n == 2 or n == 3 :
return True
else :
for i in range(2, int(math.sqrt(n)+1)) :
if n % i != 0 :
return True
else :
return False
>>
>>56869190
is_prime(3.0)
>>
>>56869202
def is_prime(n) :
if n % 1 == 0 and n > 0 :
if n == 2 or n == 3 :
return True
else :
for i in range(2, int(math.sqrt(n)+1)) :
if n % i != 0 :
return True
else :
return False
>>
Question for vim users:
Do you guys use/prefer vim's splitscreen feature or something like tmux?
What, if anything does vim's splitscreen offer that tmux doesn't?
>>
>>56869138
But that's a microsoft format. I thought you guys hated microsoft.
>>
>>56869272
I use emacs' split screen feature (and evil mode for vim bindings).
>>
My up down left right keys on keyboard are not working in VIM, what do i do?
>>
>>56869309
Do they work in insert mode? If so just use hjkl in normal mode.
>>
http://www.open-std.org/JTC1/SC22/WG14/www/docs/n2067.pdf
Liberals are trying to ruin C again.

>>56869272
I use tabs.
>>
>>56869356
Not working in any mode.
I cant you them in nerdtree too.
>>
>>56869297
wav is just raw pcm data with a header
>>
>>56869384
>I cant *you them in nerdtree too.
use
>>
can someone tell me what the complexity of this is please? I'm not sure:

def mult(a, b):
# assume both a and b are n by n
n = len(a)
# Create a zeroed n x n matrix
c = [[0 for row in range(n)] for col in range(n)]
for i in range(n):
for j in range(n):
for k in range(n):
c[i][j] += a[i][k]*b[k][j]

return c
>>
>>56866359
double & funct(Type *p)
{
static double None = 0;
if (!p) return &None;
return p->value;
}
>>
Did anything happen from that java 9 delay proposal back in early september? Is it still coming out march 2017?
>>
File: mr-robot-101-gnome-vs-kde.png (246KB, 720x405px) Image search: [Google]
mr-robot-101-gnome-vs-kde.png
246KB, 720x405px
>>56864205
Nothing, just got promoted to management, suckers
>>
Is inheritance necessary?
>>
>>56869477
n^3 ?
>>
>>56869496
No
>>
>>56869494
Tell us, what did you fuck up so badly that they wanted to keep you out of?
>>
>>56869482
Don't do this.
>>
>>56869496
It's handy in some cases.

But generally you can work without it. Doesn't excuse you from knowing how to do it and what it can do for you, though.
>>
>>56869496
For what purpose?
>>
What is the 'composition over inheritance' meme that OOP people keep talking about?
>>
>>56869509
I am the best programmer in the team. So it makes sense that I'm the boss of the team now.
>>
>>56869557
OOP is one big corporate meme. When I hear OOP programmer I think Java code monkey who'll soon be replaced by a Pajeet.
>>
>>56869557
you have objects that themselves use objects
>>
>>56869556
Just in general.
>>
>>56869572
Languages without inheritance have been shown to be turing complete. So in general the answer is "no".
>>
>>56869564
That doesn't make sense. Why would they ask their best programmer to spend less time programming?
>>
>>56869578
Does it have any benefits, then?
>>
>>56869580
https://en.wikipedia.org/wiki/Peter_principle

but seriously, being a good programmer isn't just about writing code, he can tell other programmers how they should write code
>>
>>56869589
Sometimes it does. Sometimes it doesn't.
>>
>>56869564
Actually not. Because when the best programmer is no longer programming, the quality decreases.

you are either
>unsackable
>involved too much
>someone's darling that gets tries until there's something he doesn't fuck up
or
>lying to us and still nosedeep in code
>>
>>56869572
It's not necessary at all. But a more interesting answer is inheritance useful or better or worse than something else.

I think one disadvantage of inheritance is that it violates the Principle of Least Responsibility. When you inherit a class A, you all of a sudden expose _all_ public properties of a to the users of _your_ class.

It's much better IMO to pass an instance of A as a constructor parameter to your class.

In some cases though (and very rare cases) the disadvantage I stated above is exactly what you want. But this is the exception and should be treated as such.
>>
>>56869611

>It's much better IMO to pass an instance of A as a constructor parameter to your class.

This or make your class extend a bunch of _very small behaviors_ a la interfaces in java and traits in scala.
>>
File: meme.png (6KB, 352x88px) Image search: [Google]
meme.png
6KB, 352x88px
>>56869557
"avoid OOP without admitting it"
>>
>>56869395
created by microsoft
>>
>>56869651
>implying inheritance is the only attribute that allows you to write object oriented code
>>
C, C++, or Rust for games?
>>
>>56869682
>take raw linear audio data
>attach a header
cool file format, ahmed
>>
>>56869685
Methods are the only widly used OOP feature that isn't being criticised right now

At least two major languages (D, Rust) have different semantics that make methods redundant (based on a proposal for C++)

OOP is fucking dead
>>
>>56869685
>implying OOP wasn't pushed to teach low-iq people how to program
>there are dogs, cats, and animals
>now you're an OOP programmer
>>
>>56869685
The only attribute about object oriented programming is message passing.
>>
>>56869707
C++
>>
>>56869707
C
>>
File: oop p2.png (57KB, 682x473px) Image search: [Google]
oop p2.png
57KB, 682x473px
>>56869720
>there are dogs, cats and animals
>>
>>56869707
Rust
>>
>>56869707
Assembly
>>
>>56869744
Didn't realize /dpt/ had such top tier banter.
>>
>>56869744
>wait, shouldn't legs be in Vertebrate

the sole reason we need to purge OOP
>>
ITT: People who don't understand OOP.
>>
>>56869802
Pajeet was geht?
>>
>>56869718
>OOP is fucking dead

If you have objects and methods, you have OOP.
>>
>>56869802
>ITT: People who don't like OOP
>>
>>56869802
I'm an OOP programmer because I write C code like this:

struct x;
void x_f(struct x *);


All other parts of OOP are shit though.
>>
>>56869732
>>56869738
>>56869746
>>56869747
Thanks guys, great consensus
>>
>>56869802
Ingen forstår OOP
>>
>>56869828
It's almost as if your dumbass question doesn't have a real answer.
>>
>>56869841
Hvorfor i faen skriver du norsk til meg? Kom deg tilbake til India.
>>
>>56869812

People get on /dpt/, see someone spouting a meme a few times, and then start repeating it ad nauseam. That's part of the problem.
>>
>>56869856
No, /dpt/ realises OOP is a joke.
Then the OOP minority get pissy and either shitpost, post memes, or just claim "you just don't know what OOP is"
>>
>>56869856
Mummy, why do people say OOP is bad?
>>
>>56869862
because it is
>>
>>56869851
Nei
>>
>>56869856
The problem is that commodity hardware is to cheap. To be economic, software companies have to have strict deadlines and cheap programmers. Being able to throw thousands of Pajeets at the problem via OOP is the industry's answer.

That's why any self-respecting programmer works in systems programmer where you get paid to think, not to shit out code.
>>
>>56869873
No it isn't.

>>56869856
Mummy, please correct these heretics! OOP is the best paradigm and C# is the most perfect expression of it. I installed Visual Studio yesterday, I wanted to let you know so you'd be proud of me.
>>
>>56869861

Most detractors actually don't know what OOP is, or their arguments against it are contrived myths that were spun at least 25-30 years ago by angry procedural programmers.
>>
>>56866935
gofmt decides for me
>>
>>56869861
>Then the OOP minority get pissy and either shitpost, post memes, or just claim "you just don't know what OOP is"
People continually demonstrate a fundamental misunderstanding of OOP in these threads. They might not be the say people who say they don't like OOP. They might just be bantering... But in all likelihood, the reason you guys don't like OOP is because you don't understand it.
>>
>>56869883
Quality control has gone out the window, too. Customers are resigned to there being serious bugs in software these days. That's a sad reflection on our craft, that people expect that our products won't work and will need continual patches and updates.
>>
>>56869885
>C#
>expression of OOP
You're going to love what C#7 dropped
>>
>>56869904
FP makes OOP and all the 'design patterns' obsolete.

Hell, even a subset of FP does. Design patterns are snake oil for working within the limitations of crap languages.
>>
>>56869904
OOP took programming and fucking killed it for 20 years
>>
>>56869922
What did it drop?
>>
>>56869904
>>56869917
Some validation is in order I believe. For the following reasons:

1. OOP has widely been rejected by new languages such as Rust and Go.

2. OOP is the Pajeet language. As such I don't think it can be so complicated to grasp.

Now don't misunderstand me. OOP might have intricate theoretical features. But we're talking about OOP in the industry.
>>
>>56869948
Pattern matching
Now if only previous versions had also dropped Linq, lambdas, tuples, etc. Then you'd be in OOP heaven.
>>
new >>56870007
>>
>>56869934
>>56869941
>>56869958
>hurr durr

None of these are arguments. They aren't even the BEGINNING of arguments. They're regurgitated soundbites from software 'gurus'.
>>
>>56870011
We've given the arguments again and again and again. When you get a "REAL" argument you respond >HURR DURR OOP BAD, or some other bullshit
>>
>>56870030
>We've given the arguments again and again and again

Every one of them more contrived than the last.
>>
>>56870048
>>56870011
>>
>>56869716
the format of the header still needs to be defined
>>
>>56870048
quick rundown of a bunch of random features present in oop langs:

>classes/methods
essentially a special syntax for structs + functions. not bad if you want to express that something is a function that manipulates the state of a certain type, shouldn't be used if the function is actually stateless, as this gets rid of the visible uniqueness compared to stateless functions.

>encapsulation
pretty useful thing, probably the most useful thing in most oop languages. many languages that don't call themselves oop have similar mechanism (header files for instance).
encapsulation that cannot be broken (neither by reflection nor by switching a header file or something similar) provides a more stable api but less flexibility than weak encapsulation.
for most things, strong encapsulation is more useful than weak encapsulation, but not for things like modding or scripting.
encapsulation modifiers in most languages are too complex. package-private/public are the two most useful ones, all the others aren't particularly practical.

>inheritance
good if you never override anything (also known as type embedding, as introduced by go). quickly breaks shit with overriding, and should rarely be used in languages that allow you to override (c# doesn't allow overriding by default, which is a good alternative, in java you'd have to make everything final to provide a good api).
if you let a method be overriden, the method essentially needs to be frozen and its implementation should never change.

>abstract classes
suffer from any issue inheritance with overrding suffers from.

>interfaces
essentially a collection of function types with stronger typing thanks to method names. there's absolutely nothing wrong with interfaces, they're a great and intuitive way to abstract things.
>>
>>56869828
C++ is the most popular language in the video game industry
>>
>>56870195
sure but what's wrong with wav? how those 44 bytes or so are arranged is largely inconsequential except wav is widely supported
>>
>>56869934
Not to be part of the argument, but I hate design patterns so damn much. FUCK.
>>
>>56870536
I agree with you on most points, and I don't really see them as negatives. Sure there are some abusable features (you mention inheritance/abstract classes), but it's up to the programmer to only utilize them when it makes perfect sense. There's nothing wrong with such feature-rich languages as C# allowing a few "you probably shouldn't do this but we'll allow it if you insist" (@override, operator overloading).

>>56870611
Design patterns are cancer. But they aren't directly a part of OOP.
>>
>>56870595
>but what's wrong with wav?
Except that it contains some redundancies, and with the header extensions it can be a little messy: i don't know. That's what i asked what linux nerds like to use. They can usually find fault in anything designed by MS.
Apparently applefags don't like to use wav.
>>
What legacy language do I learn? I once heard of a guy who worked ~2 days a year on an oil platform, and that was enough for a yearly salary. Is COBOL good for this?
>>56870915
It wouldn't be hard to strip out the headers and guess the missing info
>>
>>56870915
>>56871195
Apple's AIFF is virtually the same as Microsoft's RIFF. The reason they haven't managed to fuck up it too badly designing it is that there's virtually nothing to design. The only alternatives are mka* aiff flac and raw pcm
mka is technically a container format
aiff is apple shit and offers no benefits to riff (wav)
raw pcm needs header lying around somewhere
Thread posts: 344
Thread images: 21


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