/dpt/ - Daily Programming Thread

old thread: What are you working on, Sup Forums?

Other urls found in this thread:

en.wikipedia.org/wiki/Booting#BOOT-LOADER
en.wikipedia.org/wiki/Orthonormal_basis#Incomplete_orthogonal_sets
github.com/sandstorm-io/capnproto/blob/master/security-advisories/2017-04-17-0-apple-clang-elides-bounds-check.md
twitter.com/SFWRedditVideos

metaprogramming like a lot of topics with the meta prefix, in that it can be difficult to define, some misunderstandings as to the definition lead to a small flamewar between a couple users

calm down man, strength can come from places other than raw masculinity, there's also things like strength of character and intellect

tumbling down tumbling down tumbling down

In all seriousness though a lot of these threads are just angry, bitter 20 somethings, myself included, lashing out at other angry, bitter 20 somethings, all of whom have some form of social or developmental disorder, or even in the lack of a diagnosable condition have typically been labled as 'different' by the society that they grew up in, so they sit in front of their pcs their bitterness and resentment eventually piling up and being poured all over those who remind them of themselves and their own failures, it's quite sad actually

But chans don't have to be about a bunch of angry misanthropes hating themselves and eachother, we can be better than that, there's a lot of intelligence and ingenuity that goes into these threads, we've just gotta sift through some of the bullshit to get to it

The less toxic we are the less toxicity there'll be, until the whole imageboard is actually quite pleasant to visit, makes you feel better about yourself too, having contributed to a discussion or project with other users

I can kind of understand that, just make sure you are cleaning out those registers after you've used them, leakage can be a real problem if you aren't careful

Remember to always ask those who abuse greentext whom they are quoting!

...

>Who are you quoting, user?

Reminder to gas anyone who posts frogs or Umaru

>no u

I don't see the text you quoted in that post.

kys

>I don't know what you're talking about!

>there's also things like strength of character and intellect
All of which are related to masculinity.

d'whomd'st art thou quotesthisthing?

>hating umaru

>What did you just say?

...

...

Please continue to program in C so I can continue fuzzing your shitty code for vulns.

Remember that Rust is made by SJWs and therefore is bad.

If I get a retarded one I'm skipping forward by 1 until I land on a non retarded one

>I don't see the text you quoted in that post.

To this helpful user I found out you can preview latex by doing
C-C C-P C-B

Hello NSA, how's your day?

>He doesn't know any non-trivial rust program requires 'unsafe' blocks

Weren't (You)s disabled? or was that some other board

kek

In all honesty though, Rust needs a whole lot of polishing. I tried to like rust but it has just too much syntax.
Maybe D spoiled me.

This is why I use Ada, tbqh.

roll

rawling

No it doesn't. Also unsafe blocks are designed to safely interface with the rest of the program.

I don't see how C putting the impetus on developers to be responsible makes C a bad language. Guns are amazing at what they do, just because some people misuse guns or can't handle them properly doesn't mean guns are ineffective and we should find a better weapon.

Any language that doesn't give you the rope to hang yourself is ultimately too limited

How is strength of character inherently masculine? Sure popular culture might have linked the two via action films, John McClaine comes to mind immediately as both an old-school ass kicker, and a character who stares down seemingly insurmountable odds, but this doesn't inherently correlate to one's character implying masculinity, you've got character if you can fight cancer with a brave face, but chemotherapy isn't exactly steroids, and you're going to come out the other side looking like a concentration camp survivor.

Intellect on the other hand makes even less sense, as predicating on the pop-culture reference from before, if anything those with intelligence are considered immasculine, to be some sort of bookish nerd is to be physically weak and socially inept, to fail to meet the traditional ideals of the male role in society.

>the gun analogy
I wouldn't carry a gun with no safety locks in my pocket when my kids are around.

Somebody hasn't played Horizon Zero Dawn.

>I don't see how C putting the impetus on developers to be responsible makes C a bad language

the impetus is on you to be responsible with your gun. What you said isn't an argument against the analogy.

>Any language that doesn't give you the rope to hang yourself is ultimately too limited
Rust isn't one of them. Also that so-called rope is a niche requirement

Posted in the last thread but I guess it's ending so I'll repost here.

I've been making plugins for awhile for a program that uses C# as the supported scripting/plugin language, and I'm looking for the answer to a question I've had for awhile now.

In C#, is there really no way to manipulate(store, alter, or assign) class instance member variables without using their actual identifiers? Assume you're working with code/classes/structures in someone else's running application and redesigning the classes isn't an option.

For example, in C++, C, etc. you can do this kind of thing indirectly with pointers and references. In Python, you can make use of functions like getattr, setattr, and dir.

Does C# simply not offer this level of abstraction? If for some reason I'm forced to work with someone else's named member variable laden code where even simple things like position vectors can't be treated as a numbered array, do I have no choice but to write the specific class instance and member variable names(i.e. Book.Author) every time I want to do something significant to actual instances of data structures?

Related, a simpler question: is there no way to store references in an array/list/any container in C#?

Guns have safely features, so that's a bit tortured. Also, Ada can do everything C can.

don't put a gun in your pocket

I understand it's an analogy, hyperbole, whatever, just don't do this, this is a BAD idea

>be responsible with your gun
Which is why my gun has safety locks. Is this even a debate?

I wasn't specificaly talking about Rust sorry, not informed enough to have an opinion. I know plenty about C though and I think it's silly people use 'you can hurt yourself' as an excuse that it's a bad language somehow

responsible C programmers do bounds checking and implement other safety measures into their code. Yes my argument still holds and it is still a debate please send more.

I'm supposed to write a bootloader. What's a bootloader?

Since i assume it's not a program that loads boots i guess it's a program that load something at boot. But what does it load?

Sorry if this is a stupid question.

gtfo fagot

>Implying perfect programmers
Get a better argument

>He took it seriously
en.wikipedia.org/wiki/Booting#BOOT-LOADER

let's go

SOS anyone have a link to that awful connect 4 code that was posted a couple days ago? It had an if statement for every possible configuration of the game

responsible != perfect

learn basic english. Feel free to try again

Bounds checking is built into Rust compiler afaik, it's not anything special. Even though lack of bound checking is the source of many exploits.

I personally think C is good as it is, it just needs a little bit more features and the compilers have to be more strict about dangling pointers etc

Nice mental gymnastics. Come up with an argument that's more advanced than "don't ever make mistakes"

How do you guys estimate how much time would it take to do shit? Especially when you're alone?

Estimate, triple it, add a few weeks.

again, "don't ever make mistakes" isn't the same as being responsible. If this extremely basic conversation has become mental gymnastics to you that's telling.

I'm not sure I should bother coming up with a new argument simply because you can't understand the premise of the original

Infinity.
Most of the time, i'm in the ballpark.

if no previous experience on working on similar project, or parts of the new project then just guesstimating in any retarded way. Like find an OSS project that does something similar and divide result of running cloc on it (finding and excluding autogenerated code if applies/possible) by 5000 to get time to implement in weeks.

I'm working on a basic c++ gui. Is basically every object in c++ managed by a smart pointer?

I'm splitting up the interface into modular components. So I've got a class the manages a word document thing and makes it look pretty, so every object within this class has a pointer attached to it. Now my main window which has a bunch of the modular class should basically be a bunch of pointers pointing to each of the class objects?

Is there anything I'm suppose to store on the stack other than ints and strings that are quickly used then go out of scope in functions that calculate stuff?

:3333 _DD

Both rust and go has nice official developer plugins. For rust, they have cargo, rust language server, rustup etc.

What it does is simplifies IDE support. Technologies like this enable you to add language support to your favorite IDE. I'll give the credit where it's due so thanks Microsoft for the open source language server standard. Now the IDEs don't have to worry about making their own plugins for each language.

I use the shitstorm anal blister that is Scrum/Kanban. It's what any actualy 'Agile' (fuck that word) companies claim to be proficient in.

trello.com is a free implementation.

> the compilers have to be more strict about dangling pointers etc
the thing about C is that a lot of users consider the lack of compiler strictness or uniformity about undefined behaviour to be a feature

UB is almost as much a part of C as the standard itself

>He can't understand making and using his own safety features requires never messing them up, because the compiler definitely won't help you. Leading to a sleeping bug you will never notice until 10 years later when a zero day hits your server.
Kys

Installing a program on Ubuntu that's not in the software center.

"Being responsible" is effectively the same as "don't ever make mistakes"

Unless you provide concrete steps to "being a responsible c programmer", all you are doing is rephrasing a truism.

>made by SJWs

wuh, really?

>UB is almost as much a part of C as the standard itself
That's why I stay away from C. The existence of undefined behaviors imply that the language creators left it unfinished.

>"Being responsible" is effectively the same as "don't ever make mistakes"
I'm going to call that a bit of a stretch and that is an understatement.

are you really so thick that doing things like checking the length of arrays, buffers, and size of input/variables is something that needs to be spelled out? If you really want I can provide you with some best practices documentation otherwise it's not a secret lad.

How can you be responsible if your code has lead to bugs and security vulnerabilities in the software that people use?

Scrum estimating is kinda hard when you're alona or even there is 2 of you.
I don't think trello has implemented estimating poker, it's just boards

>buffer overflows are the only class of exploits that exist

this is a stupid question?

if you were responsible when coding you wouldn't have bugs and vulns in your code to begin with you dongoloid. If you choose to write shit code and publish it then the only thing your responsible for is paying up for your customer's losses.

Responsible programmers don't write vulnerabilities.

>cant extrapolate from an incomplete set

oh, do I need to list every possible type of exploit or do you have your big boy diaper on already and you can just infer for yourself what they'd be?

So there are no responsible C programmers in existence

Yes.

what prog lang would be used to run Jenny

>behaviour
It's behavior, not "behaviour".

Just confirming

found the Java developers

Some vulnerabilities are very complex and aren't going to simply be prevented with static analysis tools to check the size of arrays/buffers, it's not that simple

>incomplete set
What the fuck is an "incomplete set"? How can a set be "incomplete"?

>Is basically every object in c++ managed by a smart pointer?
Eh, wat? No.
You're responsible for managing objects yourself. There's a smart pointer implementation in stl, iirc, but if you want to use that you're still responsible for initiating that on object creation.

No one chooses to write shit code. Except for Linus maybe

do you know what the word extrapolate means?

ex-trap-o-late

look it up you clown :)

Found the baby duck. Also, no one's mentioned Java.

"It's almost like people bash on something more popular to feel superior"

Did I imply it was simple? Does my listing of one type of vuln mean there are no others? Does it mean there are not other scenarios?

What kind of stupid world do you live in to have logic like this that forms the basis of your arguments

I find it vaguely annoying that you think 'trap' is a syllable.

That doesn't answer my question.

it's Sup Forums you nigger traps are life here.

traps make the best programmers

>Did I imply it was simple
Yes, by stating the truism "just be responsible and there won't be any vulnerable code", you implied that preventing vulnerable code is as simple as basic static analysis and bounds checking.

I see that you're not interested in having a discussion, only battling for fleeting moments of superiority, though, so have fun ;)

[citation needed]

I'm attracted to skinny traps and THICC women

On a scale of 1-10, how degenerate am I?

specific to linear algebra:
en.wikipedia.org/wiki/Orthonormal_basis#Incomplete_orthogonal_sets

otherwise, in other fields an incomplete set is a set which can have implied elements based on certain inferences or other measures

again no. being responsible means take extra time to implement safety measures, put code through proper Q&A and auditing, testing for bugs and vulnerabilites, going through UAT.

just because you are simple and cant think about things in a grander fashion doesn't mean that is what I am positing.

>safety measures, put code through proper Q&A and auditing, testing for bugs and vulnerabilites, going through UAT.

And even with all those things we still see vulnerable software in the wild

wow it's almost as if "being responsible" isn't enough

I don't give a fuck about what you're attracted to.
Just syllabicate properly.

github.com/sandstorm-io/capnproto/blob/master/security-advisories/2017-04-17-0-apple-clang-elides-bounds-check.md
Another day, another tricky vulnerability in seemingly correct C(++) code.

>implement safety measures
How is this not equivalent to "just drive better xd"?

Let me make a thread just for shits and giggles.

I'm sorry akari-bbs user but C is actually quite shitty

Trying to solve P ~= NP