/dpt/ - Daily Programming Thread

Old thread: What are you working on, Jow Forums?

Attached: hidamari_dpt_waifu2x_traps.png (1618x1308, 1.95M)

Other urls found in this thread:

shenlanguage.org/OSmanual.htm
github.com/EvilPudding/candle
github.com/EvilPudding/Shift3D
twitter.com/SFWRedditVideos

First for Java.

Absolutely fucking nothing

automating the process of finding good porn

Lisp is the most powerful programming language.

I'm more of an idea guy, myself

Attached: 1511127184725.gif (349x248, 1.85M)

actually the most programming language is Slack
>get a DM
>it's your boss
>"Get to work"

you install Shen yet lads?

how can I represent a maze?

i ain't never heard of shen
what's it about

sparse graph

Lisp with dependent types that's also a kernel
shenlanguage.org/OSmanual.htm

trying to make a checksum checksum in forth

>Shen
Just another proof that Lisp is the most powerful programming language. Sub-Lisp certified programming languages BTFO.

thinking about making a visipics-like for personal use

idk, seems to bastardized a lisp

>muh pure ((((((((((())))))))))
go away, you're the reason why Lisp is mostly irrelevant trash.

codinglet here, doing a project euler problem (specifically problem 17)
i'm overcounting something and i'm not sure how to fix it (i'm pretty sure it's adding one too many ones to the integers modulo 100 = 0, but whenever i try to fix the nested if clause i get a bigger answer)

should i give up and write it in python instead?

#include
int main (void){
long int sum = 0;
int listones[9] = {3, 3, 5, 4, 4, 3, 5, 5, 4}; // letter count for "ones" place
int weirds[9] = {6, 6, 8, 8, 7, 7, 9, 8, 8}; // letter count for weird values [11-19]
int tens[9] = {3, 6, 6, 6, 5, 5, 7, 6, 6}; // letter count for "tens" place
int n;

for (n=1; n

*too

If lisp is so powerful, how come I can't invert a number with it?

If I'm not using args after the `let config` line.. does it matter if I pass it as a reference or not? What should I do?

use std::env;

pub struct Config {
pattern: String,
filename: String,
}

impl Config {
fn new(args: Vec) {
Config{
pattern : args[1].clone(),
filename : args[2].clone(),
};
}
}

pub fn run(args: env::Args) {
let args: Vec = args.collect();
let config = Config::new(args);
}

seems comfy though, I just went through some code examples

Yeah, if I didn't have Idris, i'd probably be using Shen more.

Quit your job
Make video games

Attached: 1540352491783.gif (256x169, 591K)

>Quit your job
>Make video games
Making video games is my job, though...

...

n%10 -1 will be -1 when n is a multiple of 10.

lmao get a real job

Working on a couple static sites with a generator. Also trying to create a type of review board in GCP. Thinking about making a desktop app for Jow Forums if there's not a decent one already out there. Basically, name a thing and I'll burn a couple weekends trying to build it.
Planning to leave my job by the end of the year too. Have 3 recruiters scheduled to call me this week.

ummm I said "job" sweatie, not LARPing as toby fox...

The way you have that set up, I'm pretty sure 'new' takes ownership of the array.

Here is the efficient and idiomatic way of doing this as a reference:
use std::env;
use std::borrow::Cow;

pub struct Config,
filename: Cow Config Self {
Config{
pattern : Cow::Borrowed(args[1].as_ref()),
filename : Cow::Borrowed(args[2].as_ref()),
}
}
}

pub fn run(args: env::Args) {
let args: Vec = args.collect();
let config = Config::new(&args);
}

fn main() {
run(env::args());
}
I'm not even memeing.

Right, but my question is why should I not let new take ownership of the array? I don't need the array anymore and I'm wondering if it matters whether I pass it by-value instead of a reference

Why are you so butthurt, though? My job is literally making video games.

You may as well just give it ownership.
The code I wrote was overly generic and stupid.

how much you make per year?
do you work OT?
what kind of games? AAA games? mobile games?

>how much you make per year?
~83k
>do you work OT?
Once in a blue moon, usually around the time of a major release.

>what kind of games? AAA games? mobile games?
Mostly mobile, but we're trying some VR shit now.

>Mostly mobile
When developing games for mobile, is it like mobile apps and React native, meaning that, you write it in one language, and it looks the same for all platforms?

Or do you write specific Java and Swift code and use the native capabilities of both platforms?

Also, do you guys optimize the games?

Attached: 1541923380036.jpg (640x483, 76K)

JavaScript rocks!

Attached: js-rocks.png (1000x494, 369K)

>gamedev, mobile
>83k
confirmed for bullshit, pretending on the internet doesn't make it real, also please remember to bring down your dishes and laundry

my favorite part of sepples con is "grill the committee" in which they all get visibly flustered when asked about why sepples can't have "nice feature from X language".

this
only plebs don't understand it
const flatten = ([first, ...rest]) => [
...(Array.isArray(first) ? flatten(first) : [first]),
...(Array.isArray(rest) && rest.length ? flatten(rest) : []),
];

flatten([[1,2,3], [[4,5,6], [7,8,9]], [10,11,12]]);
// [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]

if you make mobile trash you aren't a game dev, please stop dirtying the job title

thats a slightly above average salary im not sure what the issue is

he could be a grunt in commiefornia. 83k is burger flipping wages there.

why does a 32x32 image make a massive file if you print out each pixels color and alpha but can be super small in a regular file format?

Attached: shd.png (1473x852, 91K)

Disgusting, that's not how you flatten an array, this is how you do it
function flatten(arr) {
const { isArray } = Array;
const visited = new WeakSet;
const result = [];
const stack = [arr];
let i, len;
do {
const value = stack.pop();
if (!isArray(value)) {
result.push(value);
continue;
}
if (visited.has(value)) continue;
visited.add(value);
i = 0, len = value.length;
while (i < len) stack.push(value[i++]);
} while (stack.length /* volatile */);
i = 0, len = result.length - 1;
while (i < len) {
const temp = result[i];
result[i++] = result[len];
result[len--] = temp;
}
return result;
}

because binary formats count up to 256 per character but decimal only counts up to 10

>you make mobile games you're not a game dev
shut up idiot.

Bug fixes on the engine.

Attached: level7.webm (904x510, 2.79M)

>that's not how you flatten an array
it is.

>that garbage code
lmao

mobile games aren't games.

4 bytes per pixel vs 10 bytes per pixel (or 11 with the comma).
And that's talking about raw rgba images.
If you add PNG, JPG, or whatever on top of that, then it's compressed too.

Attached: 550.png (207x243, 7K)

I'm trying, I just can't quite get a hold of VBOs.

Attached: mfw.jpg (1280x720, 31K)

they aren't
they're glorified slot machines
you're like code monkeys calling themselves "software engineers"
its an insult to real engineers

post all the brainlets you want. no one will ever respect mobile game """"""""""""""""devs""""""""""""""""".

can you send me all your code?

It's for my final

Thank you Sir

We use LibGDX. Most of the code is cross-platform (gameplay, rendering, 95% of the GUI).

>do you guys optimize the games?
Yes, but it's not that extreme anymore. There's a lot you can afford now that was impossible 5 years ago.

github.com/EvilPudding/candle
github.com/EvilPudding/Shift3D

Attached: bones.webm (904x510, 2M)

>they aren't
they are.

game devs don't need your respect, you literally who.

>make a mobile game
>fill it with ads
>in-app purchases
>thousands of downloads

ranking 6 figures a year.

go back reading SICP lmfao

>seething

this game is some portal shit dude, you need like a minimap cube or something

Procrastinating on real work by working on DeepCreamPy.
The latest release v1.3.0-beta has better mosaic decensors.
The 15 minutes of fame of being on the front page of Reddit, Github's trending, and Vice's Motherboard went by really fast. Should have savored it more while I had it.
Going to work on DCP for a few months, but I'm looking for a new project to get me excited again.

>they are.
the only people who think mobile devs are game devs are mobile devs themselves

That's some impressive cube-rendering engine you've got there.

Nah, maybe the door and keys should have a pointer on the screen, a minimap would confuse more than help.

>>thousands of downloads
>ranking 6 figures a year.
wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
thousands of downloads barely meant anything even in the wildwest era of mobile shit when the app store first came out. You need a million minimum to be anything.

>C
Nice.

Attached: 1439648511159.jpg (469x469, 116K)

made some progress on my game

Attached: source.jpg (259x194, 4K)

Heh, I miss you.

Attached: challenger.webm (1360x764, 1.49M)

>You need a million minimum to be anything.
wrong.
So wrong.
games nowadays are not about code but assets.

you only need a couple thousand and release the games on app store and steam and you're golden.

but again, you have no idea what you're talking about.

>she remembers me
Those shadows look as blobby as ever, friend. Keep up the good work.

Those are old.

Attached: shadows3.webm (1360x768, 2.43M)

dumb ESL.

wait till you get SJW in your project

kys

he can just delete the issues, and if he doesn't have a remote repo other than github then he's just retarded.

I could go on about the about the OpenGL graphics I'm doing at the moment, like all of these flashy demos, but I'm literally just doing the most bare-bones 2D compositing in GLES2.
I'm trying to add Vulkan support, though.

Attached: 1375773299400.jpg (425x419, 19K)

>he can just delete the issues
yeah i forgot github now allows that.

I see you took some inspiration from my old paint illustration back in the day.

That was a very impressive rendering of shadows, who would even guess it was made by hand? Did you save it? I lost the picture (don't remember if I saved it at all).

>github.com/EvilPudding/candle
>github.com/EvilPudding/Shift3D

Are you Portuguese?

Why? Is my english that bad?

do you think somebody trained machine learning to detect sea- pee?

Everything was fine until I hit the typing sections. What a shitty syntax.
(datatype colour

____________
yellow : colour;

__________
red : colour;

___________
green : colour;)
type#colour

red
red : symbol

red : colour
red : colour

blue : colour
type error

Because you're following a Portuguese guy on GitHub.

t. Portuguese

do I have to type ______

>not using liquid types

It's just a chunk of memory, my dude.

Oh, I've been doxed! Yes, yes I am.

APALPAR-LHE A PEIDA

I suppose so, I haven't tested it.

Took some effort to find, but it turns out I do.

Attached: ssao-dynamic-soft-shadows.png (747x537, 55K)

nice
would never guessed if it wasn't that.

A ultima vez que fiz um projeto tipo o teu, foi nas aulas de computação gráfica.
fodasse

I'm fairly new to doing stuff with cpp and cmake and got a general question.

If I change the CMakeLists file do I need to remove the build folder and run cmake on a clean folder or will it just modify existing stuff, much like a make will only recompile for files where the source changed if you call it again?

yep, shen's not for everyone, it's mostly the sequent calculus though.
(datatype colour

_
yellow : colour;

_
red : colour;

_
green : colour;)

is valid too.

huefags get out

>huefags
I'm Portugal not Brazil.

Educate yourself.

I'm excited for this year's advent of code. This time I'll do everything I can in haskell. And you?

how do you make two maps in pygame

>A ultima vez que fiz um projeto tipo o teu, foi nas aulas de computação gráfica.
What college?

Attached: decal.webm (904x510, 2.07M)