/dpt/ - Daily Programming Thread

What are you working on, Sup Forums?

Old thread:

Other urls found in this thread:

mono-project.com/docs/about-mono/languages/csharp/
sourcemaking.com/antipatterns
en.wikipedia.org/wiki/Lexicographical_order
twitter.com/NSFWRedditVideo

good thread

FUCK OFF WITH YOUR ANIME SHIT!

LEGIT THREAD: >LEGIT THREAD:
LEGIT THREAD: >LEGIT THREAD:
LEGIT THREAD: >LEGIT THREAD:
LEGIT THREAD: >LEGIT THREAD:

Your thread was created later, though

So, what's a good OOP language, considering C++ is shit?

And don't give me the "OOP is bad" shit since it's impossible to work on the industry these days without having to use OOP.

C#

C++ is the best language for OOP, period.

Depends on what you're doing.

Python is good, I tgink, in terms of OOP, since it treats everything as objects.

There isn't a language as feature-rich and mature as C++ to do OOP.
It's not really a debate.

Isn't Pascal dead?

Smalltalk duh.

It's an anime site. Go to Reddit.

Fuck off, this one was poster before the other.

C++ seems to be a multiparadigm language lately.

>C++ is the best language

You could have stopped the sentence there

OOP is just a set of tools to help you arrange your program.

C++ has strengths in specific places (speed), but it is not objectively the best language that facilitates OOP.

Python

"No"

Not everyone wants bloated languages. Not everyone wants OOP.

Its really debatable.

As it should be.
Never said that, and I don't even use C++ anymore.
D's already pretty much there, once we get rid of GC, it'll surpass it.

I'm getting major deja vu right now.

The original question was specifically for OOP languages, though.

C#

What's good in D, Andrei?

Definitely C#
Industry corporate enterprise edition

native modules.
no header bullshit.
no bloated STL
MUCH MUCH MUCH better templates.
more powerful range and slice tools.
limited class inheritance.
no preprocessor nonsense.
more flexible constructors.
more powerful and common sense struct tools
the list goes on

DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME DIE ANIME

How can I make C# to get conpiled into native code?
Under Linux, please.

>Industry corporate enterprise edition
>Linux

Choose one.

FLOOD THIS THREAD KILL ANIME FLOOD THIS THREAD KILL ANIME FLOOD THIS THREAD KILL ANIME FLOOD THIS THREAD KILL ANIME FLOOD THIS THREAD KILL ANIME FLOOD THIS THREAD KILL ANIME FLOOD THIS THREAD KILL ANIME FLOOD THIS THREAD KILL ANIME FLOOD THIS THREAD KILL ANIME FLOOD THIS THREAD KILL ANIME FLOOD THIS THREAD KILL ANIME FLOOD THIS THREAD KILL ANIME FLOOD THIS THREAD KILL ANIME FLOOD THIS THREAD KILL ANIME FLOOD THIS THREAD KILL ANIME FLOOD THIS THREAD KILL ANIME FLOOD THIS THREAD KILL ANIME FLOOD THIS THREAD KILL ANIME FLOOD THIS THREAD KILL ANIME FLOOD THIS THREAD KILL ANIME FLOOD THIS THREAD KILL ANIME FLOOD THIS THREAD KILL ANIME FLOOD THIS THREAD KILL ANIME FLOOD THIS THREAD KILL ANIME FLOOD THIS THREAD KILL ANIME FLOOD THIS THREAD KILL ANIME FLOOD THIS THREAD KILL ANIME FLOOD THIS THREAD KILL ANIME FLOOD THIS THREAD KILL ANIME FLOOD THIS THREAD KILL ANIME FLOOD THIS THREAD KILL ANIME FLOOD THIS THREAD KILL ANIME FLOOD THIS THREAD KILL ANIME FLOOD THIS THREAD KILL ANIME FLOOD THIS THREAD KILL ANIME FLOOD THIS THREAD KILL ANIME FLOOD THIS THREAD KILL ANIME FLOOD THIS THREAD KILL ANIME FLOOD THIS THREAD KILL ANIME FLOOD THIS THREAD KILL ANIME FLOOD THIS THREAD KILL ANIME FLOOD THIS THREAD KILL ANIME FLOOD THIS THREAD KILL ANIME FLOOD THIS THREAD KILL ANIME FLOOD THIS THREAD KILL ANIME FLOOD THIS THREAD KILL ANIME FLOOD THIS THREAD KILL ANIME FLOOD THIS THREAD KILL ANIME FLOOD THIS THREAD KILL ANIME FLOOD THIS THREAD KILL ANIME FLOOD THIS THREAD KILL ANIME FLOOD THIS THREAD KILL ANIME FLOOD THIS THREAD KILL ANIME FLOOD THIS THREAD KILL ANIME FLOOD THIS THREAD KILL ANIME FLOOD THIS THREAD KILL ANIME FLOOD THIS THREAD KILL ANIME FLOOD THIS THREAD KILL ANIME FLOOD THIS THREAD KILL ANIME FLOOD THIS THREAD KILL ANIME FLOOD THIS THREAD KILL ANIME FLOOD THIS THREAD KILL ANIME FLOOD THIS THREAD KILL ANIME FLOOD THIS THREAD KILL ANIME FLOOD THIS THREAD KILL ANIME FLOOD THIS THREAD KILL ANIME FLOOD THIS THREAD KILL ANIME FLOOD THIS THREAD KILL ANIME FLOOD THIS THREAD KILL ANIME

I dunno, man, I tuned a web server under Linux in a big company.

KILL ALL NIGGERS KILL ALL NIGGERS KILL ALL NIGGERS KILL ALL NIGGERS KILL ALL NIGGERS KILL ALL NIGGERS KILL ALL NIGGERS KILL ALL NIGGERS KILL ALL NIGGERS KILL ALL NIGGERS KILL ALL NIGGERS KILL ALL NIGGERS KILL ALL NIGGERS KILL ALL NIGGERS KILL ALL NIGGERS KILL ALL NIGGERS KILL ALL NIGGERS KILL ALL NIGGERS KILL ALL NIGGERS KILL ALL NIGGERS KILL ALL NIGGERS KILL ALL NIGGERS KILL ALL NIGGERS KILL ALL NIGGERS KILL ALL NIGGERS KILL ALL NIGGERS KILL ALL NIGGERS KILL ALL NIGGERS KILL ALL NIGGERS KILL ALL NIGGERS KILL ALL NIGGERS KILL ALL NIGGERS KILL ALL NIGGERS KILL ALL NIGGERS KILL ALL NIGGERS KILL ALL NIGGERS KILL ALL NIGGERS KILL ALL NIGGERS KILL ALL NIGGERS KILL ALL NIGGERS KILL ALL NIGGERS KILL ALL NIGGERS KILL ALL NIGGERS KILL ALL NIGGERS KILL ALL NIGGERS KILL ALL NIGGERS KILL ALL NIGGERS KILL ALL NIGGERS KILL ALL NIGGERS KILL ALL NIGGERS KILL ALL NIGGERS KILL ALL NIGGERS KILL ALL NIGGERS KILL ALL NIGGERS KILL ALL NIGGERS KILL ALL NIGGERS KILL ALL NIGGERS KILL ALL NIGGERS KILL ALL NIGGERS KILL ALL NIGGERS KILL ALL NIGGERS KILL ALL NIGGERS KILL ALL NIGGERS KILL ALL NIGGERS KILL ALL NIGGERS KILL ALL NIGGERS KILL ALL NIGGERS KILL ALL NIGGERS KILL ALL NIGGERS KILL ALL NIGGERS KILL ALL NIGGERS KILL ALL NIGGERS KILL ALL NIGGERS KILL ALL NIGGERS KILL ALL NIGGERS KILL ALL NIGGERS KILL ALL NIGGERS KILL ALL NIGGERS KILL ALL NIGGERS KILL ALL NIGGERS KILL ALL NIGGERS KILL ALL NIGGERS KILL ALL NIGGERS KILL ALL NIGGERS KILL ALL NIGGERS KILL ALL NIGGERS KILL ALL NIGGERS KILL ALL NIGGERS KILL ALL NIGGERS KILL ALL NIGGERS KILL ALL NIGGERS KILL ALL NIGGERS KILL ALL NIGGERS KILL ALL NIGGERS KILL ALL NIGGERS KILL ALL NIGGERS KILL ALL NIGGERS KILL ALL NIGGERS KILL ALL NIGGERS KILL ALL NIGGERS KILL ALL NIGGERS KILL ALL NIGGERS KILL ALL NIGGERS KILL ALL NIGGERS KILL ALL NIGGERS KILL ALL NIGGERS KILL ALL NIGGERS KILL ALL NIGGERS KILL ALL NIGGERS KILL ALL NIGGERS KILL ALL NIGGERS KILL ALL NIGGERS KILL ALL NIGGERS KILL ALL NIGGERS KILL ALL NIGGERS KILL ALL NIGGERS KILL ALL NIGGERS KILL ALL

If you're developing an application, it's under Windows.

OK, what if I don't want C# Industry corporate enterprise edition?

mono-project.com/docs/about-mono/languages/csharp/
Try this?

Don't use it.
It's just the current meme.

Does the language still only offer convenience for those who use the GC?

Pascal-posters confirmed anti-anime?

>no functional programmers late threads
Did they die out?

I'm learning Java through Codecademy and I'm finding that I waste a lot of time wondering about the true purpose of all these new concepts being thrown at me. Is this normal or brain problems? Do I just continue anyway hoping that it'll come together on its own?

They finally realized that functional programming is a useful tool to have but awful to actually write entire non-trivial software in. They then chose to end their lives out of shame.

It's not GC favor'd if that's what you're implying, just a big mistake they're fixing.

Why is assembly the most disgusting of the 3 in that image?

Sad.
I was legitimately amused by "In Haskell, it's just X" posts.

user I'm saying that I want to do MMM and doing auto newString=myString[0..$-1] implies GC afaik. I can't tell it to use my memory management system in some way right? Because if I can't then I can't use this nice syntax anymore. And I drop down to something far more similar to C or C++.

To be clear I'm not pooping on D. It's just that it's not as nice as I'd like it to be I think.
Go back to spamming?

>MMM
Manual memory management?

Assembly is the most pure language of all time hence why it's portrayed by 2D.

Yes. It's fairly obvious from context.

What concepts are you talking about? It take a while and some experience to understand why people came up with these features and concepts.

>2D
>pure
HAHAHAHAHAHAHAHAHAHA

It's normal because they're not intuitively useful at the smaller scales.
I'm not an object oriented programming proponent so I'm bias against it but examine it with a critical eye at least.

>Assembly is the most strongest language of all time
FTFY

I''m having some trouble creating a generator from two other generators in scala. I''m trying to make a monoidal generator, as monoids have this sort of functionality built in but am 'having trouble with the syntax. Any ideas?


class GenMonoid[M >: Monoid[M]] extends Monoid[Gen[M]] {
override def zero: Gen[M] = Gen.const[M](zero)
override def append(f1: Gen[M], f2: => Gen[M]): Gen[M] =
for (
m1

2D females are far more pure than any 3DPD. Even 2D traps are more pure than modern sluts.

I'll look through it, though I thought Microsoft gave more freedom with .NET lstely.

Fixed syntax, sorry.

I'm having some trouble creating a generator from two other generators in scala. I''m trying to make a monoidal generator, as monoids have this sort of functionality built in but am 'having trouble with the syntax. Any ideas?

class GenMonoid[M >: Monoid[M]] extends Monoid[Gen[M]] {
override def zero: Gen[M] = Gen.const[M](zero)
override def append(f1: Gen[M], f2: => Gen[M]): Gen[M] =
for (
m1

Or do I want a Monad here?

auto str = "hello";
auto string2 = str.dup[0..$-1];


No new allocation according to -vgc

You can use Mono or .NET Core

C# works on Linux.

Please tell me more about how good your imaginary cartoons are

Realized that I forgot to mention I'm a complete newbie. My issue applies to all programming taught at Codecademy. Wondering if I should also try Pajeet video tutorials and/or books on the subject

>If you're developing an application, it's under Windows.
>he doesn't know that RHEL is actively supporting and pushing .NET on Linux servers

redhatloves.net

I don't know what your issue is really. A more concrete example would help.
See I think you're asking things like 'why do I ever need an abstract class?' and wonder if it's normal to have these questions.

>60mb binary
hha hahha hhahahahah

>C# works on Linux.
I don't know if Mono is stable enough and can be trusted in terms of running legit C# code.
Does Mono run .NET applications, compiled with MS tools?

Common Lisp CLOS is god-tier.

>Does Mono run .NET applications, compiled with MS tools?
Yes.

Your only issues are going to be some of the newer stuff in ASP.NET if you're doing webdev, IIRC.

>needing to compile against 10 different OSes and distributions

Don't you say I can run Paint.NET under Linux

Forgot to mention, no Microshit. I won't go that low.

>le microshit x---DDDD
*tips*

who /VsVim/ here?

...

Mods got trigger happy lmao.

Java ran even on dumbphones, what makes people claim that it's shit?
I think if I wanted my program to spread as much platforms as possible, I'd go with Java.

There is nothing wrong with the Java language.

The problem is the overabundance of shitty Java programmers turning everything into giant bloated object oriented crapware.

Pajeets do this:

sourcemaking.com/antipatterns

What the FUCK does lexicographically larger mean?
Google doesn't help.

#!/usr/bin/perl
use v5.14;
use strict;

my $ayy;
$ayy = "LMAO";
say $ayy;
for (split (//, $ayy=~s/^.(.*)$/$1/)) {
say $_;
}

I still hope there is a way to change LMAO string into MAO string with a regular expression

no senpai, its just that the runtime is included too

sorted alphabetically.

Example:
> 1,2,3,5,5,6
is greater than
> 1,2,3,3,5,6

So you get rewarded for getting a large point earlier. This means that if you are going up against a very even opponent, you get rewarded for getting a big point in early.

en.wikipedia.org/wiki/Lexicographical_order

got a design question for you lads, ive got a chessboard style pitch that my agents are gonna occupy, should i put the ball on a seperate square to the agent, or should it be on the same square?

It means it treats them like they were strings, even if it's a number.

Do a barrel roll.

...

its a programming question. in my grid representation, should i have the agent having a ball attribute, or should the ball occupy its own square on the pitch?

type Grid = [[Square]]
type Square = [Entity]
data Entity = Ball { ... } | Agent { ... }

sq :: Square
sq = [ Ball { ... }, Agent { ... } ]

>So, what's a good OOP language, considering C++ is shit?
C++

but why?

you've hardly described anything and that's the most flexible

I'm trying to come up with a palette for a fictional graphics device(i'm just thinking about stealing the default vga palette).

basically ive got a football sim on a pitch shaped chessboard, should the ball entity be a property of the agent posessing it, or should the ball be its own entity on the pitch that a player affects if within range of it?

indexed colors, duh

red, green, blue 1-vit values

type Located a = ((Int, Int), a)
type Team = [Located Agent]
type Board = (Team, Team, Located Ball)

how about you just give me your general approach in english as opposed to some code in an irrelevant syntax?

this is the daily programming thread

yeah, and im writing in prolog

not my problem