/dpt/ - Daily Programming Thread

Lisp is the most powerful programming language.
What are you working on, Jow Forums?

Old thread:

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

Other urls found in this thread:

seek.com.au/job/39636228?type=standard&searchrequesttoken=17e61733-1527-42b0-9534-7bad75f25c74
warosu.org/g/?task=search2&search_text=sepples&search_ord=old
github.com/rootcoma/visualizer
hornet.org/code/
twitter.com/NSFWRedditGif

Playing with Rust atm.

Attached: Screenshot from 2019-08-31 07-36-14.png (1654x1502, 276K)

C++ is the most powerful programming language. Having the weight of the world on your shoulders, it is hard... but someone has to do it.

>common lisp
Laughts in scheme. you you even call/cc?

Isn't using IEEE floats in money calculations a Bad Idea?

yes. I didn't want to use a high precision lib just for this.

call/cc is fucking gay, shift/reset is better

are you having a stroke?
do you even unwind-protect?

>not respecting money
Are you some kind of commie?

and autism is the most powerful mental disability too

I like C!

The fact that I use Rust should tell you otherwise. Rust encourages PRIVATE OWNERSHIP by disallowing shared ownership of resources.

Anone... ! We would like to learn JavaScript from you... would that be OK?

Attached: 1d4ae7b54749e57a11690492ca3d7683.jpg (801x1199, 97K)

We'll start with Python

We'll start with Lisp

We'll start with Prolog.

Retarded capitalist. Only commie languages are based.

You are a mentally ill tranny and this is equivalent to avatarfagging at this point and it's erpfaggotry anyways. Try not wearing your programming socks for a day.

I will allow it.

*florida man arrested for beating two transexuals to death with a baseball bat*

So if programming is mostly remembering data structures and algorithms exist to just copy... where can one find a really long list of them?

You are also a tranny anime brain rot consumer. Anime trannies are all mentally ill and deserved to be eradicated. Watching that much fan service everyday isn't healthy and destroys the brain, making animetards into useless cumbrains who shit up Jow Forums constantly.

just grab a copy of CLRS

Can you remove the Ok from line 4 and the ? from line 9?
Can you inline the two funcalls on line 34 into the match clause on line 35?
parse_annual_income ought to be called from main (since it deals with the program environment) and the result passed into your other functions which are otherwise pure and total, then you won't have to faff about with Result.

>Can you remove the Ok from line 4 and the ? from line 9?
I can't, there's a chance of parseError happening, especially when parsing user inputs are involved.

>parse_annual_income ought to be called from main
That would indeed be a better approach

>there's a chance of parseError happening
Then why are you asserting that there isn't (?)? I don't know Rust, just Haskell, and Ok(expr?) looks like it's doing exactly the same thing as just expr.

I forgot I pirated this book, thanks

It's not an assertion, it's a short-hand of try block. Should an error is raised the function is stopped immediately and it returns an error type, hence the error is propagated through the whole program and finally back to the print function in main where the error is printed.

I already know Python, sepples, and C pretty well so give me some project ideas to do in Rust and/or Haskell.

are there any rust jobs in australia or are you still stuck with C++ and Java for work and nim/D/Rust as a hobby?

lisp interpreter

seek.com.au/job/39636228?type=standard&searchrequesttoken=17e61733-1527-42b0-9534-7bad75f25c74

Since parse returns a Result type, can't you just return that instead of unwrapping and rewrapping it?

>should an error is raised
returned*
>the function is stopped immediately
But it's already the end of the function, .parse() already returns the Result you want.

I wanted to throw a generic error
1. When the argument is absent
2. When the argument could not be parsed
The Box allows me to do that. parse() only can return a parseError.

Why are people calling it sepples all of a sudden? Or is it once mentally ill shitposter?

it wasn't all of a sudden newfriend

Newfag detected.

Hasklel niggers get out.
You are nothing compared to CPLUSPLUS chads

DO NOT

>all of a sudden

Attached: 1566030236597.jpg (900x1145, 472K)

>Hasklel niggers get out.
Nigger, do you even know who Lain is?

A very cute Lisp programmer, also my gf

Hasn't sepples been a thing since fucking /prog/?

Don't attribute your ignorance to Haskell, dumbass.

3D engine in Rust

>Hasn't sepples been a thing since fucking /prog/?
Yes. Newfags are embarrassing.

What you mean by powerfull? Calc oriented and fast, APL. Universal, C. General, python.

Hi user, I've been meaning to start a small gtk-rust project. Do you have experience with DBus and POSIX?

>DBus
Yes I take this to work every day
>POSIX
I use POSIX every day

Cool, I might ask for help ITT. I have no experience in using DBus message passing.

My suggestion is to not pass any messages on d bus. There are a lot of hostile people that ride it, especially the feral niggers and spics.

>Being so uncreative you need people to give you programming ideas

You ever met a creative programmer?

You are literally a low T beta male. Instead of screaming nigger in an user forum in your basement do it in public if you have balls, DYEL.

Myself.

yes him

No, wanting to be a made up non binary gender is not creative these days

warosu.org/g/?task=search2&search_text=sepples&search_ord=old

Next time we'll be sure to send you a fax before using >9-year-old memes, user. Wouldn't want you to feel left out.

>2010
was your life better then?

Nah, there are cell phones are retarded laws about double not good talk. If a nigger tries to check me I will not stand down. I am not starting shit, but I am not letting them treat me like shit because they feel entitled to. I let every nigger who starts shit know exactly what the fuck time it is and that I do not give a fuck.

Attached: 1564895780891.png (768x480, 265K)

I've recently been interested in making some sort of music visualizer. Where would I even start with this? I'm familiar with general programming things, but I've never done anything involving making animations (or audio, for that matter).

ok Jow Forumsuys i need a language that is powerful but also one that isn't anything other than C.

give me recommendations

C++

Fast Fourier Transforms. There is fftw that has C library and probably others. That will give you the magnitude of each frequency. Otherwise audio just looks like a squiggly line.

github.com/rootcoma/visualizer

Attached: image.webm (1152x648, 2.29M)

Reading through chapter 2 of K&R C (types and stuff). I'm also trying to refactor this tiny program to work in a pipe-like manner where I can run input from a file as a character string through the program to receive the "detabbed" output.

#include

int main()
{
int c, j, k;
int i = j = k = 0;
char s[1000];
while((c = getchar()) != EOF) {
s[i] = c;
if (c == '\t') {
for(j = s[i]; j

HolyC

thoughts on julia? my professor said it's fast like c and easy to grasp like python

It's dynamically typed, so it's good.

@72539059
cringe

Its dynamically typed so automatically your professor is wrong and C is faster

i need a "personal story" of how merge-conflicts have fucked my work up, only issue is i haven't experienced anything of the sort ...
Do you guys have any stories related to merge conflicts in git ?

Attached: 1565578835835.png (536x505, 741K)

A computer should decide the types, not some fallible human.

Its dynamically typed so automatically your professor is right and C is slower

I love generators.
def fib():
a = 1
b = 1
while True:
yield b
a, b = a + b, a

for i in fib():
print(i)

Funny because the oldest post on warosu (and also rbt) also dates back to Feb 8 2010.
I doubt anyone was retarded enough to scrape a shitty worksafe board like Jow Forums back in 2005.

from 0 to 1 how often will i use limit, derivatives and integrals on my codes? i know learning them will help me to develop logic thinking, but i'm having lots of trouble with it so far. it doesn't help that our calculus i teacher isn't the best either. i dunno what to do, bros

it approaches zero

Step 1: leave Jow Forums until you are over 18

bump,
this is class work in my uni (im not just being retarded for no reason) ...

nice thanks

Attached: IMG_-b8u2ay.jpg (443x443, 66K)

>Do you guys have any stories related to merge conflicts in git ?

It's not merges, or conflicts, that are the issue. It's working on teams with retards who can't use git that's the problem.

bruh... i was just asking

Attached: dawg.jpg (288x288, 14K)

I love women.
o|8-

I like deep and immersive games with complex AI, and also copy&paste that doesn't include a lot of white space:
|---+---+---|
| X | O | X |
| X | | O |
| | O | |
|---+---+---|

i call it sepples as a term of endearment
c++ is the best programming language
template metaprogramming is elegant as fuck
zero cost abstractions are king

Implying you use call/cc for anything other than non-local exit.

std::thing::classthing::subtype::variant::thing::variantthing();
No thanks

using namespace std;

You're welcome

Anyone got a link for a good explanation of proper memory allocation in C ? I heard a lot of "use this" and "don't use that" so now I want an actual and detailed explanation to understand how each methods works and have their benefits and downside

#include
Bottom text

>I don't like X
>no worries friend, you can use no-X!
>(everyone will be disgusted by you)
>(you'll fail interviews)
>(you'll have various problems that led to people avoiding the thing I suggested)
>(I don't use no-X myself--what are you calling me, some kind of moron?)
>(obviously you should suck it up and just use X)
>(but for the purposes of your complaint let's pretend that no-X is a real option)

or you could just use auto

struct importy : std::thing::classthing::subtype::variant::thing {
using std::thing::classthing::subtype::variant::thing::...;
};
You're welcome

reading a bunch of demoscene code and articles from the 90s because i'm bored
some of these guys could really use a style guide

Attached: 1551047165007.jpg (680x383, 40K)

>a bunch of demoscene code and articles from the 90s because i'm bored
link?

if your types are nested that deep outside of a few complicated TMP sections, you have a design problem

this is what i'm reading right now
hornet.org/code/

def fib():
a = b = 1
while 1:
yield b
a, b = a + b, a

for i in fib():
print(i)

Very neat. Thanks, user!

Attached: rhinopoma_microphyllum.gif (200x200, 13K)

: SEARCH-PLACE

@PA DUP S ! P ! O T !
BEGIN 1 P @ COMP DUP 0=
IF MES1 2DROP 0 0
ELSE 0 >
IF P @ @LL DUP Q I 0=
IF @N DUP Q ! P @ !LL DROP 1 0
THEN
ELSE P @ @RL DUP Q I 0=
IF @N DUP Q ! P @ !RL DROP 1 0
THEN
THEN
THEN
WHILE Q @ @B 0= NOT
IF P @ T ! Q @ S !
THEN Q @ P !
REPEAT
IF !MEM
THEN ;
this is Forth. printed in a book. for sale in 1989. on bookshelves.
can you even imagine looking through technical books, seeing a "FORTH APPLICATIONS" book that promised all kinds of practical examples, and then opening it at random to code like that?