/dpt/ - Daily Programming Thread

What are you working on, Jow Forums?

Last:

Attached: 1444597674638.jpg (1300x1244, 767K)

Other urls found in this thread:

webm.land/media/gToD.webm
webm.land/media/gToD.webm'
twitter.com/SFWRedditGifs

Lisp is the most powerful programming language.

mmmm nice try

Attached: zig is the most language.png (4824x1527, 118K)

Attached: prog_chal_2_0.png (1450x1080, 378K)

How is your tech startup coming along?

Attached: l.jpg (2488x1600, 485K)

I'm doing 52
Any good guides or books in networking to help me?
Also, is OpenSSL allowed?

Attached: 1520551971995.jpg (507x540, 90K)

>is OpenSSL allowed?
I would think so, implementing your own cryptographic protocol is much more difficult than a TCP chat program.

use libressl nigger

whats the difference

Instead of 49 can I do Puyo Puyo?

Attached: puyo_puyo_wallpaper_by_maca33-d4srwhk.jpg (800x640, 170K)

LibreSSL is an open-source implementation of the Transport Layer Security (TLS) protocol. The implementation is called after a deprecated predecessor of TLS, Secure Sockets Layer (SSL), support for which was removed in release 2.3.0. The OpenBSD project forked LibreSSL from OpenSSL 1.0.1g in April 2014 as a response to the Heartbleed security vulnerability,[7][8][9][10] with the goals of modernizing the codebase, improving security, and applying development best practices.[11][12][13]

First for Rust!

Attached: Rust_programming_language_black_logo.svg.png (1200x1200, 56K)

If you're using C, libtls from libressl is much, much easier to use than either OpenSSL or GnuTLS.

>supporting this piece of shit

Attached: Rust_CoC_Citizen Code of Conduct A project of Stumptown Syndicate.png (618x516, 45K)

Can someone direct me to some decent resources to learn programming? Also what's the best language to learn for a beginner?

find an exploit in my code

Attached: Screenshot 2018-11-16 at 17.47.21.png (1316x962, 217K)

what's wrong

>those blue berries
those are absolutely primo
>that scarf and gloves, inside, no less
absolute faggotry

just goole for a resource.python or java are good for begginers

sicp

How are you supposed to program if you can't say "mick" or "dumb blonde" or embed gay porn in your source code?
Has anyone even written "hello world" without doing all three?

Haskell

>you should not be allowed to say the truth that gender disphoria is a mental illness

>that code
are you Chinese?

they are both not audited

Attached: cry.png (361x496, 216K)

Attached: 6286761.png (200x200, 30K)

is that a joke, because user highlighted the joke line specifically

I'm much more upset about not being able to say the truth that Jesus Christ is our lord and savior and constantly ask other programmers if they've heard of Him. Like, do they want programmers to burn in hell and be tortured for all eternity? It seems like they're actively working towards it. Don't you think? By the way, have you heard of Jesus Christ? He is the son of God and He died for our sins and then rose from the dead three days later. Isn't that amazing?

Attached: 252.jpg (680x680, 98K)

>how using Go feels like

Attached: hqdefault.jpg (480x360, 5K)

>Religion has convinced people that there’s an invisible man... living in the sky, who watches everything you do every minute of every day.
>And the invisible man has a list of ten specific things he doesn’t want you to do.
>And if you do any of these things, he will send you to a special place, of burning and fire and smoke and torture and anguish for you to live forever, and suffer and burn and scream until the end of time.
>But he loves you.
>He loves you and he needs money.
GC

Let's all love lain.

Attached: lain.jpg (1920x1080, 1.01M)

Which drooling retard are you quoting?

>unwelcome sexual advances
>As if anybody was interested in making out with obese blue-haired trannies.
kek

Agreed. Let's.

Attached: 1520096169694.jpg (1024x768, 286K)

George Carlin.
Also, not an argument.

Attached: george-carlin-saturday-night-livejpg.jpg (1200x901, 97K)

>hey...
>can I... fork your private repo?

Thank God we've got this fucking stoner comedian here to tell us about religion. I bet this dude was talking all about how existentialism is totally different from nihilism while he was drinking himself into depression and heart failure.

>stoner comedian here to tell us about religion
>drinking himself into depression and heart failure.
he wasn't a stoner.
Imagine commenting on things you don't know a thing about. Nothing you've said is true.
refrain from posting please.

if (condition) {
a = 1
b = 2
}
else {
a = 3
b = 4
}

or
a = condition ? 1 : 3
b = condition ? 2 : 4


which is better? assuming condition is a boolean variable

>Imagine commenting on things you don't know a thing about. Nothing you've said is true.
You DEFINITELY aren't the fucking cunt who thought ANYTHING in this post was half intelligent or worth reading
I fucking guarantee you're one of those bitch sceptics who cries about fallacies all the time. NOTHING in that post is true? The stoner part is the only thing that MIGHT be wrong.

I would only evaluate the condition once.

that book looks new/unread

There are people who believe in religion and those that don't.
That's it.
Not gonna post George whole life here, but basically he did smoke and drink just to see "what the appeal was". He tells about this much later on on interviews.

Some of us obsessively take good care of our books and keep them clean and new-looking with intact spines, because it's respectful. Especially if it's the Bible. Incidentally, have you heard of our lord and savior Jesus Christ? He died on the cross and rose again.

a = condition ? ( b = 2, 1) : (b = 4, 3)

in Haskell
(a, b) = if condition then (1, 2) else (3, 4)
bad
it's not my pic
good work

ugly

yes and I am not even sure it works
explicit if / else is better

bad

I spilled juice on my copy of SICP and now some pages are stained pink.

am I able to start programming in object-oriented languages once I learn OOP basics? should I read Gang of Four? I know what is an object, a class, inheritance, polymorphism, interface, association, aggregation, composition and I know I should use "composition over inheritance", delegation and SOLID principles, would that actually be enough?

what font and what theme pls

there aren't many pure OOP languages, most "OOP" languages are mostly structured procedural, based on C
so you should learn that too

Learn CLOS.

not specifically learn C ofc

>be me
>New to programming
>Download Python
>Print ('Nigger')
>Computer says back to me "Nigger"
>"Okay, Now this is epic" I think to myself
>Write in Print ('user, you are so sexy')
>Computer calls me fucking sexy
>Just got myself a fucking Hot AI gf
Programming is based AND redpilled

kek

>lookiremovedalltheunecessarysyntaxfrommysentenceisntitsoterseandbeautifulandreadableguys:)

thatsactuallyprettyeasytoreadspaceswereamistake

Encapsulation?

>tits
based

>learn structured procedural programming
aren't structured and procedural programming subsets of imperative? I believe I already know both (I'm learning programming with java), at least enough to start building programs, even though I know that if I want to be a good programmer I'll have to learn C and pointers, which I actually plan to do some time in a near future

yes, encapsulation and abstraction too. thanks user

Finalizing improved type support for libpqxx
>I've only spent about six months on something that should have taken one

Attached: Screen Shot 2018-11-17 at 10.37.00 PM.png (1592x1634, 521K)

>Python
yeah you're not based or redpilled
you're cringe and bluepilled

it's all kind of bullshit with these terms desu
i wouldn't argue that most non-imperative languages today are not "structured"

but can you favorite language do this?
from random import choice; ' '.join((choice(('pi', 'pika', 'pikachu', 'chu')) for x in range(200)))

>Python
>Not based and redpilled
a PYTHON is a snake my friend. A deadly REPTILLIAN menace. You just can't handle the raw masculinity of the program. And fucking look the logo looks like a literal SWASTIKA. that's more than based and redpilled. Come back when you learn history and manliness libcuck! LOL (laugh out loud)

Attached: 2000px-Python.svg-56a7b0bc5f9b58b7d0ecea1f.jpg (768x768, 33K)

got it, thanks user. I guess I'm gonna start creating my programs then

>the logo looks like a literal SWASTIKA
oh shit never noticed
will the SJWs pick up on this too?

200.times { print %w{pi pika pikachu chu}.sample, ' ' }

Attached: 1504231642822.png (500x500, 296K)

>from random import choice
determinists and free will btfo

looks like a snek

>%w
nice

Haha those SISSIES are too sacred to even look up PYTHON out of fear of encountering a DEADLY reptile.

Try CCNA guide, i studied and it foud it good

not sure if /dpt/ related, but is there a shell command that can be used to get the mime-type of a remote file? this is the gist of it and this is the script i want to use it on.

Attached: 1542504083426.gif (540x540, 577K)

file.

$ file -b --mime-type -- webm.land/media/gToD.webm
cannot open `webm.land/media/gToD.webm' (No such file or directory)

Attached: 1542112175824.jpg (640x853, 54K)

Download the file first you goddamn sticky cumrag

if your file command accepts stdin (mine doesn't), pipe curl to it

curl --head does it

file $(curl blah.webm)

Any reason to use let over const in this situation?

Ternary operators are a weird mechanic. There's basically nothing like them.
For the sheer fact that they just stand out from everything else, I don't use them.

The only situation where I really do is if it's required or otherwise highly inconvenient not to just embed it.

$("body").append("" + asdf = true ? "asdf" : "hjkl" + "");

Hi, Gavin

extern crate rand;
use rand::thread_rng;
use rand::seq::SliceRandom;

fn main() {
let mut rng = thread_rng();
for _ in 1..=200 {
println!("{}", ["pi", "pika", "pikachu", "chu"].choose(&mut rng).unwrap());
}
}

>Rust needs an external library to generate a random number

Attached: 1375670617230.jpg (503x503, 233K)

You can't do ANYTHING in Rust with just the stdlib. It's pretty barren for a language that wants to take over so many different computing fields.

the absolute state of rust.

import java.util.Random;

public class Program {

public static void main (String[] args) {
final String[] words = {"pi", "pika", "pikachu", "chu"};
new Random().ints(0, words.length)
.map(i -> words[i])
.forEach(System.out::println);
}
}

here you go, although the solution isn't that clean

What am I working on:

Windows application for a machinery distributor that locks down a screen and requests a license key. License keys are generated using a partial number generation system. I use persistence techniques similar to malware: DLL hijacking, fileless scripts, registry edits and scheduled tasks. Technologies used: C#, WinForms, PowerShell, VBScript.

I am not earning much; $2000 for 7 days of work. I need to up my rates.

>zero metaprogramming features
literally the least powerful programming language
it has some good ideas, though

yeah the fact that it isn't in the standard library is fucking dumb. The language itself has some brilliant ideas, but it's very rough around the edges especially given the fact that it's supposed to be stable at this point.

the funny thing about Rust is that, despite the inadequacies of the standard library, it is brutally difficult to separate its stdlib from the language itself, meaning you can't really have truly bare-metal Rust implementations without cobbling together every runtime feature needed by the stdlib.

If u guys had to start everything all over again, how would you go about learning everything to this date from zero?

Attached: Do-jwTbUcAY4atj.jpg (900x1200, 151K)

>If u guys had to start everything all over again, how would you go about learning everything to this date from zero?
I wouldn't.

Attached: 1537985908896.png (1075x1518, 1.76M)

>It's pretty barren for a language that wants to take over so many different computing fields.
To be fair, Rust put a decent package manager into its build system, so it doesn't really need to have a large stdlib. Just put rand = "0.6.0" into the dependencies section of the Cargo.toml and it'll be fine.

>it is brutally difficult to separate its stdlib from the language itself
libcore if you want bare metal. Not a lot of "runtime" in that.

>libcore if you want bare metal. Not a lot of "runtime" in that.
even with libcore there are still problems. It's impossible to have a panic handler that isn't written in Rust, unless you hack together a makefile-based build that doesn't use cargo. libcore also includes support for 128-bit integers, which aren't supported by most cross-toolchains for 32-bit architectures. It also includes heap allocation calls, even though many bare-metal applications neither want or need the heap.

do what instead then?

Why are people on Jow Forums learning rust when they should know better?

name an alternative to rust that
>isn't feature bloated
>has effective metaprogramming without runtime overhead
>has variants/named unions/whatever as part of language syntax