/dpt/ - Daily Programming Thread

What are you working on, Sup Forums?

Sorry for not using an anime image.

Previous thread:

Other urls found in this thread:

github.com/CamDavidsonPilon/Probabilistic-Programming-and-Bayesian-Methods-for-Hackers
youtube.com/watch?v=rDk9FPZVMDQ
youtube.com/watch?v=g_U6yOM3pnw
tracker.netbsd.org:6969/announce
youtu.be/TjDAiq2-xeU
youtube.com/watch?v=rbqSwE_tHjs
twitter.com/SFWRedditVideos

Can you get a job with assembly??

if programmer = true {
return virgin;
else {
return chad;
}

first for common lisp

(l (i (s p)))

>Given a list of numbers, find the arithmetic mean of the numbers
That's what does
>reading the list only once
Except if you consider using length "reading the list twice", it does.
>and using O(1) memory
I'm just reducing a list with foldr, why would I need to use more memory than the list passed in argument of the function ?

return ((Programmer) programmer.findProgrammer(programmerId).isNullOrEmpty());

I'm sorry you're so dumb user

Say nice things about my filter!

in Haskell this is just
average = (/) sum genericLength

but it's neither one-read nor O(1)

I've been learning to program, anywhere I can find little projects to practice on?

It's better at programming than you.

Do sjws dislike the use of a porn girl for image processing?

This seems like something loop fusion should be able to handle.

list fusion isn't going to combine sum and length

Okay.

Yes.

programmer ? virgin : chad

Is that wave form based on the contours of the image, or is that just a coincedence?

is it java? no, you can't get a job with assembly.

Not an argument.

Purely a coincidence.

That makes me irate.

Depends. What else do you know?

Then it is not a solution to the problem.

what do they mean by this?

we've established that

you could of course use the stack monad or IO or an embedded AST

checked

Exactly what it says.

they're hiring people to test torture devices

>>>/reddit/

Idk about that. I was a beta virgin when I wasn't a programmer. Now that I'm a programmer I'm still a beta virgin, but at least I make good money.

There is no need for any stateful monads or whatnot. Just recurse down the list.

(define (arithmetic-average lst)
(define (helper remaining length sum)
(if (null? remaining)
(/ sum length)
(helper (cdr remaining) (+ length 1) (+ sum (car remaining)))))
(helper lst 0 0))

average = uncurry (/) . foldl' (\(s,c) e -> (s + e, c + 1)) (0, 0)

Does any CS graduate know anything more than java, python and a few algorithms? 99% of them come into interviews with the attitude: "I've spent years getting drunk with my friends at uni, where's that 100k starting I was promised?".

I'm having really hard time finding talent in this part of the world.

;AmIAChadOrProgrammer.exe
.586
.MODEL FLAT
.STACK 512
.DATA
chad BYTE "CHAD"
prog BYTE "PROG"
outcomeChad BYTE "You are a chad",0
ourcomeProg BYTE "You are a programmer",0
.CODE
__main__ PROC
mov eax, chad
mov ebx, prog
cmp eax,ebx
jnl userIsProgrammer
cout outcomeChad
jmp exit
userIsProgrammer:
cout outcomeProg
exit:
xor 0,eax
ret
__main__ ENDP
END


[jreeves@tachikoma ~] $ ./AmIAChadOrProgrammer.exe
You are a programmer

Yeah, that should work. Although I must admit, it took a little bit of thinking to realize that your one letter variable names stood for sum, count, and element respectively.

If they actually like the subject (Like I do) they'd be learning new programming languages and frameworks in their leisure time

Im not even in uni yet. Python, Java, C/C++, SQL, and x86 assembly.
I get bored and work in assembly. see:
Of course, school is slow AF. its for stupid people. sadly, its the only way the work force takes you seriously

Pretty much so in NA and Western EU. Which part of the world you in?

return True if programmer else chad

lol fucked it up, meant

return virgin if programmer else chad

I know C, C++, Ruby, and can get by in Java and Python. I've dipped around in a ton of other languages, but don't consider myself to be an expert in them. I have a BS in Computer Science, am set to graduate with an MS in the spring, so long as my research pulls through. My knowledge of algorithms is decent, at least enough to get into the 95th percentile on a Major Field Exam when I finished my Bachelors.

But right now I'm looking to get a PhD.

cout isn't a 586 instruction.

The 'right answer' is iteratees. The quick one is a strict left fold with length accumulator.

Needs more bang patterns.

>But right now I'm looking to get a PhD.
>Dr. Horsefucker

it isnt but lets just say Ive linked the correct c header file to the executable... Its really not worth it having to copy and paste a cout function in assembly for a stupid chad/programmer program i typed up ina few mins

Hey daily /adv/ thread, I'm basically a wage slave at a manual labor job, started learning programming because it has always seemed interesting, let's pretend I'm actually smart enough to be above average. How do I get a job with no cuck degree and no formal experience?

Your mom needs a bang pattern

I could use a bang pattern desu..

Your mom needs more bang patterns.

dpt is full of fgts
p p
t t

i i
s s

f f
u u
l l
l l

o o
f f

f f
g g
t t
s s

you could combine them in the Fold data structure of the foldl package to guarantee such fusion

github.com/CamDavidsonPilon/Probabilistic-Programming-and-Bayesian-Methods-for-Hackers

this looks promising. has anyone read it?

Is ruby a smart guy?

Whereas I fulfil all your mom's banging needs.

No. He's a defender of C++, so we can conclude that he's retarded.

mean :: [Double] -> Double
mean = go 0 0
where
go s l [] = s / fromIntegral l
go s l (x:xs) = s `seq` l `seq`
go (s+x) (l+1) xs

Narrow the field you want to work: embedded systems, webdev, enterprise, whatever you want. Then build a portfolio showing that you know your shit, and then start looking for jobs.
I don't have a degree either, and now I'm sending CV to companies. Good luck!

First of all, you don't link header files.

Second of all, cout is part of C++, not C.

Third of all, cout is an object, not a function. The function being used is the ostream operator overload of

That sounds like something a smart guy would do, tho

C++ is a convoluted mess of a language, but it gives an extreme amount of control to its users. Scope based resource management is a damn good idea too, and I'll be looking to see how other languages that use it (i.e. Rust) progress over the next several years.

val (sum, n) = ((.0, .0) /: xs)((λ, µ) => (λ._1 + µ, λ._2 + 1.0))
sum/n


fails on empty list, YOLO :---DDd

Wew, just found out you can have two separate HTML5 canvases overlapping each other so you don't have to keep rendering the background over and over.

I know /dpt/ gets autistic about JavaScript but I thought this was pretty comfy.

thank you, how advanced are you in it?

That's a nice combo, It's more than any of my interviewees know.

Queensland, Australia. The universities in this country are FUBAR and spend more money on advertising to overseas students than they do on teaching Australian student's. The only good CS grads I've ever met went to uni elsewhere because education standards in this country are absolutely abysmal.

Can you do functional? If so, I have $100k starting waiting for you here.

started back up on my poker engine.

i'm really a terrible programmer :(

8
['Ks', '8s']
7
['9d', 'Qc']
9
['9h', '8h']
['6d', '4h', '5c', '3d', '7s']

How many layers of abstraction are you on?

I know Scheme, could probably learn other languages if necessary... but again, I'm going for a PhD. Also, you're in Aussieland. I'd rather be away from the land of spiders, spiders, and of course, the dreaded Kidney Huntsman.

youtube.com/watch?v=rDk9FPZVMDQ

Well past zygohistomorphic prepromorphisms.

>What are you working on, Sup Forums?

Nothing, because I'm frustrated with living and I just can't bring myself to work on anything.

Don't forget the spiders.

>vegan shirt
>looks like hes a gay man that smokes meth and has hiv
>complaining about spiders
>australian

yep everything adds up perfectly thanks for the video.

atleast two, but I don't won't to get QPU misaligned.

>The universities in this country are FUBAR and spend more money on advertising to overseas students than they do on teaching Australian student's.

This is true, but also, I think if you don't program for fun and just do it as a job you're going to be a shit programmer

>just can't bring myself to work on anything.
do the littlest subproblem you can fanthom

In case it was not clear, I dislike arachnids.

Yeah, that video is good for a laugh. Aussies are pretty funny people.

youtube.com/watch?v=g_U6yOM3pnw

Could anyone help me with regex? How can I get the info hash and filename (only one file name) on a string like this?

kinda trying to get this working on ruby for a weird webtorrent site

btshowmetainfo 20030621 - decode BitTorrent metainfo files

metainfo file.: amd64cd-5.1.2.iso.torrent
info hash.....: e30c05f2330ba4869eefb90bf5978a505303b235
file name.....: amd64cd-5.1.2.iso
file size.....: 253325312 (966 * 262144 + 94208)
announce url..: tracker.netbsd.org:6969/announce

Shame, I need someone like you.

Most spiders here are tame except for the dreaded redback on the toilet seat:
youtu.be/TjDAiq2-xeU

>can NEVER think of things to code
Guess I'm waiting until my next easy as fuck school assignment

just parse the bencoded torrent file manually

otherwise use grouping
info hash regex: /info hash\.{5}: (.+)/
file name regex: /file name\.{5}: (.+)/

and use the 1st reference group to get the desired info

...

>redback on the toilet seat
youtube.com/watch?v=rbqSwE_tHjs

I'm two courses shy of an MS and nope, that's pretty much me. I didn't spend the years getting drunk, though; I've never actually been drunk. I just always find it hard to want to work on personal projects and stuff when I'm home.

>can NEVER think of things to code

write a mini-compiler for any language you like

write a game using 3D graphics

this should keep you occupied for a couple months

>Could anyone help me with regex?

Yeah, ditch them and use peg's instead. They're easier to read/write and iirc they work on stuff higher on the Chomsky hierarchy.

>write a mini-compiler for any language you like
I don't know what this means or how to do it or if it would even be useful
>write a game using 3D graphics
I've tried learning openGL stuff before but it really doesn't interest me

do something that interests you. if you literally cant think of anything, but are a competent programmer, go work for a company where htey literally tell you what you need to make.

Just do it. So long as you're professional about it and never stop learning you'll be better than most.

...

final class Pull[+F[_],+O,+R] private (private val get: Free[AlgebraF[F,O]#f,Option[Attempt[R]]])

not enough effort put in / 10

Employed Haskell programmer, reporting in.

>Rust
Please. It'll be dead in a year.

why do you want Rust to die? what do you have against it? I'm just curious to why you view it as a personal grievance

Why not dig into some technical computing or numerics? When I have free time I focus on math and numerical methods because it helps me solve problems no matter what programming language I use.

The competent ones stay in academia

Just stating the facts, user.

die umaru

I don't like the ideology behind it's creation, nor do I like the personal beliefs of it's developers.

It's ownership system is also stupidly complicated and you end up putting everything in unsafe blocks to do anything useful.

The keyword "unsafe" also rubs me the wrong way because I know that most of their developers use this term incorrectly to mean "i feel uncomfortable".
They feel uncomfortable writing low level code... in a systems programming language.

Fuck them.

Maybe. Maybe not. It certainly has some interesting potential. It's probably one of the very few languages released in ages that could legitimately serve as an alternative to C and C++ for what they are used for. Sure it's not as fast as them today, but there is nothing within the language specification that would make fast implementations difficult.

...