/dpt/ — Daily Programming Thread

Previous What are you working on, Jow Forums?

Attached: 1528698866606.jpg (3721x2470, 1.42M)

Other urls found in this thread:

github.com/AppImage/AppImages
dailyprog.org/~mabynogy/honor/
p.sicp.me/bPp6K.js
stackoverflow.com/questions/38430229/why-cant-we-define-function-inside-the-main-function
github.com/andrejewski/raj
twitter.com/SFWRedditVideos

why are iterators so bad in every language

>tfw couldn't get a 100k salary for my first job
I wish I didn't live in a third world country

it bugs me to no end that there's no `operator bool` for sepples stdlib iterators
for( auto iter{ std::begin( c ) }; iter != std::end( c ); ++iter )
...
// could be
for( auto iter{ std::begin( c ) }; iter; ++iter )
...

auto found_element{ my_map.find( "foo" ) };
if( found_element != std::end( my_map ) )
...
// could be
auto found_element{ my_map.find( "foo" ) };
if( found_element )
...

Rust iterators are quite comfy, tbqh

this is only a problem because sepples doesn't allow you to create conversions for predefined types

They're alright in C#

why not use for_each, transform, copy, etc?

What is the best format for data-storing?
I made a web crawler to extracting some data, and store it locally.
The format doesn't need to be human-readable since there is another program that going to read it.
Currently considering using XML, but JSON also being considered since the web crawler going to parse json output from API

>Created 48 commits in 3 repositories
How's your June going, /dpt/?

Yo /dpt/, what are your opinions on Castlevania games? I'm making one in OpenGL atm.

Attached: asmrdarlingfbrip-10.jpg (960x960, 84K)

reminder that cout is niggerlicious

why do people hate sepples streams?

those don't work for all cases
also those aren't equivalent to the second one, which personally happens frequently enough to be annoying

Seconded

ive played all of them, my favorite are order of ecclesia, aria of sorrow and symphony of the night

What's your favourite thing about them in particular? The exploration? Aesthetics? Boss mechanics?

Move out of the USA boy.

I'm not brown enough.

>move out
Nvm I can't read. Guess that's why I cannot get a good salary.

did you have any work experience? What's the problem with getting sub 100k anyways, in a year or two you'll be making over 100

I can't compile a piece of code using gtkmm 3.0 using automake.

configure.ac:
PKG_CHECK_MODULES([gtkmm3],[gtkmm-3.0])
Makefile.am:
libfoo_la_CPPFLAGS = ${gtkmm3_CFLAGS} ...

When I try to compile, it still gives me the following error:
In file included from bar.hpp:5:0,
from baz.cpp:9:
/usr/include/gtkmm-3.0/gtkmm/glarea.h:27:10: fatal error: gtkmm/widget.h: Filen eller katalogen finns inte
#include
^~~~~~~~~~~~~~~~
What am I doing wrong? The rest of the libraries I'm including in this way works just fine. In fact, the the output from "make" doesn't even seem to include the output that I'm seeing when I run "pkg-config --cflags gtkmm-3.0"

>automake
Please god no.

According to payscale, the senior devs above the 75th percentile can barely break over 80k in my crountry. I'd have to move out if I want a chance at a better salary, which would require learning how to speak intelligible English.

the metroid-like map system is comfy, the different weapons you can equip, the RNG drop from monsters, i love the exploration and different items you find that change the gameplay, i like the dashes and things like souls in the aria of sorrow

Oh, fuck me! I had forgotten to run autoconf after updating configure.ac.

>using automake

well get to it then!

Id guess wherever you live is much cheaper than living in the US tech cities, why are you complaining. Be glad you're employed!

>4
normal programmers, who don't give a shit
>3
first group of drooling idiots who think recursion or anonymous function have anything to do with functional programming
>2
group of clowns who think lisp is functional and you should use immutable data structures and higher order functions just because they are "functional programming"
>1
the real functional masturbators who only use languages with dependent types and that do not allow IO. None of them has ever written useful program.

I mostly enjoy the *feel* (music + aesthetics), coupled with a fair but challenging fighting system.
It's a big plus if there are a shit ton of optional stuiff

what did he mean by this

Attached: Nice+_1ca8d36caed16776249a497aa96a8958.jpg (447x444, 46K)

>C is Trump
Oh, it's you again

>33 commits in 1 repository

My project is going quite well. Once I got past the setup stage everything is flowing smoothly.

Attached: 1467829566766.jpg (240x240, 6K)

>What are you working on, Jow Forums?
Adding tuple support to pqxx::tablewriter

Attached: Screen Shot 2018-06-14 at 5.14.26 PM.png (908x1358, 214K)

Have been doing toy projects since april, with less than 10 commits each.
I want to kms, I'm just too stupid for porgramming and too unsecure to contribute to existing OSS projects.

>got laid off this month
>460 commits in 9 repositories

Fuck, I'm embarrassed for myself

>What are you working on, Jow Forums?
Kernel in Haskell sans I/O

Gonna shamelessly plug this because I need some help.

Friendly reminder AppImages help developers in making their work easier and helps the Linux community too.

Attached: appImage.png (720x340, 290K)

Link github.com/AppImage/AppImages

is there an error message?

Yes, something close to "expression is type 'a * 'b but type exp was expected", can't pull it up right now but that's the gist of it. Basically failed type inference.

If plain storage is the goal and you don't need to read them often, consider an archive format that supports compression. Anything popular will probably have an API for your language of choice.

here
Error: This expression has type 'a * 'b
but an expression was expected of type exp

centered around (ext,id) in the line
| id::[] -> (match FunCall_e(exf, testNode(ext,id)) with

Hey guys quick question. Is it normal to not hear anything after a background check/drug test?

I signed the conditional offer of employment last week, and started the background process at the same time. The background process includes a drug test which I took on Sunday. I called the company doing the background on me, and they said it was finished but they wouldn’t tell me the actual details of it. I’m assuming HR of the company knows it’s done, as the HR has been very quick to reply/call me all throughout the hiring process.

I’m supposed to start June 25th, but I have another job in working at right now and I want to put my two weeks notice in, but only after I’ve confirmed that I’ve passed the background stuff.

I’m assuming that since it’s done and I haven’t heard anything, I’m safe? I mean I’m sure they’d contact me immediately to rescind their offer if something was wrong...

have you done any illegal drugs for the past 30 days?

No

for the second case you could make a wrapper using std::optional
something like


template
auto
maybeFind(Container &con, T &&arg)
-> std::optional
{
auto ret{std::find(std::begin(con), std::end(con), arg)};

if (ret != std::end(con))
return std::make_optional(ret);
else
return {};
}

auto
main(int argc, char **argv) -> int
{
std::vector wew{1, 2, 3, 4};

if (auto lel{maybeFind(wew, 3)})
std::cout

How the fuck does anyone get any meaningful work done without Python?

Attached: Blank+_8c9abd620761404068b8b0c408ea51eb.jpg (900x668, 201K)

Stop masturbating

e'z, you use ruby

why not a table in sqlite?

>auto main() -> int
>auto lel{...}
>std::begin, std::end
>std::cout

kek

Attached: a47qBN1_460s_v1.jpg (460x512, 41K)

>taking obligatory Programming Languages course
>learning Standard ML

Holy shit why didn't anyone tell me SML is so comfy? Even compared to Haskell, it's so much more consistent and simple.
It feels like SML is like to Haskell as Scheme is to Common Lisp.

There's a reason the FPL scene pretty much descends from ML, it's a really solid foundation lang.

>5
C programmers, who are so far from giving a shit about pure functional programming that they're not above writing code so impure it's actually dangerous just to do something as efficiently as possible.

Did an UI to generate qr codes for a money exchange project:
> dailyprog.org/~mabynogy/honor/
It's written in my programming language (a kind of coffeescript very close to js):
> p.sicp.me/bPp6K.js
The thing I'm proud of is to have found generators as a replacement of callback hell of promises and async.

nice

Hi, I'm slowly learning C and also retarded.
I read a few people saying it's not allowed to define a function inside another function in standard C. stackoverflow.com/questions/38430229/why-cant-we-define-function-inside-the-main-function

I tried their code that fails, and I get the same ld error.
So now I'm trying to figure out what's so different about this, because it's clearly not as simple as "you can't define a function inside another function"
main()
{
int three() { return 3; }
return 3 + three();
}

compiles just fine with gcc, and even with gcc -std=c11 and since I don't know what I'm doing I also put on -Wall and -Wextra

>because it's clearly not as simple as "you can't define a function inside another function"
Actually it is. What you have there is standard-noncompliant C code that happens to work under GCC due to a nonstandard extension.

>camelCase

Attached: 1511488663495.jpg (447x456, 32K)

whoa, interesting. Is there a flag I can use to turn it off for demonstration? I was looking for something but .. there are a lot of flags

try -pedantic -Werror

>finally get the feature you've been working on for a month working
wew lads, we're all gonna make it.

Thanks, that did it. It isn't the same error from ld, rather:
error: ISO C forbids nested functions

Really interesting, I would not have expected

Attached: python_data_science.png (1500x2250, 543K)

I'm at my first internship, is it bad that I am specifically avoiding using for loops for my C# list processing, and opt for higher order LINQ functions like Select(), Where(), and Aggregate()? I prefer using them and no one reviews my code, it's just that I bet anyone who had to maintain my code at this small shop would understand it. I'm starting to feel like I'm being too "creative" writing code, going out of my way to not use for loops is probably not pragmatic. Should I feel bad?

>would understand it.
*would not

Attached: Screenshot from 2018-05-19 21-48-31.png (264x226, 58K)

op is a faggot

better add
"nigga you gonna need plenty more stats than those dice rolling problems you did in hs"

>b-b-but my ML black-box library
do yourself a favor, go look around on kaggle, people discuss the problems, you'll start to understand how installing numpy is not enough

what I'm saying is this should be *built-in* to the stdlib iterator types
yes it's easy to write a util function to do it

an internship is also about networking. You should be establishing communication with the kind of people who can answer that for you.

i have a relatively high paying internship doing data science at a company you've heard of. still learning to be more productive, but entirely on the libraries in that pic -- not math

I'm at my first internship and unsure of how serious I should take it.

the people I'm working with just don't care about making elegant, clean code.

what the hell do you do then? data entry? asking what buttons to push?
If you don't understand a CNN, how would you know if it's applicable vs another technique? Or what to do to your data to make it applicable, etc?

>If you don't understand a CNN,
shit news channel sesu denpai

Write code that's clearly understandable. If you 're doing something a bunch of times, use a loop. If you're performing some kind of transformation on a list, use higher-order stuff. Don't try and force one kind of problem to use the other kind of solution.

You need to work somewhere where they write in C. That's how you know they give a shit.

C is still wanted in the field?

I am numb with boredom doing React stuck with teammates that don't care.
Everything is javascript.

Doing interview questions and wondering what language would be most interesting/helpful: python, ruby.

Why don't people give a shit anymore? I'm sick of web shit, but I'm failing to see the applications/lucrative output of anything else.

Wish I had a role model.

You're right, I'm working on that. Unfortunately, the only other programmer on my team is and intern, but I have been asking for his advice when it's reasonable.
Got it, thanks. I'll review my code but I believe I am really just using higher order functions for list transformations

>Why don't people give a shit anymore?
JS apathy is an overwhelming force.
Elm cannot progress any faster so we can be free from it some day.

>Elm
Fuck that's pretty beautiful

>Why don't people give a shit anymore?
Because they have no stake in what's being made. They aren't making creative decisions, they're minimally affected by how well the programs they're writing function, they're just paid to push keys.

I keep reading garbage from push constants in shaders on my mobile Haswell iGPU, anyone else got this problem in Vulkan? Querying says it supports up to 128 bytes which is the minimum requirement.

I am not a JavaScript programmer, but my friend is (see pic for proofs it's not me). He made some micro-framework that apparently is like Elm, but in plain javascript. Check it out github.com/andrejewski/raj

Attached: Screenshot from 2018-06-14 22-06-12.png (735x353, 64K)

C is very much still wanted. Embedded, "IoT", and also many high-level languages allow you to drop down to C, so you can write in a high-level, identify a bottleneck, then write that part in C. So in that sense, C is applicable wherever there are high-level languages being used that have bottlenecks.

I couldn't put it in a better way. Sounds right to me.

>implying supreme overlord trump will allow little pajeet here to climb over his mighty wall

Yeah it's gonna be a really great language.
The problem is it's literally dev'd by one person who's really fucking methodical (read: slow) and only does major updates.
We're going on 2 years between .18-> .19 and last heard news was it was in "beta".

>laid off
>not fooling anyone

I bet you use global namespace

>kernel in anything sans I/O
rip your ma

>cause_this_is_fucking_gay

I hate functions within functions, see no purpose for them, get annoyed whenever I see them and am extremely happy that C does not allow them.

Why did you label VB6 C? Hell, even VB is beyond that moron's grasp.

the joke
___
your baka head

why haven't you written an OS

because i want to make games first