/dpt/ Daily Programming Thread

Anime edition

Previous thread: What are you working on Jow Forums?

Attached: anime_programming_language.png.png (1200x1800, 1.3M)

Other urls found in this thread:

en.wikipedia.org/wiki/Quadtree
stackoverflow.com/questions/388242/the-definitive-c-book-guide-and-list
codex.cs.yale.edu/avi/db-book/db6/slide-dir/index.html
msdnshared.blob.core.windows.net/media/2018/05/IntelliCode-Video.mp4
vavr.io
techempower.com/benchmarks/#section=data-r15&hw=ph&test=db
github.com/mach-kernel/vertx-polyglot-counter#benchmarks
twitter.com/NSFWRedditVideo

I haven't put in a single hour yet but at least I'm learning how to use command line and bash uwu

Python, C++ or java

How elegant is your lang, /dpt/?
In J this is just
spiral =: 4 : '(x*y) - |."1|.(|:@|. , {:@{: + >:@i.@#)^:(+:: | x-y'

Attached: Anime_Challenge.png (1080x1106, 682K)

Can someone explain to a brainlet why its frowned upon to use functional languages for game engines? could you theoretically make a text game / VN in F#? how would it compare to one made in C/C++?

confuse dabout how i am supposed to implement draw()

the points all get stored in a TreeSet

the rows in the set alternative between whether they are supposed to represent vertical or horizontal partitions in the image at left

e.g. the root node is a vertical partition. the second row both nodes split horizontally.

row below that, all 4 nodes split vertically again.

so to draw, i'm going to need to iterate through the tree to plot the points and draw the partitions, but how am i supposed to know as i do so whether a particular point represents a vertical or a horizontal point? this doesn't seem like a piece of information that TreeSet would give me, and i'm not supposed to create my own set to hold the points.

Attached: file.png (2200x842, 149K)

What combo makes most money?

C

>rectangular array

Attached: file.png (610x324, 345K)

Visual Basic is the cutest.

Attached: Ultra+rare+smug+anime+girl+if+youre+reading+this+youve_56cff8_5818425.jpg (229x220, 8K)

actionscript
fenoxo makes $400,000 a year

Yeah, I guess that's redundant. I'll remove it in case I ever post this meme again.

the answer is dead waifu,Moho is best girl.

unreadable. is this a joke?

Readable and intuitive.

Attached: serpentard.gif (213x199, 339K)

Employed Haskell programmer reporting in

Attached: 1495359317161.png (1214x1109, 1.65M)

smug piece of shit

Haskell
300k starting
Any job you want

Your uni hire you?

i did a challenge like that once. my solution for both clockwise and counter clockwise was:

#lang racket

(define n (read))
(define width (+ 2 (inexact->exact (floor (/ (log (* n n)) (log 10))))))

(define (clockwise x y n)
(define n-1 (sub1 n))
(define k (min (min x (- n-1 x))
(min y (- n-1 y))))

(define start (add1 (* 4 k (- n k))))

(define n-1-k (- n-1 k))
(define n-1-k-k (- n-1-k k))

(+ start (if (= y k)
(- x k)
(+ n-1-k-k
(if (= x n-1-k)
(- y k)
(+ n-1-k-k
(if (= y n-1-k)
(- n-1-k x)
(+ n-1-k-k (- n-1-k y)))))))))

(define (counter-clockwise x y n) (clockwise y x n))

(for ([y (in-range n)])
(for ([x (in-range n)])
(display (~a (clockwise x y n) #:min-width width #:align 'right)))
(newline))


it doesn't need an array.

Attached: 4575775.jpg (627x885, 71K)

You need build your own data-structure.
Binary Tree odd levels begin vertical(red) line and even levels be horizontal(blue) levels.

Draw line must take father node boundary.

TreeSet dont show internal node hierarchy.

>php BMI is 28.3

What's to stop someone from changing the source IP address in the IP packet header and impersonating traffic from some legitimate IP address?

Attached: 1522183309139.jpg (533x400, 112K)

>meme read

Attached: 1484801089723.png (600x600, 462K)

yeah i think it's just a poorly written assignment
first they have you implement it the naive way using a treeset and then have you implement the 2d-tree. i think they only care about draw() being implemented for the 2d-tree implementation.

I got halfway through K&R and then they introduce shellsort and quicksort. They don't try to walk you through them, just give the code to copy and paste to use in exercises. But I tried to figure out how they work and I couldn't cause I'm stupid and I quit working through the book.

t. Pythonlet

I'm a python baby and I want to learn c++
spoonfeed me resources pls

Attached: 237962a8d23a2e7162cf86ddae95acaa.jpg (708x915, 55K)

shell sort is pretty cool

Exercises begin intro ideas of QuadTree.

en.wikipedia.org/wiki/Quadtree

stackoverflow.com/questions/388242/the-definitive-c-book-guide-and-list

Because state machines

is there any benefit to learning linear algebra if i'm out of college? offhand i know that it can be used in linear programming and ML and i'm sure other stuff too. but i'm not sure how i would benefit directly from learning it. maybe doing so would just help if i decided to take a coursera class on linear programming or ML

Attached: file.png (388x499, 209K)

I'm a dummie, first semester on college and we are learning C, I know the basics because I study some alone, so I'm fairly ahead of class.

I was looking at jobs position and looks like MySQL/SQL/Database management seems a very recursing skill required, but I have no idea how anything of this works, where do I get started, please?

Very good book about it, internet tutorial begin really limited.

codex.cs.yale.edu/avi/db-book/db6/slide-dir/index.html

Build some website project, focus in design database and manager(backups, security and migrations).

https

Here we go

Attached: Screenshot_20180507-202146.png (720x1280, 195K)

Are you a troll or just a Pajeet?

>want to learn how to program that isnt generic basedshit like javascript, html or css ie 99% of learn to code sites
>have to prove i can already solve problems with languages ive never used or seen before

Attached: Capture.png (739x589, 136K)

the hell is this ネギ shit

C# a cute!

Good luck. Don't skip what you don't know but rather search deeper. Sometimes things will sound complex but the author will make it clear later after a one page or so.

onions

Anyone worked with terraform? It's pretty nifty. Writing some stuff to make managing rabbitmq infrastructure easier

yes and

Where is this from?

c*dewars
powered by 丂口丫

After 2 years of starting, .net core can now run on arm and alpine!

C#, if you're seriously asking between those three. It has the best aspects of those for a general purpose language. C++, Java, and Python are better suited for specific scenarios.

Java, unironically
That is, if you want to make money.

There's nothing wrong with Java, especially modern Java. Webshits complain about the verbosity and boiler plate but your IDE can wire most of it up for you. Plus the verbosity saves your ass when you're working on large projects with people jumping on and off it for years.

>implying

Checksums

What the hell is modern java?
Verbosity won't help when you are desperate when working with generics.

Working on a side project to render Cairo surfaces to Wayland using EGL. It's interesting. Gonna use it to make a Wayland notification system and status bar.

Modern Java ecosystem really. Sprint boot is fucking stellar for most backend projects.
The onus is still on the dev to wrtie legible code, but at least the language enforces a certain level of clarity unlike something like python or other loosely typed languages.

This.

>not understanding generics
Are you a braindead gopher?

Modern java is Apache Kafka, Hadoop, Elastic Search, RxJava, Spring Boot, Vert.x

You know, all those technologies that Google, Netflix, Amazon and big banks depend upon.

i use linear algebra everday to save lives.

what book is this
??

It’s useful for 3D programming

Spring has been around for a long time.
Reread my post, brainlet. Java generics are absolutely shit. There is no doubt about it when you can't even make a distinct pair like some user was trying few threads ago.
>Modern java is .. *lists 3rd party libs*
nice meme

What's a good practical 1st programming language?

Botnet applied to code! Embrace the buttnet!
>msdnshared.blob.core.windows.net/media/2018/05/IntelliCode-Video.mp4

>verbosity
nice meme

C
Introduction to computing systems from something something to something and beyond

How are java generics shit? Go ahead, explain. They make it very easy to DRY so i don't get what beef you could possibly have with them, other than not understanding it.

Listing open source 3rd party libs is bad how? Are you one of thoee retards that writes everything from scratch? Even so, Java has become quite elegant with the use of lambdas

So they really were sending my code when I copy paste..

Java

Lol lambduhs and streams
Make a generic distinct pair.

i want to learn f sharp as my first language just to be contrarian

ahahaha
take that PHP

Attached: Screen Shot 2018-05-07 at 9.34.27 PM.png (1060x1420, 231K)

Yes Spring has been but it's gotten much better now with spring boot and the various starters that's risen up for it. It's changed up a lot for my workflow. When I'm spinning up a production microservice I tend to go for spring boot.
Man for modern development and evaluation of a language literally no one just looks at the language. People evaluate the community and framework support around it and Java is extremely mature compared to it's competition. I agree generics are a mess in Java but future versions are suppose to address. Hell, we finally just got a module system and reactive streams. Java is pretty interesting again.

care to elaborate?

TFW brainlet who can't even do basic math without a calculator and about 2 hours googleing how

Attached: 1445703893530.jpg (291x302, 21K)

Streams are kinda meh yeah but they're improving it. There's some good functional and immutsble collections library for vavr in the meantime
vavr.io

Vert.x is faster and better than spring though. Less magic, less bloat. If you aren't pajeet tier you should make microservices in vert.x and ditch the spring crutches, which don't help anyway.

based Joseph

tyvm uwu

I haven't had any major performance issues with spring boot. The reason I use it is fir the community support and all the nice out if the box integrations.
Can elaborate why it's better? I haven't really looked at it before.

what do you guys think of Guice?
why is something like that even necessary?

The absolute state of java code monkeys!
>just copy and paste
>just use a library

its also a shit

honestly not really, it might be mildly useful if you're doing gamedev stuff or robotics

Is it considered bad practise to have more words than fucking keywords and operators in sepples?

>t. Stupid gopher or rails dev
Kek

techempower.com/benchmarks/#section=data-r15&hw=ph&test=db
github.com/mach-kernel/vertx-polyglot-counter#benchmarks

Vert.x lets you make an application that is completely reactive, from incoming http to db. Spring boot, unless you customize it, still uses blocking jdbc on the database layer. It also lets you create very lightweight microservices, in comparison to spring which from my experience has been very heavy.

The 1 verticle per cpu core easily lets you write stateless applications that scale across multiple cores which can communicate in between verticles without having to worry about threading issues (If you follow the guidelines described on vertx.io)

Also imo it is much more fun to write because there is not fixed "Spring" way to do things, you have a lot more freedom. You could even use Spring just for something like DI and use vert.x for everything else, vert.x can be used together with other frameworks. Also the SockJS eventbus bridge is very nice, it allows you to easily build realtime applications, with data coming in over websockets form browser clients

What do you mean? I made those aliases so the code would be easier to read, like
thing.is_a< string_document >()
thing.get< map_document >()

Attached: Screen Shot 2018-05-07 at 9.49.53 PM.png (822x70, 13K)

it's bad practice to use sepples

Fffffs fucking abomination.

Also vert.x being lightweight and easily to make stateless helps a lot in horizontal scaling, e.g. with kubernetes

Attached: golang-kawaii.jpg (192x262, 37K)

Hey look! It is the vert x fag at it again!

#include
#include

class Parent {
public:
Parent(){};
int ParentInt = 0;
};

class Child1: public Parent {
public:
Child1(){};
int Child1Int = 1;
int SiblingInt = 5;
};

class Child2: public Parent {
public:
Child2(){};
int Child2Int = 2;
int SiblingInt = 5;
};

int main() {
std::vector Pptr;
Pptr.push_back(new Child1());
Pptr.push_back(new Child2());

std::cout SiblingInt

I got some spaghetti code. I am trying to run a registry check from a registry of commands to make a command line program, and so far this is this first idea of how to have it recognize "first word" - "second word" - "last word" (like in Arch, "pacman -S xorg", you get what I mean, running a check to figure out what to do in order) and it's complete ass that I know won't work, this is all for the one command so far. Help.

Attached: holy hell help.jpg (579x505, 114K)

No because you have a vector of pointers to the Parent class

Ah gotcha that's pretty interesting. The the rxJava stuff is something I've been keeping an eye on. The latest version of spring is also suppose to get reactive support though.
The lack of community support vs spring/spring boot has me hesitant though. I don't want to end up with another dripwizard application where no one wants to maintain it.
>Kubernetes
We're an AWS shop, we're waiting on EKS support till we migrate over, already completely containerized though, and even then it'll be years down the line before a full migration. I'll check it out on my free time, I don't see it replacing spring boot though

>streams are kinda meh
what are you talking about streams are great

Seriously which combo

What would you do to upgrade python?
Easier install process, native execuatables, better out of the box IDE.