/dpt/ — Daily Programming Thread

Previously

Attached: 1525664156583.png (3033x2200, 2.03M)

Other urls found in this thread:

github.com/frol/completely-unscientific-benchmarks
ziglang.org/
dlang.org/spec/function.html#pure-functions
twitter.com/AnonBabble

>reposting the same shitty meme
>it's not anime and is barely programming
0/10 absolute trash

Attached: 15296.png (644x611, 322K)

Attached: 1471995407159.jpg (2048x1536, 1.53M)

I second this.

I third this

I find Javascript and Rust more difficult than C t b h.

>Rust
understandable, it has a bigger difficulty wal up front, but
>Javascript
smth smth neck self

That's because C is completely intuitive. You already knew it before you ever sat down at a computer, just like you already knew the rules of English before you were born and only had to learn the words.

That's because JavaScript is a shitfest of a language and Rust has a sophisticated type system that imposes more constraints on you than C.

Aced Operating Systems at a top 10 university.
I still can't into async programming in JS.

>You already knew it before you ever sat down at a computer, just like you already knew the rules of English before you were born and only had to learn the words.
If that were the case, then "everyone should learn to code" meme would actually be true.

>ADT
Literally Algebraic!T
>Runtime generics
Expensive, I prefer compile time generics, which both C++ and D focuses on

Well, it isn't true. Most people don't have the talent to code. You can tell because they don't already know C.

Daily reminder that the final solution to politics, sociology, and economics is a non intelligent computer overlord.

The lead programmer has to be someone who almost everyone in the world can agree is a good person.

The software will have to be able to conduct international trade, regulate domestic trade, counter warfare, uphold law, quell and justly settle internal skirmishes, manage immigration and emigration, provide healthcare, and power itself using the mandatory but well compensated physical labor of the people. This will double as a way to make sure they exercise so that obesity doesn't arise as a problem. Because it's not intelligent and has no emergent properties, and functions entirely within predefined and unchanging bounds, it will be able to do all this with no ulterior motives or conflicts of interest, unlike a fallible human monarch.

It's going to have to have been tested REALLY thoroughly, because after it's deployed, no one will be allowed to modify it. If anyone had admin access to it, that would defeat the whole purpose. Supervised hardware maintenance will of course still be necessary.

>inb4 response containing fedora image

Is this Mr. Robot?
That TV show running gnome?

Attached: tv show running gnome.png (1622x774, 1.38M)

>Supervised hardware maintenance

you'd have to find hardware without built-it backdoors first...
>

Guy from the last thread, so, if I make my fib::Term::Text 'static, it should live throughout the main(), right? Obviously I don't want that.

See the Text should have the same lifetime as i, is it possible to destroy fib::nth(i)?

Attached: DeepinScreenshot_select-area_20180515000827.png (1919x1073, 156K)

say i'm a telemarketer and i need to know what phone numbers are active

what is stopping me from going on whatsapp, programmatically adding every phone number and ordering by last active?

Also should I use std::borrow::Cow more often?

'static means the string you reference lives for the whole runtime of your program. That doesn't mean however that the instances of your enum live as long. They'll get destroyed directly after the call to println!()

>Because it's not intelligent and has no emergent properties, and functions entirely within predefined and unchanging bounds, it will be able to do all this with no ulterior motives or conflicts of interest, unlike a fallible human monarch.
AI doesn't have to be intelligent to fuck up real bad.
>It's going to have to have been tested REALLY thoroughly, because after it's deployed, no one will be allowed to modify it. If anyone had admin access to it, that would defeat the whole purpose. Supervised hardware maintenance will of course still be necessary.
All software has bugs. And with this one, a bug can possibly result in lives, and not just credit card credentials, lost. People will never put up with this idea, simply because they find comfort in thinking that the one who governs them is a human being who understands their concerns, even if they do nothing to uphold them. Then there is the entire issue of how the thing is going to be programmed. The political and social beliefs of the programmer who writes it will influence the way it runs, simply because they will have to make decisions while writing code.

>
go back and learn ML or Haskell

Attached: Dcl2_HdXkAEJeQr.jpg (200x226, 3K)

Anti-bot protection? Although I don't know if whatsapp has anything like that.

>I got owned: the post

do you have the anime version of OP's pic?

Attached: karen.jpg (1280x720, 234K)

Yes, you got owned, now go back and learn ML or Haskell so you can understand what I mean. You obviously don't know what rank-n-types are so you don't understand the NECESSITY of runtime generics, you've no concept of compiler optimisation or of a separate template system for compilation, and you have no idea what convenient syntax is because you use trash like D

>literally just had to type "programming languages as anime girls" into google

Attached: 1413777090510.png (1920x1080, 1.03M)

>I got owned and I got angry: the post
Runtime Generics are indefinately more expensive than Compile time Generics. No ammount of ``compiler optimizations" is going to fix it.
>Hasklel or ML
No wonder your ``compiler optimization" leaves you around 20 times slower than C++/D

I appreciate the fact that ActionScript and JavaScript look like sisters.

>muh kotlin

Attached: Screenshot-2018-5-15 frol completely-unscientific-benchmarks.png (941x2871, 281K)

dude jit lmao

hey look, i have that same filename pic in my pc

Attached: pl_anime.png (664x512, 149K)

>slower than pypy
top kek

>has an entire folder for one type of image
wish i was this organized, i just have random Jow Forums pictures scattered around 4 folders on my pc.

What exactly is being benchmarked there?

most of the pics in that folder are anime girl holding SICP book

github.com/frol/completely-unscientific-benchmarks

>Chad OO Java programmer
>virgin free-function-everywhere Ctard

>Chad OO Java programmer
i'm actually a c# programmer
do i still qualify as a chad programmer?

Attached: komachan_animated.gif (303x307, 1.24M)

>c#
Yea yea, that'd pass off as a java remix or whatever

Utter retard, you don't understand anything and you refuse to learn ML or Haskell. I learned D years ago, it's fucking nothing. I know both and you only know 1. Shut the fuck up and stop pretending you know what you don't.

Aren't Lisp programmers the biggest Chads with SEXpressions and all?

Attached: qRVOZDjBXGHnIVmDYnJ9.jpg (500x367, 19K)

>3 posts in
>not a single argument
Show me where runtime generics are faster than ahead of time, compile time generics
>I know 1
I know many, you fucking asswipe.

You utter fucking baboon, just do your fucking homework and learn one so you actually have a head in the fucking conversation rather than repeating your mindless drivel

>>runtime is a NECESSITY & you can have compile time as an OPTIMISATION in some cases, plus you could have BOTH
>u-uh compile time is faster i dont need runtime lmao

>programming for a year on windows
>shitty small ssd of 250 gigs
>vm debian cause im too cucked to windows
should I just kill myself, dont think I am cut out for programming if I dont even move to fucking linux..

thank you user
not sure which pl is biggest chad, but pretty sure lisp is chad

>allowing your operating system to omit file extensions
why?

Attached: pain.jpg (161x149, 9K)

BTFO swift

what even is a file extension

Attached: we-just-dont-know.gif (500x281, 196K)

just installed win 10 last friday
keep forgetting to enable extension
also forgot showing all hidden files
thanks for reminding me

Attached: file_extension.png (382x475, 17K)

Does anybody have A Tour of C++ 2nd Edition epub/mobi/pdf? I've been look everywhere but couln't find anything...

Attached: 1524715920605.png (500x620, 419K)

>Getting THIS ass flustered that he doesn't have costly abstractions
>Getting THIS ass flustered that he can't argue that ahead of time parametric polymorphism is F A S T E R Than runtime pointer indirected polymorphism
>"u-u can have both"
How about no?

Attached: 1447764789889.png (730x694, 26K)

i program on linux only because of convenience it brings. if you haven't switched in a year, i can see two possible causes:
>you never really tried
or
>you like your windows environment more than linux (though it's hard for someone like me to see why that would be the case)
in either case, windows doesn't somehow "prevent" you from making good software. just learn at your own pace, linux is not necessary, just more convenient for most people.

The part of the filename that comes after the last dot. If there is no dot in the filename, the file has no extension.

I am irritated by your subhuman level of intellect and apparent incapacity of understanding the problem. Are you of African descent?

Can you do this in D? Put this function inside of a data structure.
id = ΛT. λx:T. x

Not a type application of this function, or a specific instance, I mean the
(parametric) polymorphic function itself.

Thank you for your kind rational response. I guess I am lazy to commit fully to it. I also had trouble resizing my ssd and just gave up in favour of the vm.
I really like codeblocks on linux for example. Its far superior to windows version.

this image made me laugh

>Can you do this in D?
The difference between your "argument" and my point is that D does not provide costly polymorphism
>id = ΛT. λx:T. x
Don't know the syntax and don't care. I only care about performance and performance only. I use D with -betterC flag.

How far below 100 is your IQ? 10? 20? 30? 40?

It's higher than you, stupid screeching faggot. English too hard for you?

Imagine having a language even less expressive than Java, and then defending it.

Define expressive

You can back up your work on your vm, delete the vm, your swap and hibernation file. Then just write the disk to a raw image and compress it for later. You can also allocate about 20GiB for linux. You don't need much. Just use arch. It might be intimidating at first, but you can just follow videos online. Keep in mind if you have a uefi system or not.

Able to do this.
interface Foo { T fun(T t); }

>Use modulo in operation cycle, measure full executable no internal language,no using JHM for java.

D literally supports OOP style inheritance too, so I've no clue what you're bitching about with runtime generics and performance, even ignoring the fact that it's not a fucking dichotomy.

how many layers of public static class { void public static main { is this?

>bashing C#
kek I'm probably making more money than all of your families

I don't use OOP, it's not allowed in betterC
Do you even read?

class Foo { template virtual T fun(T t) = 0; };
What's the problem?

:1:34: error: templates may not be 'virtual'

class Foo { template virtual T fun(T t) = 0; };

^~~~~~~

:1:55: error: templates may not be 'virtual'

class Foo { template virtual T fun(T t) = 0; };

^

Compiler returned: 1

If java is a chad lang, and lisps are chad, would that make clojure an über chad pl?

>C#
>Jobs

Attached: 1522313080301.png (1780x600, 129K)

C has void pointers you brainlet

It is just salt, user.

Daily reminder that C2x will save programming when it comes out.

>he doesnt live in the post file extension epoch

interface Foo(T) { T fun(T t); }


?

Interesting, I didn't know about this.

hello fellow c# coder

Attached: 1522981868742.png (1280x720, 602K)

Wrong, that's equivalent to interface Foo { T fun(T t); }
One specifies that a single method is available, the other specifies that a family of methods is available.

>can't even do this
T fun(T t) {
return new T();
}

you will defend this.

>C2x
vaporware

ziglang.org/

I want to be able to run several instances of my terminal emulator with a keyboard combination.
the sane method would be setting a keyboard shortcut in my desktop environment, but I want to do it myself.
would it be a good way to have a program that acts as a parentprocess to the instances of my terminal, or should I change the terminal code so it is one process where several instances run in their own thread? I would choose the former but I'd like to have some input from my fellow programming enthousiasts!

C is dead
- Not self hosted
- Not backwards compatible
- Dying niche
- No features from this century
- Shit standard library
- No dep management
0/10 utter garbage

No.

>.tar.gz

agree

What python IDE would you guys recommend for beginners?

>- Not self hosted
implementation can be self hosted, has nothing to do with language standard.
>- Not backwards compatible
it is, though.
>- Dying niche
I'm glad I'm not shitty webdev like you.
>- No features from this century
nu-lang developers make shit.
>- Shit standard library
small and simple.
>- No dep management
doesn't belong to language standard.

Have a link for a more in-depth explanation, I've never seen that syntax before and it's hard to google

Oh, we are having a party over here?
Let me in!

Attached: ovogttxdkw8z.jpg (378x485, 29K)

>it is, though.
Both C99 and C11 broke backwards compatibility.
>small and simple.
May for a brainlet for you, otherwise you'd be using C++ anyway.
Quick autism test: do you also like Go?
small and simple.
>- No dep management
>doesn't belong to language standard.
And C belongs to trash

dlang.org/spec/function.html#pure-functions

"""
Pure functions are functions that cannot directly access global or static mutable state. pure guarantees that a pure function call won't access or modify any implicit state in the program.

Unlike other functional programming languages, D's pure functions allow modification of the caller state through their mutable parameters.
"""

top kek

Attached: 1387075708427.jpg (499x497, 47K)

>python
>IDE
>beginner
None, just use vim/emacs, or sublime text/atom if you like onions

>IDE
a text editor is all you need

It is just a generic functions.

i think everyone here know that c is an obsolete programming language.

>Unlike other functional programming languages
>other functional programming languages
Do they actually think that D is a functional programming language?

It's Java.