/dpt/ - Daily Programming General

What are you working on?
Previous exploded

Attached: 1527085426531.jpg (400x400, 16K)

Other urls found in this thread:

dailyprog.org/~tacixat/blog/posts/Problems With Social Media.html
winprog.org/tutorial/simple_window.html
stackoverflow.com/questions/22569133/what-is-the-logic-behind-collision-detection-in-2d-games/22569232
twitter.com/NSFWRedditImage

haskell!

thanks for using an anime image

Attached: haskelane.png (287x81, 28K)

>anime

Levels of indenting beyond 3 indicate a problem with your code.
Writing long functions with many inner scopes is bad for readibility and performance.
Every function should be responsible for the functionality it claims it does and nothing else.

in R

how do I count how many groups contain an element with a specific value in a panel data set

just started to get in dplyr and other libraries

What's the point of using monads for side effects anyway? They allegedly allow Haskell to maintain its "purity," but any code that uses them becomes, in practice, imperative. Why not simply allow the programmer to define pure "functions" and impure "procedures" and allow calling functions from procedures, but not vice-versa? That way, people could still reason about the pure parts of their programs and explaining Haskell to novices would be much easier.

>define pure "functions" and impure "procedures" and allow calling functions from procedures
gee you mean like FUCKING MONADS?

No. My solution lacks the mathematical framework that one needs to fully understand monads, therefore it's simpler. I know that it will look the same in practice I said it in my original post. The point is to enable beginners to learn the language quicker by eliminating complex concepts with simple ones.

>t.
You do not need to understand the maths to use monads. You can even fudge it and make ones that don't obey laws.
What you want is literally monads but a more retarded subset

Attached: DdM5PONWAAAEc7W.jpg (1241x1010, 72K)

the absolute state of Jow Forums

Attached: state of g.png (305x300, 82K)

what do you mean by group, what do you mean by panel data set?
I was just feeling bad about forgetting all my R, so I probably won't be much help anyhow

I am using godot as my main IDE to make non games.

Attached: apu.jpg (636x515, 38K)

cris, please, you don't need to attach a frog every time you post. Stay in /agdg/.

dumb frogposter

What's with hatred of frogs on Jow Forums all of the sudden?

to all web devs, how do you plan and design your website from a visual point of view? I've decided to push myself more on web since most of my experience is with command line programs but I find myself spending 90% of the time tinkering with the styling instead of coding. Do you just have to have an eye for it or is there some kind of general dos and donts?

>all of a sudden
Stay in your fucking containment board

>t. someone who has been here since 2012+

>using godot as my main IDE
The official tutorial doesn't say anything about a "godot IDE." It just lists KDevelop, QtCreator and Xcode.

You could ask the same of "advice dog"
put another way, think about a bunch of people trying to ignore a douche being retarded at a party. Finally they tell him to fuck off. They didn't "suddenly" hate him.

Attached: advicedog.jpg (960x540, 70K)

I miss 9fag days

Text is the best.
>dailyprog.org/~tacixat/blog/posts/Problems With Social Media.html

I thot tihs project of mine was gonna be easy

single file < 1000 lines..

nope.

Attached: graph.png (895x623, 59K)

Dependency Visualizer?

>dependency cycles

Attached: vomit-chan.jpg (680x680, 82K)

no my friend, these are my modules

these, my friend, are my dependencies

Attached: dependencies.png (932x794, 240K)

how to program my life, so it won't suck?

Attached: 1104164b1-5.jpg (1920x1200, 832K)

Just go to Gensoukyou, it's a better place.

the only cycles are the daemon, and a module that's split into multiple files.

Attached: dependencies.png (6999x6522, 2.22M)

I just landed a job that uses a software suite to develop business automation tools with custom scripting here and there for more targeted behavior. The thing is, this really isn't a developer position per se, although it does lie somewhere within the world of business IT and coding. I can write CRUD web applications, and have been studying that in my spare time pretty heavily for around a year. I'm wondering if I should continue to write more while working this job for a while and applying to more dev-oriented roles, or if I should take the time to delve deeper into CS as a long-term investment. I have a copy of the Algorithm Design Manual. Should I pick up Java/C/C++ while I'm at it?

I wasn't really in the financial situation to take a pass on this. It's more money than I've ever made. I was elated to even get the offer, but the more I think about it, the more I worry that it's not really relevant experience that'll better my chances of finding purer software development work. I ultimately want to have the title of 'software engineer', I'm just not sure I'm there yet. I have a degree, but not in CS, obviously.

Currently scraping every post on Jow Forums. Should have a large enough dataset by saturday to start training the model for my reply generator extension.

There is a rule against using scrapers and bots you know..

and this ladies and gentlemen is a shining example of why "data scientist" is a thing (some intersection of math/cs/stats)
The complete lack of statistics background leading to a sloppy but confident methodology.

Attached: 5193db0avbey.jpg (947x946, 71K)

science sucks

thanks for posting, pajeet!

I'm following the rules for Jow Forums's api
>sloppy
we'll have to see

not a pajeet

But bro if you did next weekend too you'd have double the data

you all dead

dead to what?

you want the key explain me it

ifnot fuckoff

WhatisSatanism

none of you pussyeswill stay herenow wil you...

Imagine being sloppy drunk and posting on a Vietnamese quilting BBS

satanism is here to teach a much larger thing but you wont get it;.

hahahfuck off

Too scared to upload shit to GitHub that isn't complete, because I don't want it to be one of those incomplete projects. Is this rational? Also not a cs major, but is it bad to make a simple checkers game or minesweeper, or would it look like a class assignment? What are other things I could make without it failing or looking like a school assignment?

>Levels of indenting beyond 3 indicate a problem with your code.
I've recently come to realize this.

Applying this rule doesn't necessarily mean making tons of helper functions, it's just an indicator of the quality of your implementation.

4 levels should be VERY rare.

Do it fagget. It should boost you to do something other than continuous fizzbuzz besides even the big shits do it like microsoft, oracle and gnu project

>scared to upload shit to GitHub
Just do it. When someone declares a project "complete", they're really just declaring that they've picked a stopping point. All non-trivial software is eternally incomplete.

>Levels of indenting beyond 3 indicate a problem with your code.
Proof that assembly is the best language.

Can someone explain to me what pointers are for and why I would use them as opposed to reference? I have a somewhat good idea of how to use them but I still don't get why they're suppose to be superior

pointers can be reassigned
pointers support arithmetic also

QUESTION:

If im coding in a language like C+ how could I make it so that when I execute the code it happens in its own application window, like a game does.

Attached: Thick_Window_Borders_Windows_8[1].png (511x347, 16K)

>Is this rational?
No, but it is understandable. Just remember that it is not bad to let people see how you got to your answers. Teachers always like it when you show your working, and that's at least partly because it is more real than just pulling everything out of thin air.
If you're doing this in a job, be aware that some places really think you should never do much work between commits, and others think that you should never do anything other than perfect commits, and some PLACES FULL OF STUPID FAGGOTS want both because THEY ARE FUCKING IDIOTS.

do you mean in a gui? you need to use the win32 api which is hell on earth, and if you're asking that question you're probably gonna have a tough time.

Attached: 1492694156709.png (668x327, 115K)

Thanks for the answer.

I didn't mean the second part to discourage you, I'm just saying that as an experienced programmer I still face issues every time I wanna make anything graphical with the Win32 API.
Anyway, here is a 'Hello World' GUI program guide:
winprog.org/tutorial/simple_window.html

You can skip the win32 mess and use GUI toolkit with your PL of choice

The fuck are you using, nodejs?

What is the true patrician Jow Forums approved editor for Loonix? I want to program in Python.
VSCode? Atom? Sublime?

Just use Qt, or Visual Studio (WPF), Nobody sane does their GUI from the ground up using the Win32 API directly in the real world, because it's a very bad case of "reinventing the wheel" and then your code is nonportable as fuck. If you want to do it for learning purposes more power to you.

vim

As someone who actively researches neural network technology (BNN Neuron Architecture applied to FPGAs), NN seem so dead end with our current level of tech. Its just throwing a fuckton of simple computations to find the global minima of a f(x). As with all forms of computation, it will only truly take off when we can just throw several magnitudes more of resources at the problem which isnt looking to great considering gate size is currently so small that physics break down if it gets any smaller.

2hardcore4me

Emacs or vim. Emacs is enormously feature rich and elisp is very robust. Vim is far more lightweight but vim scripting is fucking grotesque.
Pick your poison.

vim
be an oldfag, gain respect
revel in its insanity

Powerful NNs are run on either fuckhuge cpu clusters or more commonly are run on GPUs for that sweet sweet parallelism

the good thing is that you dont need to script anything if you're using vim, because it just werks

I may be autistic but at least I don't suffer from severe autism

vs code if you just want to program
vim if you don't actually want to program for a few weeks while you tinker with it.

how do you feel about programmers who think of ML as a black box library they load up and shove some data into, then feel like pic related

Attached: Screenshot-2016-04-14-11.19.23.png (1384x818, 1.69M)

CPU clusters are shit tier at NNs, GPUs are great for parallelism but shit for power.
FPGAs have always won out in power efficiency, but a paper through came out recently that created an FPGA implementation that blows GPUs out of the water on processing too.
I'm trying to add onto it and incorporate GPU architecture methodologies to up the parallelism and further improve their model

vim, it's not as brutal kvlt as people make out.
What you need to do though:
get lightline running
bind something more reasonable to "return to normal mode", I use alt-space because I don't ever alt-tab in my WM. (i3, tiling wm, uses the win key by default to do stuff)
and type "vimtutor" in your shell (which should be zsh, with oh-my-zsh)

Literal script kiddies
Except instead of leet haxing their CoD match they're just adding to the huge number of CS kids who only know how to program the common interview questions

and goes without saying, xterm-256color with a pleasant colorscheme such as seoul256. Cousine should be your font also.

i3 is god tier
only fitting that ubuntu the normie linux ships with the worst GUI ever

I loaded up xfce the other day after many months of i3 and it felt just... disgusting. Like really hard to navigate or do anything with more than one window. It's amazing how people put up with things when they don't realize there's a better alternative. Like why would you ever PREFER non-tiling, it makes no sense to me now.

I feel like a pajeet, as it's in it's 5th and hopefully final iteration. Not gonna commit till the end, not sure if there's steps to overcoming this fear.

The only thing that keeps my sanity when working on other peoples workstations ctrl+alt+NUMPAD psuedo tiles your active window
good look switching between contexts, but at least it doesn't make me want to vomit

Also is there a point in writing a recursive method vs the normal iterative one? Doesn't it just increase the call stack? So when would you use it when you can just do the normal iterative one?

gonna apply for c++ internship soon
wish me luck anons

don't even know what to refresh, just browsing geeksforgeeks and cppreference, jesus

Attached: 15256076299160.png (830x1000, 1.03M)

Nobody is impressed with someone who just commits a finished project, that's not really the point of version control. Just like nobody's going "ooooh look at all those bugs" when they're commiting fixes to bugs. That whole process is what looks good, if you're talking about presentation. You're doing yourself a disservice by leaving out the steps that show how you work.
It's not a competition of who can publish the cleanest code user. First of all, nobody actually gives a fuck, when I say presentation I'm assuming you're caring how things look from a perspective of a portfolio for employers. Because nobody besides that is going to care. And, depends on the employer, but most will be more impressed with a consistent history than your one-commit checkers game.

data structures and algorithms

>insanity
the keybinds are almost all mnemonic
Once you get the hang of vim's modal editing anything else will feel god awful

fucking valgrind won't install

Attached: angree tomino.jpg (350x431, 38K)

$ sudo pacman -S valgrind
[sudo] password for user0:
resolving dependencies...
looking for conflicting packages...

Packages (1) valgrind-3.13.0-7

Total Download Size: 67.86 MiB
Total Installed Size: 266.33 MiB

:: Proceed with installation? [Y/n]
:: Retrieving packages...
valgrind-3.13.0-7-x86_64 67.9 MiB 920K/s 01:16 [#########################################] 100%
(1/1) checking keys in keyring [#########################################] 100%
(1/1) checking package integrity [#########################################] 100%
(1/1) loading package files [#########################################] 100%
(1/1) checking for file conflicts [#########################################] 100%
(1/1) checking available disk space [#########################################] 100%
:: Processing package changes...
(1/1) installing valgrind [#########################################] 100%
Optional dependencies for valgrind
openmpi: MPI support
lib32-glibc: 32-bit ABI support [installed]
ldconfig: /usr/lib/libDOtherSide.so.0.6 is not a symbolic link

:: Running post-transaction hooks...
(1/1) Arming ConditionNeedsUpdate...

Posted yesterday at Engine Dev Question

So I have been working on a platform game in C. It is tile based. Every tile has a mask that is a 1D array telling it how many pixels up (or down, depending on the type of tile) that specific spot of the tile is, so slopes can be done. For the most part this works great, however, there is some quirks that I want to figure out.

Halfway through the video, you will see I try to get the player 1 pixel into a solid tile while standing on the slope; when it jumps it will just snap up to the top of the solid tile. When this snap happens, the next horizontal movement will snap the entity back to the slope.

I'm almost certain that it is an order of operations somewhere. One thing I have considered adding is a variable that will determine if the entity uses the entire bottom part of the mask for collision, or only the middle part. I would like for someones opinion on that.

I elaborate more on it at the discussion at As an user told me yesterday, I will eventually get it working. I have some flag variables in my entity and it may be an order of operations thing.

Attached: 2018-05-23 19-25-38.webm (320x240, 416K)

>C
Found your problem

>pick up Java/C/C++ while I'm at it?
first of all Java, C or C++ isn't something you just "pick up". you're not going to land yourself a serious java, c or c++ (or c#) job by just casually knowing a hello world with those languages. those are examples of languages you have to really dedicate yourself to if you want to succeed with them

>I'm wondering if I should continue to write more while working this job for a while and applying to more dev-oriented roles
>I wasn't really in the financial situation to take a pass on this. It's more money than I've ever made.
work there until you find a better job, its really not that difficult. get to at least 6 months experience though otherwise your resume will look like you're hopping jobs too quickly.
unless you're integrating with a VPN you're going to get banned pretty quickly. unless you're not talking about automated replies
thats the ugliest visualisation i've ever seen. why even have a visualization if it only serves to confuse the person looking at it?
a hello world MVC application in .NET has ~40 dependencies. doesn't really mean anything

>entity
first of all can i ask why you're using this word? entity has a very specific meaning and i'm wondering if you've co-opted it unintentionally or if you actually have a reason to call it that.
>I would like for someones opinion on that.
i wrote a semi-popular stackoverflow answer that might provide some guidance here:
stackoverflow.com/questions/22569133/what-is-the-logic-behind-collision-detection-in-2d-games/22569232

>a few weeks
Lesson 1 of vimtutor should take a few minutes and gets you up to approximately notepad level.

I want to make a game in C!
someday I will be good enough

with enough hard work, anything is possible, pic very much related

Attached: 10 years.jpg (1199x667, 236K)

key part of my stackoverflow answer is this:
if ((bullet.x + (bullet.radius)) >= (monster.x + (monster.radius)))

basically you want to use the actual dimensions of your "entity" when considering a collision (in my example's case i use the bullet's radius)

i should point out the reason i linked my stackoverflow answer is this:
if ((bullet.x + (bullet.radius)) (>)= (monster.x + (monster.radius)))

basically you want to use the actual dimensions of your "entity" when considering a collision (in my example's case i use the bullet's radius)

>muh vidya
vidya will kill you like it killed tb

Why can't I get a job?

Is it because I don't have a facebook or linkedin?

Attached: SoftwareResume.png (1237x1522, 422K)

this is without a doubt the gayest thing I have ever seen

pic related peaked at 2005 and went downhill after.

Lets see some code rn user, make a simple text adventure game and come back to me. (this should take about 2 hours if you know file i/o, switch statements, user i/o, and the absolute basics of C syntax)

How long have you been looking? How many jobs have you applied for?

you did a lot more than I did and put a whole lot more effort into your resume, no idea.