/dpt/ - Daily Programming Thread

What are you working on?
Previous:

Attached: hinamatsuri.jpg (1280x720, 101K)

Other urls found in this thread:

ersilia.city
youtube.com/watch?v=uqsZa36Io2M
gitlab.com/dailyprog
github.com/ocharles/netwire-classics/blob/master/asteroids/Asteroids.hs
amazon.com/Microprocessor-Design-Manufacturing-Professional-Engineering/dp/0071459510
amazon.com/Compilers-Principles-Techniques-Tools-2nd/dp/0321486811
twitter.com/NSFWRedditImage

>What are you working on?
currently working on my next orgasm

A Chip8 emulator. Are any good programming emulators?

Daily reminder that __auto_type, statement expressions and local functions make gnuc acceptable lisp.

>Are any good programming emulators?
wut?

Fuck I meant are there any good books on how an emulator works. I have yet to find a book which explains limited emulation is by the hardware.

I made a dumb thing, domain name (via google) pointing at hosting (via nginx on digitalocean)
ersilia.city
I need to implement SSL, and I first need to understand SSL better
I also need to understand "certificate authority" and all that bullshit
/wdg/ was no help, unsurprisingly.

specifically if anyone wants to help, I'd like to be guided towards logging best practices, and SSL

No, they don't. Your repeated claim to the contrary neatly demonstrates that you have not grokked lisp.

As of tomorrow, I'll be only writing Haskell. In my spare time obviously. May the spirit of Alonzo Church be with me.

Attached: 159642714d284f44bd3e0f8bd729ef69.png (590x964, 202K)

enjoy your shitty type system

countdown to you switch to idris

Anyone know of any good world procgen library? I don't care that much about the language as I want to mass generate a bunch of world files and load them alter for testing.

write it yourself ya lazy bum
make an implementation that's specific to your problem, ya ding dong

Not Idris?

Good post user.

nah i ain't reinventing the wheel, sounds like a waste of time

If I set s2 to be characters a-z followed by a space, s1 is not touched. Otherwise, it works as intended. Is there a way I can fix this without replacing s1 in the main loop with a local array (initialized as being blank) then copying that array into s1 at the end of the function?
void squeeze(char s1[], char s2[]) {
int i, j, g;

for (i = 0, j = 0; s1[i] != '\0'; i++) {
for (g = 0; s2[g] != '\0'; g++) {
if (s1[i] == s2[g])
goto skip;
}
s1[j++] = s1[i];
skip:
;
}
}

Instead you'll post on Jow Forums
good use of your time, ya bingobango

Reminder that HRT and fursuits will save programming.

Attached: _1521581644370.png (403x393, 170K)

yes just for the offchance that someone suggests something of value while I'm looking for it myself

jump to an interpreted language that handles strings, ya dummy

I first want to be proficient in Haskell.

This is exercise 2-4 in the K&R book:
Write an alternative version of squeeze(s1, s2) that deletes in the string s1 each character that matches any character in the string s2.

just learn C but don't get caught up in shit you don't care about, ya goober

This will never help you in real life, move along, ya noodle

I need to learn perl for my sys admin job. Give me some easy programming challenges.

Pick a problem
Don't think about it in terms of "perl"

Solve it in a better language
Done, ya booger

Kek it seemed like a strange exercise but that makes sense, thanks. However for the sake of completion I will at least implement the solution mentioned in my initial post.

>Solve it in a better language
B..but.. My job..

Where's the /dpt/ gitlab
I've got some commits


Also what happened with codejam0

>memelab

advent of code ?
I did it in perl last year.
Don't forget to use higher-order functions.

How to increase my value as a programmer and make more money?

Attached: 1530807999913.jpg (850x1021, 62K)

Practice and work on useful projects

c is dependently typed
the function body is the type signature and segmentation faults and undesired output are type errors

Attached: 1477004625327.png (768x576, 509K)

Idris is the industrial-strength functional programming language of the future.

well it certainly isn't an industrial-strength functional programming language of the present

this is what c programmers actually believe

>
yep, what do you have do say friendo?

C99 is dependently typed
int foo(size_t sz, int (*arr)[sz])
it simply doesn't raise type errors

just finished the interpreter part of my chip-8 emulator. now i'm making a debugger for it. learning how nuklear works along the way. will probably build a assembler and disassembler for it after the debugger is done.

Attached: dooge.jpg (480x360, 63K)

lol

Want to learn Python? This is one of the best introductions to programming in it for people new to the language:

youtube.com/watch?v=uqsZa36Io2M

What are you doing for the debugger?
Does the interpreter work correctly, did you try loading a ROM?

it loads the rom fine and does not run into any errors. except for the pong ROM. the ball simply wont move. I can't for the life of me figure out what opcode is causing it and what i should do to fix it since all other ROM's work just fine. the best guess i can make is that its not saving or updating its position correctly. but since i don't have the code for the ROM i can't check

Attached: 1512424106990.jpg (480x480, 36K)

>cmake
why is this a thing in 2018

learn haskell

>studying outside of the job
>studying after college

but i like programming

Attached: wut.png (610x482, 449K)

dumb animeposter

>Want to learn Python
said no sane person ever

masochist

But I'm already fairly experienced, probably need to build more projects for my portfolio.
Considered it, sadly there's no haskell jobs in my area.

>he makes programs because his school or job tells him to
pathetic

> gitlab.com/dailyprog

>masochist
retarded brainlet

I've gone through all of K&R and i still don't know how to get mouse input, real time keyboard input, or render images on on screen. What is this shit?

>he didn't like math
>he thought physics was too hard
>so he makes programs

Ever heard of libraries?

bit outside of the scope of K&R

get a C64 and all that is just reading and writing to memory addresses

I want to learn about API libraries, preferably in Python. Anyone got any good tutorials?

>the absolute state of C “”””””programmers””””””

No language has that as part of their standard, because it's stupidly unportable.
The answer to how to do that depends on a lot of things.

working on some basic APIs for ATSAM3X to make my life easier for some upcoming projects

I've always been a PIC guy, and Atmel studio is sooo much better than MPLAB X, but pic related might be the dumbest shit I've ever seen any editor do

Attached: output.webm (711x488, 318K)

Anyone use Visual Studio Code?
How would I get it compiling and running C++ where MinGW is not "installed"? i.e. the compiler and standard library are in a folder instead of being installed.

I've heard of the standard library.

I thought it was supposed to teach me to program.

Explain.

>Explain.
It depends on what you're trying to achieve, and what operating system you're targeting.

>getting mouse input and display stuff on the screen is programming

>I thought it was supposed to teach me to program.

it does. it teaches you how to use a tool. what you implement that tool to do is upto you.

Attached: 35d95d68-7cbe-4936-a222-7de5d15869e1.jpg (1600x888, 182K)

good

read SICP, maybe then you can do what you wanted

install gtk

But it doesn't. For all the useful things I can do with what I've learner, I might as well have been teaching myself Haskell.

>I thought it was supposed to teach me to program
You have every necessary tool at your disposal to write your own graphics library if you've read K&R.

the tool, yes. the knowledge, no.

programming isn't just videogames you big fag
if you want to render images on screen get an OpenGL book and read the 10 hundreds of pages

I want to understand how to make games.

read some unity tutorials or what have you

yeah no shit. we got that.

Attached: bugs-bunny-king.jpg (469x469, 25K)

#include

int main() {
std::game myGame;
myGame.start();
}

easy in c++

I don't want to use a game engine. I want to write a game from scratch.

Yeah you better stick to unity, LMAOO

game is not part of std

Seriously, just leave. Everyone is laughing at you

ezpz in Haskell
github.com/ocharles/netwire-classics/blob/master/asteroids/Asteroids.hs

I told you to get a book on OpenGL

he said from scratch

OpenGL isn't a game engine

good luck with X11

Start here:
amazon.com/Microprocessor-Design-Manufacturing-Professional-Engineering/dp/0071459510

Then read this:
amazon.com/Compilers-Principles-Techniques-Tools-2nd/dp/0321486811

Yeah. But why?

>Here, use this hammer.
>I said I want to build a house from scratch.

you don't even understand the basic concept of what a computer progam is

There is no language that allows you to make a videogame with its standard tools
You will have to learn and use 3rd party libraries no matter what language you choose, and those 3rd party libraries won't be included in a manual about the language itself

But I do

Just write a program for DOS if you wanna control everything. You’re not gonna be able to do what you want to do in windows 10

I'm sure you're baiting, at least partly, but here's why: avoid reinventing the wheel if you don't have to. It's a waste of effort. If you want to make a game from scratch as an intellectual challenge, or because of pride (but less so; that's only harmful), then go ahead, and may God be with you. But if you simply want to make gamez, then for the love of all that is holy, don't do it from scratch. It'll be time-consuming and difficult enough as it is.

asking those kinds of questions and answers imply ya don't

You need to walk before you run, and crawl before you walk. Start smaller than a full blown game from scratch.

Good luck