/dpt/ - Daily Programming Thread

What are you working on, Sup Forums?

Old thread:

Other urls found in this thread:

youtube.com/watch?v=uqsZa36Io2M
acronymsmeanings.com/full-meaning-of/xsonl/xsonl-stands-for-xsonl-means
twitter.com/NSFWRedditGif

first for java a best

Functional programming thread:

Daily reminder that if your language isn't functional, it's dysfunctional.

Daily reminder that you are unemployable

Daily reminder that if your language isn't multi paradigm, it's dysfunctional.

Kek.

Are you saying a functional language is not a functional language?

static inline char
bitch(_Bool st)
{
return (char []){'0','1')[st];
}

hehheh im a retarded child every1

Daily reminder that there is more requirement for Pascal programmers than functional

>tfw omni-paradigm masterrace

>t. realizes pure functional is superior but isn't good enough to use it, so pretends OO has any use

pure OOP

OO is like Midas except everything it touches turns to shit.

>UX without OOP

Good luck.
With that.

Stop mansplaining paradigms to me.
Seriously though, pure functional is fucking trash. That's why it never caught on.

help with c#

in an inherited class, when i call a base function from within an overriden function, it uses the baseclass variables instead of the childs

the virtual function in the base class looks something like this

public virtual void f(){
if(a == 0) return;
}


the override function in the inheriting class looks like this
public override void f(){
base.f();
dosomethingelse();
}

when base.f() is called, a has changed from its default value but it's still use the default because that's what it is in the base class. please hlpe

>I don't want the compiler to tell me if I've fucked up
Dynamic typing babbies

it's okay, the runtime will tell me :^)

Not difficult at all.

just blit everything and fuck me up

I didn't mean making a meme buzz that displays fizz in one text box and buzz in another.

Pure functional only seems trash if you've been told lies about it, possibly by people who have a vested interest in other programming styles sticking around.

Pure functional programming is the most practical type of programming.

so practical it's not practiced

Functional programming is like communism, it just hasn't been properly tried, and now is being kept down by 'da mann', duhh.

Hope this video helps.

youtube.com/watch?v=uqsZa36Io2M

purely functional is me scribing math formulas in a notebook wearing only boxers. body all covered in grease stains, i.e. useless as all hell

Pure functional programming languages are notoriously bad for doing I/O. Problem is: most problems require I/O.

Pure FP is like national socialism

This is a demonstrably and obviously untrue claim.

>Pure functional programming languages are notoriously bad for doing I/O
People who say this are notorious for being wrong

"Haskell is the best imperative language"

Anyone else need to change their editor themes once in a while to remain focused?

>it just hasn't been properly tried
No it's not.
It has been tried, and it works successfully in its sphere.

No. Try not having ADHD

Now tell me why all (((popular))) databases are NOT written in a pure functional language.

And in other spheres too, which is why for the past 10 years every mainstream language has added lambdas

If functional languages are good why aren't you employed because of it?
Checkmate

Sorry sire

>why are all popular databases NOT written in a pure functional language
SQL is (mostly pure) functional

checkmate

Because people fell for the OOP hype and bullshit.

I am though.

Nope. Infact I find shit like that distracting.

Databases are not written in SQL. You interact with a database in SQL. Sucks to be retarded desu.

Must be my autismo then

Have you tried not having "autismo"?

stop lying on the internet

>what is Erlang

>using functional or OOP or any other paradigm exclusively
>not using all paradigms within the same language to suit the task at hand
>arguing pointlessly that OOP or functional is inherently bad or good

Different tools, different jobs.

Nearly every language advocated in these threads is fine.

Programming in a functional way can be incredibly useful. Utilizing objects can be very effective.

Use a language that lets you do whatever you want and go create something.

Stop being faggots.

This. And SQL is literally never used anywhere.

I use OOP where it is appropriate, which is nowhere.

>And SQL is literally never used anywhere
I don't know what you mean by this.

>And SQL is literally never used anywhere.
Are you talking about ORMs?

The priest said that if I prayed hard enough it would go away.

Not sure if he said it about my autismo or me liking boys though.

What about....

What's better for transferring text data from server to mobile app? Json or xml?

gzip the plain text

XSONL, it has a lower life path

acronymsmeanings.com/full-meaning-of/xsonl/xsonl-stands-for-xsonl-means

Hey /dpt/,

Does anyone ever find themselves getting stressed out by setting themselves over ambitious projects, or even just ambitious projects?

I find myself getting stressed just planning out very large projects, and worrying is the thing even going to work properly after putting in the huge amount of work it will seem to need. Also hoping i don't overlook something critical and waste tons of precious hours working on something that won't work how I want.

I was writing a little shell script for android that involved playing an mp3 file multiple times
I play it using am start -a android.intent.action.VIEW -d file:///file.mp3 -t audio/mp3

but sometimes it tells me that "Activity not started, its current task has been brought to the front", and the music app does indeed get brought to the front, but doesn't play the file.
I've since used a different approach, but I'm still wondering what the problem was, any ideas?

>C++ is better than C because OOP
Bruh C has structs since 20th century

nice bait bjarne

a pair of tighty whities that doesn't stain after a few hours of programming

Lol how did you even find that link?

It's literally the first result on google

JSON

Never talk to me or my wife's json again.

>stressed out
I wouldn't call it that. I either underestimate (time wise) a project and lose interest or the idea didn't work out as expected.
So I either write toy programs or solve puzzles.

yall fake niggas, i program all my software in straight up set theory notation, on a blackboard, wearing strictly ill fitted oxfords

Someone post a programming challenge.

Create a method that returns a JSON object representing an Azure Data Factory Dataset.

...

void fn(void * restrict p)
{
(void)*(char *)p;
}

Does the restrict qualifier propagate through casts or is it strictly discarded? If the cast is restrict qualified instead, does it constitute a different non-aliased pointer from ptr?

the standard methods for parsing XML in java are so fucking horrible.

you have to define custom functions for everything.

ptr = p rather what have you

Welcome to Java. Use Jackson.

rather:
void fn(void * restrict a, void * restrict b)
{
// is this ever true?
(void)((char *)a == (char *)b);
}

No.

A waste of time.

what the fuck are those cunts doing

second pathological case
void fn(void * restrict ptr)
{
// is this always true?
(void)((char *)ptr != (char *)ptr)
}

Trying to act smart.

is there really no better default solution in java for parsing structured text data?

There's DOM, SAX and JAXP. I don't like them.

(.) is (->) a 's ()

fucking suits me right thinking of this sort of thing while drunk, "can this be true" better
drinking and logical qualifiers don't mix well with my mind
note that this is a strictly semantical bother

jackson sounds like the best option, then
kinda horrible. how do companies handle their large textfiles?

>
shit operator
hate it

Hi, OP from here I have a preexisting PHP website. If I wanted to install lazy load, to boost landing page response time with images... How difficult a job is it?

Is it as simple as adding the script into the .phtml pages coding and or would it require overhauling the entire design?

SQL?

is fucking glorious. `fmap` is for philistines.

i use both

You sound pretty drunk, bro. Perhaps you better step away from the compiler.

Jesus Christ, my eyes.

I use because it makes me feel smarter. Still not as cool as (

What path/route should I take to learn basic math required for comp sci?

I agree bros

Hey I know let's go discuss the best ways to prettify our Haskell programs on /fpt/

the path of least resistance.

what's the most phallic programming language?

C--

cplusequality.

Wordpress shit x.x

>HaskLEL is useless and, pure functional and stateless languages are a meme
>Lisp is only used for third class text editors
>SICP is not a good book and this is why it's given away for free
>Anime is shit
>Maki a slut
>C++ is much better than C
>Java is the language of the future
>JS is a good choice for server side
>The best software engineers are indians