/dpt/ - Daily Programming Thread

What are you working on, Jow Forums?

Old thread:

Attached: 27835302.jpg (317x475, 31K)

Other urls found in this thread:

notehub.org/g7vo4
aosabook.org/en/llvm.html
twitter.com/SFWRedditImages

Believe me, user, I was shocked too when I couldn't find existing documentation of it. That doesn't mean none exists, which is why I said "I think".

thurst for FPOOP best paradigm

i have been using lisp for some time now. I actually want to craft a little small wiki but i will probably craft a version control system for storing/retrieving changes done to the content.

Attached: s.png (1680x1050, 146K)

This is true, although one way to do something new while essentially re-inventing something basic is to adapt some general solution to a very specific & relatively new niche. Although even then it's best to take the time to properly learn the general solution in order to either gainfully adapt its approach or just use it directly.

>mfw I work in bioinformatics and my most cited papers are just application notes sharing bioinformatics-specific re-implementations of chemometrics-specific implementations of general computer science problems solved in the 1970s-1980s

Forgot my face.

Attached: nervousdoggos.jpg (480x490, 26K)

Request for Comments x2:

notehub.org/g7vo4

Attached: 1462035914098.jpg (700x700, 67K)

I'm trying to write a web extension for Firefox and I want it to set the Youtube volume to given volume. I found the function that fires when you manually change the volume but I can't seem to call it. So basically how do I call this function in Youtube base.js?
g.h.setVolume=function(a){a=g.cd(a,0,100);MI(this.app,{volume:a,muted:this.isMuted()},!0)};
g.cd function is this one;
Math.min(Math.max(a, b), c)

Besides, I would be glad to find that someone had already done it so that I wouldn't have to do all the verification work myself.

Attached: pid3hpkmapmz[1].jpg (800x661, 61K)

It's basically a bunch of buzzwords and wouldn't-it-be-cool-ifs. Also, this is outright retarded:
>Gradually typed languages(like TypeScript) combine the benefits of both systems, but they are too lenient in untyped parts of the program, and too strict in typed parts(akin to fully-typed langs), refusing to compile and run almost-valid code.
The entire point of static type checking is to be "too strict", and the entire point of dynamic typing is to allow for expressions that have no consistent static type, because they are not necessarily broken.

static typing is the best of both worlds

that's a dude isn't it

static dynamic typing is the best.

typedef struct stuff {
int some_data;
} stuff;

typedef struct penis {
stuff **ref;
} penis;
void fn(penis *p) {
if(!*p->ref) {
// stuff not valid anymore
}
}

Is double dereferencing for checking if stuff is valid poor for performance?
Should I rather just have stuff *ref; and update every or relevant penises if stuff changes?

Σ(T: Type).T

Going through this. Just started the Prolog section today.

Attached: 7li7w.jpg (540x648, 42K)

>static typing is the best of both worlds
You sound slightly mentally challenged. What two worlds is it the best of?

this.
The only reason to be in between would be compatibility reasons.

Static typing and dynamic typing

Ok so I built SFML from source to see if I can tweak its rendering settings but now the newest SFML version crashes at the simple text rendering command, Googling around I found out that it's a "known issue" and was "fixed" by removing their default font but it's fucking not. Absolutely amazing. Fuck whoever convinced me to make my own engine instead of using anything that's available out there.

>Static typing and dynamic typing
Okay. Thanks for confirming your severe mental retardation. We don't need to continue this conversation.

More like fuck whoever convinced you to use SFML instead of taking a couple hours to write a sprite batcher with SDL and OpenGL if you were gonna make your own engine anyway.

Your posts are shit and you should feel bad

Thank you for your input.

>The entire point of static type checking is to be "too strict"
I can't agree with it. I would say that the point of static types is to prevent a certain class of errors — and being "too strict" means that a system rejects code that contains a certain class of errors _plus_ code that doesn't contain this class of errors but looks bad for dumb compiler. Making typechecker smart enough would reduce the amount of unwanted rejections, but smart typecheckers are expensive in terms of computation, making compilation slow, thus all the smart checks should be pluggable.

>entire point of dynamic typing is to allow for expressions that have no consistent static type
Neither I can agree with this statement: even in dynamic languages most of the time I use consistently-typed arguments, list elements etc, but for java-like typesystem these types would be too complex to express, thus making it harder to use. Type int|string is consistent, type Foo|NonEmptyList Bar is consistent, type string(lenght < 255)|null is consistent — but we can't use them in statically typed languages because typecheckers are dumb, not because their values are only usable within dynamically typed langs.

But while I disagree, I see that I should explain this point better, so thank you again.

>we can't use them in statically typed languages
{-@ type ShortString = { v : String | len v < 255 } @-}

>hurrrrrr static typing is the best at having no meaningful static type
Your existence is a mistake and your parents should be ashamed.

Nobody wants to see you go full scrapie on other people's posts.

Because I wanted to save some time, I already had written a bitmap font renderer but I wanted to have TT fonts now so I figured I might as well use whatever is provided and now it just straight up doesn't work.

Static typing is objectively better than dynamic typing. Essentially because it has static types and dynamic languages don't. It can do everything dynamic languages can do.

and faster

yo can have manifest typing in the dynamic environment too.

Yes, LiquidHaskell does almost this. But since Haskell has a static heart it takes forever to compile — and since it is not designed to be compilable and runnable without type checking, it cannot be improved to make it much faster.

And thanks for LH reminder — it is a proof of the idea that pluggable typecheck is completely possible.

This.
You can't have static typing though.

>I can't agree with it. I would say that the point of static types is to prevent a certain class of errors — and being "too strict" means that a system rejects code that contains a certain class of errors _plus_ code that doesn't contain this class of errors but looks bad for dumb compiler.
Nobody cares what you would say. The point of a static type checker is to reject programs with inconsistent static types. A static type checker that fails to do so is, by definition, broken. If it's "too strict" for you, the only sane alternatives are to have a more expressive type system, or to instruct the type checker to ignore some section of the code (gradual typing).

>Neither I can agree with this statement:
Nobody cares if you agree with it or not.

>in dynamic languages most of the time I use consistently-typed arguments
This is irrelevant and in no way counters my statement.

>type int|string is consistent, type Foo|NonEmptyList Bar is consistent, type string(lenght < 255)|null is consistent
That's right, fucktard, and decent type systems allow you to express that. The point of dynamic typing is when expressing all of your constraints to come up with a complex but consistent type for every expression just isn't worth the effort.

A single program for the past year and now I'm realizing I need other developers to help.

Program can be worth millions, just too much work ahead to do on my own. (Not telling what the program is)

>Take out loan and hire developers instead of college

Honestly thats my only hope.

what do?

Attached: Triangle.png (300x300, 7K)

In fact in C that string type is just
char[255]

Half baked GPL that may or may not be picked up.
Join us

no but it then become very easy to mix both.

>X is better than Y because you can still use Y instead of using X
We've already established that you're mentally challenged. There's no need to go on.

X > Y because X = Y + k, k > 0

>X is better than Y because you can use Y instead of X
Mentally deficient.

is that one a good book?

probably not, oop and fp is not exclusive to each other.

>ad hominem

try again

>if you call me mentally deficient after refuting my claim, it doesn't count anymore
Mentally deficient.

OOP with some FP is superior to FP alone or FP with OOP

>ad hominem

try again

bait

>if you call me mentally deficient after refuting my claim, it doesn't count anymore
Still mentally deficient. Try again.

see

FP is a slow useless meme and FP-based plus OOP support is sepples-tier.
OOP can integrate the good parts of FP well (not java though) which makes it easier to use OOP.

OOP is a shitty compromise between FP and procedural,

>X is better than Y because you can use Y instead of X
You will now deflect again.

this is non sense. oop is a data abstraction technique, its most famous alternative is abstract data type.
an alternative to fp is procedural programming.

fp is declarative and based on alonzo church's lambda calculus while procedural programming is imperative and based on alan turing's abstract machine computation model.

You learn a language by using it. Stop reading meme books.

no no no no
plus not all FP is Haskell or OCaml

>OOP can integrate the good parts of FP well
I have yet to see a decent integration of it.

>OOP can integrate the good parts of FP
That's literally just a retard's way of saying "FP can integrate the shitty parts of OOP".

>be writing some C and Assembly code
>notice some messy code
>start refactoring it
>sudden desire to buy a buttplug
Is this normal?

How do you even emacs?

is there even a point to FP without referential transparency?

>>start refactoring it
If it doesn't break, don't fix it

Friendly blacklister here, recursively hide the following posts if you prefer to not waste your time with:
- static/dynamic typing shitposting
- FPOOP shitposting

"I often say that none of the subsystems in LLVM are really good until they have been rewritten at least once."
aosabook.org/en/llvm.html

wns robotics

>seething faggot here
Please tell us more about how you recursively hide posts that bother your anal stitches.

The whole point of the book is to use languages for a brief period of time you wouldn't normally try on your own to broaden your perspective on what's out there. Anyone who claims to be an expert or to even have learned a programming language in a week or less is a fucking retard.

>Is this normal?
1) I'd recommend starting with a prostate-oriented one, the Aneros Helix Trident for example.
2) From there on, you can move onto standard buttplugs, focusing on dilation and the feeling of fullness.
3) At some point you may start preferring the feeling of penetration itself, thus move onto dildos, later graduating to realistic ones. Don't forget to use flared ones from body safe materials!
4) As a bonus, you may find yourself starting to get interested in slightly less conventional toys. For this, you can consult the many Bad Dragon related resources.
And don't forget, kids, when it comes to your butt: safety first!
As some forgotten porn actress said with regards to preparing your butthole: be careful with it, God only gave you one.

>being this buttblasted that his spergposts get hidden by people who prefer a bit more substance in their shitposts

Everyone knows the BJ scene in swordfish originally involved a horse dildo.

>realize my C code could be more efficient
>realize the asm code for my compiler could be more efficient
>realize the microcode for my processor could be more efficient
>realize the standards for micro instructions could be more efficient
>realize Intel is the bottleneck
>create new issue on github and call it a day

>>create new issue on github and call it a day
sanity
on my dpt?

>thinking any of the aforementioned posts were mine
It's just funny to watch you make the same ass-ravaged post 5 times per day thinking anyone but you actually cares about the posts you're weeping about.

This post was written by rustcuck.

>aosabook
Wouldyou (or any other user) recommend reading the series ?

>It's just funny to watch you make the same ass-ravaged post 5 times per day thinking anyone but you actually cares about the posts you're weeping about.
Cut down on the drugs, friend. It seems your sense of time is damaged.

>Don't repeat my mistakes, the book
Sure, why not.
Probably a lot more useful than the usual fad garbage that qualifies as "programming" or "software engineering" books.

So today's edition is buttholes ?

When is it ever not a butthole edition?

>w-wow guise w-we should recursively hide these s-shitposts m-m i rite?
>r-right?
>right guise?
>this repeats multiple times per day for several days in a row
No amount of surgery is going to reconstruct that rectum. Go back to FB.

>multiple times per day for several days in a row
see Or have others started providing low-quality-shitpost flagging services besides me?

if you are already proficient with a code editor, i would not recommend Emacs except if you want to learn lisp programming.

>not writing all your code in glorious org-mode structured literate programming
a sad way to live

Really? What about LINQ?

>w-wow guise w-we should recursively hide these s-shitposts m-m i rite?
>r-right?
>right guise?
>this repeats multiple times per day for several days in a row
>n-no i-it's not true
So anally debilitated...
That's just from the current and previous thread, and given the level of absolute ass devastation you're displaying right now, it's probably going to continue.

I can only recommend it if you've been programming for some time already.
I like the chapters on Git, FreeRTOS, GHC and LLVM.

racket + scribble is better for that since scribble is racket code itself.

You really seem to be having an emotional reaction to this.
I'm not sure if I should be entertained, or feel bad for you.

imho, it's like the art of computer programming; only interesting if you already have a specific subject to search about (= reference book)

Let's see if your butthurt posts continue after the thorough ass-whooping you just received.

Attached: 1514883135537.jpg (244x206, 10K)

4u, maybe.
Personally I find it interesting as condensed history and experience, or at least a biased account of it.
That to me is tenfold more valuable than the latest "Uncle Bob's how to shift all blame to devs", "Fad Driven Development 3.0" and "FP Webshit from first principles" garbage.
>Those who forget history are doomed to repeat it
is something that our industry deeply suffers from, especially given all the furious wheel reinventing that's wasting useful human resources worldwide.

this. While .net sucks major ass, c# is still one of the best multi-paradigm langs.

So it is either the posts you recommend us to hide or your continuous autism and argument with the other guy?
Guise.. don't waste your time and recursively hide Please use trip or namefig next time faggot

>thorough ass-whooping you just received
?

>So it is either the posts you recommend us to hide or your continuous autism and argument with the other guy?
I definitely recommend hiding both, unless you're a fan of extremely low quality garbage.
Then again, you are on /dpt/.

Are four cycles inside each other bad even when they're doing an obvious, logical, nonconvoulted thing? I just have to build a 3D array from a bunch of 1D arrays, not just appending, but changing the data a bit as well.

post gode faccit

please, don't say that. uncle bob is a incredible software carpenter and technical writer who put a massive effort in improving software development by through the spread of proven sane coding and software engineering practices. his threes books (clean code, clean coder, clean architecture) are an absolute must read.

FPOOP and static/dnamic is more programming than telling us how much of a safe space nigger you are getting butthurt about certain topics being discussed.

>uncle bob is a incredible software carpenter and technical writer who put a massive effort in improving software development by through the spread of proven sane coding and software engineering practices
dangit, my sides hurt now

>dangit
he's also a good speaker too, his talk "what killed smalltalk could kill ruby, too" is a classic.