/dpt/ - Daily Programming Thread

What are you working on, Jow Forums?

Last thread:

Attached: lain.jpg (900x473, 71K)

Other urls found in this thread:

github.com/leethacker/Tendies-TUI
github.com/leethacker/Tendies-TUI/releases/tag/0.1
pastebin.com/cXF6R6rp
youtu.be/p8-rZOCn5rQ
twitter.com/SFWRedditGifs

First for C!

Rewriting an entire game because the devs code is a fucking mess and it's easier to just rewrite this and get rid of the junk than refactor the existing nightmare.

just cracking cracksme 4 fun

we did it lads!

Attached: 1545158320523.png (376x341, 103K)

I'm 26

did you make it worst or gave up?

>Have you ever ran into a codebase so disgusting that you immediately regretted ever wanting to work on it?

> not OP, but i like the question

Rewrote the entire stack machine inside my lisp interpreter to be some small, mutually recursive functions instead of one big state machine. It's faster, memory leaks disappeared, fewer lines of code... literally everything is better about it now.

based

Attached: 2019-01-03-203236_3120x1920_scrot.png (1025x1136, 29K)

I'm using linux, and I need to write a bot to fill out some online forms. Any suggestions for guides/resources, /dpt/?

Attached: 1545211893401.jpg (1080x1349, 167K)

I'm pretty much happy with the Python version of my new TUI so I'm working on making a C version and slowly copying the features. And yes I am writing it all using the Python version of the TUI as the text editor for this project.
github.com/leethacker/Tendies-TUI

Attached: Screen Shot 2019-01-03 at 9.37.57 PM.png (541x206, 28K)

I've never done any concurrent/parallel code before. Is there a "hello world" or typical problem to solve when learning about this stuff?

bash + curl is enough
simply inspect the element
if the api exists use it
voila

>0 releases
>pushes to master
I wanted to use this but alright, guess not

nobody cares

shit, I meant

Closest thing would be to make a program that spins up four threads that incremet a counter 10 million times each, wait for them to finish, and then print "Hello race condition (number)".

It was the people that made me quit. Bad, stupid people, tend to write bad stupid code. I guess I made it worse, since i brought in even more ideas, i told the manager that if he ever wanted to finish and use this application, he needed to rebuild it with some sort of framework if the one and only dev, ever stopped working on it, no one would be able to continue. It was pretty serious stuff the thing was going to be used for, I can't go into details, but let's say, the invoice business.. And two years developing going nowhere, quite expensive, would have been better outsourcing, at least parts of it to professional webdevs. They wrote mostly VB stuff otherwise, and managed their own service. But where thinking about taking the leap to C# (remember this was 2017)...

Sorry, I don't use Github very often. I'll try to figure out the release thing 4u.

Attached: yEi96RfJWYfD9yjEn4_eaZdNfrMoJOLhZvLEvhIdYvs.jpg (422x309, 25K)

I think I did it.
github.com/leethacker/Tendies-TUI/releases/tag/0.1

>people who write return as if it was a function all

Attached: 384485467778842634.png (112x105, 7K)

People who do that exist?

Attached: 1535380331362.jpg (600x600, 333K)

Is there any good reason for using template on C++?

Are you ok?

Generic programming

Yes and i've managed to find apparently the one and only person who writes every return as if it was a function call.

You mean something like this?
int foo() {
return (5);
}

Yes, but without the space.
int foo() {
return(5);
}

I've never seen that in production code. I've never even seen production code. I sit at home on Jow Forums

i had to work with one compiler that mandated that

How do I into codeblock?

why acme

int poo() {
#in
return 100;}

bless your soul
but why?

imagine a code html tag but with brackets instead of

Good job, user.

B
B
C
O
D
E

They're just calling the continuation of the current procedure. What's the problem?

Attached: THE SUSSMAN.jpg (206x300, 14K)

Like this?

oh
sweet

.h , .hpp , or .hxx ?

\+ getting_bitches(X) :- leaning_prolog(X).
learning_prolog(me).

/* code */

lowercase, not uppercase.

.higger

I feel empty, I used to work on my side projects 24/7. Now that I make tons of money I hardly ever look at my projects or github. I feel useless. I even stopped going to the gym. How do you guys deal with this. I am glad that I still lurk HN to keep myself up to date.

Lead projectile at 1200fps

I'm scared that this will happen to me.

I'm fucking poor because side projects are all I do and every job I work is a fast food job where I get fired in a month because aspie. I tell myself every year I'll apply for an internship or a real job but I never get around to it.

Attached: 1535570041159.gif (480x270, 375K)

>animeposter
>aspie
>can't keep a job
checks out

I used to read about this and guys warning about "do something that you love and not join a company because of the money." I told myself this would never happen to me since I love to program, but I can see how this trap works.

The codebase I have to work on for my Masters makes me want to fucking kill myself.

that's sam, not acme. I use it because it's simple, but powerful.

seems it's summer in Australia

Attached: glenda_3.jpg (1910x2643, 303K)

hoo you sure showed them, user.

>aspie

Attached: dafaq.jpg (322x335, 54K)

It means I have aspergers.

Matrix-Matrix and Matrix-Vector operations are the ideal intro to parallel computing.

> throws away years worth of work and learning because "i can do it better ughhhh"

I too remember being young

lmao and your answer proves that

For a long time I used to work on a codebase for a program I used that was open source. I went back and looked at the codebase a few weeks ago and I really can't understand how I suffered through it. It has zero organization or comments and is fairly large and full of bad code. I really don't know how I put up with that when I was younger.

Topic modeling algorithm thats faster than the others like LDA

have you thought about killing yourself?

Were you diagnosed, or you just "autistic" by internet standards?

post

Attached: wtf.jpg (990x637, 229K)

pastebin.com/cXF6R6rp

Did you know it is technically possible to use the Garbage Collector to implement precisely zero overhead read locks (for the read case only?)

I stumbled upon this while trying to optimize a reader writer lock for the page tables in an emulator I am making.

The page tables are consulted on every read/write so reading them needs to be ultrafast but writing to them can be very slow.

My original solution was based around dynamically instrumenting safepoint checks using MutableCallSite points to pause every thread.

However, this does not work if a thread does not call into a safepont.

So I thought why not reuse the JVMs safepoints for garbage collection?

Unfortunately it needs to call System.gc which is crap.

Altogether it might be better to call Thread.getAllStrackTraces and inspect the backtraces to see if a thread is in a critical point or even just iterate over the threads and suspend them with Thread.suspend.

SAD!

Some psychologists and doctors told me I have it. I also test for aspergers on the autism spectrum quotient, just one point below full autism.

Link?

Just google aspie quiz, should be the first result.

Attached: 1544938358663.jpg (500x375, 92K)

Any performance stats?

Attached: 1546568517108.png (376x341, 102K)

No. Because calling System.gc for every write lock is stupidly, stupidly silly so I didn't bother writing a JMH test.

Also, Reference.reachabilityFence might prevent inlining anyway.

Why do you even need to call System.gc()? The GC runs automatically.

whats your C programming setup user?

linux, vim, and make.

It's complicated.

Attached: 1544909101454.jpg (2602x1608, 979K)

I LACK PROBLEM SOLVING SKILLS
I CANT PROGRAM FOR DICK BECAUSE I LACK THE ABILITY TO SOLVE PROBLEMS WELL. I KNOW THE LANGUAGES BUT CANT FIGURE OUT SOLUTIONS TO PROBLEMS.
WHY AM I SO RETARDED.

The GC will *eventually* run automatically. Manually calling it is ill advised but can lead to specific performance benefits.

learn math

I got this.

Attached: Screen Shot 2019-01-03 at 10.41.03 PM.png (969x713, 172K)

Learn math

Lisp is the most powerful programming language.

MATH IS FAGS

(((Lisp)))

It will mess with the generational bookkekping it is doing. It is probably the side effect of that you want.

Please tell me you're joking.

I'm not. Why? Is it that bad?

What's your favorite programming language?
youtu.be/p8-rZOCn5rQ

Attached: based C chad standing in front of the hexapod he built.png (1920x1080, 2M)

I remember some of those questions; one of them was like "do you make small noises when speaking." You must be a real weirdo.

I am abusing the GC to discover which methods are pointing to "root" and therefore preventing writes.
Normally the GC is supposed to be lazy.

Forth!

I don't follow why that would be a joke either.
You can make weird noises while speaking involuntarily. Or you might even just think you do. I think I shake uncontrollably when I get excited about things but the few people I've asked (and have good reason to trust) say it's not perceivable. If I imagine a person doing what I feel I'm doing I would probably just cut conversation immediately and run away.

C


(++)

I answered 0 for that one.

>You can make weird noises while speaking involuntarily
No, I don't.

>I think I shake uncontrollably when I get excited about things but the few people I've asked (and have good reason to trust) say it's not perceivable.
They're just being nice, they totally laugh about it when you're not there.

Nice try, I also filmed myself because I'm paranoid enough to think they'd do that.

You have enormous autism. Im actually diagnosed with it and mine was nowhere near that severe.

>eye to eye conversation, 18 inches apart
>hidden, creepy video taken from 10 feet away
>proof
I'm pretty sure they notice it, shakes.

user you're making a lot of assumptions about the way this was filmed, don't be an idiot. It was filmed body part by body part as close as the camera focus would allow with control situations.
And you're being an ass that should absolutely kill yourself. Do you not realize what you're trying to do? Have you no shame?

The fact you did that at all means youve got it, tismboy

why are you so rude to him?

Shut up queer