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

/dpt/ - Daily Programming Thread


Thread replies: 334
Thread images: 20

File: K&R himegoto waifux2.png (1MB, 1000x1400px) Image search: [Google] [Yandex] [Bing]
K&R himegoto waifux2.png
1MB, 1000x1400px
old thread: >>54590561

What are you working on, /g/?
>>
>>54600081
Rewriting the Linux kernel in Haskell.
>>
>>54600081
1st for the only language worth using from 2020 onward, C++
>>
>>54600156
C22 is just around the corner anon~
>>
Hey /dpt/,
What is the feature you'd most like to see in the next C standard?
>>
>>54600283
garbage collection and reflection
>>
>>54600283
ur mom
>>
>>54600283
native networking
>>
>>54600283
>>54600295
oh and dynamic types
>>
>>54600295
don't forget xml serialization tho
>>
>>54600283
Why ruin something that's already perfect?
>>
>>54600283
Much more abstraction, garbage collection, removal of memory management.
>>
>>54600283
C standards only ever include things that were already widely implemented as extensions, like the featureset in GNU C.

I want function literals and nested functions because lambdas.
>>
File: 2016-05-17_10-53-46.gif (231KB, 916x916px) Image search: [Google] [Yandex] [Bing]
2016-05-17_10-53-46.gif
231KB, 916x916px
I finally managed to get my quadtree and collision detection working! The collision detection is still kind of weak, I need to tweak it some more. Please excuse the poor .gif quality. Figuring out how to recursively render a quadtree's structure and overlap that onto the background as nodes are being created and destroyed was neat.
>>
>>54600414
What the fuck are those red boxes?

Background is pixelated as fuck.

Spaceship looks like a dickhead made of old caulk.

Orange thing is clearly hacking and can't even move, shit auto-aim AI.

2/10, not even trying.
>>
>>54600394
>I'm a webshit and want memes
>>>/wdg/
>>
>>54600441
please enjoy my excellent high-quality™ demo graphics, thank you
>>
>>54600164
C2x, they postponed it again last time.
>>
Going to be working on sentiment analysis soon. Can anyone suggest some programming-oriented reading material?

Also what lang should I be using
>>
>>54600240
>dereferencing null

>>54600252
That's not moving the goalposts. It's up to you to prove to me that you can make a null reference and the best way to do that is to do it.
>>
>>54600701
Are you actually writing the algorithms to do the machine learning or are you going to be leveraging pre-existing sentiment analysis APIs?
>>
Bring back unsigned integers
>>
>>54600701
NLP with Python I guess
>>
What's wrong with C#? It's free ad in freeduhm now and not likely to get license/patents issues with ms if you use it. At the very least it feels nicer than Java.
>>
>>54600739
>>54600739
Are there really languages with no unsigned?
>>
>>54600830
Java.
>>
>>54600830
I remember when I thought like you, those were good times.
>>
>>54600283
C++
>>
>>54600707
#include <stdio.h>

void g(int &x)
{
printf("lad... %p\n", &x);
}

void f(int *x)
{
g(*x);
}

int main(void)
{
f(0);
}
>>
>>54600988
f will segfault when you try to dereference x.
>>
>>54600992
f doesn't dereference x
>>
When creating function pointers, can I declare them as having no arguments and then have them point to a function with 5 arguments?
>>
>>54601004
>g(*x);
>>
>>54601012
You can cast them any way you want, just like any other pointer.
>>
>>54601027
What's the proper way to cast a function pointer?
(void (*)(int, int)) /* ? */
>>
>>54601016
>meme arrows
how about you test that "segfault" assumption, dummy? then, I can tell you what the standard says about it
>>
>>54601049
Not him, but what does the standard say about it?
>>
>>54600081

how would you go about solving this with no calculator or computer?

Consider the following method:

public int goFigure(int x)
{
if (x < 100)
x = goFigure(x + 10);
return (x - 1);
}

What does goFigure(60) return?
>>
in order to draw a frame. Does you gpu have to render every object and draw it to the screen in order of furthest vertex to nearest?
>>
>>54601089
109
>>
>>54601049
Okay, so it's undefined behaviour.

You cannot have a null reference without exploiting undefined behaviour or aliasing, happy?
>>
>>54601118
no
>>
>>54601118
No, they use a depth buffer.
>>
>>54600441
This is a programming thread, not a marketing thread. Holy fuck, just leave.
>>
>>54601089
by doing math

109
>>
>>54601177
You're a marketing thread, nerd.
>>
>>54601193

what math

do you write a summation?
>>
>>54601226
just pull out a calculator and keep adding 10 until you hit your base case of return x - 1.
>>
I am going back to school for comp sci. I did a lot of programming in high school, and thus far I have worked with java, VB, Basic, c++, c#, and python. I still have a ways to go before I get my BS.

Be real senpai, how much do programmers, and engineers make? Am I making a mistake?
>>
>>54601289
>>54601119
>>54601193

it's 95 dumbshits
>>
>>54601308
>Going back to school
Are you a dropout? Or did you get a previous Bachelor's?
>Doing it for the money
You're not gonna make much and you're not gonna have a good time unless you have some research under your belt about what you think you want to do with a CS degree.
>>
https://www.reddit.com/r/lisp/comments/4jsbdj/i_had_this_tattoo_for_a_while_now_id_thought_id/

do you have any programming tattoos, /dpt/?
>>
>>54601308
Depends on where you live, anon.

Here in Houston, I'm making ~$45k in a fairly entry-level position, and our cost of living is pretty damn low.

In San Fran or New York you'd be making like $80-90k, due to rent prices and other commodities.
>>
>>54601361
>linking reddit

Fuck off.
>>
I'm writing a toy compiler for a toy language.

I'd like a target language that's low level enough to not have any overhead if I don't want it (no GC, no runtime checks, no bloated shit, thats my source language job). C is a simple target for a quick & dirty toy compiler, but it's kind of messy and probably overkill, IR would be the "correct" choice but that's boring and annoying since I'm really gonna be targeting just x64, and if I use an IR or directly x64 ASM I have to write all the actually hard stuff like register allocations and optimizations.

So what's the laziest low level language I can compile to? go? rust? nim? terra? Why isn't there a good *really low level* language for fucks sake
>>
>>54600283
defer keyword and lambdas
>>
>>54601362
Seattle

>>54601342
I dropped out, because i got a job doing nuclear waste clean up, and wmd disposal. At one point I was making 100k, but after cut after cut after cut, i am making ~36k. I dont wanna be "in it for the money" but my landlord is in it for the money...
>>
>>54601061
it says it's not dereferencing
>>54601129
>Okay
oh, but didn't you say it dereferences x?
>so it's undefined behaviour
are you sure this time? you seem to jump to conclusions without actually really thinking about the problem
>cannot have a null reference without exploiting undefined behaviour or aliasing
again, you sound very sure about this, but as we've seen you're also quick to backpedal
got anything to support your claims?
>>
>>54601401
>C is overkill
How? It's a nice high level language that's pretty fast. Easier than writing something that compiles to hurt-me-more rust.
>*really low level* language
There is only assembly.
>>
>>54601401
Any language you compile to is going to be messy. Go is garbage collected and has runtime type information etc.. You don't have to do any register or optimization stuff with LLVM IR AFAIK. I would use C.
>>
What is best programming language to use if I want to make a website?
>>
>>54601421
>I dont wanna be "in it for the money" but my landlord is in it for the money...
That's nice but do you actually ENJOY programming? Do you go out of your way to learn things? If so you'll be fine. If not just save yourself a lot of money and get a job in finance or insurance or something.
>>
>>54601451
>>>/g/wdg
>>
>>54601444
>There is only XUL
ftfy
>>
>>54601421
>Seattle
I'm not sure what the climate is like up there, but aren't many tech companies moving way out into the surrounding towns due to the fucked highway infrastructure? Boeing rings a bell here.

I'm sure the average income is higher there anyway, just google software developer salaries in your area.
>>
>>54600283
>>54600394
I feel like yeah, lambdas should definitely be in C. Any reasons why they wouldn't be, other than not wanting to add complexity to the language?
>>
>>54601401
>C is overkill
>IR is correct choice
you got that backwards
>>
>>54601440
It does dereference x, but dereferencing null is undefined behaviour.
>A pointer whose value is null does not point to an object or a function (dereferencing a null pointer is undefined behavior)

A reference is defined as an alias to an object. References being implemented as pointers is an implementation detail, and therefore being able to have a null reference is only due to undefined or implementation-defined behaviour (assuming that the standard is consistent).
>>
>>54601491
>Any reasons
not compatible with function pointers
>>
>>54601491
Not wanting to add complexity to the language. If you implement lambdas then you probably are going to be looking to implement closures (because lambdas are basically useless without closures) and closures are very complex and very outside of C's domain.
>>
>>54601543
Only if it's a closure.

>>54601572
That's not an argument for why C can't have lambdas without variable capture, though. Would still make life a lot easier.
>>
What's the best open source license and why is it MIT?
>>
>>54601637
MIT
>>
>>54601444
>>54601445
>>54601501

fuck me, looks like I'm going with C then. Is the C11 standard the least retarded way to learn it?
>>
>>54600441
Wow what a dick this guy is
>>
>>54601620
What do you mean it would make life a lot easier? Show me some code that would be made easier with closureless lambdas? Shit's fucking useless just make a typical function.
>>
>>54601669
You're a fucking dick, asshole.

What's your favorite programming language, and why?
>>
can someone help me in C please ?
I'm working on an arduino project with LED matrix and I'm stuck
>>
>>54601637
The best license is MIT with the added clause "The Software shall be used for Good, not Evil.", so it can't be used in GPL software.

https://bugs.php.net/bug.php?id=63520
>>
>>54601717
What part are you having trouble with senpai?
>>
>>54601645
But why?
>>
>>54601719
>GPL is Evil
>M$ garbage is Good
lemme guess, MIT is "more free"?
>>
>>54601682
1) function has to be defined away from where it's used
2) pollutes the namespace
>>
>>54601645
>>54601637
>>54601719
Enjoy being cucked by corporations taking your code, perverting it, and then eclipsing it.
>>
>>54601719
>Wanting to be compliant with the cancer that is GPL.
>>
>>54601796
So do you wangdows or freebsd?
>>
>>54601540
>It does dereference x
but it doesn't; are you going to ask me to prove it to you next? you should already know by now that the big dick playa delivers :^)
>A reference is defined as an alias to an object
that's how they're useful, there's not much you can do with a null reference
>assuming that the standard is consistent
well, hasty assumptions are the ones that got you here in the first place
>>
>>54601749
Because the author is allowed to use the code however they see fit.

>>54601762
That's freedom.

GPL is anti-freedom. It's forced re-sharing.
>>
>>54601756
non issues
>>
>>54601815
OSX for development.
Linux for deployment.
>>
>>54601748
I have a matrix and I want to move a led with switchs but I can't manage how to do it

http://pastebin.com/sfbAuCXg omg I'm going to loose my mind
>>
>>54601838
GPL prevents others from using your software to take away other people's freedom.

In order to have a free society, laws must be put into place so that nobody may deprive others of their rights to life, liberty, or security of person.
>>
>>54601823
How is *x (where x is a pointer) not dereferencing x?

The compiler may do inlining and optimize &*x to just be x, therefore preventing the segfault, but that's what you get when something is undefined behaviour.

>>54601856
Subjectively. Are there any objective issues with adding lambdas that don't do variable capture?
>>
>>54601874
>you are more free if I force you to do this thing

GPL is more restrictive(read: less free) than MIT.
>>
>>54601862
>switches
Why aren't you using a lookup table for the patterns you want to display on your matrix display?
>>
>I want the freedom to deprive my users of their freedom therefore GPL is non-free cancer
lol
>>
>>54601862
>2016
>not writing identifiers in English
>>
File: 1461935993454.jpg (111KB, 717x587px) Image search: [Google] [Yandex] [Bing]
1461935993454.jpg
111KB, 717x587px
>>54601620
>he can't implement a lambda with a struct, void** and a function pointer
>>
>>54601908
The freedom to do evil is true freedom.
>>
>>54601895
>lookup table
I am trying to do a connect 4
And I don't even know what is a lookup table
>>
>>54601892
This is a false definition of freedom. Anarchy is not freedom.
>>
>>54601838
What does it offer over no licence?
>>
>>54601944
You're talking about closures and not lambdas. Lambda (outside of the lambda calculus meaning) is a synonym of "anonymous function". By specifying "lambda without variable capture" I mean something that only requires a function pointer.
>>
>>54601944
That is not a lambda but an anemic and clunky closure.
>>
>>54601401
C is not overkill at all. If you really want to be lazy then don't compile down to anything at all, just interpret it.
Yes, IR is the correct choice if you're concerned about C being messy but even C would not be that bad at all.

>Why isn't there a good *really low level* language for fucks sake
If you're so against IR, why not just write assembly?
>>
>The freedom to do evil is true freedom.
>>
>>54601964

But a license that forces your hand (see: GPL) is definitely freedom™
>>
>>54601908
>>54601964
I want my users to have the freedom to not be forced to reshare their modifications to my code.

I welcome their modifications, but I'm not going to compel them to release their work.
>>
>>54602023
Only if they want to redistribute. You can privately modify GPL software for your own use as much as you want.
>>
>>54602023

wow u sound like an evil despot.
>>
>>54602012
Nice argument there buddy.
>>
>>54602038
What use is code that I cannot redistribute?

I'm not a hobbyist NEET.
>>
File: excel.png (2KB, 187x143px) Image search: [Google] [Yandex] [Bing]
excel.png
2KB, 187x143px
Python user here. I'm trying to import data from a .csv-file. I want to create groups in a dict, and each of the groups should point to 1 or more subgroups. See pic related, from which I'd like the group 0 to contain subgroups 0 and 1, but group 1 should only contain a subgroup 0, etc.

Here's my shitty code that doesn't run:

importModel = open("C:\pathtofile\\testNodes.csv")
importModel_csv = csv.reader(importModel)
next(importLogicModel_csv, None)
groupDict = {}
subgroupDict = {}

#create groups
for row in importModel_csv:
groupCurrent = row[0]
#create subgroups in groups
for row in importModel_csv:
nodeCurrent = row[1]
nodeDict[nodeCurrent] = {}
groupDict[groupCurrent] = nodeDict[nodeCurrent]
print groupDict


The output I get is
{'0': {}}
; the output I'd like is
{'0': {'0','1'}, '1': {'0'}, '2': {'0'}, '3': {'0'}}
. Where am I going wrong, /dpt/?
>>
>>54601692
>What's your favorite programming language, and why?
I don't have a favorite.
>>
>>54601983
You cannot hold me liable for any issues my code causes, nor is any warranty implied.

Pretty much the only important thing an open-source license needs.
>>
>>54602017
What terrible things are you forced to do? Not abuse your users?

Then again you're a fan of F# aka OCAML no-freedom edition so there we go.
>>
>>54602052
I can't see any non-scummy reason to want to modify free software and then release the binaries without the modified source.
>>
>>54602058
Fuck me, I did the code wrong. The parts saying "node" are supposed to say "subgroup".
>>
>>54602072
The only non-scummy reason I can think of is a pathetic one: they don't want people to judge their code.
>>
>>54601455
Yes, i do enjoy coding. Even when I cant figure something out and I wanna hit my head against a wall. I like programming robots, i have one that drives around while quoting Agent Smith from the matrix.
>>
>>54602097
That too.
>>
>>54602072

So I can make money off the hard work of other people.

Pretty simple, desu.

>>54602069

I'm a pretty big fan of anything that oppresses.
>>
Im looking for a website that was posted on /g/, it was a game-like assembly debugging puzzle where you advance levels to unlock a prize in the end. It was really nice looking and had differet assembly instruction sets each level.
Google did not help and so i turn to you
>>
>>54602150
I'm not familiar with that one but maybe you'd be interested in TIS-100?
>>
>>54600283
memes
>>
>>54602214
Yeah first thing google showed to me. Ill look into it, but the one im looking for had the code layed infront of you( actual assembly instructions)
>>
File: trumpeatin.jpg (33KB, 540x540px) Image search: [Google] [Yandex] [Bing]
trumpeatin.jpg
33KB, 540x540px
Quick question for those that know of both C# and python.

I'm making a bot that has to open X amounts of chrome webdriver instances. Currently I've written this in C# and it works. Problem is we found out (for other reasons) that the server we will run this bot from is easier to get linux on, which overall I believe would be faster than running WIN2012 (correct me if I am wrong). Also we have to connect each instance of chrome to a specific external IP (we got enough). Any way, the code currently uses methods, threading and is almost solely made up of loops of methods. My question is, is threading done as easily in python and it is in C#? Thank you in advance.
>>
>>54602072
https://en.wikipedia.org/wiki/Trade_secret
>>
>>54601877
>How is *x (where x is a pointer) not dereferencing x?
how does the following compile?
struct X;
extern void by_ref(X& x);

void by_ptr(X *x)
{
by_ref(*x);
}

isn't "by_ref(*x)" dereferencing an incomplete type? or maybe not every "*" means dereference?
>may do inlining and optimize &*x to just be x, therefore preventing the segfault
not "may", "must"; the following is guaranteed by the standard to be correct in both C and C++
#include <stdio.h>

int main(void)
{
int *p = NULL;
printf("%p %p\n", &*p, &p[0]);
}

>is undefined behaviour
why are you still acting like you don't know the size of my dick, anon?
>>
>>54602100
Boom, done, you'll be fine. When you go back, join a computer club of some sort even if they're filled with the worst kinds of people (redditkiddies, facebook surface-dwellers, memesters, etc); even if you don't score an internship or something, having CS-themed stories to tell during an interview is a big plus to getting a job that pays and not just some pajeet-tier codemonkey position.
>>
>>54602276
For what its worth, you can run C# on Linux, but you'll have to change the way you're calling the instances of the process to a platform-agnostic standard.
>>
>>54602287
>Trade secrets
>that you put on the Internet in obfuscated form
You're an idiot if you do that.
>>
>>54602058
send help pls
>>
>>54602288
>how does the following compile?
Because *x dereferences into an lvalue reference &X.
>or maybe not every "*" means dereference?
Only if you take "dereference" literally; it's a misnomer in C++, as you have shown.

>not "may", "must"; the following is guaranteed by the standard to be correct in both C and C++
Not contesting that.

You may be right in both cases, but neither involves null so it's irrelevant.
>>
Haven't done any programming in 2 days, because studying for my uni exams(not prog. related obv.)

I feel a little guilty.
>>
>>54600081

How old were you when you first understood object oriented programming
>>
>>54602425

just carry a graphing calculator with you at all times
>>
>>54602432
16.
>>
>>54602432
I believe I was 28 (I'm 26 as of writing this tho ;_;).
>>
>>54602449
Now tell me how to see into the future.
>>
>>54602432
14 - high school java class
>>
>>54602288
>>54602410
I guess I didn't read the second example carefully. I'll change my wording: the second involves creating a transient null reference that can only legally used with & to take its address. You can't use it to initialize a reference or access members.

That is rather inconsistent of the C++ standard, IMO. I may be technically wrong but only because I expected ISO to be smarter.
>>
>>54602432
>tfw still don't understand the point of OOP.
>>
I only know C and I want to try some web development.
How does one write a backend for a website?
>>
File: perv.webm (3MB, 1280x720px) Image search: [Google] [Yandex] [Bing]
perv.webm
3MB, 1280x720px
>>54600372
C is very far from perfection.

>>54600283
Nothing, there is no point to add anything to C now, the language is obsolete and very niche. If you want an imperative statically typed programming language with good support for most of abstraction techniques but still suitable for system programming, you already have plenty: C++, Objective-C, D, Go, Vala, Rust, Ark, Crystal, ...

>>54601451
clacklisp

>>54601401
Forth, Battlestar

>>54601944
A Lambda procedure is an anonymous procedure but more importantly it's an expression (obviously, otherwise it would be useless) which is necessary for declarative programming where everything is an expression.

A closure is a procedure that capture it's free variables and it's not necessary an lambda.

eg in speudo C:

// lambda (doesn't capture anything)
f = int (int x) { return x + x; };

// closure
int addY (int x)
{
return x + y; // state of y is captured.
}

// lambda + closure
f = int (int x) { return x + y; };


>>54602150
https://microcorruption.com
http://corewars.org/
http://www.koth.org/pmars/
>>
>>54602526

CGI. It's 110 years old, so there's plenty of tutorials.
>>
>>54602549
Wait, so I just create a CLI program that spews stuff to stdout whenever it is run?
>>
>>54602519
>too retarded to understand OOP
>>
>>54602542
>https://microcorruption.com
Thats the one, thanks
>>
>>54602519
At this point there isn't one. Some of its constituents may have uses (like encapsulation for hiding implementation details/fixing an ABI) but its claim to "managing state" has been snatched away by pure FP and linear type systems.
>>
>>54602587
Pretty much. If you want GET parameters, just fetch an environment variable. Want to do POST, read from stdin.
>>
using expat to parse a tiled xml file, if I have the encoding as XML, then it's easy, I just have to look at the tile element. I want to use the other formats that are available, however.

This is a portion of the .tmx file that has the tile data in CSV (comma seperated values):

  <data encoding="csv">
9,9,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,9,9,
9,6,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,6,9,
2,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,2,
3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,
2,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,2,
3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,
2,6,0,0,0,0,0,0,0,7,7,7,7,0,0,0,0,0,6,2,
3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,
2,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,2,
3,3,0,0,0,0,6,0,0,0,0,0,0,0,0,0,0,0,3,3,
2,6,0,0,0,0,6,0,0,0,0,0,0,6,0,0,0,0,6,2,
3,3,0,0,0,0,6,0,0,0,0,0,6,6,0,0,0,0,3,3,
2,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,2,
1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,
3,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,3
</data>


if you want to understand how expat is used to read xml files: http://stackoverflow.com/questions/609376/geting-xml-data-using-xml-parser-expat

how do I get a hold of those numbers?
>>
>>54602639
Is it possible to do this without showing an ugly program.cgi?variable in the url?
>>
>>54602542
I don't think you understand the point of C. You're just using buzzwords. C is not defined by being "imperative and static."

C is solid, stable, and well supported. The features of C++ and things like it are bloat unsuitable for systems programming outside of the 80's due to memory speed limitations becoming orders of magnitude more significant.
>>
What is the difference between 4chan and Reddit?
>>
>>54602485
>transient null reference
>only legally used with & to take its address
oh, "transient", a special kind of reference, unlike in >>54600988 where it was also only used to take its address, right?
>rather inconsistent
agreed on that
>expected ISO to be smarter
they thought so too, "let's not say outright that null references are illegal, just play games and put it in a note, which is not-normative, and can't be taken as ultimate source of truth anyway"
>>
>>54602711
At least we're both arguing for the same reason.
>>
>>54602708
>What is the difference between lists and trees?
>>
>>54602542
>speudo C
as in C for spergs?
>>
>>54602726
well, it's something :)
>>
>>54601341
>what is recursion
>>
Every day I wish I had studied computer science instead of chemistry.

Can someone please tell me good reasons why comp sci/programming jobs are shit? I need to feel better
>>
>>54601341
holy shit you are right, now i feel stupid
>>
>>54602790
It's only shit if you're a dumb computer janitor scrub who gets paid to create CRUD webdev interfaces all day.
>>
>>54602790
But you can learn computer science on your own(at least the undergrad part), you just won't get a degree.

Also I doubt grad CS has much to do with software development or a regular programming job, but that's just a hunch, I don't actually know.

Chemistry is god tier imo, not in terms of jobs, I don't know how chem jobs are either, but because I've always thought it was just cool and wanted to study something science relating.
>>
>>54600283
Dynamic typing, currying, and HM type inference. And native 1024 bit floats.

>>54602790
Really you'll only get shit jobs if you're shit or for some odd reason don't recognize mobility when you have it. The CS world is teeming with jobs right now.
>>
File: 1449700279793.png (74KB, 300x256px) Image search: [Google] [Yandex] [Bing]
1449700279793.png
74KB, 300x256px
>>54602875
>Dynamic typing
>HM type inference
>>
>>54602900
Both are optional. It has to fit into the C standard so you'll have the option of static typing anyway.
>>
File: pepe_fu.jpg (24KB, 495x495px) Image search: [Google] [Yandex] [Bing]
pepe_fu.jpg
24KB, 495x495px
>>54600441
kys
>>
>>54602900
>1024 bit floats
>taking it seriously
>>
File: cl.jpg (12KB, 195x245px) Image search: [Google] [Yandex] [Bing]
cl.jpg
12KB, 195x245px
I'm trying to write TWOP in terms of ZEROP and SUB2 in Common Lisp.
>>
Any of you ever worked on a bigger project in Android Studio? We're developing a tiny app for a university course, and it's already SO FUCKING SLOW. Cant even imagine how unstable this gets if you work on a big mess, like facebooks app. Do the people involved just want to kill themselves at that point?
>>
>>54603058
I'm an idiot. This should be correct.
4 --> SUB2 --> ZEROP = TWOP
>>
File: img.jpg (1MB, 2000x1333px) Image search: [Google] [Yandex] [Bing]
img.jpg
1MB, 2000x1333px
Did I do good gee?
>>
>>54603237
i3 lenovo
it's OK anon
if it's arch or gentoo it's perfect
>>
>>54603237
>X220
You did excellent.
>>
>>54603237
Depends, what other books do you have?
>>
>>54602685
anybody?

>>54602695
Not him, but I mainly use C and Java/C#, depending on what I want to do.
>>
What is point of using json in server client communication if you have to use stringify() and change JSON to normal string anyway

?
>>
File: 20160517_140256.jpg (1000KB, 2560x1536px) Image search: [Google] [Yandex] [Bing]
20160517_140256.jpg
1000KB, 2560x1536px
>>54603237
Post your memes.
>>
What's the /dpt/ approved x86 assembly book? I wanna be able to read what my compiler is spitting out.
>>
File: images.jpg (18KB, 305x400px) Image search: [Google] [Yandex] [Bing]
images.jpg
18KB, 305x400px
>>54603383

Not going to go to the trouble of photographing my desk but I have this one.

I've got an awful feeling that I'm in over my head.
>>
>>54603543
To the trash and read SICP instead. You'll learn real thing.
>>
>>54603336
As opposed to implementing a poorly defined, custom, ad-hoc format?
>>
>>54603528
interested in this too, decided to go with x64 codegen for my shitty compiler
>>
Is there anything like Netty for C?
>>
Is it possible to get a job as a C or C++ programmer these days?

Maybe I'm just living in the wrong country (Norway), but 99% of the job ads here are for C# and Java.
>>
>>54600283
Lambda functions, or at least defining functions within functions, so we can do stuff like
qsort(array, 10, sizeof(int), (void *arg1, void *arg2){
int *a = arg1, *b = arg2;
if (a > b) return 1;
if (a < b) return -1;
return 0;
});


Case and designated initialiser ranges. I can understand why they may not want these.
switch (c) {
case 'a' ... 'z':
do_something();
}

bool is_lower[UCHAR_MAX] = {
['a' ... 'z'] = true;
}


Deprecation/removal of C11 annex K. Pretty much everyone agrees that it's shit and isn't going to implement it.

## __VA_ARGS__ 'eating' commas. It allows for variable macros to have 0 arguments.

http://en.cppreference.com/w/c/experimental/dynamic to be included in the standard.

Forward declarations in function arguments
int fn(size_t n; int array[static n], size_t n)

it allows function arguments to be expressed in a more natural way.
>>
>>54603750
>a > b
>a < b
I clearly meant
*a > *b
*a < *b
>>
>>54603773
>clearly
>>
File: pythonlogo.jpg (46KB, 680x459px) Image search: [Google] [Yandex] [Bing]
pythonlogo.jpg
46KB, 680x459px
So i started learning Python and i like it so far, it's the first language i'm learning, it's not too hard but still not very easy to someone who just stepped into programming, my question is, how much more difficult are Java and C++?
>>
>>54603620

I don't even want to spend the effort of searching through my extensive reaction image collection to find an image that conveys you are trying to ruse me
>>
>>54603789
drop python right now and learn java
>>
Does PowerShell ever get any love in these threads?
>>
>>54603789
When you're at the C++ stage, you'll laugh at others still in their python stage.
>>
>>54603750
I do like functions within functions. The lack of it really makes recursion less appealing to write in C.
>inb4 muh iteration
Is exactly the same as recursion when compiled with -O2
>>
>>54603818
>you are trying to ruse me
I ain't rusing you. Stay ignorant, it's your choice.
>>
>>54603858
Is C++ really hard? what if i'm very very weak with math, should i avoid C++?
>>
>>54603885
>if i'm very very weak with math, should i avoid C++?
avoid programming
>>
>>54603858
When you're at the C stage you'll laugh at others in their C++ stage.
>>
I know Python fairly well, and have some Java programming experience from a large project I worked on, want to pick up C. Can I jump into network programming immediately? If so would pic related be a good book? It's pre-ANSI C but I'm not retarded so I figure I can still learn from it.
>>
i want to pair program with a trap then fuck her ass whilst holding her penis

n-no homo
>>
>>54603789
python is pretty idiot proof so if you managed to work you're way through it with ease you will do good with java. C++ is a bit of a different story but if you're determined enough you'll do fine
>>
File: 1258642070877.jpg (2KB, 120x126px) Image search: [Google] [Yandex] [Bing]
1258642070877.jpg
2KB, 120x126px
>>54603863

>le have you read your SICP today meme
>>
>>54603789
Same as you, guy. Pirated PyCharm and DL'd the MIT lectures. I have the latter playing while I skim ThinkPy.pdf and the Python wiki.

It's pretty easy thus far (Str/Int Ops and Statements). My only problem is that I can't think of a single case in which I would apply what I've learned in real life, ie why use
print ('4 * 3')

when I could just use the calc on my phone.
>>
>>54603930
>thinking network paradigms of a 1970s mainframe OS programmed in ASM applies to computers in 2017
>>
>>54603956
SICP is a good book that teach good things.
>>
>>54603935
I want to pair program with a trap while they sit on my lap.
>>
>>54603744
Yes. Look for jobs directly from product developers, such as Atmel or Funcom.

Generic IT job postings are flooded by consultancy companies who want C#/Java devs.
>>
>>54603992
Aha, okay. Thanks.
>>
>>54603988
what if its a biological girl with a big clit?
>>
Why is C the comfiest language? Every time I write in C I feel safe, as if I'm being nurtured by my grandmother while wearing adult diapers.
>>
>>54603929
>he's still in his C stage
>>
>>54604006
>biological girl
disgusting.
>>
>>54604008
autism
>>54604018
autism
>>54604006
autism
>>
>>54603984
That book is published 1990, dumbshit.
>>
>>54603108
Android Studio is very slow. The problem can be remedied somewhat if you turn on the power save mode in the IDE, but it's even then it's still much slower than Eclipse. The only good thing about Android Studio is that it has seamless integration with the SDK and you don't have to download plugins.
>>
What does /g/ think about programming competitions ? are they a waste of time?

does it correlate with being a good programmer?
>>
What does m do b you guys think of lua? Is it a good scripting language?
>>
File: 1461549226989.jpg (106KB, 960x731px) Image search: [Google] [Yandex] [Bing]
1461549226989.jpg
106KB, 960x731px
>tfw at my type theory stage and just disappointed at the state of everything in programming
>>
>>54604083
You win competitions on the merits of how flashy and fancy your app is, and sometimes by how many people you know in the judge's table.

The actual quality of code has nothing to do with winning.
>>
>>54603936
>you're
speaking from experience?
>>
>>54604083
I think Google did a study and they don't necessarily mean they are a good programmer.
>>
>>54604083
yes and yes
>>
>>54604101
I don't think he's talking about hackathons.
>>
>>54604094
Sorry about that. Meant to type what do you guys think of lua?
>>
>>54604126
hackathons is literally who can write a 10line py script the first imo desu
>>
>>54604104
fug
>>
>>54604133
Lua is cool.
>>
>>54604138
Again, not hackathons. Think coding challenges instead. You're given a problems to solve in an hour, and the more you solve the more points you get.
>>
>>54604083
Competitions like the google code jam or such are usually more about how good you are at creating algorithms which does not necessarily mean being good at writing maintainable code (which really is a more useful trait if you want to be employed) but in some sense yeah, you're probably a good programmer if you place high in it.

Hackathons usually are fucking pointless and/or rigged though, just ways for companies to exploit idiots by saying anything written for the competition belongs to them and then letting someone who works for the company take home the prize anyway.
>>
>>54604138
How can someone be so retarded. Are you ESL?
>>
>>54604040
based
>>
>>54603826
really?
>>
>>54604244
really
you learn jack shit about program logic in python. learn java instead for the basic fundamentals of programming
>>
>>54602519
the only scenario I can see OOP being useful is when building software with an enterprise development style team, if everything is abstracted into parts it's hard for one idiot to fuck too much up
>>
>>54604244
Don't do that. He's just autistic and trying to reduce the competition.
>>
>>54604083
They are fun and useful. It definitely correlates with being a good programmer.

>>54604113
Not at all. What they found was that if two people score equally well on programming exercises, then the person who didn't practice for competitions was better at their job.

This is not really a surprise, since the dude who didn't practice would only get better at solving them if he did.
>>
>>54604305
That's got nothing to do with OOP, though.
>>
>>54604305
>the only scenario I can see OOP being useful is when building software with an enterprise development style team
typical brainwashed nigger with short sighted programming imagination and ability.
>>
>>54604322
I'm sure there's other benefits, but I'm not privy to them, it's never been a paradigm I've enjoyed but my experience is limited
>>54604362
ok
>>
Q: Why do Indians program in Java?
A: Poo backwards is OOP
>>
>>54604412
Well, this is my take on OOP nowadays: >>54602627
>>
>>54604415
oop in ool
>>
>>54604480
detangised
>>
Motherboard finished dying. Using a laptop from ~2005 running windows XP, with MSYS2, for development.

I had hoped this would happen much later, so I could wait for the second generation Zen and have better means to predict how things will pan out. At this point I might just get Zen, or stomach my disgust and further line Intel's pockets if Zen is a severe failure. Maybe I just won't buy anything at all.

Strangely, I don't feel much of anything. Apathy.
>>
>>54603789
Java and Python are basically dialects of the same language.

If you know one well, you can write in the other pretty easily.
>>
>>54600081
Fuck off this programming fag meme.
>>
>>54604538
it's a kind of strange feel
>>
/g/ want to learn to program what do?
>>
>>54604648
read K&R and buy a skirt
>>
>>54604648
By an entry level programming book of whatever language you want to learn and read it 4 hours ever day.
>>
>>54604665
epic my man
>>
>>54604665
Why do I have to buy a skirt?
>>
>>54604694
Because dressing like a schoolgirl improves programming ability! It's a scientific fact!
>>
I fucking hate VxWorks and their shitty documentation.

>>54602695

>The features of C++ and things like it are bloat unsuitable for systems programming outside of the 80's due to memory speed limitations becoming orders of magnitude more significant
>due to memory speed limitations becoming orders of magnitude more significant

What features of C++ do you think will cause issues with memory access times?
>>
File: 153648937461.jpg (279KB, 1699x2048px) Image search: [Google] [Yandex] [Bing]
153648937461.jpg
279KB, 1699x2048px
Why is Windows software development so painful?

After you implement + port your idea you have to march through the hell of dependency management and installation. Why is there no organized standard for Windows software management? MSI doesn't compare to dpkg + apt (or their RHEL equivalents), and if you don't want to bloat your installer (which is an offensive concept in itself) by more than 10x+ the size of your program you have to learn an entirely new language to do scripted package installs with something like NSIS. Even then, you end up with 0.0.1 different versions of the same "dynamic" C++ library installed, and broken all to fuck registry (again, offensive in it self) keys because some monkey didn't provide a clean uninstaller (that they had to build themselves) for their program.

I thought Windows was supposed to be attractive because "it just werks" when it comes to development. I know the install base drives people to put up with it, but holy fuck why hasn't Microsoft fixed this?
>>
>>54603967
your calc on the phone wouldn't output 4 * 3, it would output 12. So that's one reason right there.
>>
>>54604648
-Decide on a language
-Torrent an introductory book for that language, or find a good website
-Establish a base and a framework of knowledge
-Think of a project, use what you learn to add something to it as you go along. replace older parts with more suitable approaches as you're able.

Don't expect the project to be viable forever. It's just a means to apply what you're learning and build the mental structures involved with using these things together. Makes it interesting and reduces a lot of the overhead involved in avoiding compartmentalization.

I'd recommend C++ for performance and understanding what the machine is actually doing.
>>
>>54602072
This is definitely true.
The problem with GPL comes into play when you start needing GPL libraries, not binaries. I'm making a video game and I don't want to release my source code, but I need a JSON decoder. If I wanted to use the GPL JSON decoder, I'd have to make my entire game engine open source. This doesn't mean I don't want to give whoever wrote the JSON decoder credit for their work, I do respect them and am glad they released a library for the public to use, but I'm not going to be able to use it if it's GPL.
>>
>>54604752
Windows 10 has apt-get now :^)) time to take the poo to the loo
>>
>>54604752
"Backwards compatibility is better than stability"
>>
>>54604133
lua is cool but its ecosystem is shit. every time you need some library its like "no fucking way there is not already a good one for this". luajit has a great C FFI, maybe that can help, but personally haven't used it much.
>>
>>54604731

I'm sure he doesn't believe that there can be such a thing as a zero cost abstraction.
>>
>>54604731
>What features of C++ do you think will cause issues with memory access times?
Not him, but C++ doesn't directly _cause_ memory issues, rather it encourages them.
Examples:
generic standard library structures, like std::string or std::map<> obscure their initial structure, so it's really hard to tell how much memory is being used at any given time.
C++ is implicit copy, explicit move, so you can easily find yourself copying large amounts of memory very often, and it may cause a lot of heap allocations that are difficult to see at first. This is definitely something I think Rust was right about.
>>
>>54604689
Thanks

>>54604721
Is that why there are so many anime pictures with programing books then, because they go hand in hand, all the images make sense now thank you.

>>54604772
Cheers friends, i appreciate it.
>>
>>54604752
"it just werks" for the end-user, developing for windows is a pain in the ass.
>>
>>54603789
>he isn't into assembly yet
Just wew
>>
>>54604752

>Why is Windows software development so painful?

Because Microsoft likes to be different, and open source groups don't like Windows enough to bother with it much.

>and broken all to fuck registry (again, offensive in it self) keys because some monkey didn't provide a clean uninstaller (that they had to build themselves) for their program

You could just, you know, not touch the registry with your application. It is perfectly acceptable on Windows to distribute a standalone executable without an installer or uninstaller.
>>
>>54604775
Why not make your engine open sores? You can't stop pirates no matter what you do (except maybe bending over for Denuvo).
>>
>>54600081
My prof keeps giving me assignments with code that doesn't compile. I'm supposed to build up on that code, but it's shit, so what the fuck do I do?
>>
>>54604879
And what, go back to static linking land? I get get what you mean, it's a practical solution for small otherwise standalone programs, but it's not a substitute for a proper management and installation system (that _actually_ make use of dynamic libraries).

>I'm making a video game and I don't want to release my source code, but I need a JSON decoder. If I wanted to use the GPL JSON decoder, I'd have to make my entire game engine open source.
No, you wouldn't. So long as your game is reasonably (functionally) independent of the GPL'd library, and you didn't modify the library's code itself you're clear. You seem to be operating under a misconception.
>>
>>54604844

>obscure their initial structure
Most STL implementations don't use opaque structs in my experience. I've commonly seen std::string take up 24-32 bytes on 64-bit platforms, indicating that there's a capacity field, a length field, a pointer to the data, and something else.

>implicit copy, explicit move
If you're passing around big objects, use a const reference. Don't C programmers normally pass around pointers to structs anyways?

>This is definitely something I think Rust was right about.
Rust does a lot of the same shit C++ does, mate.
>>
>>54604994
That would be LGPL, not GPL.
>>
>>54592865
I have the same-ish problem. I have a shit ton of non-work ideas while I'm at work. I just offload them into a text file I keep in a private bitbucket git repo. Helps me stay focused on work AND I get to remember all of my weird ideas.
>>
I use gvim on windows, it works perfectly (editing php atm, oop and all). I open the file on my mac, macvim to be precise, and syntax highlighting is fucked up. Same exact .gvimrc. Why u do dis. mac?
>>
>>54604994

>And what, go back to static linking land?
On Windows, this is perfectly reasonable. Go through your Program Files and Program Files (x86) folder. How many of the applications there have a shit load of DLLs shipped with them? They're not sitting around in a common folder where all of the applications can make use of them simultaneously. No, each application is using its own copy of a DLL. The only advantage of this system is that it's easier to update libraries without breaking everything. you aren't saving disk space or memory though. So go ahead, static link all of the things. It won't kill you.
>>
>>54605032
Probably something with the default system-wide config file
>>
>>54605007
You can write a small and independent program, use ipc to move data around. If it's not LGPL, but GPL, you're fine so long as you don't link against it.
>>
>>54605088
I suppose, but I think if this anon needs it for a game engine he'd rather not use it through IPC.

I just don't see the opposition to making the game open-source in the first place. People who complain about GPL just want to have their cake and eat it too, really.
>>
>>54605073
you mean the default system .vimrc? I know macs ship with an old ass deprecated version of vim
>>
File: 1452381104205.jpg (55KB, 590x480px) Image search: [Google] [Yandex] [Bing]
1452381104205.jpg
55KB, 590x480px
>>54605059
>It won't kill you.

It hurts my soul.

>>54605124
I don't think I've seen a strait GPL library; they're usually LGPL.
>>
this
>>
>>54604844
>what are move semantics
>>
>>54603789

python is cool for small stuff and easy to pick up

java is a littel bit more "verbose" and a little bit more complex

c is a little bit harder than java, but worth to learn.

c++ is a huge clusterfuck, difficult and not very systematic, don't waste your time on it unless you REALLY REALLY need it (for example as game developper).
>>
case $test in
foo)
gentoo(){
//unique function 1
}
;;
bar)
gentoo(){
//unique function 2
}
;;
baz)
gentoo(){
//unique function 1
}
;;
esac


Am I allowed to do this?
>>
>>54605230

No.

Delete this.
>>
>>54605228
You don't need C++ for gamez. All the useful libraries you would use are C.

It's easier to optimize C code than it is to optimized C++ clusterfuckery, and optimization is more important for gamez than it is for your average application.
>>
#include <stdio.h>

int main (void)
{
int buf[5];
int i = 0;

for ( ; i<9; i++ )
buf[i] = i;

i = 0;

for ( ; i<9; i++)
printf("buf[%i]: %i\n", i, buf[i]);

return 0;
}

output:
buf[0]: 0
buf[1]: 1
buf[2]: 2
buf[3]: 3
buf[4]: 4
buf[5]: 5
buf[6]: 6
buf[7]: 7
buf[8]: 8

Why? It's outside the buffer bounds, and there's no Segmentation Fault.
What's happening? Why didn't it fault?
>>
>>54601964
>Anarchy is not freedom.
Spoken like a true communist.
>>
>>54605280
Because you're just overwriting other shit on the stack.
>>
>>54605289
Spoken like a true corporatocrachist. The state and law are necessities to ensure freedom. Without them tribes (corporations) would end up conquering and forming tyrannies.

t. True American
>>
>>54605167
Yeah, I would say that full applications, engines, and frameworks should be GPL but small self-contained libraries are fine with LGPL. The only issue is that (from what I gather) people think all you need to do to comply with LGPL is dynamically link but you also have to be mindful of things like not programming to an ABI.
>>
>>54605280
>>54605316
+ gcc (by default most of the time) includes stack smashing protection / default stack size leaves a fair amount of room.

>>54605350
>people think all you need to do to comply with LGPL is dynamically link but you also have to be mindful of things like not programming to an ABI.
Can you elaborate on this?
>>
>>54605269
C-style C++ is the best for games imo
>>
>>54604947
That's up to the developer, right?

>>54605005
>I've commonly seen std::string take up 24-32 bytes on 64-bit platforms
I've seen them taking up 4 bytes... it's (intentionally) hard to tell what's going on under the scenes, and even if you do know, it's still "implementation defined beahvior"

>If you're passing around big objects, use a const reference.
struct foo {
big_struct my_field;
void do_thing (const big_struct& bs)
{ my_field = bs; }
}

foo f;
big_struct bs;
f.do_thing(bs);

Thank god I used a const reference, right? Wouldn't want to copy any big structures...
>>
>>54605376
What features do you see in C++ that justify compiling for C++?

I'll be honest I used to use C++ but I haven't missed anything after switching to C.
>>
>>54601964
There is no useful, nor meaningful, sense of "freedom" to an extent that "true" freedom might as well be said to not exist.

All definitions are arbitrary, conditional, and ultimately relative. Existence is a varying spectrum of affordance built on top of a foundation of immutable slavery.
>>
>>54605346
>Without them tribes (corporations) would end up conquering and forming tyrannies.

They already do that, with the blessing of the state. Enforced monopolies are big business.
>>
>>54605346
>implying I don't want a true anarco-communist society
You just don't see that to have that we need to change the culture. That doesn't happen by oppressing people but rather by giving freely. You can see examples of that throughout history.

GPL hinders progress by being restrictive. Corperations don't go "oh yeah we'd love to contribute to these projects" because they see the GPL downside.

If they're free to give just what they want to give and nothing more we will eventually see progress.

I'm entirely serious by the way. Open source has always had this problem within corporations. It has changed some but not enough.
>>
>>54605418
>namespaces
>method syntax
>templates
I can never start any projects in C because I miss the above features too much.
>>
File: common-lisper.jpg (26KB, 367x500px) Image search: [Google] [Yandex] [Bing]
common-lisper.jpg
26KB, 367x500px
>>54605424
That is a problem, which would also be a million times worse if the US became a libertarian paradise or dissolved.

>>54605423
>relativistic nihilism
kek
>>
>>54605437
>anarchy
>communism
>possible, together, at the same time

Bloody brilliant banter, that is.
>>
>>54605443
Honest question:

>namespaces
Why do they matter?

>method syntax
Huh?

>templates
Huh?

~ ANSI C programmer.
>>
>>54605418
Function overloading- maybe.
Declare anywhere (depends on version of C obviously)
Not having to typedef the struct.
Certain libraries maybe.
Namespaces
Templates if you're feeling naughty.
>>
>>54605167
>>54605350
Then again, you look at the major gripe against GPL for small libraries and it's "I want to use this at work but can't because it's GPL". You're not being paid to incorporate free code that other people wrote into your proprietary business application.

>>54605372
This is the relevant clause:
>Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (a) uses at run time a copy of the Library already present on the user's computer system, and (b) will operate properly with a modified version of the Library that is interface-compatible with the Linked Version.
I suppose "interface-compatible" is a bit generic. I think that RMS probably means in terms of the API and nothing else, though, as if the application depends on a specific implementation (details of which are likely not discernible) it is difficult to make modifications.
>>
>>54605475
>Huh?

He means he likes calling obj.method() instead of objType_dothing(&obj).
>>
NEW THREAD!!

>>54605498
>>
>>54605437
>he thinks he can change corporations from the inside out
Brotip: You can't. They want you to think that so you publish in anything but GPL. You're being manipulated.
>>
>>54605475
>>namespaces
>Why do they matter?
I like to keep my code organized, but I suppose it's just a matter of preference

>>method syntax
when functionality clearly corresponds to a data structure, e.g. inserting into a queue, showing a debugging representation of an object. Method syntax is less verbose and more clear.

>>templates
I love type theory too much to give away the vague semblance of parametric polymorphism that C++ templates offer. Also I don't like reinventing the wheel.
>>
>>54605475
using name prefixes to emulate namespaces becomes exceedingly verbose and can be a pain to refactor
>>
>>54605470
It's a complicated topic. I meant to say anarcho-syndicalism really (anarcho-communism is anti-wage, less freedom imo because of restrictive payment system and restriction on recompense). But there's been things considered anracho-communism that worked pretty OK.
>>54605515
Yeah I'm sure a NEET can tell me how my company hasn't published any patches to (even GPL) projects. It's clear MIT is preferred. And it's not because people want to keep the code internal. How often are open source projects core to your product? Rarely.
>>
>>54605475
I also might add that those features are hardly bloat, don't force the programmer into doing anything, and are zero-cost abstractions.
>>
>>54605558
I sure can because GPL is incompatible with your business license. You act as if "corporate contributions" are the ultimate measure of license quality which is flat out false.

Oh and Linux is contributed to by corporations and is GPL so yeah.
>>
I have a file and a compressed version of it (some flavor of gzip without encryption that i cannot replicate with gzip) how can i determine what the encryption is and how to replicate it with other files?

Anyone have experience with this kind of stuff?
>>
>>54605599
>Oh and Linux is contributed to by corporations and is GPL so yeah.
Yeah. I'm not arguing it doesn't happen. I'm saying that when there's a pick of libraries to use MIT gets favored because of fear. And MIT patches get submitted.

It's not the GPL that makes corporations contribute.
>>
>>54605633
Exactly it's the software. I don't wanna use a license that corporations like. I want software that they use and contribute to in spite of the license.
>>
>>54605487
>operate properly with a modified version of the Library that is interface-compatible with the Linked Version
Oh so don't be an idiot and expect implementation dependent behaviour.

>>54605526
I understand
>showing a debugging representation of an object. Method syntax is less verbose and more clear.

but
>functionality clearly corresponds to a data structure
could be accomplished with function pointers.

>I love type theory
Neat I guess, but a typdef to make a wrapper isn't so bad

>>54605533
I can appreciate that, but I definitely see it being abused more than used properly.

>>54605558
>How often are open source projects core to your product? Rarely.
(different anon) All the time.

>can tell me how my company hasn't published any patches to (even GPL) projects
They can tell if you use them though.

>>54605562
That's all well and good, but it's also unnecessary most of the time.

>>54605633
MIT is favoured because people are: a) lazy, and b) greedy. Using existing code is the safest (stability) and fastest (time) way to build an application. I still don't understand why people can be upset about the GPL or feel entitled to break it (not that you do). It's literally someone else's work; deal with it.
>>
>>54605669
>I don't wanna use a license that corporations like.
Ok. Seems rather arbitrary.
>I want software that they use and contribute to in spite of the license.
Oh you're talking about software quality here? It's SO GOOD they have to use it?
Dream on.
>>
>>54600283
namespaces to prevent naming conflicts
>>
>>54605698
>It's SO GOOD they have to use it? Dream on.
Yeah who needs libc, linux, apache, bind, openssl, ssh or any of that shit.

I hear most companies roll their own OS / webserver / DNS server / crypto / ... nowadays anyway right
>>
>>54605698
So why do corporations use linux if it isn't SO GOOD that they have to use it? Does Linux give bjs to executives or something?

Oh wait it's because reproducing a closed source Linux would cost hundreds of millions.

And yes generally you should avoid doing what corporations want you to do because corporations seek to make as much money as possible no matter what.

t. tobacco industry, asbestos industry
>>
>>54605751
>>54605752
Oh so you two are saying there's no options to what you've suggested for companies?

They clearly don't HAVE to use them. They prefer it because they're good. The idea you seemed to convey was that basically you'd drag corporations kicking and screaming behind your GPL-licensed wagon because there's no options for them but to adhere.

Which is complete bullshit.
>>
>>54605814
>there's no options for them but to adhere.
>Which is complete bullshit.

There are CERTAINLY places where that's the case bud.

What exactly do you think LLVM+CLANG is evidence of?
>>
>>54605931
>LLVM
MIT derivative license.
>CLANG
BSD
>what is it evidence of?
I dunno maybe that I'm at least partially correct.
>>
>>54605959
I was trying to be fancy and forgot a plus before BSD..
>>
>>54605959
That they actually needed to fund / develop something new because they were completely reliant on GCC.
>>
>>54605690
>could be accomplished with function pointers.
That's a costly abstraction, and it requires a lot of extra work.

>Neat I guess, but a typdef to make a wrapper isn't so bad
I'm assuming you aren't sure what I'm talking about
>>
>>54605480
>Function overloading- maybe.
worthless crap
>Declare anywhere (depends on version of C obviously)
there's only one current C version
>Not having to typedef the struct.
you don't have to
>Certain libraries maybe.
qt?
>Namespaces
C has namespaces
>Templates if you're feeling naughty.
no, thanks
>>
>>54605411

Right, and C isn't also littered with implementation defined behavior as well...

By the way, if you don't like your platform's STL impregnation, there are always alternatives. Or you can use another library altogether and keep classes/templates and the like.

Also, what you just wrote there is explicitly copying.
>>
>>54606368
I'm just saying that C++ _encourages_ doing costly things (makes it easier to do costly things than cheap things), although it's definitely possible to avoid it.
>>
>>54606368
Also, if you don't think it's a real problem:
https://groups.google.com/a/chromium.org/forum/#!msg/chromium-dev/EUqoIz2iFU4/kPZ5ZK0K3gEJ
>std::string is responsible for almost half of all allocations in the Chrome browser process
>the Syzygy team discovered that nearly 25000 (!!) allocations are made for every keystroke in the Omnibox
You could argue that it's the bad C++ dev's faults, but if you want to go there then we might as well start talking about buffer overflows too...
>>
>>54606486

Are you suggesting that, were it a C program, they would not be doing an equal number of memory allocations?
>>
I recently posted a few shell scripts on my Github. I always feel like I can improve them though... One is a forensics script and another is a network mapper but I'm thinking of adding support for IDS/Firewall evasion.
Thread replies: 334
Thread images: 20
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y / ] [Home]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
If a post contains illegal content, please click on its [Report] button and follow the instructions.
This is a 4chan archive - all of the content originated from them. If you need information for a Poster - you need to contact them.
This website shows only archived content and is not affiliated with 4chan in any way.
If you like this website please support us by donating with Bitcoin at 1XVgDnu36zCj97gLdeSwHMdiJaBkqhtMK