/dpt/ - Daily Programming Thread

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

Other urls found in this thread:

code.visualstudio.com/docs/editor/debugging
msdn.microsoft.com/en-us/library/sc65sadd.aspx
youtube.com/watch?v=4jh94gowim0
pastebin.com/yhn9jznb
twitter.com/SFWRedditImages

copying from the end of last thread:

From a pure job security, job availability, and long-term salary point of view, would it be better to choose information security or software development in my career?

I realize that both of these are massive fields with many subfields to choose from, but I would like some general guidance. I am finishing up a CS degree from a good university, and have one internship plus a few side projects under my belt.

I am interested in both software dev work and software security stuff, and have to pick a career path. If one is equally interested in both, which do you guys feel is the best route to take? Which path won't be infested with h1b's?

C influenced languages get an automatic F in my book.

>posting sluts

AHAHAHA IO IS IMPURE
A good pure program can be replaced with a single nop instruction.
If your program can't be optimized as a single nop it's gets an automatic F in my book!!!

Pic related it's you

Software dev. You'll always be second fiddle (at best) as a security guy because you aren't the one generating the value for a company. When the time comes to tighten the belt who do you think gets let go first? The company can still function with shit security, they can't function if they don't produce any products.

Also, its easier to do your own thing as a software dev. The closest thing as a security researcher is going full blackhat.

With that being said, you can have a great career in both so just do the one that interests you more.

How do people write large programs (50k lines+) without debugging tools? I asked about Linux debuggers and it seems nobody in the thread uses any. Some user said he didn't even use any IO when she writes software.
I don't see how you could write anything of note without debugging facilities because tracking the space of potential state in a sufficiently complex program is next to impossible. Even with the most crazy FP zealot you can't track where you're gonna run into an error based on the one input you use.
So how is it done?
And what's the best Linux debuggers (C++/C primarily but any language is fine).

If your pure program can be optimized to no op then why not just write all of them once in asm and be done with it?

>it's gets
>Pic related it's you
Please learn English before posting here.

So you're saying assembly is the best functional programming paradigm programming language?

Maybe you should try wanting
writing good code the first time.
Printf debugging always works.
You could also resort to using unit testing to prove program correctness and make sure that any changes don't suddenly break the business logic of your program.

gdb or edb. Also, never underestimate the power of printf debugging, 99% of bugs can be solved this way imo. I only resort to debuggers when I really don't know what the fuck is going on and this is usually because I've made some sort of assumption that is terribly wrong.

>Some user said he didn't even use any IO when she writes software.

??

Why use printf when a debugger does the exact same thing with the press of a button (break)? Even better if you insert asserts in your code you can automatically have your program give you all the information you need when you've detected an erroneous state.
>unit testing
Only works for very small input spaces.
Which only really happens in situations where you don't need that aid. Like writing a simple math function.

I feel like garbage by not knowing exactly what happens under the hood.

>testing to prove program correctness

C is cute

>tfw too much of a brainlet to make my own compiler

I see, thanks for the detailed post.

>easier to do your own thing as a software dev
Could you elaborate on this? Don't managers (or project managers) always make developers work on particular tasks at all times?

>gdb
Its so weak though. Doesn't even compare to something like visual studio in convenience. Which is all you're looking for in a debugger obviously.
>edb
I'll check it out but it just looks like a gdb front-end.

In the long run, empirical results are all that matter.

They're both rather safe professions.

Sounds like something a retard would say.

>he
>she
Sorry I meant to write she in both places.

simple puzzle game, it's about 80% done now

wow rude

I mean that you can potentially build some sort of product or service on your own as a developer. Like a game or a website or some sort of app.

I guess you can do the same thing as a security guy but you would have spent a bunch of time building up a skill set that isn't the most useful for that sort of thing.

C and Java work just fine.

>visual studio
Let's not even go there.

So whats your favorite /dpt/ related game?
Any more good ones that arent from zachtroncis?

...

Have you used it user? I see tons of flaws with it too but it's not as terrible as using gdb. It's even integrated so well with the OS that whenever a program stops responding to the message loop windows prompts you if you wish to open it in visual studio for debugging. It lets you freeze all the threads and read exactly what's going on without issue.

It suffers a lot in the resource usage department and in certain UI choices. But it's miles beyond anything I've tried on Linux. So that's why I'm looking.

Minecraft tekkit. Programming mining turtles/builder turtles was a lot of fun. Lua isn't too bad either.

Literally just use VS Code, lad. Its FOSS, and has debuggers.

I can't think of any ideas for sideprojects. Id like to make something using JavaScript, thats all ive got so far.

Is anyone publishing an alexa skill to get a free echo this month?

You should make a visual basic compiler in JavaScript so people can port their excel macros to Google spreadsheet.

>a free botnet
but why

Top post, thanks!

Looking at the feature set for C/C++ i might as well use gdb at that point. The only thing it gets me over just using gdb raw is breakpoints. Which I already set up for atom and gdb.

Why you'd recommend VS code over visual studio is beyond me. I'm sure its a better editor but that's not what I wanted.
Just look at how incredibly bare bones this is:
code.visualstudio.com/docs/editor/debugging

You can easily be a self-employed pentester when you have the merits.

Planning to develop a ram based file system that accepts mounts and automatically wipes the memory with 0's on umount / reboot (preventing cold boot)

Because at the expense of worse debugging, you get a vastly better editor that doesnt take three years to do anything and you dont have to have to waste 20GB+ on useless shit you wont use.

For Windows?

>waste disk space
We don't live in the 90s anymore user. It's not a problem. Especially not as low as 20gb even if it's not nice of them.
>nicer editor
user why would I use VS code as an editor? It's outmatched by every other editor.
>takes three years to do anything
Oh I'm way faster than that in emacs and I'm not even good at emacs.
I don't see any advantage really. How is VS supposedly better than other editors?

that'd be like using a condom that u made cuts all over
for *nix

> It's outmatched by every other editor.
How so?

>Doesn't even compare to something like visual studio in convenience

I keep hearing this all the time, but what does it really mean?

Please list ONE feature the VS debugger has that gdb doesn't

>inb4 "convenience"
gdb integrates excellently into many IDEs, so this is a moot point.

Will Linux already had tmpfs built in.

true but it doesnt have wiping on unmount / reboot and I'd like this to be userspace

I avoid IO and use recursion with manual tail call elimination... But then again C is a functional language right?

>what does it mean
I'll give you more than one feature. I'll give you the list:
msdn.microsoft.com/en-us/library/sc65sadd.aspx
It's a lot. If I tell you just one feature you might say 'but I don't need that!'. But others do. The 'more debugging features' link is the most concise imo.
>convenience
Well yeah. The thing is that you can build anything on top of gdb I'm pretty sure. It's just a lot of work. To have that work done for you is why you look for a program that does this for you. Of course you could pause every project and just write your perfect debugger. But it takes time. And usually when you find debuggers lacking you're facing a problem you need to focus on. So you don't even note what your grievance is. Which is a problem I should be doing that.
Most other editors have far more support. VS code is a young ecosystem.

>have far more support.
What do other editors have that VS Code does not.

Dcd integration is something I haven't found in VS code for instance. user of course you can get by with VS code. The minimum is easy to get up to. You could write it in a day. But to know that you likely won't have to move to another editor for convenience reasons is a big plus. You don't get that with VS code.

54th for C.
Reminder your book is shit.

Are you serious?
Did you even bother typing dlang into the extensions search?

Despite the user mentioning VSCode's DCD you should install DCD, Dfmt, DScanner, Dfix and DUB manually.

It didn't when I last checked.
Do you think it has every extention though? Frankly I feel your reaction weird. It's like you've attached your pride to VS code being good.
Why?

>spout ignorant nonsense
>get proved wrong
>wow why are you proving me wrong you loser

Atom is shit.
VS is shit.
Vim is shit.
Emacs is shit.

VS Code is the first pleasant TE ive used that just works. And i dont have to fuck with an external config file for rice and QOL preferences either.

But use what you want i guess.

> pacaur -S dlang workspace-d
> Install vscode plugin
> Config the std lib path
> ???
> Done

>Why
1. You know where the DCD,... resides so it's easy for you to edit their config and recompile
2. In case that you remove VSCode you can still use the tools manually

>I hate all other editors irrationally
It all makes sense now. Even why you'd suggest vs code as a debugger.

Thanks, Rahul! 2 Rupees has been deposited into your Microsoft® Windows™ Store Account™.

>irrationally
I used atom for awhile with C, but big projects slow it down.
VS was already slow and tedious from the start.
Vim is pure tedium and takes extensive amount of time to have anything usable for programming.
Emacs when i got tired of Vim and things werent much different.

>Vim is pure tedium and takes extensive amount of time to have anything usable for programming.
Nah, you're just shit.

my home brew search engine, if you want to look up older style websites, use my search engine wibr.me.
Its a lamp server on a vps. Good old php/sql with a bot (written in c) that scrapes the submitted sites.

>vim
How can you complain about vims setup?

Not him but the one and only reason I use VS Code is that it has a nice built in terminal that I can quickly focus to without having to use the mouse.

>Neo/Vim
DCD breaks Vim. Vim has other issues that hamper productivity.
>Coedit
No built in terminal, passing arguments and inputs are a pain in the ass
>Sublime kek
Well, it's got no built in terminal. Plus it's closed source.
>Atom
Didn't try it, it does not have a built in terminal but I guess you can install a plugin that allows you to switch to a terminal pane unlike sublime
>Code::blocks
I actually want to try this!
>Eclipse
Unusable
>IntelliJ
>Even though I configured everything:
1. I can't find a way to run dfmt via a shortcut
2. No bracket matching

We are making a web browser!

>built in terminal
Who the hell cares about that? Just fucking open a normal terminal.

vimrc is ass.
Severe fragmentation with plugin managers doesnt help.
VimS is also terrible.
Not to mention Coedits still buggy as shit, and god forbid you accidently run an infinite loop. and trying to rice it is a nightmare.

CB is ass for D,

>D
Oh, you're one of (the only) those fucking idiots.
Your opinion has been completely discarded. There is no point is arguing with a braindead person.

When you have multiple windows open, depending on your window manager you may have to press a few keys multiple times. However, an easy solution to this is to develop/test in a separate workspace.

I envy IntelliJ's Rust integration. I find that combination to be very comfy

>when you have no arguments left

Vim is trash. Fight me.

The ease of being able to toggle to your editor and terminal with one bind each is nice. I can also just make a new terminal, cycle between those and delete them all with a bind each. Especially when im working with different languages at once.

Multiple external windows also goes against the one good thing Vim enforces, which is dont use your mouse for programming if you dont have to.

But sure i guess i could nig-rig the same solution to emulate, but why when i already have it?

Nice website for your browser. Please keep it that way. I have added it my search engine (mentioned further up), and will keep an eye on your development progress. Would love an alternative to FF.

>He doesn't use a tiling window manager

This is a thread about dev projects, not about arguing about your stupid text editors. Will you guys chill?

I do cross-plat so VS Code is a dream for wangblows.

This is the one thing I loved about Vim/Or any CLI text editor. Of course you have to use tmux or dvtm or modern tiling terminal emulators that allows multiple windows

Scala is so shit it almost (ALMOST) makes C++ look a little less shit

Why is lambda calculus so comfy?

Even though they dont show the slides, i really enjoyed this talk just for blunt and emotional he gets.
youtube.com/watch?v=4jh94gowim0

Dude is slightly mentally unhinged

C++17 > *
pastebin.com/yhn9jznb

I think you would be too if you spent 5 years chained to a shitty language,desperately trying to make it better but just watching it get worse.

50 rupees and 16 bing points have been added to your designated Microsoft Visual C++ shilling account, vishnu

I already am. Doing Physics and being attached to /dpt/ is t blame.

Why does /dpt/ shit on C++ so much?
Is it too advanced for you?

C++ is literally for brainlets, fuck off

C++ killed programming.

Being overly complex doesn't mean that it's well designed; it's actually the opposite.
Fuck off, you microsoft shill.

61083961
Its templates, pajeet

>There are people that think C++ is actually complex and that's why people hate it

Because it's too thicc for its own good. I don't even get to use a quarter of everything it has to do my job.

Take your furry shit to

>boost

You mean std beta

It's amazing, right? Almost every single person I asked why he is using C++ replied "C is a bit too hard"

No you mean std::stdbeta::currstdbeta