/dpt/ - Daily Programming Thread

OOP cult edition. What are you working on, Sup Forums?

Previous thread:

Other urls found in this thread:

github.com/ticki/termion/blob/master/examples/commie.rs
twitter.com/NSFWRedditVideo

First for JAVA!

Lisp is the most powerful programming language.

Are functions functions tho?

Lisp is not a programming language.

If your project has data and functions and some of those functions operate on some of those data then you're doing OOP.

>Lisp is the most powerful programming language.
Can confirm.

I saw a UML stacies made for one of the Java projects. It looked exactly like that

The more powerful a program, the more unreasonable it is.

>If your project has data and functions and some of those functions operate on some of those data then you're doing OOP.
Actually, OOP is even more amazing and fundamental: If your project has "things" in it, then those "things" are objects, and you're doing OOP. It is literally impossible to not do OOP unless your program doesn't model anything.

Hey, guess what? The + function is designed to operate on numbers. So really, it's just OOP!

FizzBuzz doesn't model anything

they're procedures, just like doubles are a subset of integers

FizzBuzz models a FizzBuzzFactory that produces FizzBuzzSolutions.

FizzBuzz models NEETology

"The most powerful programming language is Lisp. If you don't know Lisp (or its variant, Scheme), you don't know what it means for a programming language to be powerful and elegant. Once you learn Lisp, you will see what is lacking in most other languages." -Richard Stallman

Anybody who creates a class named *Factory is immediately fired from my team.

If OOP is dead then I don't need to read GoF? Should I show /dpt/ screenshots to my professor?

Were you not the same guy trying to say everything is OOP? Meaning C is OOP and everything is an object anyway.

Computers are objects, so if you ever use a computer, you're doing OOP.

C is primitive OOP. C++ is advanced OOP.

>subset of integers
what did he mean by this?

Yes to both, and also "Are Design Patterns Missing Language Features" by Paul Graham.

>what did he mean by this?
He meant that arrays are pointers, and that "const int*" points to a constant int. He's our resident schizophrenic.

>C is primitive OOP. C++ is advanced OOP.
Sup Forums

>C is OOP and everything is an object
it literally is!

OOP is an attempt by the previous generation of numale "programmers" to make programming more relatable for Chads and Stacys by replacing concrete mathematical concepts like "function" with meaningless and vaguely defined concepts like "object" to help the mentally challenged normies make analogies between programming and the real world.

traverse_ :: (Foldable t, Applicative f) => (a -> f b) -> t a -> f ()


this triggers the ooplet

>arrays are pointers
they literally are! there are no arrays in C anyway
>"const int*" points to a constant int
it literally does!

yes, yes and yes

class RequestMappingInfoHandlerMethodMappingNamingStrategy extends InfoHandlerMethodMappingNamingStrategy {
}

>this triggers the funclet

Well, you're not wrong.

>numale
The new, improved male? Do you identify as an olmale?

We dig our own graves.

Eh, I wouldn't say Smalltalk is easier for Chads than, say, Haskell

/*
* InternalFrameInternalFrameTitlePaneInternalFrameTitlePaneMaximizeButtonWindowNotFocusedState.java %E%
*
* Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/
package com.sun.java.swing.plaf.nimbus;

import java.awt.*;
import javax.swing.*;

/**
*/
class InternalFrameInternalFrameTitlePaneInternalFrameTitlePaneMaximizeButtonWindowNotFocusedState extends State {
InternalFrameInternalFrameTitlePaneInternalFrameTitlePaneMaximizeButtonWindowNotFocusedState() {
super("WindowNotFocused");
}

@Override protected boolean isInState(JComponent c) {

Component parent = c;
while (parent.getParent() != null) {
if (parent instanceof JInternalFrame) {
break;
}
parent = parent.getParent();
}
if (parent instanceof JInternalFrame) {
return !(((JInternalFrame)parent).isSelected());
}
return false;
}
}

>It is the design principals within OOP which are useful. You're attacking the axioms without actually learning the consequences.
>t. OOP programmer

Out of these 2, at least the class sounds like it has a purpose as opposed to the fizzbuzz tier """functional""" garbage.

arrays act like pointers in value contexts, but not in object contexts
const int* points to an int you're not allowed to modify through that pointer afaik
I too wonder how the doubles are a subset of ints meme came about

Easier to just say you don't understand abstraction, user.

class RequestMappingInfoHandlerMethodMappingNamingStrategy
extends InfoHandlerMethodMappingNamingStrategy
implements interfaceHandlerPositionSystem {
}

...

>he can't figure out a use of traverse_

>arrays act like pointers in value contexts, but not in object contexts
arrays decay to pointers, stop jumping through hoops and learn how C actually works

this
Haskell is a CHAD language

there are no arrays in C

>the virgin haskell
>the chad agda

>I wouldn't say Smalltalk is easier for Chads than, say, Haskell
I'd say it absolutely is, but in all seriousness, I don't hate Smalltalk. It's not too far from exemplifying a meaningful concept of OOP, unlike most other attempts.

>fizzbuzz2
m8

neither CHADskell nor CHAgDa are virgin languages, unlike virgidris

If you can implement fizzbuzz by making use of traverse_ I'll concede the point.

how about CHADris?

>decay
has anyone studied this phenomenon? is it similar to the decay from int to double? are you saying pointers are a subset of arrays?

>arrays decay to pointers
sometimes they do, sometimes they don't

>it's worthless even for fizzbuzz
not a great start there laddie

I just want to make sure you understand it.

back to red*it

That's called promotion, but pretty much. It's implicit conversion (to an rvalue).

>implying you can't use it to implement fizzbuzz
Just admit that you're too dumb to figure out what it is and how to use it.

incel
idris

same number of letters

>virgidris
Let me know when haskell gets totality checking and dependent types.

>idris
>idriskjailtimetofinallygetmydickwet

he apparently is:

It won't without losing type inference. Therefore, it will never happen.

Let me know when your funcmemes get dynamic typing, static programmers. We live in a dynamic world.

>What is Scheme

Exactly.
Haskell is the shit-lang of FP.

>What is Common Lisp

>arrays are pointers
in what language?

did they ban you? you too dumb or what?

C++ommon Lisp is a procedural abomination.

I agree. Pure FP is shit.

Hasklel.

>what is javascript
I mean real programming languages.

not him but
import Data.Foldable
import Data.Maybe
import Data.Monoid

fizz :: Int -> Maybe String
fizz i = if i `mod` 3 == 0 then Just "fizz" else Nothing

buzz :: Int -> Maybe String
buzz i = if i `mod` 5 == 0 then Just "buzz" else Nothing

fizzbuzz :: Int -> String
fizzbuzz i = fromMaybe (show i) $ fizz i buzz i

main :: IO ()
main = traverse_ (putStrLn . fizzbuzz) [1..100]

Lisp-1 is garbage. unwind-protect > call/cc everytime.

What does Idris do instead of type inference?

haskell isn't pure and its type system can be arbitrary loosened. It's literally a beta language.

>he has to import libraries to do fizzbuzz

>not him
Well, that defeats the purpose, but thanks for demonstrating.

I've gotten a little bit past a beginner level in C# and Python. I also know some HTML/CSS/JS and jQuery/PHP.
I've tried to apply for some junior dev positions but gotten rejected everywhere since I had no projects to show and maybe I was less experienced than what they needed.
I wonder, is there any place where I can do some tasks in this languages? I'm eager to do it for free just to have it as something to show on my next interviews.
Are there any sites where I can get something like coding bounties I can do to improve my skill and build my CV?

The only type inference you get are holes.

>dynamic world
have fun seeing your programs crash and not knowing why

also dependent types obviously.

nope, they are lists, not arrays, and an array is not a pointer

Have fun never getting anything done in the first place, let alone enjoy the experience of watching your production software crash reports flowing it.

>never getting anything done
I think you missed

If you don't have a CS/SE degree you need some big, semi serious projects on your CV you show what you can do. Not some FizzBuzz "bounties"

let me know when Idris gets you a job

post yfw ooplets can't even grasp traverse_ after seeing the type AND an example of it being used

my face fell off

post yfw funclets can't even grasp classes after seeing the interface AND implementation of AbstractFizzBuzzSolutionFactoryBean.

Writing stuff in Rust.
I was looking for a terminal library and I came across this: github.com/ticki/termion/blob/master/examples/commie.rs

if you use -XMonadComprehensions

[ "fizz" | i `mod` 3 == 0 ]

>never getting anything done
i dont think you have ever tried a statically typed language... running your program is not getting anything done, youre only getting it done if your program does what its supposed to. if you have to run it to know if it does or not what its supposed to, then youre actually retarding the part of "getting it done"

Reminder that POO got BTFO all the way in the 90s.
A second reminder that a CS student learned haskell in a week and still performed better better than a sepples expert.

If I consume soy will I improve my coding skills faster?

>development time
>relationap lisp
>3
Haskell BTFO. Sepples BTFO. Ada BTFO. Blublets B-T-F-O.

arrays are a subset of pointers tho

rawr

Nope, no degree.
How big and how serious?
I know all the basics. And I can work on anything that will eventually get me a job for absolutely free. But I don't where to find it.