/dpt/ - Daily Programming Thread

What are you working on, Jow Forums?

Last thread:

Attached: 1551339845870.jpg (1280x720, 810K)

Other urls found in this thread:

arxiv.org/pdf/1705.02257.pdf),
en.wikipedia.org/wiki/Onesimus
docs.racket-lang.org/sicp-manual/index.html
tex.stackexchange.com/questions/47520/removing-the-quotations-marks-from-the-bibliography-using-harvard-style-agsm
twitter.com/AnonBabble

I love you all, anons

Attached: 1494888806720.jpg (540x720, 86K)

nth for Nim!

>join company
>clone main repository
>+2000 commits
>+10 branches
>+4.0GB

4th for Haskell
u2

...

Y-you too!

>>+2000 commits
Commits simply grow over time. It may just be a mature project.
>>+10 branches
That's not very many.
>>+4.0GB
This is either because it's simply a large history (unlikely) or someone was retarded and put large binary files inside of git. I don't know why there is always some fuckface who does this.

>vcpkg

Attached: 1552982465433.jpg (1280x720, 111K)

>2000 commits
That's like a year of work for a small 4-5 man team. Unless you're somewhere that likes to push a month's worth of work at once.

one might cheekily claim that there are so many parameters in modern algorithm design research for exactly that reason - to keep the funding rolling in - but it turns out that it does still make a difference in practice and that there are even still breakthroughs, even in areas like sorting, where some algorithms consistently perform better than others in benchmarks, despite their complexity.

JavaScript rocks!

Attached: 1500840209383.gif (160x224, 242K)

i don't know why but i'm totally ok with this choice of image for the regular js rocks post. i don't even like js.

What's the best way to check if a signed integer is out of bounds of a range, e.g. if not within -128 to 127, and assign it the the respective min/max range without using if-else?

Color me ignorant (again), but how on Earth can sorting still be an active research topic when radix sort under an ideal hashing function exists (for certain classes of input)?

I finally got around to buying these books. What's the best way to run lisp? Also I'm surprised at how thin K&R is.

Attached: Capture.png (1230x883, 2.14M)

Adding a GUI and initial mapper support to NES Emulator for TempleOS

Attached: templenes.webm (872x652, 2.34M)

Depends entirely on the language, but a ternary statement (which itself doesn't avoid if/else inherently).

int x = a < min ? min : a;
x = a > max ? max : a;

for sicp you should probably use racket, you can even get the picture language working. chicken/guile works too. do not use mit-scheme.

use min and max functions, or a clamp function if available

>not uploading your node_modules folder to github

What's the name of the emulator?

TempleNES

is this the power of autism

Attached: file.png (765x259, 7K)

clamp(int min, int max, int n)
{
n &= -(n >= min);
return n | ((max - n) >> 31);
}

parallel sorting, for instance.
hyksort, bitonic sort, or IPS4O (arxiv.org/pdf/1705.02257.pdf), to name a recent one, which, according to the paper, is even performing better in sequential cases.

>get cs degree
>get job programming backend in language called abap
>language doesn't transfer well, very useful to my company but that's about it
>2 years of this

What should I do, I need to start reviewing my old skills. I was going to start a machine learning project in python for fun but I realize I dont have time for this at the moment. Do I learn javascript? Do I review java and try to do a project?

I need to make sure I'm not stuck in a niche. I still have time but it's running out.

Moreover what DoD analogue even funds algorithms development? I'm more strongly connected with formal methods and fuzzing/testing systems for firmware components and even then it's a struggle to actually get a respectable chunk of funding to prove or, more importantly, disprove that given component is secure without suckling on the many-headed cock of the DoD.

Is there some secret NSF program my department's missed out on?

don't bully templeos guy, autism built the computer and all the software we run on it.

A bit too safe. I was hoping for something a little holier.

As Skarupka himself said when presenting the highly optimized radix sort, these things are hundred year processes, people come, tweak things, then go their own merry way.
As the hardware changes new ways of optimizing arise as well.
His optimized radix sort for example specifically relies on IEEE 754 floating point representation for sorting floats

honestly, i have no idea.
i don't work in algorithm design research either, my branch is a different one (and i'm in europe), i just know a few people that work in the area and took a few classes in that direction.

>Brunette = 1/0
Big think

Attached: 2019-04-08-183521_835x470_scrot.png (835x470, 39K)

I'm not too thrilled with the name, it's more of a placeholder. I'll probably change it in the near future.

Dead OS

printf("%d\n", clamp(-128, 127, 3000));
printf("%d\n", clamp(-128, 127, -3000));
Prints: -1, 0

How about GeNESis?

FYI regardless of how shit this board is in general, it is nice to occasionally run into someone that has an actually background in theoretical CS and not just garbage mixed with anime. Thanks for the company (regardless of how I still think that, for the introductory student, you're intuition regarding algorithm development is skewed by the consideration of models that go well beyond the conventional understanding of von Neumann systems (or restricted Turing machines (as real universal Turing machines are impossible in a finite reality)).

In reciprocity, I'd recommend checking out the work that's been done in (if you have an interest) formal methods and program verification. I find type theoretic constructions of type theory and concolic execution to be 'of the zeitgesit'. Particularly bounded depth concolic models that try to approximate really complex functions to be super interesting. Of course, if you can restrict the proof system to exclusively cryptographic operation, you've made a big step to 'winning' w.r.t. proof semantics -- in which case you should check out CPSA and Isabelle.

*catches u coding impurely*

wyd?

Attached: johndegoes.jpg (400x400, 15K)

might be confused with the sega console.

hide in a monad

Comment on his man tits and change more state.

How about oNESimus
en.wikipedia.org/wiki/Onesimus

what about clisp?

That won't work for SICP, clisp is common lisp. SICP uses scheme, another lisp dialect. Actually it's an older version of scheme, there's a few small differences. Anyway just use racket.
docs.racket-lang.org/sicp-manual/index.html

import friend

fuck off

everything will be daijoubu

Attached: [FFF-Vivid] Non Non Biyori Vacation [BD 1080p AAC] [3D65299C]-00h39m38s209t.jpg (1920x1080, 775K)

...

import girlfriend

...

>I'm surprised at how thin K&R is.
That's because C is an ancient language with very little features to write about. I'm sorry that you fell for the Jow Forums memes.

>spending money on memes

Attached: CF439A8E-6404-4D40-A7F3-7C70AD391AE6.jpg (651x1024, 59K)

#include

>not include guarding

Anyone here use APL languages?

Learning Q at work, its interesting. Also extremely lucrative, but you have to work in a bank, essentially, which would suck.

The wife guards against being included more than once

int affection(){
kiss(me);
hug(me);
love(me);
return affection(her);
}

Attached: 21963ab8cfb9318bf189b696580f600752aef5a1eb3165ffb822d6c39329b0f2.png (1080x1145, 852K)

Guys I need help. I'm seriously becoming miserable over this. I have graduated with my cs degree. I have a job that pays well for two years but the language I am using WILL NOT transfer well. I do not want to do this longer than 6 months to a year more.

I have forgotten a lot of things about normal programming it feels like. I need to review. In college I mostly used java.

I need to decide what I should focus on learning and stick to it 100 percent. But I'm at a loss for what that should be. What language should I use? I know it doesn't matter in the long run but I need to choose and start reviewing fundamentals then working on a project. C# or java? I looked at javascript for awhile but I'm not sure. I dont even know where to start

I'm leaning to say fuck it and go for java

This getting stuck in a niche with no transferable skills is scaring the hell out of me. If I fail I will off myself. So failure isnt an option.

>affection is an integer not a State
wwwwwwwwwwwwwwww

You posted this in the previous thread right?

What kind of job are you looking to do next in your career? Backend development? Frontend? Web dev? Game dev? Desktop applications?

Look at what the companies near you (or near where you need to go) are looking for.

Hey, I just got some graphics homework, and I need some help:

Make a virtual kaleidoscope. The mirror system is regular polygon, where count of sides starts from 3, and can be incremented with 'a'. The material of the mirror is gold ('g') or silver ('s'). At the end of the kaleidoscope there's at least three different material ellipsoids, which reflect light by ambient+diffuse+Phong-Blinn specular model. The ellipsoids are pushed by random forces (Brown movement).

My current idea for solution is to math out the whole thing (count of reflection, determine the actual ray (outside the kaleidoscope), figure out what it intersects, etc.., basically write up a function that gets x, y, and spews out color), but I'm sure there is an easier approach that i'm supposed to do (actual raytracing maybe? how tf do I do that, recommended resources?).

Environment is OpenGL 3.3 and C++, if it matters

Sleep 3000 &

C-d

that joshiraku is an idiot, so it fits

I'm Writting a package manager Jow Forums, what's the best algorithm to compare two given graphs (one for the installing packages, other for the systempackages) for conflicts? Is this the best way?

That's the problem right there I have no idea what the fuck I want to do.

I've been working with backend for the past two years. At the very at least I know about data selection and SQL type stuff.

I'm leaning towards mobile development and java. My friends work at fidelity and most of them use java. I'm thinking of trying to apply there eventually, job seems nice and relaxed.

They also use javascript a lot. But I know nothing about javascript. Maybe it would be good to start using.

Fuck my brain is so fried from today I just need to sleep. But I would like to make the first step and research my next step before I go to sleep. I need to do something every single day to make sure I fix this

Is a conflict as simple as "a dependency node of the same name but a different version number exists in both graphs" or are you trying to do something more complicated?

Learn Java 12, Gradle, and networking at an undergrad level. We use YourKit at work but I'm not certain how widespread it is.

What are you using at work, Erlang? Some internal toolchain?

On a second thought i just described ray tracing.
Ray tracing doesn't need to use vertices / planes, anything would do as long as i can tell if it intersects (and where), and give a normal vector for the surface at the point of intersection.
Thanks, /dpt/

wish I could believe that
all I wanted was a best friend, a partner
just wanted to not feel so alone in this world

anime's got you covered

Attached: [FFF-Vivid] Non Non Biyori Vacation [BD 1080p AAC] [3D65299C]-00h23m39s919t.jpg (1920x1080, 438K)

Abap

>mobile development and java
>job seems nice and relaxed.

Attached: 26073.jpg (1280x720, 86K)

>anime
>friend

Prepare to be bullied nerds.

Attached: The Quintessential Quintuplets.jpg (1053x921, 419K)

I'm using texstudio and I want to find the agsm.bst file

So I can carry out this tutorial:
tex.stackexchange.com/questions/47520/removing-the-quotations-marks-from-the-bibliography-using-harvard-style-agsm

Anyone tell me where I can find it?

>tfw I want nothing more than to be femdommed

Attached: 1553275143093.jpg (1200x794, 75K)

Lisp is the most powerful programming language.

Built in and free profilers are also pretty good, as are free static analysis tools. Good enough to get started with at least.

the first option, the more complicated stuff like rules I'll do later

Bet you brainlets are too dumb for this.

Attached: problem.png (1000x1024, 776K)

depends on your system, on my gnu/linux system with texlive it's at
/usr/share/texmf-dist/bibtex/bst/index/xagsm.tex
FUNCTION {article}
{ output.bibitem
list.label.output
" (" list.year * ")" * output.nonnull
author "author" item.check
title.field field.used =
{ skip$ }
{ format.title quote "title" output.check }

just add a counter to quicksort

I meant .bst, I copied that by hand like an idiot.

I want to know where it is and where I should look.

On linux it's in that /usr/share directory, if you're on windows it's probably in the directory your tex distribution is installed like C:\Program Files\something or whatever. It's part of the core tex install.

mergesort would be easier.

no bubble sort

Julia looks so interesting, so attractive. I want to fuck Julia

So I found the file, copied it and changed it in my document but the references didn't change.
What could be the problem here?

(I don't have to reboot to get it too work do I?)

I don't think you would need to restart, at least restart whatever environment you're using to edit tex and recompile your documents.

Also I only have a surface level understanding of it, I use latex on rare occasions. That said, I'm sure there's there's probably a better way to change the bibliography format other than modyfing system files. That's seems extremely dumb.

To someone who isn't a programmer, can it be explained what makes a truly good one?

What makes the difference between someone hired by google (or insert desirable company) vs the kind that can't get hired?

Whether or not they can do algorithm and data structure questions. The ones that can't complain about how irrelevant it is to them. These are the same people who would cry about algebra in high school and say it's "useless" and "I'll never use this stuff in real life".

Here you go:
#include
#include

static size_t mergesort(int *arr, size_t len)
{
if (len

>he forgot to check for too many swaps

Is it true that if you really want to know about computers, is a good idea to learn programming?

I deliberately left it out. When you write an algorithm, you write it to be general and not have some arbitrary cap.

>know about computers
From a software side, yes.
From a hardware side, no.

Depends what you mean by computer. CS and programming is about computation, what the machine(computer) does. Which one do you want to learn about? They overlap but it's not the same.