/dpt/ - Daily Programming Thread

What are you working on, Sup Forums?

Previous Thread: Functional Programming Thread:

Other urls found in this thread:

ghc.haskell.org/trac/ghc/wiki/Commentary/Rts/Storage
twitter.com/SFWRedditImages

First for D

This thread is pathetic. It is not about programming. It's just a bunch of computers illiterates and first semesters memeing about whatever they just learned.

A quick search shows that most arguments used here are not original and have been copied from some trendy tech blog or other shit site.

The only real programming questions I have seen so far are from beginners(it's fine to be a beginner btw).

This entire site is shit and I don't know why anyone would regularly come here.

Second for Haskell generates a gigabyte of unused data

Are you guys better at programming than your mates?

how do you cope with that feel?

...

>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

For fuck's sake, it's 1GB *per second*.

Fucking imperitards.

Anyone here with experience in using GEO Datasets from NCBI?
I'm on Python3.5 using the orangecontrib.geo lib

>Are you guys better at programming than your mates?
No

>how do you cope with that feel?
By drinking my sorrows away

...

I don't have mates. Friends are for faggot normies.

A hello world can fill a big servers memory in one minute. Kek, why would anyone use that.

...

>unironically shilling splitting of /dpt/
kys

this

Impressive, considering that the entire GHC suite is only 499 MB.

Just wait until you realise that there are currently 3 active /dpt/s and 2 active /fpt/s

Here's your (You). I know you're desperate for attention ever since your dad stopped giving you "massages" at night.

Sup Forums cool kids club checklist

[x] hate OOP
[x] hate IDEs
[x] use only Haskell
[x] never produce actually useful software (this is important)
[x] wear knee socks
[x] tiling window manager
[x] dark-like-my-soul customized colors
[x] hate popular Linux distributions (because too intelligent for them)

>Functional Programming Thread: (Cross-thread)
Please don't link to off topic threads.

>DataSet Browser
>Analysis of hippocampal samples from engrailed-2 (En2) mutant adults. The En2-/- animals are a model for autism spectrum disorder (ASD). The hippocampus is a brain area profoundly affected in ASD patients. Results provide insight into molecular mechanisms underlying ASD-related neuropathology.

Can you use that to finally cure this thread's autism

For user who was wondering earlier about GHC RTS representation.

I hope this helps

ghc.haskell.org/trac/ghc/wiki/Commentary/Rts/Storage

Solid thread, guys.

Jesus Christ, we're moving at like 100 mps

>OP is Haskell
>thread churning out gigabytes of garbage every second

poetry

>tfw you will never post shit as fast as haskell generates it

Where would I go to learn C++ or C?
I know its a google search away, but I also know most of those sites are going to be shite.

C Programming: A Modern Approach
C Primer Plus (haven't read it myself, but everyone else recs it)

I wish we could create an OP link that'll list all these, but people always sperg out about it

I was wondering why /dpt/s are so shit lately. Then I remembered that it's the holidays.

So instead you decide to go to the worst website on the whole internet, for advice.

Well I guess that explains why we suddenly got an FP general.

...

Never change Sup Forums

no, it doesnt. functional programmers have holidays for 365 days a year, involuntarily.

>hasklel in OP
what a loss of thread

>Where would I go to learn C++ or C?
Right here.

First lesson: asking about "C++ or C" is about the same as asking about "piloting an aircraft or riding a bicycle".

>functional programmers have holidays for 365 days a year, involuntarily.

Every time Haskell fags show up in DPT, it turns into a shitfest. Why the fuck can't you just stay inside your fucking containment thread?

There have been plenty of excellent /dpt/s with Haskell OPs.
The problem is it's the holidays and all the shitposters are around.

Bitching about FP is the new bitching about anime images.

Does g++ do some multithreading optimization even if there's specific request? I can't seem to get my code to run faster with multithreading on. And I have a duocore with near to nothing running in the background

#include
#include
#include

uint64_t foo(uint64_t length)
{
uint64_t a = 0;
uint64_t b = 1;
uint64_t temp;
for(uint64_t index=0; index

At least FP is on-topic.

>anime website

But user, piloting an aircraft is mostly illegal to civilians. You also need tha aircraft itself, an open airport and proper clearance to actually fly the thing, both on departure AND on arrival.
On top of that you need to pay for the fuel, which probably costs more than both your lungs.

Riding a bicicle is the obvious choice here.

If you care about performance or memory efficiency, do not use FP. Otherwise, use FP.

TL;DNR: There is no reason to use Python.

>anime has literally anything to do with technology
This imageboard is split up into different boards for a reason.

FP fags are welcome. Haskellfags are not. Stop pretending that all FP fags are Haskellfags you cunt.

Why not take a look at the assembly it generates.

>But user, piloting an aircraft is mostly illegal to civilians.
Not really.
>You also need tha aircraft itself,
Starting from a bit more than a new car.
> an open airport
No. Just plan ground.
>and proper clearance to actually fly the thing, both on departure AND on arrival.
Only on commercial airports.

>On top of that you need to pay for the fuel, which probably costs more than both your lungs.
A small plane uses less fuel than a car.


C is much better than C++ thou.

>cout

try running them both with output directed to /dev/null and report back.

I have AIDS. Pls give me (You)s.

I compressed a 34 byte file into an 11 byte file. Though I loose some information near the end.

Thank you Huffman™

nvm, i didn't actually read the snippets and I'm tired.

I have Cancer. Pls give me (You)s.

would love to, but the new style does not allow for it

Have 'em.

4chanx

ty

Yeah, the only reason I had that there was because -O2 would just skip everything if it didn't have a purpose. I removed the optimization flag and just left it there to see which function finishes first. I know multithreading actually works because bar() prints first.

I am an FP aficionado, give me the (You)'s

Thanks for reminding me about how cool huffman encoding is, gonna have to implement it in C once I finish my simple conversion library.

What did you write yours in?

Haskell-chan is cute.

Curious about Ada. Is there any reason to learn it if I do not plan to go work for a defense contractor?

It's a really cute looking language

C++, though it's not exactly user friendly and this is a special file I made for it to work. I still have to fetch characters and sort the list. But I think i got the hard part of the way, building the tree drove me mad.

Good enough for me

(You)

You should add a variadic "addNodes", so that you don't have to repeat "addNode" that many times

you can change
while (head->next != NULL)
twoSmallest();

to
while (head->next)
twoSmallest();

The idea is to scan the original file and build the list from there, this is just to make sure everything works right so far.

Neat.

...

lel.
good more of these fake book covers?

>fake

Nevermind it's crap.

...

how would you write this in a different way?

or is it better this way?
def are_connected(self, user1, user2):
if self.filter(from_user=user1, to_user=user2).count() > 0:
return True
if self.filter(from_user=user2, to_user=user1).count() > 0:
return True
return False

If linked lists are slower than vectors for common usage (few insertions, lots of lookup), why not use a sorted vector instead of a BST?

I'm sure the penalty is greater for all of these cache misses and levels of indirection than copying the whole thing on each insert.

How does a vector differ from an array? I've never used them before.

Finger trees for everything, fuck the police.

return (pred1 or pred2)

in that context, "array" is normally a vector of fixed size

Depending on the language, an array is implied to be of fixed size, while a vector can be resized.

Vectors have no more than one dimension.

wrong

Arrays have no more than one dimension

>Vectors have no more than one dimension.
Arrays don't either.

>An array of arrays

>A vector of vectors

Ever heard of a matrix?

It's not a vector, imbecile. It's an array of arrays. An vector is an array that do not contain other arrays.

Jesus Fucking Christ this site is full of stupid people.

A 1d array of 1d arrays

>An vector is an array that do not contain other arrays.
holy shit pajeet who taught you that

A matrix IS an array of arrays. Doesn't matter if your meme language has a matrix type. It's just sugar for an arrays of arrays.

I'm fetching EventLogRecord objects from DomainContext and parse them to create flat DTOs

How the hell do I name this class? EventLogRecordModel is just too long

>A matrix IS an array of arrays.
No. It's representation of a linear application according to the choice of two bases.

>An vector
>vector is a type in the C++ Standard Template Library referring to a sequence container

See >Depending on the language,

See >in that context

Autism.

ObserverManagerSingleton

>An vector
std::vector rajesh;

>ObserverManagerSingleton

OOP is pig disgusting.

Everyone's very angry today.

Create a YourNamespace.DTOs and put your object in there with the same name.

Fuck you

No I'm not. Fuck you.

>A 1d array of 1d arrays
If it contains an array, then it is NOT a vector.