/dpt/ - Daily Programming Thread

What are you working on, /dpt/?

Previously

Other urls found in this thread:

github.com/rust-lang/rust/pull/25640
github.com/rust-lang-deprecated/rust-buildbot/issues/2
github.com/rust-lang/rust/issues/41646
github.com/rust-lang/rust/pull/25585
en.wikipedia.org/wiki/Argumentum_ad_populum
blog.rust-lang.org/2018/02/15/Rust-1.24.html
freebsd.org/internal/code-of-conduct.html
twitter.com/AnonBabble

CoC doesn't affect the quality of Rust as a programming language at all.

>dpt is sperging out over how to write a simple OR function
Jesus fuck, is this what it's like working with other programmers?

But it affects the quality of my experience while using it.

IRL people would just solve the problem as quickly as possible so they can get home to do whatever it is they want to do.

for(int i = 0; i < args.length; ++i)
if(args[i])
return true;

Is this legal syntax? Why do you hate brackets?

Actually, it certainly has the power to bring down discussions related to extending or changing the language. Theoretically, this only affects pull requests to the reference implementation, but community splitting isn't ideal.

It's fine.

I mean I prefer throwing some curly boys in there, but meh. at least it's legible.

Yes it is. You can throw in a bunch of single-statement if-elses and a single-statement else, all without brackets, and it will still work.

So I got accepted for a free bootcamp to get into prog and turn myself into a .net pajeet.
Shit includes:
HTML ( DOM), CSS3, semantic markup, Bootstrap (or Materialize), Javascript + Jquery
Control flow, Events, Validator(Bootstrap), Dynamic components, SQL, MVC, ORM (modelling, OOP intro), Layers, IDE, Debugging, Deployment.
6hs a week from the upcoming Monday to mid May.

What am I in for? Any supplementary resource that you guys can recommend?
I really want/need a job ;_;
btw this is in Argentina so I doubt I can help anyone here to get into this course.

thanks.

There's only one guy sperging about it, and he's clearly a mental cripple.

Trying to combine refinement types with mutation without resorting to special rely-guarantee reference types. Basically, I need to add binary relations between "before" and "after" values to the refinements, which already include unary relations (predicates) over "current" values. Would it be too offensive if it looked like this?
x: T | p(x) && r(before(x), after(x))

Bikeshedding is appreciated. Symbols instead of "before" and "after", maybe?

>Trying to combine refinement types with mutation without resorting to special rely-guarantee reference types
Why, though? Do you even have a girlfriend?

>without resorting to special rely-guarantee reference types.
Why though?
No one wants to write shit like that in any language.

Note that you would be able to do something like this:
prop monotonic(i: Int) = before(i) = the last observed value. You could then implement a (probably or mostly automatically) verified, lock-free channel using types depending on counters to track the producer and consumer ends.

*I* want to write shit like that, and maybe others do, too.

How can I jquery based on multiple criteria?

Sample

id
name
time
condition


None of the td's have a class name

I want to change css based on time value, and if second condition is a particular string value


Came up with
$("td:nth-of-type(5):contains('Dog')").parent ().css("background","red");


But I dont know dates in javascript too well and I imagine since it's printed as 00:10:00 it'll be interpreted as a string.

I just realized that I would require the relation to be a partial order (to account for non-deterministic thread interleaving). Maybe that's a clue.

hello friend.
Webshit should be posted here

thanks friend.
I figured userscript based crap would fit. Will post there.

If behaving like a decent human being affects your experience so hard, then you should maybe consider killing yourself.

This. Rust is a fine language. There are very smart people working on it, and very smart people using it as well.
Even if the CoC were a bad thing, it shouldn't affect anyone's decision to use it.

>CoC doesn't affect the quality of Rust as a programming language at all.
Of course not. What affects the quality of Rust is the common factor of being conceived and maintained by autistic numales who live to shove their retarded opinions down other peoples' throat. The CoC simply reflects that in a more overt way than the language.

github.com/rust-lang/rust/pull/25640
github.com/rust-lang-deprecated/rust-buildbot/issues/2
github.com/rust-lang/rust/issues/41646
github.com/rust-lang/rust/pull/25585

What do you think is bad about Rust?

>What do you think is bad about Rust?
There's just nothing good about it. Every feature ranges from mediocre to retarded. Its idioms are verbose and obnoxious, and its philosophy is pure autism.

Being a decent human being isn't just an "opinion", m8.

>Being a decent human being isn't just an "opinion", m8.
Like clockwork...

Being in favour of homsexuality and transexualism makes you not just a bad person, but an awful person.

What's up with this recent trend of software devs thinking that it's legal to force people into waiving their rights in order to use some kind of platform? Imagine if you couldn't purchase food at Whole Foods because you sent someone a virtual hug while you were in Wal-Mart. It's the same logic, and these types of people can be sued, or if they themselves can't be sued, these "codes of conduct breaches" would not hold up as legitimate torts /contracts in court. Absolutely mind boggling how these people have no concept of contract / tort law, and I'm not even in the legal field. This is the contract/tort equivalent of sovereign citizens

>haha g-guys rust is ridiculous, j-just look at the appearance of their developers h-heh...
Mocking people based on their appearance makes you a literal child. Grow up.

>What's up with this recent trend of software devs thinking that it's legal to force people into waiving their rights in order to use some kind of platform?
Participating in a community and receiving some service is not a "right".

󠇦 󠇦 󠇦 󠇦E
E D G E
󠇦 󠇦 󠇦 󠇦G
󠇦 󠇦 󠇦 󠇦E

>Mocking people based on their appearance
That's not even the point, user. It's just ironic how you attempt to "refute" my post by literally confirming the observation it outlines.

>Webshit should be posted here
>this thread is for circle jerk only!

It is though. If you don't like that, make your own thread. Faggot.

How is that edgy? Are you a 12 year old girl who's just got out of social science class in some American uni? The majority of the world would agree with me.

en.wikipedia.org/wiki/Argumentum_ad_populum

You don't seem to understand how rights work. In my post, I'm not concluding that there is a positive right to participate in a particular community (although some would argue that it is against the 5th & 14th amendments to exclude people from the first amendment right of freedom of association, funny enough this being the argument that prohibits privately owned banks from racially discriminating in housing loans, I am concluding that if such participation removes rights that are protected by the government, namely the right to free speech, that the individuals who try to enforce these codes may be open for criminal liability, if we take the interpretation of the constitution to be that the government ought to actively protect rights through use of force and law against private entities who try to take away rights (this being the argument of civil rights advocates and a rather authoritarian interpretation of the government, as started by individuals such as Lincoln) rather than merely not jeopardizing those rights (the more archaic view of government)

We have a whole general for it, and they could use the new users anyway.

>The majority of the world would agree with me.
The majority of the world consists of low-IQ shitskins, so I find it funny you would make that "argument".

>github.com/rust-lang/rust/pull/25640
PR wasn't made by someone on the Rust team. PR was rejected either way. And the example isn't even in the docs anymore.

>github.com/rust-lang-deprecated/rust-buildbot/issues/2
Someone random made a suggestion and was promptly ignored.

>github.com/rust-lang/rust/issues/41646
Discussion led nowhere. And judging from comments, the reaction to it was mostly negative.

>github.com/rust-lang/rust/pull/25585
That's is a valid point. Also, see the PR 25640.

It seems to me that you have a childish grudge against some of the people who post on the Rust GitHub page. How is that detrimental to the quality of the language itself is unclear, do you mind clarifying your point?

>Its idioms are verbose and obnoxious
I would like to see how you would solve what Rust is trying to solve, while being less verbose and obnoxious.

>the most fervently pro-homosexual states are democratic states, aka argumentum-ad-populum states

>In my post, I'm not concluding that there is a positive right to participate in a particular community
Then what's the point of your post? Is anyone holding you at gunpoint forcing you to forfeit your rights? Blackmailing you? Threatening you in some way? No? Then nobody is "forcing" you to do anything. If you don't agree to the terms, you don't get the service, and that's it. No rights are being violated.

It actually is. It all revolves around on the collective definition of what constitutes a "decent human being", and is not based on any objective truth.

...

obvious bait

It is interesting that you said "participating in a community and receiving some service is not a 'right'". If we just take this without the context, you're completely wrong. The first amendment was drafted in particular for the right for freedom of association to exist. Take the case of the many fraternal organizations that existed during the revolutionary war, most of those organizations were outlawed by the King of England to prevent the revolutionary war from occuring. Hence, the government (and, abridged after the civil war and increasing authoritarian government power, private groups), cannot deprive you of the right to associate with whatever group you would like to associate with, at least in the United States.

>I would like to see how you would solve what Rust is trying to solve, while being less verbose and obnoxious.
Nice arbitrary goalpost you're setting there, but it doesn't refute anything I said. I don't care about solving exactly what Rust is trying to "solve" under the same self-imposed constraints, and Rust doesn't solve anything I actually care about.

It seems to me that you have a childish grudge against some of the people who post on the Rust GitHub page. How is that detrimental to the quality of the language itself is unclear, do you mind clarifying your point?

Also, do you have a sense of humor?

The use of force isn't necessary to deprive someone of rights. Is a bank using force when it refuses to loan a black person a mortgage based upon their skin color only? No, but the penalty for that kind of behavior can be greater than someone who uses force or threat of force to commit a crime

>the government (and, abridged after the civil war and increasing authoritarian government power, private groups), cannot deprive you of the right to associate with whatever group you would like to associate with, at least in the United States.
Nobody is depriving you of the right to associate with anyone. The group you want to associate with simply doesn't want to associate with you.

Rust 1.24 has incremental compilation now!

blog.rust-lang.org/2018/02/15/Rust-1.24.html

>rust programs can now gradually tansition into executables

>Is a bank using force when it refuses to loan a black person a mortgage based upon their skin color only?
No.
>No, but the penalty for that kind of behavior can be greater than someone who uses force or threat of force to commit a crime
I don't give a fuck about the US and its laws. As far as I'm concerned, a bank is fully within its right to refuse to give loan to anyone, for any reason.

Yes, this is exactly the point I'm trying to make. Many government institutions and workplaces, as well as increasingly private associations, are BY LAW, expressively prohibited from not associating with people without due process of law. In legal theory, the KKK BY LAW is not permitted to disallow a black, agendered transsexual from joining their association, unless said person is disallowed as a result of DUE PROCESS OF LAW

If the CoC makes you feel like you're not welcome, it's working. Just saying. Don't sperg out on the GitHub issues because someone is being progressive. If they're potentially getting in the way of actual technical discussion (e.g. a perpetually offended trannykin disputing a pull request), be the better man and logically attack their arguments.

>In legal theory, the KKK BY LAW is not permitted to disallow a black, agendered transsexual from joining their association, unless said person is disallowed as a result of DUE PROCESS OF LAW
Again, I don't give a fuck about your ridiculous laws. As far as I'm concerned, any group is fully within its rights to reject you from its ranks for any reason.

It depends, then, if the Rust community can be considered a workplace or club or whatever that "private association" weasel phrase suggests.

That's great, and I'm not sure I disagree with you - I'm playing the devil's advocate. However, it doesn't really matter what you or I think. The law is the law, and the position that the government takes towards these kinds of things ultimately is backed up by immense force and power. An army, coastgaurd, FBI, justice system, federal reserve system, etc, etc. So, if you live in the US like a decent percentage of the users of this software, you may want to care about making people sign contracts that stand on iffy tort / contractual ground.

the CoC is reaching other projects too

freebsd.org/internal/code-of-conduct.html

This.
Can we move to a more worthwhile discussion now?

My suggestion still applies.

The supreme irony is that this prohibition on rejection from groups based upon their standards stems from leftist, authoritarian legal precedent.

Did you even read what he wrote?

get out of here with your logic

>The law is the law, and the position that the government takes towards these kinds of things ultimately is backed up by immense force and power
It's arbitrary tyranny maintained by force, with zero moral legitimacy, so people should (and do) violate these laws whenever they can get away with it. What are you even arguing? That the anti-discrimination laws which apply to various institutions should also apply to private individuals managing their own private communities? You're saying you'd be happier if the scope of government overreach was increase by several orders of magnitude just to get back at some faggots on the internet? Do you suffer from some kind of brain damage?

>You're saying you'd be happier if the scope of government overreach was increase by several orders of magnitude just to get back at some faggots on the internet?
It's a sad fact that these people actually exist.

Is Python a useful language to learn? I only know one HTML code.

If you actually think that the scope of government overreach needs to be increased by several orders of magnitude to do what I'm describing then you're wrong. It's already here. Thank 9/11 and the patriot act, along with global FACTA, etc, etc. No matter where you are, the US government can and is monitoring you. I'm on your side, but you don't seem to understand that the way things work =/ reality

the way things should work*

depends what you want to do.
Python is a glue/hack-together language.

We're not arguing about what the current state of reality is, we're arguing about what we think the state of reality should be.

>If you actually think that the scope of government overreach needs to be increased by several orders of magnitude to do what I'm describing then you're wrong
I'm saying that if the government starts actually doing what you're saying it legally can, government overreach will be increased by several orders of magnitude. I don't know if you're right or wrong in claiming it, but what's fucking bizarre is that you seem to be looking forward to it.

No one asked for the American opinion.

>How about "gun" and "shovel"?
>"You see in this world there's two kinds of people, my friend. Those with loaded guns, and those who dig. You dig."
I can get behind this actually.

What is this gutter level philosophy?

The government started doing this a long time ago. What I’m saying isn’t my own ideas

whatever you say, these issues have existed and show how lunatic the rust community is.

>Someone random made a suggestion and was promptly ignored.
It wasn't actually ignored, it was just unfeasible for Rust because it was buildbot that used it. Apparently someone paid like $10k for buildbot to change the notation.

>The government started doing this a long time ago
Can you give me examples of privately organized communities being forced to accept members they didn't want?

What is a privately organized community?

What are you talking about?
It's a movie quote.

I hate how more and more nu-male redditors are infecting Sup Forums.

>github.com/rust-lang/rust/pull/25640
>steveklabnik
>So, what I suggest is this:
>Leave Hoare in.
>Change all pronouns to they, and use [they] in the quotation.
>Swap Spinoza for Judith Butler.
SPINOZA FOR JUDITH FUCKING BUTLER

That whole comment chain... is Rust a containment language?

You mean people who didn't come here during the 2016 elections like proper Sup Forums patrons did?
Really just fuck off if you find this offensive.

Someone makes a step into the right direction and you are mad 'bout it?

At least here you can have an open discussion.

What are you even talking about?

>What is a privately organized community?
Here we go with the sheer autism... Tell me, user, when was the last time you had to register your "organization" with the government when you opened some discussion group, or a local poetry-reading club, or an open source project, or got together with a bunch of friends, or whatever the fuck. Are you telling me all of that is regulated by the US government? So if I, as a literal kike, get banned from Sup Forums (which never happened, you guys are so tolerant!), can I sue chinkmoot for discrimination?

Python has a time and place. Usually tasks or one off stuff. No boilerplate, powerful standard methods/libraries, very small code.

All residential neighborhoods
All schools
All workplaces
All rotary clubs
Most fraternities but not the Freemasons

I'm not him. I'm curious what a privately organized community is.

You don’t register with the government because the creation of an organization cannot be regulated by the government. But if a private person petitions the government against a private group, then the government can regulate. There has to be an actual proven deprivation of rights (aka due process of law) proven to the court for the government to regulate an association

>I'm not him. I'm curious what a privately organized community is.
not him but Scientology? Freemasonry?

Analysing an intelligently designed signal from space.

The hardest part is ruling out literally everything else...

>All residential neighborhoods
>All schools
>All rotary clubs
Those are publicly-funded.

>All workplaces
Those have been heavily regulated for ages in all aspects.

>Most fraternities
Again, universities are publicly-funded. Can you give me examples more relevant to what we were actually talking about?

If aliens were transmitting using some hefty crytpo, would we be able to discern it from noise?

Could I tell the difference between a SHA-256 stream and random output?

Refuse to talk to poster: 64781727

Reason: Retarded

Are you sure you would like to list the reason 'Retarded' this appears to be discrimination due to a health handicap or physical disability. If you list the reason 'Retarded' you may be fined or penalized.

Yes/No

Yes.

Reason for override: User is so retarded, that I accept all fines and penalties and die happy and fulfilled in life, for paying them.

I don’t understand why you think that a private university or a privately developed, maintained, and owned gated community is publicly funded. Legally, both of those institutions are considered private and if you were to for example file suit against those two things you would not be filing a lawsuit against the government. If you sue a state university you are suing the government, and a lawsuit against a government entity is an entirely different beast than a lawsuit against a private entity, because you currently have more rights when dealing with the government than you do against a private individual or association

>I'm curious what a privately organized community is.
A bunch of private individuals getting together for whatever purpose, without being regulated or having to register in any form. This includes most things, excluding publicly funded organizations and businesses.

>t. black man who didn't get his loan