/dpt/ - Daily Programming Thread

Old thread: What are you working on Sup Forums?

Other urls found in this thread:

youtube.com/watch?v=QM1iUe6IofM
deferpanic.com/blog/manual-memory-management-in-go/
benchmarksgame.alioth.debian.org/u64q/rust.html
twitter.com/NSFWRedditVideo

first
and go fuck yourself
lal
lel
lil
lol
lul

does georgia tech have a good computer engineering program

I hear it is stupid man's MIT

MIT is overrated.
>Memesnek as babby's first language

>mit is overrated

- some anonymous poster on a chinese cartoon website 2017

I never understand why people care so much about the university they go to, unless you're looking to get into serious academia any accredited university would do fine.

Most companies are more interested in your portfolio than where you got your degree.

How do I write a program which will prove the genre of a given anime?

Start with anime axioms, use one of those theorem provers.

Why did you guys tell me I shouldn't touch OOP?
Seriously, having objects with interfaces makes it better because then I can reason about my code with less effort.

Genres only exist because of vox populi, for example a comedy is only a comedy because the majority of people agree it is a comedy. The Room would be labeled as such despite being intended as a serious drama. Authorial intent has no bearing on what genre something falls under.

You'd have to make some kind of web crawler algorithm that created tags based on the most common phrases people used in association with the title.

youtube.com/watch?v=QM1iUe6IofM
It's a much better argument that what I can be fucked putting in a Sup Forums post.

might as well go to a good one if you're gonna go to one

train a convnet

remember last thread when i was complaining about qt being hard to deploy

i was wrong, i didn't realize that i could just zip this entire folder and pass it along. it's just a little weird because my one window program is 13 megs zipped but whatever

>theorem provers
Are they easy enough to learn if all I know is C and Haskell?
What set of initial axioms would you suggest?
I need a system which can actually be proven.
>The Room would be labeled as such despite being intended as a serious drama
I don't see why something can't have two labels, one for authorial intent and the other for how it's seen by most people.
>You'd have to make some kind of web crawler algorithm that created tags based on the most common phrases people used in association with the title.
This would certainly be part of it, but I need it to determine the genre based on some information and prove it as well.

cute = moe
moe = shit

I'm trying to make a range/linspace function that does this. Basically as you increase or decrease some parameter, the points will be more clustered around the ends.

ex.
> range([0, 1], 4, my_parameter)
[0, 0.333, 0.666, 1]

> range([0, 1], 4, my_parameter - something)
[0, 0.25, 0.75, 1]


It should work for any endpoints and preferably the parameter should go from 0 to 1 where 1 has it as your standard range function and 0 gives you [a, ..., a, (b-a)/2 {if the number of points requested is even}, b, ..., b].

How do?

>What set of initial axioms would you suggest?
Karen ∈ {x: IsCute(x)}

I wanna program something, but I don't know what, any ideas?

public final class Integer // the class Integer is public and final
extends Number // this extends the class Number
implements Comparable// implements Comparable

>I wanna program something, but I don't know what, any ideas?
Program to give you ideas to program.

This. Don't forget to write a formal proof though

You can't really mathematically "prove" a genre unless it has specific rules it follows like some sub-genres of music which is easier to do because music can generally be broken down mathematically.


I imagine you could theoretically make something that could reasonably guess what broad genre something was like if something was action focused or not but it'd be a pretty big accomplishment to get something that could tell the difference between say slice of life and psychological horror.

Some people really do enjoy using excel to make data sheets or w/e

I could write a program that strings together 3-4 random compsci buzzwords together from a huge list, but I doubt that would end up doing anything other than give me a few chuckles

>You can't really mathematically "prove" a genre
Why not? What determines whether or not I can do this? I don't see why I can't prove something using my own set of anime axioms.
>music can generally be broken down mathematically
Anime is just "music" plus video. So one part of it can already be "proven" so to speak.
>but it'd be a pretty big accomplishment to get something that could tell the difference between say slice of life and psychological horror
I think those are distinct enough. Proving different subsets of slice of life would probably be a lot harder.

>cute = moe
this is mathematically wrong

You never know

You know tarot readings actually work somewhat because it's just a form of meditation to help you tap into your intuition.

i hope he's learning matlab or c++/c# in his spare time

[spoiler]R is a meme[/spoiler]

> He doesn't already have one to generate his resume

>Anime is just "music" plus video. So one part of it can already be "proven" so to speak.

So do it then

I'd be interested to see you try and break down a piece of anime mathematically

Should I learn Clojure or Go?

...

>transient multithreaded while unicode runtime system

>So do it then
I think I eventually will when I learn more math. I'll start learning Coq for now.
>break down a piece of anime mathematically
Is this even necessary though? I don't see why you think that's the case. Or perhaps I'm misunderstanding the exact meaning you are trying to convey here.

I've seen a lot of people shilling Go

>Is this even necessary though?

If you're so fucking incessant on "proving" anything yes you need to do it mathematically.

Well, I want to prove the genre of a given anime using my system. I don't understand what you mean by mathematically "breaking down" something.

It'd be better to say you could break music down using music theory rather than mathematics. Granted, pure maths can get you far (FFT on a sound file, then train a net using the resulting frequencies is one idea).

How the fuck else would you do it?

computers work with numbers user

I can do anything with OOP, prove me wong

Solve the halting problem with OOP.

Good idea
Why would you need a computer to prove something using math? I plan on using one but it's not in any way necessary.

halting problem is not programming

Then be more specific next time :^)

>Why would you need a computer to prove something using math? I plan on using one but it's not in any way necessary.

Because you need a computer to run a program

I mean you could technically write out all your code on paper but that wouldn't actually do anything.

i actually did last night but with lambda calculus and in the process accidentally discovered a major flaw in lambda calculus itself. will post results this week.
are you stupid?

>Because you need a computer to run a program
That's only an implementation detail. I really hope you aren't implying that I need a computer to prove the commutativity of addition for example
>I mean you could technically write out all your code on paper but that wouldn't actually do anything.
Did the mathematicians who lived before computers were a thing also somehow needed a computer? How does this make any sense?

No you need a computer to run the program for the project you're attempting you purposefully dense piece of shit.

THREADLY REMINDER THAT THE GPL SHOULD ONLY BE USED IN SECURITY AND PIRVACY-ORIENTED PROGRAMS AS IT'S TRASH FOR ANYTHING ELSE

>i actually did last night
I hope you enjoyed all that wasted time.

Reminder that the GPL causes massive butthurt and should be used for maximum lulz

Virtual machines are hard, time to wipe the dust off of WAMPVOIP.

Solved with Bezier curves (the answer is always Bezier curves).

why do you think it's wasted time?

What is a proper cflags for ARM64?

VM's are so easy on Linux and right now I'm taking an ethical hacking class (and cuz /school/ I have to use Windows.)

For the labs I'm supposed to setup a bsd router with a couple centos 5 boxes (an http server on one and a sql db on the other) serving up an outdated ecommerce app written in PHP, as well as a windows 7 "workstation" and then a Kali VM to run against the "router" which has the http server port forwarded.

Got off track but my point is i've tried both Hyper-V and VMWare Workstation and both of them are giving me weird errors, Hyper-V won't allow me to create virtual disks (gives me some kind of permission error even as admin) and VMWare tells me I need to do some hacky shit with EFI variables and what not.

KVM was so much easier sempai.

this is embarrassing. please delete your reddit post.

hyper-v requires a bunch of fucko ACLs, it's a bitch to do anything

not sure why you are embarrassed but okay

Fuck Hyper-V

Turns out that by removing Hyper-V completely, at least VMWare now works.

fucking Javascript man...
I've had to do some web stuff the last few weeks and you guys were right all along - Javascript is pure cancer
For example, why the fuck is null an object?

I hate bash because I barely use it and every time I want to do something nontrivial I have to look up every little thing because it's so crufty and there's like 10 different ways to do everything.

Also, rate my nano wrapper~
it opens a file at the line number of the first occurrance of a search string

goto() { echo "+$(grep -n -i $1 $2 | head -n1 | cut -d: -f1) $2 "; }
num_args=$(($# / 2))
args=($@)
expand=()
idx=0

for n in $(seq 1 $num_args)
do
expand+=$(goto ${args[$idx]} ${args[$idx + 1]})
((idx += 2))
done

nano ${expand[@]}

you are not deceiving anyone

i-it is? thank god I only program in C

quote: deceiving
about what exactly?

Will Rust and Go really replace C/C++ one day?

what's so great about Go?

If it wasn't google backed would anyone care?

It's basically C but they fixed everything wrong with it, also it has a garbage collector.

Rust could very well do it. Go, never.

it also has no pointer arithmetic and refuses to compile if you have unused variables or functions.

It's literally made for retards.

>Go, never

But why

No manual memory management.

No, HolyC will replace all these programming languages appealing to the nigger cattle soon.

>bratposting in my /dpt/

Rust will replace C++, not C itself.
Golang replaces Java and C#. They are not competitors


Also
deferpanic.com/blog/manual-memory-management-in-go/

C/C++ will never be replaced in earnest unless a new OS from the ground up debuts.

Eww

benchmarksgame.alioth.debian.org/u64q/rust.html

can someone give me a basic gestalt on why I would want to use an abstract class with all abstract methods vs an interface?

In most OO languages you only have single inheritance so you should use interfaces whenever possible.

...

A lot of whining

C is the most unproductive language aside from assembly. Plus it's broken by design. The only reason why C took off is because there were no better alternatives in the 80's.

The creators of UNIX got sick and tired at C and then created golang.

All of these benchmarks are number crunching.

Rust does a ton of checks statically that Ada needs to do at run time.

>Even something as simple as integer math produces unexpected results. 20,000 + 20,000 is a negative number.
Don't use signed shorts then?

ENTER KEY?

Really?

Assembly is faster than C
EWW

There is nothing in C that prevents a program from scribbling on random bits of memory. This is a task left to the OS, which must sandbox processes to maintain memory integrity. This works, however it makes interprocess communication much more difficult than necessary, leading to byzantine systems such as CORBA. Plus typing is barely enforced in C, encouraging poor design.

>most unproductive language

You can be productive in any language if you've used it enough and understand how to work with it. Contrary to what hacker movies and tv shows tell you, most time spent programming is time thinking, not time typing.

The creators of UNIX got paid by Google to create a language pajeets and new grads could understand and then created golang.

.software TLD for new company?

seems unpretentious, unlike .io

>exception handlers are totally optional in C
wtf is this goof on about, exceptions aren't even part of C the language, unless you add them in yourself (which is a popular learning exercise) - so saying the handlers for exceptions which don't exist in the language are optional seems like a bizarre mismatch between his mental model of what C is and the reality of C

>most time spent programming is time thinking,
Yes, thinking how to implement an algorithm in a featureless deprecated language.
Then spend the equal time in making it safe because C has no concept of memory safety.

C is fine given you admit it shouldn't be used for 90% of what it's being used for now

>All of these benchmarks are number crunching.
True, I was having a think about this the other day. We need more benchmarks that exercise memory usage, or in the very least the use of more complicated data structures with depth and breadth to them. Would be very interesting desu ne

Educate yourself before you project your insecurities onto pajeets.

what is C even used for now?
Drivers, Kernels, Compilers.

Very "basic" to the point stuff.

C is an ancient relic whose incredibly solid design at the time has kept it alive for decades. The first thing you do with any new architecture is make a C compiler for it. Maybe the LLVM backend for Rust will start to inch in on that space.

what do you mean? Rust already has compilers and those include GCC too

>featureless language
I guess you could make the tradeoff to working in an equally featureless language that has a garbage collector and dares call itself a systems language, or you could go full SJW in Mozillalang. Or you could go back to javascript, if that's what you want.

>spend time doing things in C that you do all the time in C and that an experienced developer would be used to doing in C
God. Fucking. Forbid.

>Believing tech marketing hype

I bet you still use Mongo too. It's web scale!

>full SJW in Mozillalang
Do you have any objective criticisms of Rust or just memes?