/dpt/ - Daily Programming Thread

Last thread: What are you working on, Sup Forums?

c++ is the greatest language of all time

I need a cool project guys. Something I can do and then be like "hey man I did that", you know what I mean?

also, thoughts on Elm?

Lisp is the most powerful programming language.

Idris is a good language.

Orthodox C++ > modern C++.

indexed monads

reposting extremely important and serious project idea for user
you have a large collection of "travel" image/video files
- some are duplicates, have functionality to find those and allow removal/symlinking
- allow adding tags to each item, e.g. 'bananal' 'teens love british broadcasting company', etc.
- allow querying the set of media for those that contain given tags, e.g. A and B or C
- thumbnails (gtk btfo)
- image/video playback would be nice

Lisp is exactly as powerful as Java.

Clojure, yes.

lisp is exactly as powerful as a turing machine

doesn't really sound that interesting, to be honest.

XML makes Java the ``Acceptable LISP''

Elm is retard. Learn haskell.

>extremely useful software doesn't sound interesting
prime example of why floss is in the state it's currently in

>getting into programming without any ideas or project dreams
never gonna make it

>qt anime AI waifu
>not considered "project dream"
tsk tsk

First of all, I'm sure such software already exists. Second of all, I don't really think it's interesting to enable people to organize their pornography collections. Most people stream. It would be for an extremely small and autistic user base.

how's the progress coming?

excuses, excuses

I think I'm just too stupid to be honest. All my ideas are AI related and I'm too lazy and stupid to do anything AGRAHGAHR Why am i so stupid and lazy how do I stop being stupid and lazy if it helps i'm not stupid, only lazy, but I'm turning myself stupider by being so lazy.

it's a project *dream*, much like I have a theoretical degree in physics (ba dim tish)

I'm not offering excuses, or deflecting. I'm blatantly saying I have no interest in working on that.

realistic goals m8
can't start w/ "gon be the next elon tesla musk and launch a rocket to jupiter"
temper your expectations until you reach something achievable, e.g. "best dpt fizz buzzer"

i have exhausted all lines of shitposting on this topic

he's not going to do that

too hard, huh?
dunno, guess he can go for "average two numbers"

what do you mean. I can be anything i put my mind to. That's what my mommy told me

a slightly more interested project idea: Use ML/NN to organize a reaction image folder.

Easy, make a Digimon MUD game.

could be interesting. One idea I had was that it analyzed all Sup Forums posts, and when you make a response, it would try to pick the most fitting reaction image from a database. Maybe I should work on that project.

that's even better, and much more extensive. You'd basically be making the proto-Sup Forums poster bot.

double average(const int x, const int y)
{
if (abs(x) > MAX_INT - 100 || abs(y) > MAX_INT - 100) {
x = x * 0.00001;
y = y * 0.00001;
}
return (x+y)/2.0;
}

rms sama~

govt approved/10

so it's already been done? What's the point of even working on things when everything's already been done?

What happened to the D shills? Did they finally accept that the language is dead?

Went down with the ship. rip in piece.

as a smaller mvp:
use chains of dpt shitposts as training data
ought to be able to make a convincing "type theory is a cult" etc shitpostbot

No?
I just meant its tte first steps to a full-fledged bot specifically for Sup Forums

also "lisp is a relevant programming language"

maybe I should just go all out and make shitposto9000. It'd give me an excuse to actually study Neural Networks and NLP

D would be perfect if it cut all the C++ bullshit, made itself backwards compatible with C and threw out garbage collection.

std::decay_t
the fuck am I doing

Modern C++ is a write only language

Threadly reminder that type theory is a cult.

Type theory in action.

and there he is:

I do it for free. :^)

> butthurt

eeyy somebody's gotta keep things going, amirite

I'm in my last two semesters of CS and I am now only fully aware of how inept I am at this.
But I'm also using it as motivation to go hard everyday.

Imagine being such a sheep that you choose haskell based on meme features.

don't feel bad. College education in general is a joke. The only reason you feel so inept in CS is because there a ton of genius programmers and they are all extremely online.

CS and IT degrees are fucking awful.
They're almost the only degrees that are stuck in the 80's.

every data structure is a linked list amirite?

>non-total language
>type theory

>implying I'm a lispfag
>implying it's still 1990 in lisp
Peddle your snake oil somewhere else.

i think your view of other departments is too rosy. at least the outcomes are better

I don't shill, but I still post

Why do all the threads on Sup Forums move so slowly these days? HAvn't been here for about a year.

dunno m8, seems to be around the same-ish at the board level (slight slowdown) in the last 6 months

the good: did an assignment in python instead of java and it only took 160 lines, same amount as the boilerplate file he gave out that wasn't close to complete

the bad: gf broke up with me a couple days ago and i feel familiar inner darkness closing in again

> gf broke up with me a couple days ago
Good opportunity; stop crying, Learn haskell.

bitches come and go, mate
escapism when you get too emo, work on yoself the rest of the time
hit the gym etc etc

This , then your transformation into an inept autist will be complete.

There are dozens, that's what makes it complicated.
Meanwhile Haskell is very simple even if it has a lot of syntactic forms.

dumb frogposter

>threw out garbage collection
The consequence of that: needing to manually manage memory. There are techniques that can help, but not in all cases; without GC, sometimes you gotta get your hands dirty.

Not that GC solves everything perfectly.

falling for the sepples meme

Apex programming.

>The consequence of that: needing to manually manage memory.

That's a positive.

what's a practical application of determining if a set is a subset of another

i hate writing assignments

I'm here though

>I hate delegation and don't want machines to do any of my work

I gave it a go.
How did I do?
#include
#include
#include
#include

typedef struct{
int *nums;
int size;
}List;

double avg(List *l){
if(!(l->size > 0))
return nan("");

int result = 0, temp, remainder = 0;

int count;
for(count = 0; count < l->size; count++){
temp = l->nums[count];
while(temp > 0){ // For numbers bigger than 0
if(temp % l->size == 0){
result++;
temp -= l->size;
}
else{
remainder++;
temp--;
}

while(remainder > l->size && remainder % l->size == 0){
result++;
remainder -= l->size;
}
}

while(temp < 0){ // For numbers smaller than 0
if(temp % l->size == 0){
result--;
temp += l->size;
}
else{
remainder--;
temp++;
}

while(-remainder > l->size && -remainder % l->size == 0){
result--;
remainder += l->size;
}
}
}

return result + (double)remainder/l->size;
}

int main(){
List test;
test.size = 8;
test.nums[0] = LONG_MAX;
test.nums[1] = LONG_MIN;
test.nums[2] = LONG_MAX;
test.nums[3] = LONG_MIN;
test.nums[4] = LONG_MAX;
test.nums[5] = LONG_MIN;
test.nums[6] = LONG_MAX;
test.nums[7] = LONG_MIN;

printf("%f\n", avg(&test));

return 0;
}

>yer nan

Make 2D games.

Also this

Typelets, you don't have to throw away your Lisp skills:

{-# LANGUAGE CPP #-} -- Use CPP for macros.

data X
data App t u
data Lam t

class Subst s t u | s t -> u
instance Subst X u u
instance (Subst s u s', Subst t u t') => Subst (App s t) u (App s' t')
instance Subst (Lam t) u (Lam t)

class Apply s t u | s t -> u
instance (Subst s t u, Eval u u') => Apply (Lam s) t u'

class Eval t u | t -> u
instance Eval X X
instance Eval (Lam t) (Lam t)
instance (Eval s s', Apply s' t u) => Eval (App s t) u


But *sadly* you can't run this on the JVM yet.

Why you guys still using 1950's technology?
Are you all such a hipster???
Stop using keyboard. Use proper input method such as touch screen and on screen keyboard.
Hipsters always make me sick

array.fold!((a, b) => a + b)
use a better language next time

...

Is JavaScript worth learning?

>((a,b) => a + b)
>not simply (+)

>using fold
>not having .sum in stdlib already
xs.sum/xs.size

it's not even the right function anyway lol I didn't read user's code properly

Which computer architecture book would you guys recommend?

probably

Just starting in with Python today.
.... Does this shit get interesting at some point? I feel like I'm punching in 3 lines of horse shit to have it display a single number for no reason

> taking the length of a list before computing instead of streaming the results [i]online[/i]

[x/n | (x, n)

x/fromIntegral n
unless you only want Ints

Yes. Gets more interesting when you start using libraries to do cool shit.

I do all my data munging in it. Also works okayish for web scraping.

>assuming I'd be retarded enough to do .sum/.size on a collection without O(1) for the latter and optimized for the former
not all of us are stuck with retarded^Wnon-pragmatic "muh academic elegance" PL design decisions, buddy

it's mostly uninteresting. that's the point

shutup now only c from now on

import Control.Monad

> triggered by a list comprehension

I keep finding myself wanting to write something in lisp, but without any practical reasons to do so. Any suggestions?

>deflecting this hard
guess that criticism hit a sore spot, eh?
try again, buddy

Lisp is a beautiful woman and it takes a real man to cons his dick into her empty list

...