/dpt/ - Daily Programming Thread

What are you working on, Jow Forums?

Previous thread:

Attached: karen haskell.png (1280x719, 818K)

Other urls found in this thread:

github.com/aybe/Windows-API-Code-Pack-1.1/blob/master/source/WindowsAPICodePack/Shell/PropertySystem/SystemProperties.cs
twitter.com/NSFWRedditVideo

>insert some unknown obscure PL

Haskell isn't very obscure anymore

Fuck fuck FUCK! What language should I learn to keep being in the super secret klub?

nim?

J# ?

Japanese

Thank you for posting a programming (anime) related image.

you are welcome

I am not a weeb

Just started learning Go. So far, I love it. Why does almost everyone on Jow Forums shit on it?

no generics

Russian.

it's a child's toy and you should feel bad

Attached: lain.png (392x309, 180K)

Attached: 1499849023819.png (1000x500, 480K)

Why are you using an anime website?

>how to farm (You)s on Jow Forums

prolog, is not obscure BUT its extremelly beautiful .

To be anonymouse. If the entire site was only about anime, there would be no reason to other boards than /a/

thank (You).

Attached: 1495125600495.gif (350x200, 402K)

HTML still newbie but making progress

C++
similar to other memelangs, only the people familiar with it don't think it's shit

Anime is an intrinsic part of the imageboard and its culture. /a/ is for discussion specific to anime and manga. What's the problem?

Attached: 1472853729156.png (1300x736, 59K)

Stop living in the past. Anime belongs to /a/, get over it.

literally just as an unconditional branch/jump (in x86 that would be jmp if memory serves)

as for other methods, well, depends on what method

This _is_ an anime website.
Anonymity however is part of image board culture as a whole, and there are a whole variety of image boards who don't have this weebry as part of their core (420 for example).
For everybody's sake you should go to a better suited website for you.

I'm programming a file system as university project, it's an utter monstrosity so far

I did not claim that there is a problem.

hi plebbit

One would think complaining about anime on every board would give you some sort of hint

Attached: flat,750x1000,075,t.jpg (750x1000, 90K)

Agda or Idris if you want Haskell plus more autism

Best resources to learn Go?

back

I really like autism, however I hate haskell.
What do ?

golang.org

Assembly, lots of autism required and not similar to Haskell

You are autistic. Assembly is the simplest PL.

Obsessively making complex shit out of impractical simple things is textbook autism, look at Lego competitions.

Backpage?

Go backpage?

Go back there

What's a good book to buy at Barnes and Noble about programming python?

>buying books
>python

why does go look so shit?

package main

import (
"fmt"
)

func main() {
const (
pi = 3.14
)

foo := [100]float64{}

for x := 0; x < 99; x++ {
foo[x] = pi
}

fmt.Println(foo)
}

this looks fucking unreadable

compare that to c++
#include

int main() {
const double pi = 3.14;

double foo[100];

for(int i=0; i

Yeah you read what I said correctly

I can't cure your autism over the internets

>const double pi = 3.14;
>not using template static const T pi with overloads for all arithmetic types
ishygddt

> [100]float64{}
kek
also what's the `:=` exactly ?

I'm low iq..

It's a declaration and also an assignment.

assignment
comes from math autists

no generics

Attached: errnil.jpg (700x720, 82K)

library genesis for books.
python docs have a very good tutorial.

whoa! you don't have do that... just have the function return a struct and an err

return struct_name, err

>
#include
#include
#include
#include

constexpr double pi = 3.14;

int main(int, const char **)
{
std::array foo{};
std::fill(foo.begin(), foo.end(), pi);
std::copy(foo.begin(), foo.end(), std::ostream_iterator(std::cout, " "));
return 0;
}

If you want to buy a book to learn with, o'reilly's series is usually excellent. However, for Python, you may really want to look online, there are many good resources online for learning Python. I like Learn Python the Hard Way. There's also Automate the Boring Stuff with Python. Plus, the Python documentation itself on their own website is really good. But as far as just physical books go, I'd go with O'Reilly's Programming Python book.

Also, if you plan to use Python in industry, I'd definitely recommend getting familiar with Python 2 also. Python 3 is way newer and good in its own right and many fanatics will tell you to stay away from 2 entirely, but a lot of old code is written in Python 2. They're really not very different at all and it won't be much effort to learn one if you know the other.

I mean, if return struct, err 5 times that much better?

Attached: lolnogenerics.jpg (1438x788, 109K)

compare that to rust
fn main() {
let pi = 3.14;
let foo = [pi; 100];
for n in foo.iter() {
print!("{} ", n);
}
}

>foo.begin(), foo.end()
sepples is an amazing language

Has anyone here used range V3 in their codebase? It looks neat, but I'm thinking it might slow compilation too much.

>mfw C++ template error messages

What about it?

in haskell this is just
pi = 3.14
foo = replicate 100 pi
main = do (print . show) foo

Compare that to lisp
(let ((foo (make-array 100 :initial-element pi)))
(print foo))

>do

Attached: 1524836081960.jpg (540x540, 17K)

import Control.Monad (replicateM_)
main = replicateM_ 100 (print pi)

Which is your primary programming language, guys?

Attached: 14937731469030.jpg (3477x2456, 1.01M)

Common Lisp and C

python is superior
pi = 3.14
foo = [pi for i in range(100)]
print(foo)

Haskell, VHDL, C, I've been thinking of picking up something between C and Haskell that's more normal.

That doesn't do the same thing, you're not creating a list with 100 pi.

You aren't necessarily either, since the compiler could optimise the list out

Things stopped making sense to me in C#. I have this method call that returns a property. The type of the property is System.Double[] but before I can access the Array operations I have to cast the property to System.Double[] . It already says its type is System.Double[] so why the fuck do I have to cast it to System.Double[]?

What the hell? Show code.

What do you call a band of Haskell programmers?
The Foo Fighters xd!
Seriously, Haskell sucks, kill yourself.

C++, Python, and Ruby.

var longitude = file.Properties.GetProperty(SystemProperties.System.GPS.Longitude).ValueAsObject;
Double[] longitudeDouble = (System.Double[]) longitude;


Console.WriteLine("Type: " + longitude.GetType());
Console.WriteLine("Longitude: " + string.Join(",",longitudeDouble));

I'm working with this class from the Windows API Code pack.
github.com/aybe/Windows-API-Code-Pack-1.1/blob/master/source/WindowsAPICodePack/Shell/PropertySystem/SystemProperties.cs

this is why you dont use var

>.ValueAsObject
There is your problem.
See the library docs. They probably have something like.ValueAs()
Make use of intellisense to find it after pressing dot.

why is haskell the most elegant language?

You mean this is when you don't use var.
var is really nice and niche when creating collections and when it doesn't harm readability when the return type is so obvious.

Is it better to learn Java before JS?
I've just started into Java and I'm finding easier to pick up than JS because I'm revisiting a lot of JS concepts but more expansive maybe.

Attached: Depressed_709722_6505972.jpg (1200x1200, 148K)

Okay thanks. I'm afraid this won't be sufficient though since I can't foresee which type is returned with each of these properties. Best thing would be if I could say if this property is an Array then just join all the elements together into a string. I'm a little bit mad that they decided to return Arrays at all. Most of the properties can simply be turned into Strings with .ValueAsObject.ToString()

you dont learn js at all

Read the docs. I am not going to touch that ugly lib.
Do you really have no alternative to that shit?
Anyways, you have to handle every property by yourself.
You can do many many tricks though like checking if the object implements IEnumerable if so you join it and call ToString() on every element assuming they are basic types.

working on writing a 3d renderer completely from scratch only using 2d javascript canvas drawing api

just got z buffer occlusion working

Attached: output.webm (558x574, 1.23M)

you dont learn java at all

For fun hover over the object and do some double clicks for me.

I'm writing a plugin with which you can access all these properties and it's almost finished. I will also find a workaround around for that problem. I think I will just overwrite .toString() so it can handle Arrays. I will try to use one of your tricks there.

what do you mean?
I had some issue where it lagged unless you clicked or dragged the mouse constantly but it was fixed by using requestAnimationFrame instead of setInterval

I mean fuck web browsers.

that sounds like a /d/ thing

>written in C
>interpreted
C is superior

fine cython is superior

>liberal arts major
>sub 3.0 gpa
>study intensely for 7 months
>get offer on 2nd interview
>110k eng2 position

feels good man

>Hate college
>Have to have a degree to even be considered for dev jobs regardless of my actual skills or knowledge

Fuck

Attached: nicebuttersnigga.jpg (1200x900, 249K)

who doing golangy here


how u like golangy

Feeling generically ᐸUnified Canadian Aboriginal Syllabicsᐳ my fellow golet!