/dpt/ - Daily Programming Thread

What are you working on, Sup Forums?


Previous Thread: Functional Thread: Sorry for not using an anime image.

Other urls found in this thread:

futhark-lang.org/
pastebin.com/sBJnwXD4
benchmarksgame.alioth.debian.org/u64q/lua.html
doc.rust-lang.org/std/env/struct.Args.html)
twitter.com/SFWRedditGifs

First for D

A POC for my Japanese training application.

first for futhark
futhark-lang.org/

java's objectively a bad language

they are all retarded anyway. literally no need for anything besides anki.

rewriting c++ game engine in c.
What's the best utility library(allocators, containers, ...) glibc, qlibc, tbox, apr or something?

Yeah but the only other options are C and C++ and C++ is maybe slightly slower than C so you're not allowed to use it, only C when you need performance and Java otherwise.

Stop advertising the functional programming thread in the OP, cunt.

Why split the threads? Functional programming is still programming.

...

It's just a description of FP

How do I convert std::iter::Skip back to a normal iterator?

>Functional Thread: →
Why?

Don't advertising other threads in the OP.

No one is posting here.

Refer to the correct thread

We shift out now.

Next step:
shift in with through dip-switches, which alter the shift-out then

>11 IPs here
>4 IPs there
Nah.

>Functional programming is still programming.

Nice to see you're still working on it. Just a few questions:
1) Could we see a download?
2) Is it only for Sup Forums or is there multi-board support?
3) What stage is your program in? Do you plan to add any more features?

Real thread without any advertising in the OP.

Go post on my thread now

>advertising

What the fuck are you talking about?
It's a fucking link to the FP thread.

it's productive and reasonably fast

learn it and start getting shit done

It's stupid thread splitting is what it is.

Don't include it the OP, cunt.

>it's thread splitting
No it isn't.
The other two threads are thread splitting.

How the fuck can you LITERALLY split the thread and dare to accuse someone else of thread splitting?

Stop linking to other threads that aren't /dpt/ threads.

nice

Why link to /fpt/ in the OP?

What's the point in having two seperate programming threads?

There's a thread specifically for discussing FP, and a general purpose programming thread.

You can think of the FP thread as being there for advanced FP discussion, since it's more of a niche.

The link is there because it is a useful resource related to programming, unlike wdg (which is not programming).

1) browser #112 can be found by searching for it
2) works for all Sup Forums boards except /f/
3) very mature and stable after 6 years. always thinking of new features.

>outperformed by luajit

kek

You can discuss FP here, there's no need to advertise your thread splitting general in the OP.

If you want to have a separate programming thread as well as /dpt/, fine, but don't use the /dpt/ OP to advertise it because hardly anyone is posting in it.

C# is far more productive with comparable performance.

>to advertise your thread splitting general
please read BEFORE replying

...

getting my poker engine hacked together.

['d', 5, 'd', 2]
['h', 'A', 's', 'K']
['s', 'Q', 'h', 10]
['c', 'A', 'c', 'Q']
['c', 8, 'd', 4]
['d', 9, 'h', 5]
['s', 2, 'c', 7]
['c', 5, 'd', 3]
['d', 6, 'd', 8]
['h', 'K', 'c', 2, 'c', 'J', 'h', 6, 's', 9]

['s', 'Q', 'h', 10] made a straight

I don't disagree

Java is just five times more popular = easy to find jobs

What about Nim?

You can spin it however you like, the reason why you included the link is because no body is posting in your /fpt/ threads.

It's nearly 2 days old and it only has 100 replies.

You're forcing a general that nobody wants, we have /dpt/ to discuss programming. We don't need a separate thread for every single programming paradigm.

doing K&R and having trouble with an exercise. it's to make a program that copies its input to its output and places each tab by \t, each backspace by \b, and each backslash by \\. this is what i have

#include

main()
{
int c;

c = 0;
while((c = getchar()) != EOF)
{
if(c == '\t') printf("\\t");
else if(c == '\b') printf("\\b");
else if(c == '\\') printf("\\\\");
else putchar(c);
}
}


but when i do ./replace lorem.txt the document remains unchanged. also when i do cat lorem.txt > ./replace > res.txt, res.txt is the same as lorem.txt. i may just be using the command line wrong, anyone know how i should be doing it?

so you're admitting it's NOT advertising

>automated proof
>I cannot prove it so I won't allow it
Slow compilation for overly conservative results. I'll pass and use a language where I can write the proofs myself.

Worthless meme language that failed to be shilled even here

Try a pipeline
cat in.txt | ./program > out.txt

They say it's like Python but static and compiled through C.

Quick update on my Arduino project:
I tried compiling the link you sent over for Serial logging - didn't work because it kept complaining about LK1561 in VS 2015's compiler. I'll find something else in the meanwhile, don't worry about it.

I've spent the past two hours dicking around with how the data writes to the tags, as it wasn't coming out properly, but I fixed that now. Up next is trying to get timestamps added to the data read off each time, and then get the serial logger working on the PC side and get it written into .csv.

Link to source code if anyone is interested: pastebin.com/sBJnwXD4

>it's like Python
Is that supposed to be appealing?

only in the simplest task

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

>the reason why you included the link is because no body is posting in your /fpt/ threads.
That isn't true, I always link the functional thread in /dpt/.
Similarly I try to link the current /dpt/ in the functional thread, but someone complained that it moves too fast.

Your problem isn't your C code, your problem is that you're using redirects wrong.

( cat lorem.txt | ./replace ) > res.txt

It's 6 years old? I thought it was 1 year at most
I'll give it a try, thanks buddy

when i do it that way, out.txt is empty

It's not advertising in the commercial sense, but he's definitely using /dpt/ to promote his slow general.

Personally I don't know why we can't just have a single programming thread, why do we have to split discussion up into programming paradigms?

Oh, and /prog/ used to be its own board.
100 replies in 2 days (well, 30 hours) is perfectly fine for a thread.

>It's not advertising in the commercial sense, but he's definitely using /dpt/ to promote his slow general.
No I'm not, and it's not "my" general.
I didn't even start the idea.

I bet half of the people who are mad about /fpt/ are the ones that complain any time anyone mentions Haskell or monads.

What do you mean by "normal"?

the output file's empty when i do it that way as well. i'm starting to think it has to be a problem with my C code, i don't know how else it'd be failing to work. can you compile it and see if it works for you?

Is the original file empty?

Did you rebuild ./replace ? (Because cat lorem.txt > ./replace > res.txt overwrites replace)

2344 days, to be precise.

of course, it's only taking me about 10 hours of total coding time. :^)

See

That's literally what static typing is.
When you don't want to fight the type checker, use more permissive types.

ah yep that was it. i was about to ask you what effect the original way i put it had if not the effect i expected it but i guess now i know. thanks!

>The ada compiler they're using is three years old

whats this?

you generate random cards and wait to see if you make a hand?

correct. functional programmers are like the jews, we are harassed and belittled in europe (/dpt/) and when we try to create our own home state (/fpt/) we are attacked even then

Checking a programmer-supplied proof is completely different from automatically coming up with one.

I want to pass this (doc.rust-lang.org/std/env/struct.Args.html) iterator, but after skip has been called, it's transformed into a skip iterator.

You can't automate every proof

Yeah, exactly.

Just stop being a cunt and keep the /dpt/ OP free from the usual bloat you see from generals.

We don't need links to anything, /dpt/ has always been a minimalist thread.

You can have your functional ethno state just stop promoting it ours.

And like the real jews, you aren't really persecuted and in fact you're a bunch of entitled cunts making everyone else's lives miserable.

Are you better than the programmers you know?

I'm the best because I don't know any other programmers irl.

what do you mean?

you never leave the basement?

>Just stop being a cunt and don't ever link programming related threads in the OP
You realise you can deviate from the tradition, right?
We established the whole "you have to post "what are you working on g, previous thread", and nothing else" thing to end incessant shitposting.

If someone makes another niche programming thread I'd've linked that too.

>implying we have basements here

keep Sup Forums in Sup Forums

>Just stop being a cunt and don't ever link programming related threads in the OP

Yes, that's what I'm saying. Stop it.

Keep /dpt/ minimalist like it's always been.

Your /fpt/ threads would die if you stopped bumping them, stop forcing it.

Do you need to pass Args? It's normally better to make the function generic over the Iterator trait, e.g.
fn takes_iter(args: I) where I: Iterator { ... }
instead of
fn takes_iter(args: Args) { ... }
otherwise your Iterator types become limited (e.g. can't call any iterator methods before passing it to takes_iter()).

i go to a party school and yeah, i don't know any better programmers. big fish in a small pond

>get ask by co-worker to check out his video player implementation because that's basically my job
>notice a class called SomethingViewHelper
"what does it do?" I ask
>"it helps the View, duh" he says
>...
>shitpost about it on Sup Forums
Seriously, stop with the fucking SomethingHelper, SomethingManager and SomethingUtils.

dumb frogposter

>replying to the effortless false flag

We get plenty of people that use and enjoy the FP threads.
For FP discussion they are MUCH comfier than /dpt/.
Ideally /prog/ would be brought back.

In OpenGL...

Let's say I want to render 128 textures to the screen.

I can only bind 16 textures to texture units at a time, so I guess I need to make 8 draw calls, changing out all the texture units to new textures each time. Is there an reasons not to do this? I though i recall reading switching textures specifically has a high cost but i can't remember.

Alternatively I could put the 128 textures into a single texture array and bind it to one texture unit, and that would work fine too. But would it be worth the hassle performance wise?

well it's a texas hold em poker game.

the list at the bottom is the community cards, and all the other are the players hands. it sees who made what hand. right now the game is very incomplete it only can check for straights, flushes, and a pair.

ideally once it's finished it'll have all the features of a regular poker game players can check, fold, call, etc on all streets. so it'll first deal their hands allow them to bet, fold, then it'll show the first three cards in teh community list and same thing, then the fourth card in the list until it gets to the river.

Fine, enjoy it, just stop promoting it in the OP.

>Ideally /prog/ would be brought back.
Well seeing how /prog/ was basically that one guy that did everything in Racket and a bunch of annoying Haskellfags that also were incredibly racist and basically Sup Forumslacks, I agree. Bringing back /prog/ would remove the Sup Forums from Sup Forums.

Yeah, I want to pass the iterator around. That should do the trick.

>promoting it on the OP
I am literally only linking it because it is related.
This is like saying that the resources linked in the FP thread "are only there to promote the resources"

As I said, if there were other niche programming threads (there used to be lisp generals), I'd link them

Better than embedded rust general

i could make this program in 5 minutes

you're beginning to learning programming or what?

/dpt/ doesn't need links to resources, they're just unnecessary bloat. We all know /fpt/ exists.

But that's just a charade anyway, the reason you're promoting it is because it's slow and it would die if you stopped bumping it.

well i've been programming for about two months now.

this is just a project i started its actually kinda difficult for me to get all the logic put together.

>But that's just a charade anyway, the reason you're promoting it is because it's slow and it would die if you stopped bumping it.
Repeating this doesn't make it true

>Say it loud, say it clear: refugees are welcome here
Kill you're self. Anime and right wing extremism is an integral part of the Sup Forums community.

We both know it's true regardless.

What's the password?
I just launched it, and anything I enter throws me an error for an incorrect password.

Just a request - add the option to change themes, e.g. Yotsuba, Tomorrow, Photon etc.

I approve

>What's the password?
animu4life

kek ok