/dpt/ - Daily Programming Thread

old thread: What are you working on, Sup Forums?

Other urls found in this thread:

wikihow.com/Cope-with-Loss-and-Pain
es6-features.org/#ExpressionBodies
es6-features.org/#StringInterpolation
reacttraining.com/react-router/web/guides/quick-start
gen.lib.rus.ec/book/index.php?md5=079C8509473FD1937FCD29889DCD5AF3
cs.cmu.edu/~fp/courses/15816-s98/lolli.html
twitter.com/SFWRedditImages

...

What anime is this trap from and why are you using a image for a /dpt/ thread?

RAII in C

input = input.replace(/\[quote="([^"]+)"\]/g, ($0, $1) => ``);
input = input.replace(/\[\/quote\]/g, "");

(replace with your own markup)

RAII is a crutch that teaches bad habits. You should deallocate manually like a responsible programmer.

RAII is less error-prone than manual deallocation.

Can reverse traps learn to program well?

Can you not use getopts in bash to allow optional option arguments?

javascript engine in haskell

C99 compiler in Haskell.

Stop posting your literal gay shit.

user, that's a girl...

Threadly reminder that dlang-chan is not dead, and she's super duper cute! Say something nice about her, /dpt/!

Why aren't you using smalltalk?

D might have been a good language in the 90s

Sure, they drew a girl, but the creators of that trash are mentally ill, so they called it a boy.

wikihow.com/Cope-with-Loss-and-Pain

What is a recommended x86 assembly book?

Is there a way to lower your IQ? That's the only way I could use that trash.

Why actually does no one use D? It seems like it's literally C++ but better.

Don't be rude, you bullies.

Where can I learn more on how you managed to do that properly?, especially with the

/g, ($0, $1) => `
and
${$1}
parts, I know basically nothing about ES6

If you ever actually look into the design of D, it's actually really fucking stupid.
Also, the garbage collector doomed it from the start.

It uses something called "POO", which would prohibit any sane person from using it.

But they're going to get rid of it. Any day now...

Why aren't you compiling the latest version of gcc to use the newest C++17 features /dpt/?

languages like smalltalk and lisp represent the road not taken in computer language evolution

by learning ancient primordial computer languages, you are actually handicapping yourself because no modern language works like this
smalltalk literally uses "" symbols to denote comments and not string literals, it's garbage

es6-features.org/#ExpressionBodies
es6-features.org/#StringInterpolation

Lisp's influence can clearly be seen in Clojure.

Which is absolute trash.

Yeah, no

>something nice
at least nobody will be crying at D lang's funeral

Clojure is a good language.

D(ead)

Thanks, your solution does make it work kinda, the messages however are missing

example:
[quote="user2"]
[quote="user1]
hello
[/quote]
bye
[/quote]

I tried doing
text = text.replace(/\[quote="([^"]+)"\]([^"]+)/g, ($0, $1, $2) => ` ${$1} ${$2}`);
but it doesn't work, is it doable this way or it's just the same problem as before?

Sure, if it's somehow possible to be both trash and a good language.

Stop trying to using regex to parse a non-regular grammar, idiot.

Accidentally posted to the dead thread. Can any anons help me out?

S T O P

>JS

if you're going to post in a dead thread, at least post about a dead language

like D

I suppose we should, at this point we're flogging a dead horse.

kaguya is literally a girl

>draw a boy
>call it a girl

>draw a boy (girl)
>call it a girl (boy (girl boy))

Reminder that the "D is dead" meme is the only dead thing here

I never knew anyone that programmed smalltalk.

I've never even heard of D outside of this board.
I don't see smalltalk or lisp mentioned either.

Only neets use them.

What is easier to learn, python or lua?

At first I liked to start with microcontrollers. So much simple architecture and easier to learn.

We should bury it

Next to D

When you use static imports in java, such as import static java.time.LocalDate.*;, do you still need to import the class normally too, like import java.time.LocalDate;? When I only had the static import, javac gave me errors like pic related.
Btw I know it's bad practice to import everything, but it's just for the sake of an exercise that specifically requested me to change the code from one of the previous exercises to use static imports.

>What is easier to learn
Why is that relevant?

D and Rust are the same breed of language, they only exist in the realm of pure hype and aren't used for real jobs.

>I've never even heard of D outside of this board.
So? That doesn't mean it isn't actively being worked on
Why, D's not dead

D doesn't even have hype going for it.

Why would I want to use Ada Lite, when I have full Ada already?

I'm curious. Which is the easier language?

Friendly reminder that it's 2017 and javascript is the only valid scripting language, because it's extremely versatile and runs EVERYWHERE.

I'm curious as to why you're curious.

Is it true that D is less popular than Haskell?

lua is easier and you can learn the whole of it faster
python has more tutorials

fuck donald drumpf

In Lisp, this is just
(search x y)

If your condition text[i] === 'E' is met, the inner for loop will run to completion, and then the outer loop will continue.

Basically think about it like this, your outer for-loop is iterating from i=0 to the length of your text, and inspecting text[i] for each i. That means it is checking every character in the text. Once 'E' is found, the inner for-loop will run to completion, and then the outer for-loop will check the next character, and so on..

>x and y are undefined

retard

does anybody know where I could get an electronic copy of Lisp in Small Pieces for free? it's like $80 for the book :( I've heard it's a good book

You haven't learned a useless language, right user?

Did you try libgen?

Found the trumpscript faggot.

doesn't look like it's on there :(

Am I blind or is D not on that list?

no rust either. VERY strange

>Elm
>Idris
>OCaml
>PureScript
Am I a meme, /dpt/?

how did react router website do this?

im trying to get my code in my blog to show like this
what library or how do i do this?

here is there website

reacttraining.com/react-router/web/guides/quick-start

you mean syntax highlighting? you can do that with markdown, look up a markdown parsing

It is.
gen.lib.rus.ec/book/index.php?md5=079C8509473FD1937FCD29889DCD5AF3

cs.cmu.edu/~fp/courses/15816-s98/lolli.html
> there is a loli programming language
the madmen

How do i into Bayer Dithering?

>Lolli
>loli

Why is there a trend to write everything as functions calling other functions?

>>>/sqt/

all data can be encoded as functions

Image unrelated, right? She's too old to be a loli.

compartmentalization is a foundational concept in software architecture

math

A B S T R A C T I O N

is encapsulation abstraction?

If you encapsulate an abstract do you get back to where you started?

I have a fairly large cli program written in c++. I need a gui for it however since it became way larger than I ever intended.
What are my options? Should I look into java wrappers or qt creator. Id like for the program to run on linux/windows/mac still.

It can also not be. Not valid reasoning.
Compartmentalization is given by blocks. Why write any given block as a function if it's only going to be called once?

because most non-trivial functions will be called more than once unless you're writing an abort function

>first week of programming class
>given homework
>"i don't want you using anything we didn't learn in class! that's how i know u cheated"
>we're still on variables and cout/cin
>i'm not allowed to use loops or functions
>can't even skip this class because it's a prereq
AAAAAAAAAAAAAAAAAA

Qt is probably your best bet.

>that's how i know u cheated
I hate when they do that. If your student cheats, then they'll just get fucked later because they don't actually know anything. You can only cheat so much before you reach a level where you'll be fucked.
Good speed, user.

I guess, but you know they have to fail someone.

>What are you working on, Sup Forums?
CLI xdcc downloader, nicks are mapped to servers/channels, so all you have to provide is
$ xdcc get CR-HOLLAND|NEW xdcc send #14153
or
$ xdcc get /msg CR-HOLLAND|NEW xdcc send #14153
and it should connect to the proper server/channel, issue the get command and start the xdcc receive.

failing too many students is also a sign of ineffective teaching