/dpt/

What are you working on Sup Forums?

Other urls found in this thread:

choosealicense.com/
whitesourcesoftware.com/whitesource-blog/open-source-software-licenses-trends/
twitter.com/SFWRedditVideos

Previous:

Repostan because I have awful timing

I'm making my first program that I'm gonna make public through my repository. Up until now I've never thought about licensing. I mean I know of the GPL, the MIT, apache and so on, but I don't know which one to choose.
Should I just stick to GPL? How different are the other non copyright licenses from it?

choosealicense.com/
GPL is cancer tho, use MIT.

Protip: wrap a rubberband around your testicles while you dev in order to increase productivity

don't forget to wear your pink striped programming socks, too!

New to Linux, how do I make it so it will only output a quote that has not been outputted, once all quotes have been outputted it loops to the start.

#!/bin/sh

# Keep this updated when you add or take away quotes on the case list
num_quotes=10

# Generate a random quote number variable, 'rand'
rand=$[ ( $RANDOM % $num_quotes ) + 1 ]
case $rand in #BEGIN CASE
1) quote='Jesus said "I will rebuild this temple in three days." I could make a compiler in 3 days.';;
2) quote="India nigger retard doctor.";;
3) quote="Yeah, I killed a CIA nigger with my car in 1999. Score one for the good guys.";;
4) quote="If you guys have ideas for things to do, let me know. I probably will ignore them.";;
5) quote="I have God's official endorsement. I win and the CIA/FBI niggers lose. Just wait. Dumb fuck FBI niggers.";;
6) quote="I report to God. You report to me.";;
7) quote="Nigger, I am not a pedophile. My Dad is.";;
8) quote="God's world is perfectly just. Only a nigger cannot see. That's why niggers have no morals.";;
9) quote="Spoiler alert, CIA. Guess how this ends? I have God. I win. You unconditionally surrender and suck my fucken dick. That's how this ends.";;
10) quote="I'm the boss of the FBI. Divine authority.";;
esac # END CASE

# Display the random quote from case statement, and format it to line wrap at 80 characters
echo "Terry says:"
echo "\"$quote\"" | fmt -80

So portfolio is tuple of dictionaries? What do dictionaries contain?

Is it a program that you just want people to use freely? GPL.
Is it a library that you want people to take seriously? MIT/BSD/Similar.
Is it something you don't give a shit about? WTFPL/CC0.

Basically he is using dicts like a class. And is try to hack a way to use these dicts like a class.

I remember when I listened to some small lecture about android that they chose apache since if they had used GPL everything else that included android would have had to use GPL, and that companies were not going to let their proprietary code become shared. That's the only cancer like feature of GPL that I heard of, other than that it doesn't sound bad.

What does this sentence mean?
>and also provides an express grant of patent rights from contributors to users.

It's the first one mostly. It's going to be a small self contained program and I can't imagine how people could is it in their projects unless it's just modifying it to give it a new feature. It's not a library to be included into something else.

Lopp through and add them to a dictionary using default for get method to accumulate same entries.

>cancer like feature of GPL
Protecting your freedom is a cancer. Well done little slave.

It's not my opinion, I used the word corresponding to the post I was replying to. He called it cancer so I was letting him know that that was the only feature of GPL I thought he was talking about.

Leftist """""""""""""""""freedom""""""""""""""""" isn't freedom.

Is this a shoop? That makes me sad

I'm practicing Python and made a clone of the 2048 game, but I'm currently stuck on how to animate the movement.

I made an animation loop that is executed after every move but I can't figure out how to set the animation positions. Like I have a square class with a previous and current position, I can interpolate the intermediate animation positions but then I get in a trouble storing the intermediate values because I end up iterating over the entire board every loop.

Protecting your freedom by limiting your users' freedom is cancer.

Learn what is freedom.

see

> he has his own definition of freedom
I'm not surprised.

how do I tell if the code is coffescript or javascript?

How is GPL constricting freedom. I'm genuinely curious.

If it's been written by a code artisan sitting in a coffee shop on a macbook, then it's coffescript.

I've heard optimising compilers often ignore the inline keyword in C++ because it's more efficient to not inline (instruction cache size seems the primary reason). But is there then also cases where the compiler takes your normal sequential code and puts it into functions it can call?
There should be right?

I have to open code of derivative products and I have to use GPL for all code statically linked with GPL code. This constricts my freedom, and this is why GPL is dying: whitesourcesoftware.com/whitesource-blog/open-source-software-licenses-trends/ .

Use GPL. Freedom ain't Free.

>Using a license that lets corporate fucks profit off of your work without contributing anything in return

Are you also into cuckolding?

I think it's fine to have a licence that's only for people who participate positively in the communist side of software. Why do people complain so loudly about it? It's just a developer taking a stance that you don't agree with. There's plenty of MIT and public domain open source stuff out there.

are decorators and annotations the same thing?

Anyone got any decent tutorials for html for experienced programmers? I've been writing a lot of scala, and seeing as scala.js and the like are making the web a little less obnoxious I figured it's finally time to take the plunge. What I'm after is a starting point that doesn't assume any knowledge of HTML/CSS without assuming that I'm a complete beginner.

@59933510
Wrong thread. Your kind isn't welcome here.

Who are you quoting?

I guess you're right, but I'm interested in hearing from people like me who have avoided web programming because it's so fucking AIDS, not the kind of fags that actively embrace it

> MUH FREEDOM
> Except for for-profit organizations, fuck them
Projects with permissive licenses tend to attract more contributions from companies because they don't feel discriminated against.

I don't care about that. This isn't the right thread for discussing the garbage you want to discuss.

If the companies wanted to contribute, they wouldn't mind the GPL.

>tutorials
>for HTML
it's not rocket science

okay, have fun ordering programmer socks from amazon and discuss the newest within fizzbuzz you fucking fag.

An entry for the lisp game jam

Right now you print one at random.
If you want to print all of them, you should store what you have printed.
I would load them all into an array, inserting them at random.
Then store the index of which you have printed and increment that.
When you are at the end, shuffle the variables and do it again.
But printing a random variable is better in most cases.
You can store values on disk.

Just go through W3, scroll through the tags to get a general idea of what's available and that's it, you don't have to read everything.

I don't care about the companies. I would mind the GPL. I won't have that cancer anywhere near me.

And nobody cares about you. You brought up companies as an argument against GPL.

Most companies can't just open source all their code because they would lose the competitive advantage they have. Permissive licenses are optimal, since companies can share 90% of contributions and keep the important 10%. Forcing companies to share 100% of their code is so out of touch with reality only fat breaded communists could have came up with it.

template
struct node {
T head;
node *tail;
};

template
class stack {

public:
stack ();
stack (const stack &other);
~stack ();

stack &operator = (const stack &other);

size_t size () const;
void push (T item);
T pop ();
const T &top () const;
T &top ();

private:
size_t _size;
node *_node;

};

template
inline stack::stack () : _size (0), _node (NULL) {}

template
void copyOther (stack &self, const node *otherNode) {
stack tmpStack;
while (otherNode != NULL) {
tmpStack.push (otherNode->head);
otherNode = otherNode->tail;
}
while (tmpStack.size () > 0) {
self.push (tmpStack.pop ());
}
}

template
inline stack::stack (const stack &other) : _size (0), _node (NULL) {
copyOther (*this, other._node);
}

template
inline stack::~stack () {
while (this->_node != NULL) {
this->pop ();
}
}

template
inline stack &stack::operator = (const stack &other) {
while (this->size () > 0) {
this->pop ();
}
copyOther (this, other);
}

template
inline size_t stack::size () const {
return this->_size;
}

template
inline void stack::push (T item) {
node *node (new struct node);
node->head = item;
node->tail = this->_node;
this->_node = node;
this->_size++;
}

template
inline T stack::pop () {
node *node (this->_node);
T item (node->head);
this->_node = node->tail;
this->_size--;
delete node;
return item;
}

template
inline const T &stack::top () const {
return this->_node->head;
}

template
inline T &stack::top () {
return this->_node->head;
}

It's pretty clear that wasn't me.

Can you give some examples of projects where companies have released 90% of their code?

ADA compiler

Only because of other companies, if all companies used the GPL there would be no problems.

So actually the only cancer is the regular copyright since it pushes the ante up. Once some uses it everybody has to.

@59933728
>If everyone believed in c*mmunism there would be no problems

Sounds exactly like the problems communism facing. You'd think they would have found some attempt at solutions.

data Stack : Nat -> Type -> Type where
Nil : Stack Z t
(::) : t -> Stack n t -> Stack (S n) t

pop : Stack (S n) t -> t
pop (x :: _) = x

length : {n : Nat} -> Stack n t -> Nat
length {n} _ = n

WebKit, LLVM, .NET core, Android, FreeBSD, IDEA.
> GPL is basically communism
This is what I'm talking about.

>ADA compiler
Which one? There are several and the most notable one, GNAT, is GPL.

...

I have 1000 reddit accounts.

I want to post something then have a script run and log me into the accounts and upvote my post

Which language would be the most efficient to do this in?

Coq?

Python + Selenium

The one made by Ada core.

Idris. Coq is pretty different from both Idris and Agda, which are slightly similar.

How do you use it in an interactive code tho? Like, a user interactively adds entries to the stack and then asks its length.

This is network-bound. It doesn't matter how fast your programming language is.

I'll write something

>length : {n : Nat} -> Stack n t -> Nat
>length {n} _ = n
to declare "optional" argument?

An implicit argument.
Idris infers (if possible) what n is, and the pattern simply captures what it has been inferred to be

That would be GNAT and it uses the GPL.

Yes, and gnat has a non GPL version that it is sell to companies for big monney.

Nevermind, I solved it. Portfolio is a list of dicts because that is what I get from querying my SQL database, but I figured I can just use a different query, using GROUP BY and SUM, and get everything already grouped the way I want it to.

Honestly this is too much of a pain.
Someone who uses idris regularly can do this.

Without type indexed length it would be trivial

From what I can see, the only difference of the pro version is support. There is no other license.

And I don't see why a company would want to distribute a modified version of a compiler anyway.

Any good C++ books that don't get bogged down in obscure language features that you'll probably never use or see?

>From what I can see, the only difference of the pro version is support
No the pro ain't GPL. When you use the compiler it link to gpl runtime and force you to gpl your code. With the pro version you have a non gpl runtime.
source: ada core employee

>good C++ book
Such a thing can't possibly exist.

I'm not good at this, the most I can do is log in.
Im going to have a bunch of error handling like if the account cant be logged into and shit.
Fuck, my friend described me great. I just copy random shit and like plaster things together I don't really understand.
Should I just forget what I have learnt and start a course like the one at MIT and learn over again?

That is what software engineering is, embrace it

>good C++ book that doesn't get bogged down in obscure language features you'll probably never use
Easy. K&R.
>or see
Impossible. C++ programmers get bogged down in useless features all the time and they're very complex. Makes the C++ programmer feel confident that they're doing their job well when they achieve simple things in complicated ways.
I honestly believe alexandrescus book on D is more appropriate to learning how to be efficient in C++ than his C++ book because it covers issues C++ (and other languages) have and more general philosophy of how to write code well. But it's littered with D features you don't actually need (for C++) so it's not a worthwhile read.

That's what the gcc runtime library exception is for. Both, the free and the pro version have it, they're still GPL but they allow proprietary software to be compiled. You're probably thinking of an older version.

Error handling is what a lot of bad api suffer from.

If you can log in with selenium surely you can post and upvote? Is it possible to log in via POST? Does reddit's API let bots upvote? There are likely countless tutorials out there for this sort of thing.

>features you don't need [for C++]
>features you don't have [in C++]

>What are you working on Sup Forums?
more /diy/ than /dpt/, but /diy/ is ded.

Building a 7-Segment-RGB-Display from scratch. First prototype werks - still just green though. Have to buy some new wires

C++ IS GREATEST LANGUAGE

ALL OTHER LANGUAGE IS SHIT--

pretty cool. That's a rasp-pi, right? You programming it in C or Python?

>That's a rasp-pi, right?
Arduino.
>You programming it in C or Python?
ML.

How do I gain the emotional stability needed for programming? There's days where I feel like shit and can't get anything done. I hear good programmers power through but I can't manage that.
So what aids are there?

...

But people will think I'm a tranny! There has to be another way.

Here's a compromise user.

> But people will think I'm a tranny!
They won't if they don't know you're not a girl(female).

def net_input:
return numpy.dot(X, w_[1:]) + w_[0]


X - 2-dimensional matrix.
w_ - 1-dimenshional array.

Numpy.dot multiplies two matrices. How does sum work here? The product is also a matrix, but w_[0] is a single number.

It's starting to turn black and I don't think my productivity increased. Can I take it off?

you should have easy-learning and hard-learning, or easy and hard tasks. When you're feeling good go work on the hard stuff, make your brain sweat and shit. When you're feeling down, go work on the easy stuff.

The easy stuff won't be difficult enough to demotivate you, but ideally it will still give you a sense of accomplishment and make you feel productive and all that, so it might help to put you in the right mood for the harder stuff.

Easy stuff could be fixing the style on your code, watching tutorials on youtube, doing easy shit on codecademy and those type of follow-along tutorials.

It adds w_[0] to each element in the matrix, obviously.

>share 90% of contributions and keep the important 10%
>the important 10%

Exactly, it's only used by corporations and people who want to benefit off of someone else's hard work and not let anyone benefit off of theirs.

Sharing is caring, user. Didn't your fucking parents teach you that? If you don't want to share your shit, write all the fucking code yourself and stop using someone else's.

If you're such a genius that you could never let people discover the secrets of your amazing code surely you don't need other peoples' open source libraries to make your program function.

Fucking magnets, how they work.

Scalar - matrix addition is just adding the scalar to every element of the matrix.
It's fine to learn linear algebra through programming but I found it easier to learn the math first in isolation. Less concerns.

w_[0] is not a scalar though.

Dick Simulator (sperm racing)
Coming soon.