/dpt/ - Daily Programming Thread

What are you working on, Jow Forums?
Old thread:

Attached: 1534149798844.png (970x793, 40K)

Other urls found in this thread:

archive.is/mnbNo
github.com/hmemcpy/milewski-ctfp-pdf
franz.com/success/
lispworks.com/success-stories/index.html
docs.google.com/presentation/d/1kSuQyW5DTnkVaZEjGYCkfOxvzCqGEFzWBy4e9Uedd9k/preview?slide=id.g168a3288f7_0_58
mathsisfun.com/definitions/set.html
twitter.com/NSFWRedditImage

Looking for new programming socks, got any suggestions?

what is the most /d/eviant programming language, and why?

Yeah maybe I would, how would I go about doing that?

I use chrome like a pleb so what are the basics of making an extension? Just some JS & shiet?

How about black nylon thigh-highs?

Programming onesies are the hot new trend

Attached: programming onesie.jpg (666x1000, 45K)

Why does Jow Forums not like Clean Code (the book)? I read it and it seemed to have some good advice, but every time it's mentioned here people make fun of it

OP is majorly buttblasted by Lisp, it seems

haha xd

(((Google))) has a pretty solid resource base to learn from, and there's plenty of open source Chrome extensions to learn from. To answer your question, yes it's just JS & shiet.

Not the user you were replying to.

Because Stack Exchange pseudointellectuals fellate the author like there's no tomorrow.

Attached: vitas.webm (720x480, 1.08M)

1. Java
2. If you've been programming for >= 1 year you already know essentially all of the concepts the book is trying to teach.
3. Java

>666x1000
the mark of the onesie

Truth.

What are some fun linux kernel module projects?

Made an equivalent of futex on windows

>meme I made is spreading
feels giddy man, let's remind them archive.is/mnbNo

Anyways, I just completed my first daemon program that simply logs everything that goes to my downloads folder and shits out JSON.

Attached: 1523040788433.jpg (368x535, 29K)

Bullshit. A real pro uses Lisp and DOES accomplish actual software with it. A real pro also uses Java, C++, C#, SQL, JavaScript, Ruby, Python, and PHP, even though they're all trash. Also, a real pro uses non-trash languages, such as C, Scheme, Haskell, Idris, various assembly architectures, Lua, and Oh Camel.
Also, even if you're trying to draw something unflattering, would it kill you to put some effort into it?

>daemon program that simply logs everything that goes to my downloads folder

repeat:
ls ~/Downloads/* > log.txt
sleep 60
goto repeat

whoa

The advice in Clean Code is the absolute basic you need to know as a programmer. It's so basic that even junior programmers are aware of them. So the book is not really bad, it's just not worth your time.
Invest your time in algorithms and data structures instead.

>scheme,haskell, lua, ocaml
>not shit langs

Oh hi based Kizuna.
Have we succeeded in creating a standalone executable for a Lisp program that is under 10 MB?

Real pros make stuff. Period. No one makes stuff in Lisp.

Attached: jewishpro.jpg (1280x720, 60K)

>not anime op
trash

Attached: 1532552347927-vr.jpg (9999x9999, 1.73M)

I'm developing a network client that monitors remote and local paths for changes and do various operations on the files discovered the directories. I'm using Go to make it platform independent and also to learn the language.

>That logo
Yeah I know, I fucking hate it.

Attached: golang.jpg (443x317, 35K)

This, about two thirds of the book are absolute basic common sense that any non-shit programmer already does without even realizing it. The counter-examples feel incredibly artificial, like problems created to justify a solution.
The bad thing about it is that it promotes dogmatic thinking, such as "never do X", or "always do Y". Always use whatever works best and don't listen to "gurus" telling you otherwise.
Not to mention that "Uncle" Bob has made literally nothing.

>ocaml
No no no, you read wrong. I said Oh Camel.
>Real pros make stuff. Period.
agree
>No one makes stuff in Lisp.
disagree

show me 3 examples of non-interpreter,compiler, toylang, etc related programs written predominantly in Lisp.

>herro, I rill be condocting the progrraming interwiew
>prease write me a program to cacurate the nth fibonacci number
>that program is wrong: it ron't cacurate the correct answer
>what do you mean that it rill?
>*opens macbook and google searches for an online java interpreter*
>*struggles to translate the python function to java*
>oh, I guess it rill work afterar, good job!
Didn't get the job.

Attached: 1526449401289.jpg (432x403, 18K)

Dunno, I'll let others verify that, I have no interest to install dualboot/virtualize Linux atm to test sh or waste space for Racket. But the source didn't look too good last I checked, it's nowhere near level notepad.exe when it comes to features. It's just a fucking text box with save option you incredible idiots.

Attached: 1522755597540.png (576x545, 346K)

github.com/hmemcpy/milewski-ctfp-pdf
Do you think this is a good introduction to category theory for brainlets?

I can't. However, I still don't concede that no one makes things in Lisp.

Reddit was originally written in common lisp, but got translated to python because of normies.

COBOL is a hell of a drug

Attached: why not just use while.jpg (1280x322, 32K)

people make things in lisp, just mostly useless things.
>oh boy ANOTHER lisp flavor that does absolutely nothing special or new, the world is truly saved now!
1 down, two more to go.

>Reddit was originally written in common lisp, but got translated to python
Now ponder on what this could mean before sperging out "normies" again.

>tfw take home code challenge for interview
>three questions
>aced the first two
>third question time
>holy shit I can't do this. I know how to do this but right now I can't find a solution
>time about to run out (codility)
>submit the questions, feeling pretty bad
>play a match of videogames with friends
>lay down on my bed to sleep
>answers suddenly pops in my head, I wasn't even thinking about the question anymore
FUCK my life and it was such a sweet job opportunity

>Have we succeeded in creating a standalone executable for a Lisp program that is under 10 MB?

Attached: ic-8309.png (520x296, 38K)

human brains suck.
programmers in the future are gonna have it so easy. Being able to turn off shit that doesn't matter and give max priority to the problem at hand.

It is not itself written in Lisp.

>Have we succeeded in creating a standalone executable for a Lisp program that is under 10 MB?
We have some at my job.
>No one makes stuff in Lisp.
Sure we do.

Attached: 1525856158400.jpg (683x1024, 227K)

>look up TS fork

C 78.4%
Scheme 6.7%
Other 6.7%
C++ 6.2%
Makefile 0.9%
CMake 0.6%
Shell 0.5%

the absolute state

I'm sure there's some there:
franz.com/success/
lispworks.com/success-stories/index.html

plus 6 out of that 6.7% is just parentheses

Don't worry, I'm sure he'll concoct a reason to ignore them

>Astrology software supports Lisp scripting

Attached: 1525732435327.png (846x900, 448K)

kek

could not find a better match for Lisp honestly.

ITA's Matrix

Crash Bandicoot
Crash Bandicoot 2
Crash Bandicoot 3

good job lads.
now start writing useful lisp programs yourself if it's so great.

Programming as one's sona is liberating and an unmatched way to improve productivity.

CBs aren't written in lisp tho, they use a lisp-like language for scripting.

I don't get companies that use python in their serious projects. I get that it's easy for prototyping and for scientists to test some mathematical algorithm without much boilerplate code. Or in machine learning where fucking thing is abstracted behind tensorflow anyway. I can't imagine having to manage more than one page of python code.

Seriously, how and why would someone use python for big projects?

>Tuples are a built in feature of the syntax but are plain old algebraic data types! They have only one constructor though. Having the same name as their types (don't freak out, it's just a matter of convenience, as the type constructors and the data constructors have separate namespaces). So, (4, True) is really a value of the form (,) 4 True having the type (,) Int Bool, which, too, is written conveniently as (Int, Bool) to make it more readable.
Does this mean a tuple is just a sequence of nested pairs in Haskell? I'm not clear on how an expression like (1, 2, 3, 4) would appear with the commas written in prefix form.

No, it's not nested pairs. A tuple of four elements uses the (,,,) constructor.

Hammer, nails - you know the idiom

It does make working with web facing things a bit easier.

(write-line "OP is a fag")

I'm thinking of writing a simulation of simple organisms which are controlled by a neural network and the network is trained via evolution.
I.e. organisms fucking other organisms, recombinating weights and passing them down to a new organism. That is, a net is considered good if it results in the organism reproducing somehow (the environment I'd put them in would of course have a mechanism to make this possible)
And some other things like food, predators etc which might be different colours, so the nets would have to distinguish them from sensor input alone. (Such as color)

However, I don't really know much about neural networks, I've only ever implementation forward propagation before. I've never trained one and aren't really knowledgeable about all the different types.
So my question is, what network would produce the most interesting results while also being fast? I'm thinking a recurrent net (so it can remember stuff) with 2 or 3 layers or so. But I'd like the opinion of someone more knowledgeable.

bash: write-line: command not found

it's a LISP insider joke, you probably wouldn't get it

Thread just begins and is already full of salty lispers.

>2018
lisp)))))))))

if i had a lisp i'd be salty

i think you should first try to thoroughly understannd the basics of machine learning and maybe evolutionary computing (they are completely different if you didnt know already).

docs.google.com/presentation/d/1kSuQyW5DTnkVaZEjGYCkfOxvzCqGEFzWBy4e9Uedd9k/preview?slide=id.g168a3288f7_0_58

Yes I know they're different. I've implemented a few genetic algorithms before.

if I attend to programming engineering classes, can I work as a computer technician later?

No, but it would be trivial to use it to write a program in lisp.
Package the interpreter with it and you've got yourself a standalone lisp program under 1mb much less 10.

the logo is the best part wtf are you talking about

I wonder if Google had to pay Pike's wife for designing the logo.

Attached: DGai-uNUAAAKZc_.jpg:large.jpg (1572x800, 198K)

why "array" and not "set"?
an array is a bunch of elements of a given type grouped together, an int array contains elements of type int, a char array contains elements of type char, an array may also contain no elements at all, to which we often confuse them with a pointer.
a string could be a set whose last element is a null character.
WHY
WHY DID COMPUTER SCIENTISTS HAVE TO BE SUCH BRAINLETS
THIS WAS TAUGHT TO THEM DURING *ELEMENTARY* SCHOOL

Attached: 62185517.jpg (750x709, 84K)

why is it that dpt always ignore my questions

user, what the fuck are you talking about

ranges and slices desu.
[1,2,3] and "string" can both work with generic range algorithms.

dumb frogposter

>

Attached: 1520326065331.png (2693x3385, 441K)

It's possible concepts won't fix it because it's unclear to which extend if any STL is gonna be retrofitted with them.

I don't see why it wouldn't be. It won't bring breaking changes will it? The standard library already defacto defines a bunch of concepts.

Why are C++ error messages so awful?

they're trying to stop you from using the language

duck typed templates that leak the implementation details of every template that fails to instantiate simply because it's the only thing it can do.

most compiler error messages are awful.
Especially in the FP world.

mathsisfun.com/definitions/set.html
big brained
didn't know sets couldnt be split, or at least that is what you appear to imply
PIC RELATED, BRACE YOURSELF

Attached: 1489771859130.gif (680x440, 140K)

What programming language will impress normie employers? I'm a CS student got nothing to do in summer break wanna learn something. I lready know: Java, C# (and VB.NET), little C++ and some webdev (HTML, CSS, JS, PHP).
I could just practice these with some random projects idk or learn something else.

git gud, real programmers don't make errors.

show me your 100% bug-free, warning-free, production tested,stable C++ code

Drastically improved my terminal gif player

FPS increased 7.5x and visuals are better

Attached: 17_08_18_00.webm (876x1172, 1.1M)

Here's before

Attached: 13_08_18_00.webm (660x928, 681K)

Is it open sauce

What was the bottleneck? Just curious.

Anyone know how much work it would be to implement a custom container engine, like Docker, inside another application?

I have a desktop GUI app that will talk to a webservice API for some functions, but sometimes the GUI app will need to run standalone with no internet connectivity. In those cases, I'd like to start up a local server on the user's machine. For simplicity, I'd like to just reuse the same container from my webservice, but asking the user to install Docker is a non-starter. If there's a way I can just run the container in my own app and then shut it down when the app ends, that'd solve the standalone issue, be minimal work for me, and not require anything extra from the user.

Otherwise, I'll just have to duplicate all of the webservice's functions in another module in the GUI app. Not impossible, just redundant work.

...

>how much work it would be to implement a custom container engine
At least a fuckton.
Also, why can't you just start a separate web-service process. That sounds a whole lot easier.

Sets don't have a fixed order or adjacency in memory and by definition need additional methods for mathematical operations which are beyond the scope of a bare array. In order to support those operations sets usually aren't implemented as arrays because things like simple lookups would be O(n). Instead they're usually hashmaps or trees of some kind.

In other words, not the same thing at all.

Well, executing the service in the container is stable. Haven't had any issues on any machines or in AWS. Running the service in the user's environment might upset that. So, in that case, I'd rather go with the separate module solution.

Anyways, container implementation will be much more complex than whatever application you are building.

Writing stupid slow code where I was cropping 4x8 boxes out of the picture and then averaging the top and bottom halves for color (half-block character and background color). Instead of cropping and averaging I'm taking the top left and bottom right pixels in steps along the picture and using their color directly.

Ooh, you should do filtering next. Like linear, bilinear and stuff.

That's what I figured... I was hoping someone else already did this and I could just import it into my project.

Oh well, thanks.