/dpt/ - Daily Programming Thread

What are you working on Sup Forums?

Previous thread:

Other urls found in this thread:

adobe.com/products/type/font-licensing/font-embedding-permissions.html
youtube.com/watch?v=cbBkAdNc88w
ghostbin.com/paste/za63q
apps.getpebble.com/en_US/application/54f972b93dd477b391000017?section=watchfaces&dev_settings
haskell.org/ghc/
tiobe.com/tiobe-index/
twitter.com/SFWRedditImages

Thank you for posting a cute anime girl.

>What are you working on Sup Forums?
I just finished a skype interview, and they now want to interview me in person.

what kind of job, lad?

all the best!

It's sort of a mixed technical support (Tier 3)/programming job. And this is coming basically straight out of university.

Thanks!

Thanks for anime picture.

I-Is Mikoto-chan there? ...
..
( ´_ゝ`)

Automate the boring shit with Python

Is this book any good? Sounds like its right up my alley. If i wanna automate some stuff and scrape the web is there a better language than python? Why is Python used for these purposes? Noob here

Use Ruby

Use gbeta

...

What are the actual laws about embedded fonts in your programs? I keep hearing that copyright laws only apply if you distribute the font alongside your program, but not if it's embedded?

Embedded into your program certainly IS distributing it with you program.
Stop using jew fonts.

Depends on the license afaik. E.g. adobe allows embedding fonts but other's dont:

adobe.com/products/type/font-licensing/font-embedding-permissions.html

Don't forget to crunch your code for maximum performance

javascript minification is the modernization of this concept

I-I just w-want to pair program... with m-my friend Mikoto-chan...
...
(ノ﹏ヽ)
...

You have no friends, tripfag.

Was always /dpt/ shit and filled with faggots?

I think you need to learn English.

I blame shitskins like you.

Nah, it's the animefags.

Go home, you mudslime redditor.

Nice projection.

>tfw learning lua

>tfw learning Ruby

why would an adreno 330 gpu render at a worse quality than an adreno 320? it doesn't even help if i switch from mediump to highp. i'm doing bicubic upsampling and the shader is very straightforward with texture reads, fract, floor, addition, subtraction, multiplication, division, that's it.

check out nim too

Ayaya?

PAIP is actually a pretty cool book. It's lots of old school AI with Lisp. What's really fun is creating your own version of ELIZA and GPS. Can recommend if you're are interested in the field and its historical context

My DELL XPS 13 9365 arrived today, can't wait to go home from work and try it out. ^^

Anime is for losers, get a life faggots

WE ARE A PART OF THE WILDERNESS

python, still basic stuff almost finished 1st book

What naming convention should I use for C++ files?

Whatever you feel like.
.h or .hpp for headers and .cc, .cpp, or .cxx for implementations.

I mean the name before the extension.

If the entirety of the file is one scope (one class, one namespace, maybe even just one function) then you have an easy answer. Otherwise just pick something sensible.

WELL FUCK i mean
>why would an adreno 530 gpu render at a worse quality than an adreno 330?
looks fine on 330, looks shit on 530

ayaya! ayaya!

I'm working on getting multi-GPU support in my wayland compositor backend.
The red part is from the secondary GPU, and the green part is from the primary GPU.
I have an annoying rendering bug, though. Maybe I'm not handling the double buffering properly.

Is the artifact on the top right the aforementioned bug?

You know that the thing about pair programming is that you both have to be physically present in the same room, right? All of the comfortable anonymity/pseudonymity of the Internet is gone, and you are left with one neckbeard standing over the shoulders of another neckbeard, pointing out whenever they make a mistake.

youtube.com/watch?v=cbBkAdNc88w

Any idea how to write a program to load balance connection to openvpn server ?

Shit, forgot. In C

Yes. Actually, after changing changing it to render something that isn't static, it realised I'm nowhere near getting this shit right.
Unsurprisingly, sharing resources between GPUs (and separare OpenGL contexts) is hard.

oh god it hurts wtf am i doing hurrrrr

#include
#include

// X = Value, Y = Mutable
#define __let(X, Y) _Generic((X), \
/* Basic */ \
default: _Generic((Y), \
false: void, \
default: const void), \
void *: _Generic((Y), \
false: void *, \
default: const void *), \
char: _Generic((Y), \
false: char, \
default: const char), \
char *: _Generic((Y), \
false: char *, \
default: const char *), \
\
/* Signed */ \
signed char: _Generic((Y), \
false: signed char, \
default: const signed char), \
...
long double _Imaginary *: _Generic((Y), \
false: long double _Imaginary *, \
default: const long double _Imaginary *) \
)

#define _(X, Y) __let(X, Y)

typedef union let
{
void;
char;
short;
int;
long;
float;
double;
} let;

int main(int argc, char **argv)
{
let stupidshit = _((char* )"lol this is so fuckign badf", true);

puts(stupidshit);

stupidshit = "wow the string changed this is l33t h4x";

puts(stupidshit);

let morestupidshit = _((int)69, false);

stupidshit = "ok lets end this abomination of a \"\"\"\"program\"\"\"\"";

puts(stupidshit);

return morestupidshit == 69 ? 0 : 1;
}

ghostbin.com/paste/za63q

Just use C++ and do this:
#define let auto

>use C++
REEEEEEE

(checked)
>use C++
excellent choice

that shit in is objectively more disgusting than C++

>use C++
use Rust

dear mozilla stop shilling on boards and go fix firefox

yeah, go for it.
python is nice for doing that sort of stuff.
don't use shitty ruby.

Rust posting seems to have completely stopped desu, i guess most people realized its shit.

I managed to get it working.
The artifacts from before was an issue with vsync, so it got some pretty fucking terrible tearing.
I got my moving images working correctly by changing the buffer formats.

you should have a look at the beauty in GNU's tgmath.h
that's the delightful way how _Generic was hacked with macro crap before it existed in C11

I'm working on a personal project that create's JSON files to get sent and populated into a database. So far haven't achieved much with it, but I have until September until my summer is over

_Generic is supposed to return expressions, not types.
I don't think that would work.

B-But I just want t-to program with Mikoto-chan.....
W-Where is Mikoto-chan? (つ﹏

Asleep, possibly? I should be getting to sleep soon, myself. It is 5:20 AM here on the West coast. Not a good time to be staying up until, but I'm a night owl during the summer.

the shills might just be on vacation

Pretty long vacation then.

well they're based in the bay area and in other fancy meme areas

In C++11 I know it's possible to take the function pointer of a non-capturing lambda function.
However, is it supposed valid to return the pointer of a lambda which is local to a function, and then invoke it outside?
The example shows the idea and works when I run it, but in real programs I had crashes in similar usages, which makes me think the program may permit itself to allocate the code of the lambda on the program's stack.
Is the code below correct?
#include

void (*foo())(const char *) {
return [](const char *s) {
puts(s);
};
}

int main() {
void (*fun)(const char *) = foo();
fun("Hello!");
return 0;
}

Please webdev gods

apps.getpebble.com/en_US/application/54f972b93dd477b391000017?section=watchfaces&dev_settings

I'm trying to programmatically =, press that "DOWNLOAD PBW" file. I can't get angular to accept my fake clicks, I can't figure out how to get into scope to just call that openexternal() myself, I DEFINITELY can't even find where it generates the link

you are making an app download bot? I know somebody who built one with sikuli and an army of fake accounts

Yeah the bots aren't the problem, it's just scripting downloading the dang things

Literally just don't.
You gain nothing with this.
Simply always specifying the type when you declare a variable is much more elegant.
Especially in C, which has no generics or ADTs, so types never get very complicated.

I can't see why that would be the case. Would it be invalid to return a function pointer to a static member of a class scoped within the function?
void (*get_fptr())()
{
class Lambda
{
void invoke()
{
std::cout

I don't have the web skill to help you. The method I mentioned bypasses web stuff it is a visual recognition which sends mouse sequences at the os level. It is way slower but works also outside the browser for itunes like programs.

GHCi, version 7.10.3: haskell.org/ghc/ :? for help
Prelude> quickSort :: Ord a => [a] -> [a]

:2:1: Not in scope: ‘quickSort’
Prelude>

0/10 language tbqfhfam

Tried selenium?

>I can't see why that would be the case
Me neither and I was equally surprised.
My last crash experience was having a member method returning a curl callback. lambda = crash, static function = good
Since it's so bizarre I suspect a compiler bug. From memory I think only gcc produced crashing programs, not clang.

This

Well, 5 years Sup Forums pretty much made me do it - today I enrolled into a CS degree. Still don't know whether to go for a SE or CE specialisation a year into it, but there will definitely be lots of programming regardless of what I choose.

Really looking forward to actually doing C and *NIX.

"sort" is in Data.List

that's beside the point
the point is that haskell is such a shitlang the repl won't even let you define things

all the best, user!

Swift, ocaml or D?

>Appleshit, deadshit or completely deadshit
Good question.

I just completed my CE degree. Definitely better than SE as we build real solutions instead of durdling with databases and other junk nobody cares about.
Now I work with making medical robots, making the world a better place.

There's really no better alternative other than C.

0000000000438cc4 :
438cc4: 48 83 ec 08 sub $0x8,%rsp
438cc8: 48 83 c4 08 add $0x8,%rsp
438ccc: c3 retq

>OCaml
>dead
lmao Sup Forumstoddlers everyone

An innocuous-seeming line actually introduces an arbitrary code execution exploit:
const string& longer = max("a", "b");


C++ fags WILL defend this

I find CE a bit more interesting as well and I've been tinkering with hardware ever since building (not completely on my own, of course) my first PC at 9.

Unfortunately, a lot more money is in SE, it's hard to earn $80k+ as a sysadmin. There are lots of CE-related elective studies even in the SE spec so I'm sure I'll be able to learn both if I want.

D

D

Thanks
Bump

How so

tiobe.com/tiobe-index/
>ctrl+f ocaml
really makes you think

Poo in the

My innocuous-seeming dick actually introduces an baby execution exploit in ur mom.

I'm guessing it's because of one of the fucking overloads

...

kek

By being retarded.

>r*ddit

Hasklets BTFO their interpreter can't even fucking declare things