/dpt/ - Daily Programming Thread

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

Attached: lain3.jpg (1508x950, 339K)

Other urls found in this thread:

gcc.godbolt.org/z/hQ5OZk
phauna.org/papers/anime/anime.pdf
mitpress.mit.edu/sites/default/files/sicp/full-text/book/book.html
github.com/sarabander
twitter.com/SFWRedditVideos

First for Cniles being delusional boomers.

Second for Sepples being almost irredeemable garbage.

>almost irredeemable garbage
irredeemable garbage*

JavaScript rocks!

Attached: js-rocks.png (1000x494, 369K)

Lain is shit, mate.

Attached: 1543874106187.jpg (1500x1500, 1.26M)

sixth for exception handling in C is dumb and designing for your programs to fail is bad design. You shouldn't have to care about exceptions, the program should simply terminate itself on errors and the OS should prevent any corruption that you may have caused.

Obj*ctively wrong

delete

That's what happens when you don't catch a C++ exception.

>It's syntactic sugar for calling the iterator under the hood.
Yes absolutely. But there's cases where an indexed loop is just fine but a nice ranged for is 'nicer'. It something the programmer expects to be no cost as well.
I'm saying that it has significant cost in many of those cases. I might be a bit lenient when I say that it doesn't handle anything but the most trivial cases well because:
gcc.godbolt.org/z/hQ5OZk
This might be considered a trivial case.
Consider how this might interact in more complicated situations. You've made the code more impenetrable for the compiler.

It's not really about this specific feature or any specific. It's about how they've framed it. I'm fine with high level features that offer something, even at cost. But it should be honesty presented.
I don't see haskell programmers come and claim their language to be just as fast as C or C++ (or handwritten assembler, which is what I would take the claim to mean naturally) because a theoretical compiler could sort it out and make it so. But that's what's really going on here.

>liking shaft

Lain and NGE faggots are pretentious idiots

anno is trash, yes
but not ABe

>the program should simply terminate itself on errors
If your program is "one-shot", this would be acceptable. I normally write killing wrappers over malloc and the like for these kinds of programs.
But if it's an interactive program, you don't want to crash and lose all of your user's state.
Also, a library shouldn't be killing a program without being asked to.

Hidamari Sketch is great, though. Top-tier CGDCT SOL animu.

Attached: 1543210133459.png (361x697, 371K)

Imagine saying that to your boss at NASA

Idea: a programming language where functions conjugate and variables decline like they do in natural language.

I'm finally gonna teach myself python like I should have years ago.

everything shaft is garbage

See you in a few years for your next attempt.

Thank you for your words of encouragement!

don't do it! learn Haskell or C instead!

Oh, it's not for a first language. Just seems like it could be useful.

Why does animeposters infest this thread so much? Other parts of this Chinese basketweaving site does not exhibit this behavior. Why are they attracted to Jow Forums?

cute drawing of me

Then you're left in the dust
Unless I stuck by ya
You're a sunflower
I think your love would be too much
Or you'll be left in the dust
Unless I stuck by ya
You're the sunflower
You're the sunflower

Attached: 47380661.jpg (943x1348, 92K)

>this thread
I'm sorry?
>Other parts of this Chinese basketweaving site does not exhibit this behavior
How new are you?
Anime website.

Attached: 1543266313139.jpg (1100x777, 256K)

You have no taste.

No, I've been here for many years now. please answer the question, what attracts your kind to Jow Forums. Boards like /ck/ don't have this.

phauna.org/papers/anime/anime.pdf

This board has a large proportion of redditfags and /v/-spillover compared to other boards.
These unwanted demographics don't like anime, so we make sure to post it to make them uncomfortable, and hopefully leave. Every time someone complains about it, I make sure to attach an anime image to my next post.

Attached: 1541483607240.jpg (1000x1100, 114K)

/v/ like anime though.

They only like "manime" and "mature shows for mature people, such as myself".
Hence I post cutesy anime girls.

Attached: 1544528261345.jpg (900x1200, 124K)

Seems like the "pretentious" one here is you.

Attached: lain_032.jpg (1520x1080, 164K)

These posts are off topic which is against the rules. Take this to /trash/ please.

I know this is asking a lot from this younger poster base, but are any of you from /prog/? Any idea what happened to FrozenVoid?

That's exactly what happens, I don't see how him being the "boss at NASA" changes.

Based.

This. Exceptions are an antipattern everywhere, but they're outright unacceptable in many of the realms where C is relevant.

I hope you people never get in charge of building anything "reliable"

Would lose to CoC, because most people can't conjugate or decline in their native tongues anymore, so inaccessible.

My entire job consists of writing indefinite-uptime, fault tolerant real-time systems. Most of the software I write for work uses no dynamic memory, and all of it has formally proven behavior. Every thing that can be statically allocated at compile-time, is statically allocated. Even the stack is scarcely more than a call stack. Our customers expect our devices to run for 5-10 years or more, nonstop, with zero human intervention. I would never, EVER use exceptions.

Name the company and product.

Lisp is the most powerful programming language.

>He's learning to program just so he can make video games.

Attached: 1544709762837.png (944x539, 57K)

Just when you thought it was impossible to get worse syntax than C++, Rust comes along.
Jesus.

If exceptions were good Dennis would have included them in K&R. Errno should be ignored in real time systems. The OS will handle failure better than you.

Lisp is the most powerful programming language.

Better than C's function pointer mess

You need to go back to plebbit.

Attached: unknown.png (496x753, 122K)

Attached: 1545052706894.png (944x539, 64K)

What did you guys do to to practice when you were first learning C? I'm having a great time going through K&R and I'd like to start getting creative with their examples. Wondering if y'all have advice. Python is my first and only language and I feel pretty stupid without my precious modules.

How does gcc inline assembly work for structures that are larger than a single register?

I'm not going to doxx myself outright, but we're a German industrial automation firm. You can think of us like Siemens or Emerson, but smaller (roughly half-billion market cap IIRC). My specific little corner of the company focuses on networked IO blocks. The bigger ones speak Modbus, Ethernet/IP (which is actually an application layer protocol, go figure), and a proprietary protocol that allows customers to daisy-chain them and make them appear as a single device to anything that doesn't speak the protocol (this is a nice feature for our customers because Siemens makes cheap PLCs that have a limit on the number of devices they will communicate with). The smaller class of devices I work with speaks DeviceNet.

Cherrypicking. Most of /ck/ is animefree.

>manime
Worthless buzzword. As worthless as hating cute girl anime for being "moeblob"

No one believes you nazi.

>be me
>get into private IRC
>the group discovers vulnerabilities in software widely used by other people
>they have a list of all the vulnerabilities already discovered
>tfw they'll only be revealed to the public months and months from now
>tfw they'll continue to exploit this vulnerabilities

>hurr durr why do poor quality threads and boards post less anime on average than good quality threads and boards
Go to >>>/wdg/, your frogs and wojaks will be more welcome there.

Attached: 1541073447932.jpg (512x476, 18K)

It's also free of straights

Imagine not exception handling in 2018. #EAFP

That's it, I'm fed up with the useless FP and Rust shitlang shills, I'm going to learn ATS.

Straights are discusting

learn ocaml. it's the perfect language.

fuck off, pythonista

Sorry, I care about optimal code and ATS transpiles straight to efficient C.

where to start with programming ?

mitpress.mit.edu/sites/default/files/sicp/full-text/book/book.html

Attached: sicp-mahoro-alpha.png (796x720, 456K)

You can allocate them onto the stack, ans store the object's starting address in a register. That's what compilers (usually) do when you declare a struct in a block.

I have a lot of down time at work that I've filled with minesweeper (mostly as a fidget) so I got it in my head to work on a minesweeper bot.

It's probably been done a million times before but as I get more familiar with the problem logically I want to explore driving the bot with ML and experimenting with different models. Writing it in C++ with a simple SFML frontend

Attached: 1530825262482.jpg (916x910, 66K)

>That one user who's learning programming just so he can make video games.

It's better than wasting his time playing video games.

idiot frogposter

I love C++!

Attached: Без названия.jpg (491x398, 125K)

Learning programming to make lame video games is a stupid reason to learn how to program.

Don't listen to this loser. Good luck video game user!

Attached: 1544074982024.png (139x129, 23K)

I love you too, user!

Attached: 1520767203757.jpg (1440x810, 155K)

I learnt C, I am getting a book for christmas. What book should I get after having learnt C?

Using templates in C makes my life so much easier. I don't know what I'd do without them.

what if you;re learning how to program so you can make enough money to pay people to make video games for you

Give me 1 (one) reason to use Haskell over F#
>Inb4 using winshit
my clients use it

Attached: meme.png (597x255, 66K)

I made video games to learn how to program

If Dwarf Fortress were written in Haskell, would the performance be significantly worse?

no one could run it without their mobo shutting down. dork fort needs a language like chapel.

Idiot idiotposter

Attached: 1R3zxbdn.jpg (400x400, 12K)

can you believe Jow Forums still hates pepe after Jow Forums desecrated and defamed the meme just so normals wouldn’t use it as much?

i fail to see how frogs are bad

it would be unplayable

because most people just use them as their shitposting avatar. Especially knowing they'll rile up idiots who will screech Jow Forums at them four (you)s. pepe going beyond sadfrog was a mistake.

When did you grow out of using meme terminal editors and started using a proper IDE?

i already use VSC though.

this

Attached: 1518942574376.jpg (930x1516, 256K)

github.com/sarabander
more/better formats

The same thing with anime. All anime posters are retards. Except the jannies are all weeb pedos, so they ban everyone but weebs.

after programming at work I'm too tired to do some projects at home
what are some nice languages that will make programming fun again?

Attached: 1529427036008.jpg (1080x1118, 304K)

give nim a try.

>Except the jannies are all weeb pedos, so they ban everyone but weebs.
False.

Attached: 1528049207478.png (834x536, 129K)

malbolge

10
Y
E
A
R
S