/dpt/ - Daily Programming Thread

What are you working on, Sup Forums?

Old thread:

Other urls found in this thread:

iso.org/ics/35.060/x/
youtube.com/watch?v=i93d1QfTOK4
youtube.com/watch?v=qz_8C1zqxn4
youtube.com/watch?v=_IJvFHvc-h8
youtube.com/watch?v=5Par5zpjiFQ
youtube.com/watch?v=DFUaWe56eYw
youtube.com/watch?v=6jyMX3-au5c
discord.gg/csEwM
twitter.com/NSFWRedditGif

...

Probability of Python 3 becoming an ISO standard?
>many supported platforms
>widely used and deployed
>multiple major implementations (CPython, IronPython, Jython and PyPy)
>multiple cpython variants
>multiple sub-set implementations (Brython, CLPython, HotPy, pyjs, PyMite, pyvm, RapydScript, SNAPy, tinypy)
>multiple implementations in progress (Berp, phpython, Pyjaco, Pystacho, pyvm2, Skulpt, Typhon)
>shitload of libraries and frameworks
>many working products made

Please post a _cute_ anime image next time.

if you don't love lain then you shouldn't be on Sup Forums

What's the benefits tho?

Lain is fucking garbage. Piss off with your forced meme.

...

Why don't PCs have the ability to fully render code in 3D Space?

Trials Fusion absolutely nailed this, and taught me more about the basics of programming than any text could have.

>t. trapposter

Why not 4D?

Languages without a respectable authority standard will die in the long term.

Because it's inconvenient to program on a fucking 2D monitor in a 3D space. Well done writing that ten line program in the screenshot.

And by respectable authority I mean ISO/ANSI/IEC/POSIX.

Non-textual representations of code fall apart and become stupidly hard to navigate once you get past trivial programs.

How does thinking lain is not cute imply that I'm some of those filthy degenerates?
I normally post the Yuki flipping image.
I've never even bothered to watch lain. I just call it shit to trigger you fags.

Everything will die in the long term.

No user, you're talking about the very long term, not about the long term.

iso.org/ics/35.060/x/
Some languages died already, yet they had ISO standard

"Implementation is the standard" is better than design by committee IMO.
>will die in the long term
No? Java, Python, PHP, Perl, Ruby and VB aren't standardized and they all are alive languages from TIOBE's top 10 with long histories behind them.

Well, they can be resurrected.

They would be safer with a commitee standard though.

cont.
As a counter example, language like Forth, Common Lisp, Smalltalk and Pascal has been standardized, yet are virtually dead nowadays.

Long term is the very long term.

>>They would be safer with a commitee standard though.
Someone get this hothead outta here.

#include
#include

const double table[] = {
.00, .01, .01, .02, .02, .03,
.03, .03, .04, .04, .04, .05,
.06, .06, .07, .08, .09, .10,
.11, .13, .14, .16, .18, .20,
.23, .25, .29, .32, .36, .40,
.45, .51, .57, .64, .72, .81,
.91, 1.02, 1.14, 1.28, 1.44, 1.61,
1.81, 2.03, 2.28, 2.56, 2.87, 3.23,
3.62, 4.06, 4.56, 5.12, 5.75, 6.45,
7.24, 8.13, 9.12, 10.24, 11.49, 12.90,
14.48, 16.25, 18.25, 20.48 };
const unsigned tablen = sizeof(table) / sizeof(table[0]);

double expt(double t, double x) {
return (pow(t, x) - 1) / (t - 1);
}

int main() {
double min = 500;
double maj = 5000;
double a = (maj + min) / 2;

double y = table[tablen - 1];
double n = tablen - 1;

unsigned itermax = 1000;
for (unsigned iter = 1; iter

> They would be safer
What does this even mean? A committee can't force anyone to use the language it maintains, and the success record of the committee-maintained languages is mixed at best.

I disagree. Being able to see everything on the screen and how they're connected works a treat. You even get to see visual representations of the impulses being triggered.

youtube.com/watch?v=i93d1QfTOK4

youtube.com/watch?v=qz_8C1zqxn4

youtube.com/watch?v=_IJvFHvc-h8

youtube.com/watch?v=5Par5zpjiFQ

youtube.com/watch?v=DFUaWe56eYw

youtube.com/watch?v=6jyMX3-au5c

Even if it's not your personal cup of tea, you can't deny it's an excellent way of visually showing how programming works, at very least on a basic level.

> const unsigned tablen = sizeof(table) / sizeof(table[0]);
The type of `sizeof` is `size_t`, not `unsigned`.

Can we all agree Lain programs in C?

No, because she programs in Lisp.

If you're a baby who needs visual effects to keep his attention when learning programming, maybe.
For productive work, this is worthless.

>he hasn't watched the show

why do we even need signed ints
is there ever a time where you cant just change your function slightly and do without them
there isnt even such thing as a negative number

Common Lisp is the hackiest language

Balance can't be negative? Nice!

ISO is the reason why C++ is worse than it could've been.

What is it about the word 'learning' you're too stupid to understand?

ISO is the reason why we have C++ and not C++/MS, C++/GNU, C++/Intel, C++/Apple, etc.

That is still nowhere near the level of "real" software and programming.
Scale that up to the equivalent of 50,000 lines of code (what would be considered a "medium" sized program), and tell me how it works then.

Yes it can't, it's called overdraft, not negative balance.

>C++/MS, C++/GNU, C++/Intel, C++/Apple, etc.
You DO have that, though. In fact, it's far worse than that.
There are literally thousands of different versions of C++.

I did use the word learning in correct context in my reply. Baby.

rewrite that in a decent language with good libraries and it'd be 10k

How the fuck am I supposed to make a kernel with this trash?

Wow, that is a really fucking stupid statement.
There is literally no context for what I said about the 50,000 lines of code.

For BASIC programming.

>6.
> a figure representing the difference between credits and debits in an account; the amount of money held in an account.
When credits are greater than debits, balance is negative.

>You DO have that, though. In fact, it's far worse than that.
No, it's not? Practically any major C++ project, like Qt or Chrome, can be compiled with any standard-compliant C++ compiler with minor to no changes.
> literally thousands of different versions of C++
What?

so you're saying its the difference between two numbers
.... which is a positive int

We have that. They are incompatible between each other. Both at source code level and at binary level, even for same platform.

You're saying that owing 1000 dollars and being owed 1000 dollars results in the same balance value - one thousand.

yes the value of money is 1000 for each

debt is a capitalist structure

That is incorrect.

>What?
Literally every psychopath (i.e. sepplesfag) has their own "C++", with whatever different shit they've picked and excluded.
You can take the ""C++"" written by one """C++""" programmer, and how it to a different """"C++"""" programmer, and they will be completely unfamiliar with it.
That's why there are literally thousands of different versions of C++.

>They are incompatible between each other.
They all are compatible with each other as far as the standard goes, ABI incompatibility is not a language issue.

1. '-' isn't a digit so you cant use it as part of a number
2, you cant have negative distance to somethinng dumb dumb
3. balanceis caculatted as the distance between two numbers, which is a positive value

negative values do not exist

Fuck even is this?
These videos are boring as hell.

Yup, definitely Lisp.

Kinda want to learn that, now, desu.


BTW, if anyone is interested in a Sup Forums Server on Discord, we got one over here:
discord.gg/csEwM

Global type of Sup Forums for programming, machines, game creation, Science and Maths, etc. And, ofc, chatbot programming

>with minor changes
Well done admitting there actually are different incompatible vendor-specific versions of C++.

>They all are compatible with each other as far as the standard goes
And this is irrelevant, because people do use non-standard features.

You're confusing distance and difference. You're actually just a very confused person. This is my last reply to you.

im right
dont reply

Committee denies it. The embedded community has been asking for the standard to give us a method for constraining the feature set for years now.
I doubt the committee would like to add something like this to the spec (despite them bloating it with abandon) just because it'd make what you describe plainly obvious. It'd be problematic from a PR perspective. Right now people blame each other for writing 'wrong C++'.
If you let the language exclude features or styles you'd shift the blame to the language because it's so unwieldy.

lol, no. Commitees are actually the worst. They restrict the development of a language because any new features in a language require that a committee come to delegate and decide new features. Then each member of the committee want to put their own favorite features into the language and you get a cluster fuck up of a language that is basically inconsistent. See C++ and how messy the language is and how long it takes to change any shit in the language. Especially when you have corporations on the committee who don't want to break backwards compatibility with their product and will push to have dumb shit still in the language. Languages are much better designed by a single person or small group of people because then the language has direction and can remain consistent and not have dumb shit tacked on. Though its too late for Python anyway because Python is already a hacked together language which I don't particularly like.

>proprietary software
Trash
Call me when you'll have FOSS solution.

This is a meaningless remark, we are talking about implementations, not about styles, it's still the same language whatever you use spaces or tabs.
>And this is irrelevant, because people do use non-standard features.
Yet every major C++ project can be built with any modern C++ compiler tho, you can use any C++ book with any modern C++ compiler, most of the libraries work with any modern compiler. For some reason, you keep ignoring the reality out there.

Well, it's free as in free beer.
And there are plugins, so it's kinda free as in Free Speech

#include

int main(){

int c = 5, d;
d = ++c + ++c + ++c + ++c + ++c + ++c + ++c + ++c + ++c + ++c + ++c + ++c;

printf("%d\n", d);

return 0;

}


How much is d?

>Yet every major C++ project can be built with any modern C++ compiler tho
Yes, and they have people dedicated to ensuring that their projects can be built with those compilers. Your point?

UB lol

d is free

> Your point?
Ok, whatever, this is going nowhere.

It's >= c.

(defvar d
(let* ((c 5))
(+ (incf c) (incf c) (incf c) (incf c) (incf c) (incf c)
(incf c) (incf c) (incf c) (incf c) (incf c) (incf c))))

(format t "~A~%" d)
How much is d?

...

False

The only C++ that should exist is C++/Stroustrup
Seriously, C++ would be so much better if the committee bothered to actually fucking listen to him.

Read the right books, user.

This is a really shitty maymay.

t. underage.

>They restrict the development of a language
>Though its too late for Python anyway because Python is already a hacked together language
Wouldn't this protect Python from more shit added, or at least slow that process down?

PROGRAM EUCLID
PRINT *, 'A?'
READ *, NA
IF (NA.LE.0) THEN
PRINT *, 'A must be a positive integer.'
STOP
END IF
PRINT *, 'B?'
READ *, NB
IF (NB.LE.0) THEN
PRINT *, 'B must be a positive integer.'
STOP
END IF
PRINT *, 'The GCD of', NA, ' and', NB, ' is', NGCD(NA, NB), '.'
STOP
END

FUNCTION NGCD(NA, NB)
IA = NA
IB = NB
1 IF (IB.NE.0) THEN
ITEMP = IA
IA = IB
IB = MOD(ITEMP, IB)
GOTO 1
END IF
NGCD = IA
RETURN
END

Really? How so, I don't exactly follow C++ internal politics.

How bad is it that my html parser or whatever the term is, is O(kn) where k > 1 ?? I have to iterate through the damn webpage multiple times.

No, what do you mean? You can't fix a fucked up language with a committee, a committee can only make it worse. I mean, Python 3 is fucked because people still live in Python 2 land and standardizing the language isn't going to make them switch. Also, not having a committee means you can change the language much easier because you just change the implementation, see Ruby. Ruby implements changes to the language, but they don't split because nobody bothers supporting the old shit, which they would if the language was standardized. Standardizing Python which just create a further split in an already fractured community. Also, Python is on its way out in popularity outside of the scientific community and is getting replaced by Go in a lot of cases.

Incorrect. You suck balls.

>and is getting replaced by Go in a lot of cases.
I don't know whether to cheer or cry.

>c++17
>most codecvt stuff got deprecated
What the hell replaces std::wbuffer_convert?

Yeah, just like C can be "portable". For some reason you will get fuck wits who program outside a standard and use not standard features for convenience.

What kind of moonlanguage is that? Learn a real language, faggot.

>No, what do you mean? You can't fix a fucked up language with a committee
You can slow down the language getting even more fucked up.

Also, a language that breaks backward compatibility with the predecessor, however small that change would be, is a new language.

>doesnt know lisp
You're a fucking idiot.

That's not a language. That's a family of languages.

the l stands for language

You got it backwards I think..?

BTW totoro was one of the most disturbing movies ever..

> For some reason you will get fuck wits who program outside a standard and use not standard features for convenience.
This is the reason the kernel can only be compiled with gcc. Say that you want about Linus, but not insisting on compiler portability from the start was a huge mistake.

GUYS STOP ARGUING ABOUT WHICH LANGUAGE IS THE BEST AND ANSWER MY FUCKING QUESTION

ANY LANGUAGE IS BETTER THAN ANY OTHER LANGUAGE DEPENDING ON THE FUCKING USER SHUT THE FUCK UP

no, l stands for list in list processing

I only know he's been trying to add Concepts to the standard since ~2009.

Are there any intelligent people here?

I can live without Concepts. I can't live without modules or UFCS.

no its not and your a retard for believing that