Shitty /dpt/ - Daily Programming Thread

What are you working on Sup Forums?

Old Thread: //shit thread since no one else would create new

Other urls found in this thread:

github.com/Akari-chan/brainpp/blob/master/brainpp.cpp
youtube.com/watch?v=XKu_SEDAykw
twitter.com/AnonBabble

Working on a linear type system inspired by session types for an imperative language.

Asked in last thread but didnot get very many answers thank u to the one that did answer. Im going to ask again which is easier to learn java or visual basic I need to pick one. I have a little bit of c++ knowledge if that will help a little bit with either of the two

Angular 3

C#
or do java, since it will be easier to learn C# when you come to your senses

C#

And or Cobol is an option too

r8 or h8

github.com/Akari-chan/brainpp/blob/master/brainpp.cpp

Visual Basic was deprecated 20 years ago lad

do you think this is a reasonable question? you have two very different tools and you haven't said why you'd care to learn either one

c++ is the greatest language of all time

That's some next-level fizzbuzz, mate. Cheers.

built a console app in C#
now gotta figure out how to translate it to android/iOS via Xamarin.

gotta get them dollars from the newage folks

>no tests

Picking one toward my ciss degree. Dont want to get waste time with the more difficult language

What do you mean, senpai?

>1 branch
>1 release
>1 contributor
>5 commits
>GPL
not 2 bad for what it is tho

I just uploaded the file

this:

Realted to Eventually did:
struct matrix {
int size_x;
int size_y;
int *m;
};

And
struct matrix matrix_init
(
int size_x,
int size_y
)
{
int i;
int size = size_x * size_y;
struct matrix matrix;
matrix.size_x = size_x;
matrix.size_y = size_y;
matrix.m = malloc(size);
for (i = 0; i < size; i++) {
matrix.m[i] = 0;
}
return matrix;
}

Kinda werks. Am i dumb or this is all right?

like a program that feeds in the "hello world" bf program into your interpreter and makes sure it prints out "hello world" as expected

so you can verify your interpreter works correctly

I already tested multiple programs though

Have you made any money in the past from making semi shitty apps? If so what kind of apps have you made?

automate it lad

i'm just starting
hope to make some $$$$$$$$$$$$$

In my (basically) C programming language,
1. wrote a standards conformant atof function. there were a surprising number of edge cases to consider and i didn't even know it supported hexadecimal floating point literals.
2. Added command line argument detection to my code generator for my main function.

>built a console app in C#
>now gotta figure out how to translate it to android/iOS via Xamarin.
How do you plan to earn anything from console app

Close
1. Should be malloc (size * sizeof (int))
2. You should consider returning a pointer to a matrix rather than the matrix struct itself (8 bytes on a 64-bit system vs probably 12 bytes)

>>now gotta figure out how to translate it to android/iOS via Xamarin.
>How do you plan to earn anything from console app
you gave my answer before you asked the question... you are a special kind of stupid, huh?
console app was to build and test logic.
when making the mobile apps, text field will replace Console.Readline, label will replace Console.WriteLine.
buttons will do their jobs.

just gotta setup the layout
then copy and past the logic in the right places.

still learning. but if the damn thing works, someone would be willing to pay $1 for it.

cuckity cucks

...laughing out of loud

Do you really think you are the only one like that? Why would someone pay for your shitty app when there is 999999999999999 similar from the same guys like you 1:1?

YOU are special, user. A very special.

what's wrong with that?

pick java. i've never seen an easier choice

i'll laugh with you, but i'll be laughing all the way to the bank!
#secretsauce

J master race here.
Thought I would forward a challenge I saw on lainchan, as well as my one line solution to it:
0 : 0

Challenge from lainchan:
Write a program that takes a row and column count as arguments
and outputs a matrix of that size of properly aligned cells,
filled with consecutive numbers starting with 1 in the top left
and proceeding in a clockwise inward spiral.
For example, an input of 3, 5 should result in

1 2 3 4 5
12 13 14 15 6
11 10 9 8 7

)

NB. One line solution, based on an earlier program for making an Ulam spiral

spiral =: 4 : '>: (x*y) - (|:@|.)^:2 ((, >./@:{: + >:@i.@#@{:)@|:@|.)^:(((x>y)&+)@((-&2)^:(-.@(2&|)@(x

you don't even know what it does bro

why not j++

>Picking one toward my ciss degree.
Does your college really allow you to pick VB?
What college is it

why is no one talking about Q#?
oh, you never heard of it?
google is your friend :)

How long does it take to be able to write a small game engine or game in C or C++ ?

>A community wants a nice place for everybody that's about programming and not autistic shit like attacking others because of things like those mentioned
>autistic screeching from Sup Forums
Nothing out of the ordinary here.

What's best editor font?

what editor font does mean? monospaced?

Fantasque Sans Mono

Hermit

wingdings

Menlo

Not him, but I fail to see why a code of conduct is even necessary. The only rule should be to keep things rust related when discussing things.
Also, codes of conduct inevitably become subjective. Take this for example:
>No matter who you are, if you feel you have been or are being harassed or made uncomfortable by a community member, please contact one of the channel ops or any of theRust moderation teamimmediately.
I feel this gives way too much power to a single person. You can claim you were made uncomfortable by someone, and according to their code of conduct, they need to do something about it. What does uncomfortable mean? It probably means something different to you than to me but now a developer's participation in the rust community is contingent on someone else's definition of this word.

Looks exactly like inconsolata.

It's based on Monaco, the other font OS X used as default monospace for years. They probably all have the same origins honestly.

>ask sjw interview questions
>only pass the ones that don't play along with the gay shit
>build a team of hardcore autist neckbeards

Learn Kotlin!

For:

java for sure

>using raw pointers
>C++17

What's even the point of Kotlin nowadays.

to suck jetbrains cock

It's Java 2.0: Electric Boogaloo. Basically brings new life into Java by making it not look like dog shit.

sf mono is pretty cool

I didn't use raw pointers anywhere, only iterators

Pretending that you're not writing Java with syntactic sugar for Java antipatterns.

For an actual typical developer job, how much do I need to know in terms of data structures, algorithms, math, etc?

Do interviewers really ask you to fizzbuzz and bubble sort or is it even easier than that?

>Sup Forums users
not using Anonymous Pro

if you're asked technical questions in the interview (not all companies ask technical questions in interviews) then they will typically be around the difficulty of fizzbuzz and bubble sort
top companies (think google) will ask much more difficult, esoteric "thinking" type questions that are more like thought experiments
ie, if you were the size of an ant and you were placed in a blender, how would you get out?

I see now, you're using a dereference operator.
>char c = *code_ptr

operator mono

The knife is too high to hit me. Did I pass?

no, you didn't answer the question
you're still in the blender

Probably the ugliest italic I've ever seen.

this

Man. I'd never pass the google interview.
Idk. Just walk out of the container, i can walk on walls.

What editor is that?

youtube.com/watch?v=XKu_SEDAykw

looks like sublime text 3

VS Code

it grows on you

riced nano

Stockholm syndrome is never the answer.

Exercise 1-9 from K&R is driving me insane.
>Write a program to copy its input to its output, replacing each string of one or more blanks by a single blank
In my various attempts at doing this I've written programs that could reduce each string of blanks by one blank and programs that could remove all blanks, but I can't figure out how to write one that could replace each string of one or more with a single blank.

>a different opinion is now Stockholm Syndrome

>Stockholm Syndrome is "just an opinion"

It's finite automaton.
- already met blank, see blank
- already met blank, don't see blank
- haven't seen blank yet, see blank
- haven't seen blank yet, don't see blank

Define behaviour, there's your program.

it livens up my day
and i like the non-italic one as well

i used to use Roboto Mono before, but now i use this, and whenever i try to switch to some different font, i start missing these stylish-derpy italics

>a /dpt/ poster suffered domestic abuse at the hands of the creator of Operator Mono

replaceBlanks[x_String] := StringReplace[x, blank .. -> blank]

is this go ?

Recommend some good places with exercises to do in Python /dpt/

Learning elm. Pretty cool so far

Pseudocode:
met_space = false

for char in input {
if isspace(char) && !met_space {
print(" ")
met_space = true
}
else {
met_space = false
}
}

mathematica/wolfram language

Advent of Code. Still open.

>how do i keep track of whether this is the first in a row of spaces or not
Now imagine if you had to write a parser, user...

Just regex it

>K&R exercise
>regex

>a /dpt/ poster suffered domestic abuse at the hands of another /dpt/ poster

ironically an acceptable answer
just deliver it confidently instead of
>uhh idk walk on walls?
throw in something about the strength of static electricity relative to your mass and you're good to go

#include

int main()
{
char c;
char inspace;
while((c=getchar())!=EOF) {
if (c == ' ') {
if (!inspace) putchar(' ');
inspace = 1;
} else {
putchar(c);
inspace = 0;
}
}
return 0;
}

>Advent of Code
I'd love to get on this but what kind of answer are they expecting? I don't know what form of answer I should put into the box. Do I paste the entire code I used to work it out or just the answer of the question itself?

For every problem they show example solutions for easy variants. Do as they do.

climb on blade via rotor
use centrifugal force to get from the blade to the side of the blender above the blade

Arrays are not pointers. Arrays are not first class objects and cannot be copied (unless part of a first class object like a struct or union) C doesn't have array parameters. Don't pretend that it does - declare only pointer parameters.
Follow this advice and everything will become clear and reasonably consistent.
I prefer working with sized slices but that seems a bit too high level for C.