/dpt/ - Daily Programming Thread

Lambda Cube Edition

What are you working on, Sup Forums?
Which vertex are you at?

Other urls found in this thread:

incredible.pm/
github.com/deeepaaa/rana
pyimagesearch.com/2015/07/20/install-opencv-3-0-and-python-3-4-on-ubuntu/
en.cppreference.com/w/cpp/language/sizeof
twitter.com/NSFWRedditVideo

Algebraic effects are useless

thank you for not using an anime image

Who /postscript/? Computerphile reminded me of how comfy it could be.

rude

Are we being raided by lainchan?
Is such a thing even possible?
When did they develop this capability?

this is one of the C++ gurus

>not the lambda tesseract
Get on my level

thank you for practicing sexual abstinence

Effects? They're basically just types

I guess you know all about its benefits.

>not succumbing to the sheer power of the lain

Thank you practising homosexual promiscuity.

I am beyond types

I knew it

There's no way we'd so suddenly get so many people knowing what they're talking about

>be programmer
>feel dumb; all those scientists, engineers, and mathematicians make fun of me
>browse Sup Forums
>hey what's this...
>ALGEBRAIC LAMBDA FUNCTOR APPLICATIVE MONAD
>oMG it's math but it's programming??!!!!!!1
>now i can feel smart too...

Is the Tup guy here? I have a question. Does it support autotools-like functionality?

nice projection

this, you should just use oop like all smartist people

>that mongodb icon
Fucking kek

>implying programming isn't applied math anyway

>Is someone not a programmer because they're not interested in PHP?
Dumb argument. You and I know roughly what PHP is good at, and when we'll be faced with a problem it could solve, we'd reluctantly jump to using it. (never gonna happen but that's not the point) You admit you have absolutely no idea what Tup is good at, so you should chiggidout so you know what the author (not me btw) was thinking when he made it.

>I might have even looked at this thing if you hadn't shilled it so hard.
Oh poor you! Did I trigger you? Do you need a safe-space rn? Is it hard leading your life basing your opinions according to how people defending one PoV or the other made you feefeel deep down?

...

Hey, I had a question, see

programming is puzzle solving

...

incredible.pm/

fun with curry-howard

I need to write a program to track multiple moving objects on a camera in real time and then save and analyze their paths. I'm pretty lost on the first part, as I never worked on any video analysis not even static image analysis. Can you recommend some good literature or helpful links?

I only found "image sequence analysis" by Tsai and Huong which is pretty old so I'm not quite sure if that's good to use. Otherwise all I found were books on static image analysis.

github.com/deeepaaa/rana

define "autotools-like functionality"

I mean, can it handle setting up the correct compiler, fixing up differences in header files, doing cross-compilation, that sort of stuff.

I'm trying to run PDCurses on windows but I don't even know where to start. I can only do basic as fuck compilation (gcc main.c -o main.exe kinda thing), I don't know if I can just import the curses.h right away or if it needs to be build still.

pls help

Algebraic effects are for more than just reasoning about effects, they're for implementing them. It's free monad + interpreter in a sexy package.

>not using sxml
shig.jpg

No. That's not it's goal. You'd have to adapt the output of another tool to it, which is not undoable (it can include a config.tup file with CFLAGS=whatever), but it's not included. Note that make proper doesn't either, and that cmake does not include a make.

Why doesn't my fizzbuzz work when checking for matches?

function FizzBuzz(length, bool, map){
this.length = ++length;
this.bool = bool;
this.map = map;
};
FizzBuzz.prototype.fizzbuzz = function(){
console.log(
Array.apply(
null, new Array(this.length)).map(
Number.call, Number).map(
i => {
let c = ''
this.map.forEach(
(
a,
b
) => (
this.bool
)?(
!(
i%b||(
''+i
).indexOf(
b
) != -1
)&&(
c += a
)
):(
!(
i%b
)&&(
c += a
)
)
)
return (c)?c:i
}
).slice(
1
).join(
'\n'
)
)
}
var FizzBuzzer = new FizzBuzz(100, false, new Map([[3, 'Fizz'], [5, 'Buzz'], [7, 'Woof']]));
FizzBuzzer.fizzbuzz();

Are the moving objects the only things that are moving? What language are you using?

Lang? looks like JS.

What do you mean by 'doesn't work'?

>jshit
>pseudo-functional bloat
Of course it won't work, dumb shit. Consider sudoku.

>>pol

Well since it's real time I thought C would be best for performance. Yes they should be the only thing moving.

Shoo poltard.

it outputs wrong things
but i got this now
thanks asshole

In 2016 AD is it safe to assume GLint or EGLint will always be 32 bits?

Are the objects of some particular shape and/or color?

Go back to /pol retard

No

samefag

Try OpenCV,(Open Computer Vision) you can use C,C++, Python and maybe even Javascript to use that library. Check the books in google, there are a few.

this

Two days into assembly and I don't wanna do this, what a piece of shit lel, I understand it but it's such a mess

what does CRUD mean?

>how do i google

>it's such a mess
if you learn it, you would be better programmer. I'm still stuck in C/C++ and doing every shit to get improve my skills. Keep learning assembly mate and learn computer architecture too, you would be proud/

sometimes some acronyms stand for other things and its hard to find their tech meaning retard

>Crud or CRUD may refer to:

>Waste, dirt, feces, or something of poor quality
>Create, read, update and delete (CRUD), basic functions of a computer database

I heard that alot from the idiots here and it looks like they don't know what they are talking about, I read alot of assembly before and two days of writing it I am disgusted, its just a huge hassle and would rather let the compiler do it. Stick to C and C++ my man, learn to read but dont write yourself except for SSE3 etc, its a mess

what if the guy reads a manual that says "do a crud on your computer" and takes a shit on the laptop??? huh??? bet you didn't think of that

Does openCV work with python3? if it does. can someone tell me how to get it on ubuntu

what about it?

and its still worthwhile skill mate. If you're looking for a job assembly is a pain in the ass, but if you're willing to be a good programmer assembly is huge advancement. Its still used in industry. Assembly isn't that hard if you already know other language or algorithms.

kek
nothing sanjeep, you got me

Google is your friend
pyimagesearch.com/2015/07/20/install-opencv-3-0-and-python-3-4-on-ubuntu/

the language itself is pretty simple (instructions, addressing modes, flags, very simple) but to do anything worthwhile in it just takes way too much work, and it's so hard to debug (gdb snippets of C code isn't so hard) I'll just write hardware init code in it and jump to C i guess

I literally have no clue why I couldn't find this yesterday, thanks

ok, rajesh

Loving C so far.

The speed is amazing compared to Python routines.

Any draw back to include gards, conditional includes and macro defines?

How exactly does sizeof() work in C++? I used it on a class I made and it returned 112. Then I used it on an instance of that class, and it returned 4.

>on an instance of that class, and it returned 4.
Surely 'twas a reference. Poast code.

I know nothing about C++ but sizeof probably ruturned the number of bytes an instance of the class occupies the first time while it only returned the size of the pointer to the instance the second time (assuming you're on a 32-bits computer)

Yes, when it returned 4 I had used it on a pointer. I guess that makes sense.

Yop. Also I'm full of shit:
>When applied to a reference type, the result is the size of the referenced type.
But yeah, pointers aren't references, and they occupy a fixed size

OMG I COMBO'D x5!!!

sauce: en.cppreference.com/w/cpp/language/sizeof

What the ever loving fuck is this.

for anyone wanting a practical use of Haskell
GHCI is good for doing command line stuff, assuming you're using some (normally standard) packages like directory, unix, windows, etc.

you can escape command line stuff from the interpreter with :!

basically like command line++

Welcome to JavaScript!

>Then I used it on an instance of that class, and it returned 4.
No, you used it on a pointer to your class instance.
Also, you're on a 32bit machine.

NO SHIT SHERLOCK! It's been 10 minutes since we figured it

oi m8 the fck u just say i'll hook u in th gabber m8 i swear on me mum

Is Rust still considered a meme?
Multiple SO surveys show that it's the coolest thing that currently exists, but I still hear that it's absolute shit.

You can really tell it's trying to replace C++ given it's god awful fucking syntax

I submit that Rust is WORSE than C++ in terms of syntax.

It's a good meme m8.

i () -> = { := case { agree } frob -)

>mfw using visual studio without visual assist
cheap motherfucker doesn't want to pay 90 bucks

dumb r9k neet 90 bucks is not free
just live without the shitty refactoring

>using visual studio

It's a good IDE

It's the best of the worst.

Sup Forums is even stupider than /biz/ and Sup Forums combined

what does that have to do with anything.

>LOL USING MICROSOFT PRODUCT :DDDD

It's like you don't even try to educate yourself at all on any of the shit you spout.

Visual Studio is a fantastic IDE, get your head out of your arse.

Wow, learn to take a compliment, fag.

go shower

>protecting microsoft
>even though i didn't even mention it
Something doesn't add up here.

Hello /dpt/, not a regular poster seeking help. Which language would be the best tool for automating interactions with web pages?

Say there is a form on technology.bike and I'd like to input something into it based on logic and submit it.

Or say you wanted to make a bot to mass vote on a poll

I hope I explained the use case well enough, I have little experience.

No maki picture, shame on you op

There's literally nothing wrong with Windows 10

Do employers still use fizzbuzz to weed out candidates? I'm geniunely curious now that everyone and their mother can google "fizzbuzz" and get examples of it.

python lib "mechanize" is pretty good if you want something very high-level.

autohotkey or python should work and be easy enough to learn