/dpt/ - Daily Programming Thread

Old thread: Lisp is the most powerful programming language.
I don't care about what you're working on.

Attached: lisp.png (2880x1800, 562K)

Other urls found in this thread:

stackoverflow.com/questions/11563154/what-are-replacement-functions-in-r
youtube.com/watch?v=kOgLxc9YvbI
tiobe.com/tiobe-index/visual-basic-dotnet/
redox-os.org/
twitter.com/AnonBabble

rustc touched my penis

panic!();

how did it feel

unsafe

Stop creating these autistic lisp threads, you fag.
The /dpt/ OP is supposed to be an anime image.

Attached: 1544991463520.jpg (330x560, 118K)

what is python used the most nowadays beside sciencefags?

where do i start? should i go into webdev and django?

Attached: wwww.png (971x280, 94K)

>tfw rustc is incorrectly accessing private members.
Time to file a bug report.

no its not you degenerate waste of air

Why are you complaining about anime on an anime website?

Attached: 1453302579367.jpg (1280x720, 91K)

Technology board.

On an anime website.

Absolutely delusional
>it'll be just like star trek!
Automating most jobs doesn't serve any purpose other than "number go up"

Attached: onions.png (644x800, 15K)

pub struct user(pub Penis);

>public penis
Such indecency on a Christian website!

What are some examples of algorithms that have good CPU parallelism but bad GPU parallelism?

Attached: 1566606852096.png (288x253, 143K)

What is the kind of ∀a. a -> a?
What is the kind of ∃a. a -> a?

Someone with better domain knowledge can correct me but I believe branch heavy code is better on a CPU.
So parallel sorting would be better on a CPU.

they're both just regular types, you don't even need a notion of kind
unless your notion of kind is related to storage or something else

>My university teaches programming using Java

Attached: o4tq42duxug31.jpg (933x933, 83K)

Based and durgasoft

Mine taught whatever the professor felt like, which unfortunately was always either Java or C.

What's this programming paradigm called?

>vect = c(1, 2, 3, 4) # create vector [1 2 3 4]
>dim(vect) = c(2, 2) # set dimensions to 2 x 2
> vect
[,1] [,2]
[1,] 1 3
[2,] 2 4


This language (R) allows you to set the attribute of an object by "assigning" the output of a function (dim(vect)) instead of altering the object (e.g. vect.dimensions = c(2, 2)).

Rtarded programming. R fucking sucks and I hate it.

Okay but it's the most popular statistical computing language at the moment and we're forced to use it.

Anyway it's basically just returning a reference
I was forced to use it. It sucks.

They're both just types.

So they're both just *?

They're just regular types like anything else.

So if a function is called but followed by the assignment symbol, it just returns a reference instead of the actual value? Does this happen always? Like length(something) = 2 changes the length to 2? (This seems to work)

GPUs are very bad at managing memory and following pointers. Anything that needs to traverse and/or update a linked data structure is going to do poorly.

GPUs aren't necessarily bad at handling branches. You just want "adjacent" work items to take the same branches as much as possible.

It might be something else actually, I've found this:
stackoverflow.com/questions/11563154/what-are-replacement-functions-in-r
It seems weird, it would make more sense to just be able to return a reference and maybe overload =. But as I said, R sucks.
In another language you really would just return a reference rather than a copy.

So it's actually calling a function "dim

Woah, Anone! Your JavaScript program is so cool!

Attached: 3ef2250735a8bce253f30bde35afb3fb.jpg (900x1200, 144K)

The Rust community has been nothing but helpful and cooperative to my newbie questions :) I've been way more productive talking to them while /dpt/ obsesses over feminine penis/weebshit/sjws etc.
The CoC boogeyman has always been a lie.

Thank you sir, durgasoft has taught me to be an expert at the script of Java.

Attached: average java certified durgasoft trainee.png (180x196, 63K)

you need to go back discord tranny

Array[1]'th for Julia

Attached: images (1).png (467x315, 6K)

I refuse to learn Rust, simply because

Just youtubed this and the video is literally incomprehensible even though it's in English supposedly what the fuck

youtube.com/watch?v=kOgLxc9YvbI

>he can't understand an Indian accent
not gonna make it. you'll never get your durgasoft certification at this rate

I've writing a little gui I can use to browse and play my anime collection. Got the basics working, now I need to make it look good and work more smoothly. One problem I have now is I need to manually specify the display title for each file. This is no good as it'll prevent automatic scanning and force me to maintain the listing by hand. So I'm going to look into finding an mkv library to read off that stuff from the video metadata.

Post your body, incel

Attached: FD6FFD0E-8C98-4039-963F-A2A674A7F0FF.jpg (1509x1737, 302K)

1 indexed arrays are indisputably based and redpilled.

>not alphabet indexed arrays

>Why yes I program in Rust, how could you tell?

packet bot? how did you make the bot

I wanted to learn Julia the past weekend, and I had this project in mind:
Suppose an chess board (8x8) with a horse on one corner. If the horse moves around randomly (doing legal moves, that is, jumping around doing L's), how many moves, on average, it would take it to reach the opposite corner?
The model I made was a discrete time markov chain, so the problem reduces to just finding E[T(1,64)], which means solving a 63x63 equation system. I failed miserably. How would you approach the problem user?

I'm convinced he's speaking Hindu and just throws random English words in between. Hell, I know I have a thick eastern accent but what the fuck is this man?

nigger

>mspaint and notepad presentation
absolutely based

>incel cope

Attached: 1536063434957.jpg (1000x1000, 80K)

fuck off sperg

today I left my wagie cagie and incorporated my limited company

doesn't that just mean you're in a wage cage of your own creation?

>work bad

>word bad

This but unironically

how does civilization exist without people working?

Civilisation bad

Attached: young ted k.png (220x156, 72K)

Fucking imbecile NEETs struggle with simple concepts. They cope by calling you a wage slave but the truth is that they're just incapable of getting a (non-shit) job due to low IQ.

under capitalism yes. the entire basis of the software industry is a fucking meme propped up by the rent-seeking-through-IP that is artificially scarce goods. It's inefficient as fuck even when viewed through a capitalist economics lens.

just sell drugs bro

>t. guy posting in a programming thread

You don't need a particularly high IQ to be a fireman, or a nurse, or a carpenter or a farmer or any job that you could actually be proud of.

work needs to be done but if we were honest wit ourselves white collar people would be working like 10 hours a week.

You are correct but Jow Forums NEETs lack the skills for even those.

Why is everyone angry now?

>tiobe.com/tiobe-index/visual-basic-dotnet/
>6th
who tf still uses visual basic .net?

Visual Based and Redpilled

Implementation of the Emacs Lisp VM and builtin functions as well as toolkit bindings. It's living mostly in the src and lib subdirectories.

That is the default state of this thread when there's no reasonably interesting programming challenge to solve.
It's not called the friendly coding thread.

This place is hostile. All of Jow Forums and Jow Forums in general is hostile. I would say I got used to it and just filter it out, but it's not true. Jow Forums has negatively affected how I interact with people. I can't talk to somebody without wanting to call them "brainlet", "nigger", or tell them to "cope" or "seethe". I genuinely hate everybody and everything yet I continue to come here and express my anger because it's, strangely enough, the only thing that still gives me any satisfaction.

PROGRAMMING CHALLENGE:
Do a syscall in your language of choice. Bonus points if you can accomplish this in a high level lang like Durga.

Seething

Jow Forums and Jow Forums are stereotyped as bullies but they're the nicest places on the internet that aren't degenerate imo.

I guess but I hope it will feel better. Also I can work from home.

That just means you've turned your home into a wage cage

Stop spamming the jew shit.

Java has nothing to do with ECMAScript

I'm learning Emacs but the default controls are so awful. Any suggestions?

I do not understand the question? I am Java certified

Attached: 1234.png (250x250, 75K)

Rebind it using EMACScript

Has anyone made a Jow Forums inspired programming language yet?

cringe

don't, it's a shit editor

Have dilate

import socket
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM, socket.IPPROTO_TCP)

>what if we took a programming language and made all the keywords funny words like tranny
dilate lmao
>what if we renamed all the variables to nigger lmao
so y.png

>(non-shit) job
good one

no but Jow Forums made feminist inspired programming language c+=

def fetchURL(url):
header={'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36'}

try:
response=requests.get(url,headers=header)
except requests.exceptions.RequestException as e:
print "Error: " + str(e)
print 'Can\'t reach resource'
read.time.sleep(30)
fetchURL(url)

json_obj = response.json()
return json_obj

This function should keep retrying until the requested resource is available again and return a JSON object.

Problem: Let's say the resource is available for the first function call, so it can fetch the content successfully. Now I reroute the request to 127.0.0.1, it keeps recalling the function, as expected, but when the resource becomes available again, I get the following error:

"UnboundLocalError: local variable 'response' referenced before assignment"

How can I solve this? Thanks in advance!

Well it makes sense, the variable is assigned in the try block, so when you execute it in the except block it's not assigned.
headers = {
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36'
}

def fetch_url(url):
while True:
try:
res = requests.get(url, headers=headers)
assert res.status_code == 200
return res.json()
except requests.exceptions.RequestException:
read.time.sleep(30)

Is posix just implementing syscalls and would writing an os in Rust actually make it more secure? My goal is to make an os that can run a graphical web browser before I die.

pick a better goal, that one is stupid

hierarchical labels subsume taxonomies

how bad of an idea is it to use setjmp/longjmp for error handling?

eh it's fine just shittier exceptions

I can't see the programming language 'Haskell' being useful for anything serious.

just why

If you want a gentler introduction than jumping straight into the deep end then the Redox team is always looking for contributions.
redox-os.org/
>would writing an os in Rust actually make it more secure?
That depends on whether you see security as a sliding scale or a binary property. After all, if you have at least one vulnerability then isn't your system insecure and it's irrelevant if there are also more bugs?
But I know what you're getting at when you say "more secure" so yeah, in that sense it ought to be.