/dpt/ - Daily Programming Thread

What are you working on, Sup Forums?

Old thread:

Other urls found in this thread:

nodeschool.io/
geoff.greer.fm/vim/#realwaitforchar
natecraun.net/articles/struct-iteration-through-abuse-of-the-c-preprocessor.html
twitter.com/AnonBabble

First for developping your own OS

First for akari-bbs!

Good OP, right at bump limit. Thanks.

Working on .NET things.

I like C#, and I like .NET.

I am happy.

Fucking weeb pedos kill yourselves

Akari is the worst anime I haven't watched yet.

what about .NET#?

Rewriting the Linux Kernel in Perl

C# > Java
VS > any other IDE

Just finished working out some bugs on a new program I've been fiddling with, currently backing up like 24TB so I might need to suspend operations for now.

Fuck off pajeets, get out of my website.

/dpt/-chan, daisuki~

Ask your favorite programming literate anything (r/IAMA).

>VS > any other IDE
Something like Pharo is better; The language is the programming environment and the programming environment is the language.

Please, don't bully.

Thank you for doing akari-bbs.

Thank you for using an anime image.

Why haven't you killed yourself yet

Why Haskell is superiour language?

I'm learning to code in Rust and I'll try to make a cli libre minimum viable program for my union.

Because Haskell fags know how to code in C# while C# fags don't know how to code in Haskell.

How do I learn JS senpai?

I'm making a personal site as a hobby, and as a way to store all the front ends for my little projects. I'm not sure what frontend framework I want to use. Right now I'm thinking Vue.js, but I've also been told that Angular 2 and React are good. Does the speed and small size of Vue.js make it worth it?

>.NET#
n-nani?

>C# > Java
Absolutely
>VS > any other IDE
Depends on what language you're using. On any VS first-class language, this is true.

It's 2016, you shouldn't really be using frameworks anymore.

Pure JS is the way to go.

JavaScript knowers, can you explain what is happening?

nice trips

I fucked up real bad with this one boyos.
Trying to generate SASL challenge string.

if (!tallis_get_sasl_password(tallis))
{
char *temp = malloc(strlen(tallis->nick) * 2 +
strlen(tallis->sasl_password) + 3);

memcpy(temp, tallis->nick, strlen(tallis->nick));
temp[strlen(tallis->nick) + 2] = '\0';
memcpy(temp + strlen(tallis->nick) + 1,
tallis->nick, strlen(tallis->nick) + 1);
temp[strlen(tallis->nick) * 2 + 2] = '\0';
memcpy(temp + strlen(tallis->nick) * 2 + 2, tallis->sasl_password,
strlen(tallis->sasl_password));
tallis_base64_encode(temp,
strlen(temp) * 2 + strlen(tallis->sasl_password) + 2,
&tallis->sasl_challenge);

tallis_send(tallis, 1, "CAP REQ :multi-prefix sasl\r\n");
}
else
puts("running with SASL disabled");

Theorizing about data mining and astroturfing /r/the_donald

Going to compile a list of /r/the_donald posters

You can use + to concat strings.

Strings are implicitly converted to an integer if an integer operation is attempted on them.

Thus, + is trying to concat strings, and - is trying to subtract the integer conversion from a string that can be converted to an integer.

>javascript
>programming
lol

But more people are using frameworks now than ever before.

So... no.

Weak typing. It's bad.

Weak typing is not the same as dynamic typing, which can be good.

Quads of truth

How does that demonstrate weak typing?

aurelia js

New project idea: An extension that prevents you from accidentally going to a website that tells you to turn off your adblocker. It can remove the links from webpages and Google results.

Implicit coercion. That's weak typing.

Or just use an adblocker-blocker-blocker

>Weak typing. It's bad.
Weak typing can be consistent.

RRREEEEEEE

I've got a python string that i want to print out at the center of the terminal window.

So i thought this would work
x = (terminal width)/2 - string-length/2)
print ' '*x + 'string'


But my string consists of a bunch of functions, so the length counts the name of those functions as characters.

How do i count the letters of the string without counting the function names?

Type coercion.

You can't take a number away from a string so it converts the string to a number.

You can't concatenate a string to a number so it converts the number to a string.

When you say -"2" JavaScript converts the string to a negative number so it's the same as saying "5" + -2 and since you can't concatenate a string to a number, it converts the -2 into a string.

Why the actual fuck do recruiters play phone tag with everyone, and use the excuse "Oh I was with another potential candidate".

Literally doesn't make sense, are they just playing with themselves all day?

i'm going to download a .exe to play a game with real money.

should i analyze the .exe? any good tools for that?

>But my string consists of a bunch of functions,

post a example.

i don't get what you saying

Strongly-typed languages also have implicit coercion. Implicit coercion is only bad if it coerces to a less-precise data type.

Nevermind. i'ts because i'm using color coding and shit.

Must be that.

forgot that my functions dont return clean strings

thanks anyways

:^)

6/10 if trolling
4/10 if serious

ascii codes?

How do I come up with a good idea for a project?

Nothing wrong here.

?

Just follow this simple step by step tutorial to having original ideas:
- There's no magic recipe to good ideas holly shit what were you thinking

nodeschool.io/

but i'm the idea guy in my team.

i'm suppose to have good ideas, since i get paid way more than the developers

Are you serious?

Yeah, any arithmetic involving the character type in C# works with ASCII codes.

And you're taking advice about it on Sup Forums, because of course you are.

Steal them from other people you dumb nigger.

This just gave me cancer. Thanks for that!

geoff.greer.fm/vim/#realwaitforchar

If you always want strings to always convert to numbers in JavaScript you can put a plus sign in front of them.

5 - +"3" //2

+"5" - 3 //2

+"5" + 3 //8

+"5" +- +"2" //3

Nice.
I mean, that's the only right way.
Is that some VS console? I didn't know C# can be an interpreted language.

just doing some project euler since a nigger stole my shit.

anyways i'm doing problem 8 and it seems the four adjacent numbers 9989 aren't in my set and i have no idea why?

THAT GUY ISN'T ME YOU FAGS!

>just doing some project euler since a nigger stole my shit.
what

>I was just pretending to be retarded

>Nigger stole my project euler solutions then my bike

unfortunately it sounds more literal then not. i have extraneous circumstances and my laptop was stolen by a person (black person). so as you can see I'm on a library computer using an online ide and compiler ot program.

Anyways why in my problem is -

The four adjacent digits in the 1000-digit number that have the greatest product are 9 × 9 × 8 × 9 = 5832

so when i break that large number into sets of four and search my sets the string '9989' is not in there?

How can you be the idea guy on a team when you're unemployed? Wait, fuck I shouldn't have said that.

>Wait, fuck I shouldn't have said that.
>types enter anyway

hola réddit

>Wait, fuck I shouldn't have said that.
Look! A wild faggot!

Yeah, it's the "C# Interactive" window in Visual Studio.

You can right-click your project and do "Initialize Interactive With Project" and use the libraries you're already importing.

View => Other Windows => C# Interactive

ahhahahah

figured it out. it was the way they worded it but etiehr way niggers can never keep me down still solving problems.

...

okay solved that problem but now my library computer time is up.

s = 1
x = 0
y = 13
product = 0
for i in stringg:
if i == '\n':
continue
else:
numberlist.append(i)

while y < len(numberlist):
for i in numberlist[x:y]:
i = int(i)
s *= i
sets.append(s)
x += 1
y += 1
s = 1


once i get a laptop ill prgrm non stop.

Wish we didn't have to split programming discussion between /wdg/ and /dpt/.

Is there any way we can get rid of /wdg/?

/wdg/ is a containment general, we don't want anything to do with them.

Fuck off, it's a containment thread.

We don't want Land of 1000 JQueries in /dpt/.

I don't mind seeing web dev related programming here.

You don't belong.

Why? Because you're a mindless neckbeard that can only write fizzbuzz?

I dunno what kind of webdev nigger pretending to be a "real programmer" you are, but /wdg/ is nice when as it is.
It has stable OP text, it is more focused than /dpt/.
Let /wdg/ and /dpt/ stay divided.

Screw the autists, lads.

Lets get some good 'ol web dev related programming discussion going.

What web dev related projects are you working on, lads?

...

...

it is in there, but you have to search for it like a window,
x,x,x,fst
x,x,fst,scnd
x,fst,scnd,thrd
....
one b4 lst, lst, xx

t. I've done this one

Says the javascript coder who couldn't learn a real language if he tried. Are you fresh from a bootcamp, too?

They had to put a JS engine on the backend and on the desktop just so because you idiots can't code your way out of a paper bag if it's not in a braindead baby language.

When you look at the state of the Javascript ecosystem, it's no surprise you guys are so incompetent.

>not a single word defending yourself.
Wow you really are brain dead.

Apply yourself.

That's because I'm not an insecure little bitch, kiddo.

>kiddo
projecting much?

I'm not sure you know what that word means, kid.

>"I'm not sure you know what that word means, kid."
>says the brain dead faggot.

Wow, you're really hurting me with those sick insults.
Does your mom know you use all these bad words?

Your mom wants you to move out of the basement and stop being a waste of space.

Maybe if you applied yourself hard enough you could figure out how to fix it, but that's probably too much thinking for a vegetable.

post your programming environment

i want to see how are others working

natecraun.net/articles/struct-iteration-through-abuse-of-the-c-preprocessor.html
Is that neat or what?
t packed:
05 00 00 00 00 00 00 00 61
s packed:
00 04 00 00 00 00 00 00 00
t:
int:a: 0 4 = 05 00 00 00
float:b: 4 4 = 00 00 00 00
char:c: 8 1 = 61
s:
long:l: 0 8 = 00 04 00 00 00 00 00 00
double:g: 8 8 = 00 00 00 00 00 00 00 00
unsigned long long:f: 16 8 = 00 08 00 00 00 00 00 00
int:x: 24 4 = 00 00 00 00
t:
int:a: 0 4 = 05 00 00 00
float:b: 4 4 = 00 00 00 00
char:c: 8 1 = 61
s:
long:l: 0 8 = 00 04 00 00 00 00 00 00
double:g: 8 8 = 00 00 00 00 00 00 00 00
unsigned long long:f: 16 8 = 00 08 00 00 00 00 00 00
int:x: 24 4 = 00 00 00 00

Tell me more, you're entertaining ^__^

>compiler spewing walls of gibberish
>something about illegal syntax
>realize I included a binary

Writing an image thumbnailer in C for a shitty imageboard. Implementing lossy PNG compression right now.

Actually I would like to hear more about projects that you have worked on, as a /real/ programmer.

So in response to 'JavaScript knowers, can you explain what is happening?', you would say... strong typing?

It's what