/dpt/ - Daily Programming Thread

What are you working on, Sup Forums?

Old thread:

Other urls found in this thread:

better-dpt-roll.github.io/
freevms.net/
github.com/ztmr/FreeVMS
is.Sup
is.Sup
is2.Sup
is2.Sup
play.google.com/store/apps/details?id=softin.my.fast.fitness&hl=en
twitter.com/NSFWRedditVideo

C#

fuck you for using an anime image

...

too early
delet

Would Von Neumann be happy with modern programming languages?

...

It was actually posted after post 310 from last thread.

He's happy as long as the language makes it possible to launch a nuke in your face.

If by that question you meant would he kill himself, then the answer is yes.

Program in Ruby to generate large prime number.

Rust is the best language. Deal with it. Don't like the SJW? Make a new rust and get over 100 useful, full-fledged libraries written purely in your language. Then we'll talk.

What is the best javascript textbook?

>I'm huge SJW faggot and nobody can stop me

Someone post a challenge list.

better-dpt-roll.github.io/

Who slept on the job and let the anime troll start another thread again?

Now I'm hoping for the haskellfag and the functional-minions to show up and kill this thread...

>I'm projecting and nobody can stop me
Only SJW like you would not use the best tool for the job based on purely political grounds.

>anime troll
OP picture is the first and original /dpt/ picture, dumbass.

>people still caring about the image used in the OP.

The OP should have a piece of interesting [Code] instead. Argue about the code, not the image.

Is there an open sauce alternative to azure media services? I need to do live recording, encoding and HLS streaming of video to a unity game.

>defending animu
KYS

You hold a minority view.

I don't think this is the website for you.

Programming can coexist with anime, too.

I suspect that out your Mumbai window is an urban view.

It's unfortunate that you still can't figure out how to poo in the loo.

Writing my own screenshot tool that lets me select a region and then uploads it instantly because every single tool in AUR is bloated.

How hard is it to write scrot $1 && upload $1 www.faggotville.com ?
>needing to write a tool for that
Kill yourself tardo.

>Scrot
I bet you suck dick for a living

>Until relatively recent times, Yuki was the only anime girl used in the opening post picture. She was chosen due to her computer skills, as displayed in the Melancholy of Haruhi Suzumiya show. Prior to the advent of the catalog, the picture was how users quickly recognized the thread on the board, and it stayed that way for quite a long time. The original Yuki was upside down, was wearing a cap and held onto the SICP Computer Science book.
>the anime girl
Who would know that anime girls are being posted on the anime website?

>it's another "more features is a bad thing" episode

ShareX just works out of the box and can be used for precisely what you're trying to do.

I'm not entirely sure what your criteria for "bloated" is.

Stop responding to her, please.

Responding to bait is as bad as baiting.

I've done some relatively trivial programs in Rust on and off for the last couple of years. In general, I do like the language. However, I have an extreme aversion to doing anything major in the language currently, it seems despite their marketing of the language as "complete!" the sands are still shifting...

Get fucked, weeeb.

What they mean by stable seems to be that the what is there will never disappear, but more features may be added at any time. I think it's a fairly good model, so long as they don't go overboard and make rust C++-bloated in the end.

You think you intimidate me, you degenerate piece of shit?

>what is there will never disappear, but more features may be added at any time
>thinks it won't get bloated

????

Nobody gives a flying fuck, stick that degenerate shit into the fucking

lrn2read lardo tardo.

I read correctly, and your clarification of "as long as they don't go overboard" doesn't answer the fact that it's more than likely eventually going to get "bloated" as more language features are desired and subsequently added.

xfce4-screenshooter

Gomenne kudasai me, sempai, I was baka to reply to those kusoposters

img processing using a resperry

Python? More like Pyfun!

more like pyshit

Python? More like Pycancer!
FTFY

Writing unit test for a network synchronisation algorithm implementation.

They teach it at MIT, it has very similar syntax to C# and Java plus it's easy to learn so there's no reason not to know it. Especially for some applications like GIS

it gives you cancer
people that learn python unprepared will still be pythonfags 10 years down the road

>unprepared


If it doesn't suit your needs you can just learn something else.

N O

unprepared as in "not capable of mentally blocking it off, not already aware of the problems a beginnrt wouldn't see!

are you by any chance projecting, user?

there's nothing wrong with python if you use it properly

*beginner wouldn't see"

Well that failed.

>AHHHHH
you've created a world of endless suffering

>this kind of cancer is all over Sup Forums

Rate my regex, /dpt/
s{(\d)(\d)?(\d)?([0-3])?}
{("M" x $4) .
(($3 == 9) ? "CM" :
(($3 > 4) ? ("D" . ("C" x ($3 - 5))) :
(($3 == 4) ? ("CD") : ("C" x $3)))) .

(($2 == 9) ? "XC" :
(($2 > 4) ? ("L" . ("X" x ($2 - 5))) :
(($2 == 4) ? ("XL") : ("X" x $2)))) .

(($1 == 9) ? "IX" :
(($1 > 4) ? ("V" . ("I" x ($1 - 5))) :
(($1 == 4) ? ("IV") : ("I" x $1)))) }ex;

>this kind of cancer is all over Sup Forums

Everyone starts as a beginner

Pretty ugly.

Why is it?

and you don't start them with python

I guess an anonymous poster on a chinese cartoon board would know better than MIT about how to teach people.

>2017
>Not using KDE.

You memed me into reading K&R /dpt/, and I have some questions.
int c;
c = getchar();
while (c != EOF) { /*...*/ }

They said this:
>We can't use char since c must be big enough to hold EOF in addition to any possible char. Therefore we use int.
I don't get that. since EOF is -1, it's in a range of char, and changing the type to int won't do anything.
Why did they say that c must be big enough to hold any char + EOF, if EOF is in char's range?
I know that EOF isn't guaranteed to be -1, but could it be outside of char's range? Wouldn't that break some programs?
And the second question is:
Is it a good practice to rely on int being 32 bit since that is the case on every normal machine today?

Not this guy again. Seriously, did you spend the entire night awake the last thread?

doesn't even look like regex anymore, just a bunch of nested ternary operators mashed together, pretty ugly if you ask me

there surely is a better way, what is this supposed to do?

that's right mit nigger

>I don't get that. since EOF is -1, it's in a range of char,
Are you literally retarded?

char can be both signed and unsigned, it's implementation defined. getchar returns an int.

>Is it a good practice to rely on int being 32 bit since that is the case on every normal machine today?
No, absolutely not. The only guarantee you have is that int is at least 16 bits.

Hello, world!

what are you even trying to show?
It looks like you cannot program, cannot use a screen recorder and doesn't comprehend how to use a window manager.

Obviously anything you attempt at doing would fail.

I was trying to print hello world, and I didn't care too much about SSR being in the video.

So what were you trying to show?
The code?
How you launched the application?
The output?

the output is in the telnet terminal, it's from a terminal-serial-Iike thing I implemented for my VM.

with char you can't distinguish between EOF and a byte with value 255, since getchar can return any value char can hold or EOF char isn't large enough to check for the possible EOF

user is trying to post actual code instead of endlessly circlejerking if anime should be welcome on /dpt/. (It should)

Roman numbers

FreeVMS is looking for developers.

FreeVMS (VMS stands for "virtual memory system") is not just another Unix, is a real-time operative system with tight integration with the base system, DCL (DIGITAL Command Language), and also perfect for routers.

Support for FreeVMS is welcome!
Main page freevms.net/
Github mirror github.com/ztmr/FreeVMS

Pay us you bastard

Everyone knows Sup Forums's second image server(is2.Sup Forums.org) is ungodly slow. How are you guys circumventing it?

Is there a more native faster approach than greasemonkey

// ==UserScript==
// @name Sup Forums Host changer
// @namespace Sup Forums
// @description changes image host
// @include is.Sup Forums.org/*
// @include is.Sup Forums.org/*
// @include is2.Sup Forums.org/*
// @include is2.Sup Forums.org/*
// @version 1
// @grant none
// ==/UserScript==

var newurl = window.location.href.replace("is2.","is.");
//alert(newurl);
window.location.href = window.location.href.replace(window.location.href, newurl);

use your hosts file?

...

echo "is.Sup Forums.org is2.Sup Forums.org" >> /etc/hosts

>Are you literally retarded?
Are you? For saying i'm retarded just because I'm learning?
>char can be both signed and unsigned, it's implementation defined
>getchar returns an int
Ok, that information wasn't in the book, that clears it up a little.
What I still don't get though is how changing type of c to int makes it different?
How is
char c = EOF;
if (c == 255) {/*EOF or char 255?*/}

different from
int c = EOF;
if (c == 255) {/*EOF or int 255?*/}

This

Didn't know you could do url replacements in hosts thanks

It will pay off once you can have it in your router.

It has a open source license you silly.

What are some must read books for beginner into programming / compsci ?

Infinite Jest

it might be easier to understand from an example

I am doing exercise 2-3 in K&R c, and so far I have this:
#include
#include
#include

int htoi(char s[]);

main(){
char a[10] = "1f";
char b[10] = "ff";
char c[10] = "2a";
printf("1f: %3d ff: %3d 2a: %3d", htoi(a), htoi(b), htoi(c));
}

int htoi(char s[]){
int i, n;
char c;
c = s[i];

for(i=0; i= 'a' && tolower(c)

I need your opinion /dpt/
I'll try to make it as short as possible.
So for end of study work, I chose to make a fitness app? Just like this one:
play.google.com/store/apps/details?id=softin.my.fast.fitness&hl=en

The thing is I'm alone on this project and I have to make it work for October. Didn't do anything for the moment.
Is it too ambitious ?
I also won't have really the time to only focus on this since I have an internship coming and classes.
Any opinions, advices ?

oh fuck I am dumb. I put c = s[i]; at the start of the for loop and the segmentation fault is gone, but now I just get random numbers, sometimes negative for the tests. Still have no idea what I did wrong, but sorry for the stupid mistake in my original post.

It's a good novel

I'm currently making an idle game and I'm trying to track both the Lemons Per Second and the amount. But the way I've currently coded it as Lemons Per Second == Amount. How would I go about separating the values in the code? Sorry if this sounds like a simple fix, still relatively new to coding.

Here's my code if that helps.

var pickers = 0;

function buyPicker(){
var pickerCost = Math.floor(10 * Math.pow(1.1,pickers));
if(lemons >= pickerCost){
pickers++;
lemons = lemons - pickerCost;
document.getElementById('pickers').innerHTML = pickers;
document.getElementById('lemons').innerHTML = lemons;
document.getElementById('pickerPS').innerHTML = pickers;
};
var nextCost = Math.floor(10 * Math.pow(1.1,pickers));
document.getElementById('pickerCost').innerHTML = nextCost;
};

Pros and cons of rust?
Reasons to learn functional language?

memory safe
they forgot about the rest of the language

What color programming socks should I buy for network programming?

They're already getting into bloat. Instead of making "unsafe" unions using a struct attribute (since unions are just structs where every field is at the same location), they introduced a whole new language feature with syntax and everything.

no socks, you just need some xanax

green on black obviously

Rust is memory safe without requiring many checks at run time, especially when you use functional features (e.g. mapping an array instead of using a for loop). The type and lifetime systems allow you to design highly descriptive APIs for how something can be used, and the libhoare library improves this even more.

Don't cheap out on socks you fucking degenerate

I'm programming a game!