/dpt/ - Daily Programming Thread:

Anime edition.

Previous thread: What are you working on Sup Forums?

Other urls found in this thread:

dlang.org/comparison.html
dlang.org/phobos/index.html
code.dlang.org
dlang.org/spec/garbage.html
dlang.org/blog/2017/03/20/dont-fear-the-reaper/
dlang.org/blog/2017/04/28/automem-hands-free-raii-for-d/
wiki.dlang.org/Books
next.rikunabi.com/tech/docs/ct_s03600.jsp?p=002412
pastebin.com/BYyMHj7u
youtube.com/watch?v=5BaoQweD8Ss
youtube.com/watch?v=3M9RFtziALc
youtube.com/watch?v=QuncqzGKmxg
pastebin.com/Zj6ENTqS
twitter.com/SFWRedditVideos

install NixOS

Working on a distributed backend infrastructure to mange services related to fetching thigh-highs when I run out.

Threadly reminder that dlang-chan is not dead; she's going to have her GC tumor removed (eventually); she's super duper cute; and she's a blast to write in! Say something nice about her, /dpt/!

>Features
dlang.org/comparison.html
>Standard library
dlang.org/phobos/index.html
>Package manager
code.dlang.org
>GC
dlang.org/spec/garbage.html
dlang.org/blog/2017/03/20/dont-fear-the-reaper/
dlang.org/blog/2017/04/28/automem-hands-free-raii-for-d/
>Books
wiki.dlang.org/Books

senpai will never notice you

What's so great about D compared to rust or c++?

Nothing. It's a useless, dead language.

I can't speak for Rust, but she was developed to be a better C++. And in my opinion, she is. I'd say the only thing I would want from C++ would be RAII, but her GC can be disabled in some areas if you need the performance. Luckily, for regular desktop applications, the GC is fine.
Go take a look at the links in my post. You'll find there's a lot to like. She's a great general purpose systems language.

Stop shitposting, please~

>she is
Lol.

All programming languages are cute girls, you know.
next.rikunabi.com/tech/docs/ct_s03600.jsp?p=002412

There's nothing wrong with C, but C++ isn't "improved C".

>All programming languages are cute girls, you know.
>C++ is the only one with tits
>C++ confirmed for not (girl (male))
and this is why C++ is for plebs

Never said it was, homo.

If C++ was a woman, she would have 5 vaginas. You'd think a woman would only need 1, and that the remaining might just look completely out of place, but I mean... more is always better, right?

Six legs, or five legs arranged radially?

Just exercising my brain with a program for scoring Cribbage hands (though no flushes or nob, since suit isn't taken into account). Trying to figure out how to make the findruns definition less clunky.

pastebin.com/BYyMHj7u

>5 vaginas
No, it would be 5 assholes.

2 legs as normal, but 5 vaginas nonetheless.

rolling, i'm kinda newish to programming btw

>She would have 5 vaginas
No one is forcing you to use them all. Just use the modern subset you retard.

This is literally my fetish. Thank you Borusen

Yes, I can feel it running through me

Reroll because all I got is use git twice with no project

Something about passing templates into and returning them out of a function


template T;

template& func(template& t)
{
// code
return t;
}

template U = func(T);

when I hit ctrl + space in eclipse it shows all the functions and shit of the current class and super class etc. when I click on one of the super functions it will automatically create the whole override stub.
why cant visual studio do that?

>obj*ct
Fuck off.
Thank you for using a Homura image though.

Have 80 percent left on my laptop and notepad with mingw and a java compiler.

What do I spend what time I have left on this laptop doing? I will likely be using my phone once the laptop dies. Sadly, I don't have a charger for either. I will look for one in a bit.Hotel room btw.

in sepples can I only override virtual functions?

...

fuck animu

>in sepples

Who are you replying to? He didn't post a single anime image.

fuck animu

>No anime.
... on an anime site.

you have a very low IQ user.

>this again
ABANDON THREAD

tell me about low iq when you cant even understand the pic

>posting leftist trash
I can't say I'm surprised.
Anime is strictly right wing and you have to leave immediately.

Sorry, posted this in the other thread but it died before I could respond.

Any pointers on how to generate HTML pages with C?

An user suggested using a tree and printing in order: can you elaborate on this? It's not immediately clear to me.

Basically, I'm generating a bunch of images using C and I want to display them in the browser using HTML.

Please take it to the both of you

I don't visit left wing boards since I am loyal to the anime.

Tell me why I should abuse C preprocessor macros to simulate C++ templates.

You shouldn't. C macros are degenerate.

>falls for the jewish ploy of animu
>hurr look at me Im le right wing

Anime is strictly right wing and has always been.
It seems like you have fallen for the MI6 black op propaganda though, since you post leftist trash.

>What are you working on Sup Forums?
Lisp apparently. Decided to give that fancy Structure and Interpretation of Computer Programs book a read, mostly because classes aren't going fast enough for my liking. I like the intro so far.

/dpt/ theme

youtube.com/watch?v=5BaoQweD8Ss

>Doesn't even have the best shibayan song
I'm disappointed.
youtube.com/watch?v=3M9RFtziALc

youtube.com/watch?v=QuncqzGKmxg

I'll play 2hu one day. Maybe.

pastebin.com/Zj6ENTqS

rate my C code from 1 to 10

you can use the program with the following syntax, but it's more difficult to verify the correctness than the interpreter, as it doesn't keep the program code loaded after parsing. Everything evaluates to a lambda and all it will say is
\x x
(\x x \y y)

C is pretty verbose
you should rewrite it in something else

yeah but it's 511 lines, the interpreter also happened to be 255 lines. i just thought it was a nice (almost) coincidence for a couple short fun programs i wrote

think of how short it could be

the point wasn't making it as short as possible

And think of how slow it would be.

It's cute.
Have you written a typechecker in C? I plan to do something similar too, but for a different type of lambda calculus.

you could also try adding simple types and primitives (and fix), though that will limit it

What makes you say that?
Pattern matching in something like Rust shouldn't be any slower than a switch on a tag

A variant/enum should compile to the same code

Rust is quite a verbose language itself.

Yes, but not as verbose as C
I chose Rust because it should compile to mostly the same code

Rust is slower than C, though.

Any language with more that's implicit will be slower in a large program.
This isn't a very large program.

Roll

thank you, that's what i was hoping for.
i haven't done a typechecker yet, but i think that's getting to the point where i'd probably rather do it in another language

yeah, maybe simple integers, addition/subtraction, and i/o. not sure yet

make sure it's pure

that means no i/o right

Purity isn't as important as having no general recursion.

no it means monads

It doesn't though.

>Any language with more that's implicit will be slower in a large program
this isn't true as a general statement. for example, type deduction in a statically typed language (var, auto) is much more implicit, but still altogether static and no slower than explicit type declaration. the compiler already knows the type of any given expression anyway, because it must in order for the program to be well-formed

it means no side effects

>statically typed language
That's redundant. I think you mean "typed language".

don't u mean compile-time typed language

If you don't understand that, maybe you should generate the html with python.

i was differentiating between "statically typed" and "dynamically typed" languages in the context in which those terms are used. i would say dynamically typed languages are "typed" in some sense of the word, though at a different level of abstraction than the one i think you're speaking in the context of

>What are you working on Sup Forums?
Embedding information inside a jpeg

I want to see how far I can take it. So far I've just been embedding "test" inside porn. I'm curious if I can get whole scripts in.

I didn't mention type-checking anywhere in my post.

>i was differentiating between "statically typed" and "dynamically typed" languages
So you were differentiating between something which exists and something which doesn't?
>i would say dynamically typed languages are "typed" in some sense of the word
Assuming "dynamically typed" isn't a self-contradiction, it's obviously "typed".

Oh good, you again.

a program can be well typed without verifying that it is so

Wrong. Programs are just numbers. Numbers have no sense of types. They do not understand what it means to be statically or dynamically type checked. Additionally, numbers are an abstraction, designed by humans to quantify objects found in nature.

i am trying to find out how user input is cached in a browser, on a asp/js website that frequently looses its data when working in a offline mode. this mode should enable the user to input data and upload it later when a connection to the server can be established.
sadly i know jack shit about the website and theres no documentation and noone that knows how it works and now im just scanning trough every js file and decompiled dll to find wtf is going on...

>designed by humans to quantify objects found in nature
Maybe if you're a baby.

Numbers are an artificial construct. Do you think the universe understands what a number is?

bonus points if you're embedding the information such that it can't be detected without the decoding tool or a copy of the unmodified source image for comparison. extra bonus points if the embedded data can survive reencoding

>So you were differentiating between something which exists and something which doesn't?
dynamic typing obviously exists in the context in which the term is used, even if it doesn't satisfy your definition of typing. you're just arguing semantics, and not in any productive way

>Do you think the universe understands what a number is?
"the universe" doesn't understand anything
hippies go homu

When did I ever deny this? Also there must exist at least one program which is well typed, but it's impossible to verify that.

>Programs are just numbers.
Yes, the natural numbers are a type.
>They do not understand what it means to be statically or dynamically type checked
I never mentioned type-checking in my posts.
>"""abstraction"""
I don't recognize this as a valid word.

>Do you think the universe understands what a number is?
What does it mean for a ""universe"" to ""understand"" something? What sort of retardation is this?

>even if it doesn't satisfy your definition of typing
Something which doesn't exist can satisfy any definition of anything for all I care, it's just irrelevant.

Did humans invent numbers or did they discover them? Do numbers "exist"? Do they "exist" outside of our universe?

> When did I ever deny this? Also there must exist at least one program which is well typed, but it's impossible to verify that.

My point was that every language is typed because all programs are typed, though some are obviously not well-typed.

>the Hall conductance of a topological superconductor just (((happens))) to be an integer
Lmao sure thing brainlet.

>This idiot is here again arguing non-standard definitions of type systems

A language is called statically typed if it performs type checking at compile time.
A language is called dynamically typed if it performs type checking at runtime.
A language is called gradually typed if it in some way combines static and dynamic type checking (as in .NET languages)

The terms "strong typing" and "weak typing" have nothing to do with static vs dynamic typing, and the lines that define which languages as strong and which are weak, are ambiguous. A language is more strongly typed if it allows less implicit type conversion, and more weakly typed if it allows more implicit type conversion.

>My point was that every language is typed because all programs are typed
So? When did I ever deny this?
>though some are obviously not well-typed
"well-typed" only means something in relation to a specific type system.

How else would you embed the information? Every steganography method I know of just changes the lowest bits, so the difference isn't noticeable.

Types don't actually exist.

>compile vs runtime
false dichotomy

What does it mean for something to """exist"""?

>responding to a tripfag
Slow on the uptake, aren't you?

> "well-typed" only means something in relation to a specific type system.
when did i ever deny this

Ruby is a tripgirl, not a tripfag

It just seemed irrelevant to mention that.

It forgot read time.

false trichotomy