/dpt/ - Daily Programming Thread

What are you working on, Jow Forums?

Last thread:

Attached: yamashita.jpg (686x720, 312K)

Other urls found in this thread:

en.cppreference.com/w/cpp/keyword
g.sicp.me/books/
ia800205.us.archive.org/27/items/2013TheCPro
twitter.com/NSFWRedditImage

First for writing your own Lisp

An AI that writes it's own OS.

just use common lisp and stop polluting the world with scheme #823719231

Does metacircular evaluator count?

Just found out today C++ has a "final" keyword. Someone should make a site with obscure C++ bullshit like "did you know...?"

You're a beginner, then.

Enlighten me user.

>getStdRandom (randomR (0, i))
randomRIO (0, i)

>takeGroup
takeGroup n = ana (\case [] -> Nil; (Cons . take n drop n -> x) -> x )

>shuffle
shuffle = zipWith (!!) . (flip replicate length) \(length -> le) -> unsafePerformIO $ fmap (take le . nub) (let i = do { r

Attached: kagu.png (134x117, 17K)

Wtf no! I have talent and my mom says I am really clever!!

It's not a keyword, it's contextual specifier.

Also it's well known and you should use it often, along with the override specifier.

Okay, this might be the most esoteric question I have ever asked here, but in the easyUML plugin of NetBeans how the hell do I draw split inheritence arrows?
I know the chance that anyone else used it besides me is less than 1%, but still

if my objective is to have sex with as much women as possible, which programming language should I learn?

C

probably js
Women would rather onion boys than neckbeards

COBOL

takeGroup = (takeWhile (not . null) .) . (Data.List.unfoldr . (Just .)) . splitAt

Attached: 1548277643973.jpg (500x700, 133K)

S-so big... *huff-huff*

Attached: 51KEqIsBa4L._SX370_BO1,204,203,200_[1].jpg (372x499, 44K)

COBOL = loadsa money = gold diggers

JavaScript = pink haired girls with dicks and the occasional fujo

Anything else is a non-starter.

is this the fizzbuzz of gamedev?

Attached: bullet.png (1019x597, 61K)

Is there any recommended source for general programming project handling?
To be more specific I'm looking for guidelines how to design the project directory structure. How to properly include ability to process configuration files by the application, how to then refer to the directory structure from within the application.

stfu fagerooni

Keep everything neatly organized in one big file.

That's an oxymoron.

>What are you working on, Jow Forums?
Building up my robot kode with ros2.
It's unbelievable how much work this is if you want to do it right and not just a quick hack solution. But now my pwm controller works and I can move the legs with the power of ros2.
This looks really fucking boring, but god damn, I am happy rn.

Attached: powerofros2.webm (1280x720, 695K)

worse!

that might be a bit too much autism for my taste (except the randomRIO, that's useful)

Is this COBOL == money thing a meme, or can I actually make money by learning COBOL

>no pattern matching
>totally point free
>doesn't use things not in base (only uses Prelude and Data.List)
""""""""""worse""""""""""

Attached: 1548020984592.jpg (401x500, 32K)

...

also
>splitAt rather than take n and drop n

Speaking of gamedev, is there any reason to make your game in strictly code instead of a game maker program?

Every project I know that started as code died, meanwhile Unity and Game Maker games became huge hits (Cuphead, Undertale etc)
Only exception I know is Minecraft and Dwarf Fortress
Every friend I know that started their game in pure code (or even massive autists like Ulilllillia) gave it up

excellent post

PS: I need a name for this qt. Please help
PPS: I'd love to have a recursive acronym, but i am to dumb for that. Possible keywords would be: robot, ros2, robot operating system, quadruped, spider, white male, epic

Pls respond with good names. :-)

Attached: qt314.jpg (3000x2000, 452K)

it doesn't use the superior lens brackets

>What are you working on, Jow Forums?
Clone of Snake 2 on Nokia

Attached: 1548845192985.75.png (1278x720, 613K)

Have you tried putting an onahole on it?

hello, I've never done ruby before and I'm trying to get this to work. I can't seem to figure out how to write back to the file after I've read from it and modified the data.
f = File.open("file.txt") do |f|
f.each_line do |line|
f.write(" 1.times.inject(line) { |str, _| str.sub!('h','o') } ")
end
end

>Pls respond with good names. :-)
Bill Gates is a pretty good name.

engine or framework
FTL, Celeste, Towerfall, Dead cells, bastion, Axiom verge, Stardew Valley and many others were made in framework (monogame for all except FTL and Dead Cells)

en.cppreference.com/w/cpp/keyword
Final isn't a keyword

read your data first and re-open the file for writing

This book has no competition, though. I read it cover-to-cover and I know way more C++ than my coworkers. Sometimes I think they just learned by doing projects and googling when they got stuck. That's how terrible they are.

I don't know ruby but you probably want to open the file in read-write mode. also I'm not sure how iterating over the file while simultaneously writing new line to it is going to work out

A Quadrupedal Tarantula, or QT for short.

>Sometimes I think they just learned by doing projects and googling when they got stuck. That's how terrible they are.
Too many programmers believe that experience is all you need.

cuckider
as in cuck+spider

I found a bug in the chicken scheme garbage collector. I have no idea how to produce an isolated test case to trigger the bug. The only workaround is to trigger a minor GC every frame.

Attached: rocky.jpg (640x480, 38K)

I learned C# through Wrox's Professional C# and .NET book, which I thought was neat (bar all of the spelling mistakes).
I do wonder how their C++ book is, though.

my uni wants me to write a program in QT creator on windows so it is displayed in GUI mode
how do i do this without using QT and best without IDE at all, on RMS/Linux in cpp
t. barely know c++

Install pirated windows as dualboot/in a VM.
QT is a language in and of itself with its own preprocessor and shit, so you kinda have to use QT creator.

Anyone got the link to Jow Forums's programming book collection? My ssd died :(

It's in line with any other advanced programming job. Online salaries seem to be quoted at 60k to 100k a year. For whatever reason a lot of businesses continue to use outdated hardware and software which runs using outdated languages and tools. COBOL is one of those languages but you'd need to learn a lot more about these out of date systems before getting hired to work on them.

Time to TRY AGAIN
I want to mirror the entire Wii U USA-region CDN on my local drive (well, just the most recent updates, all the games, and all the DLC).
I have a ticket database (and a titlekey database), and I know that FunkiiU works to do what I want, but it's slow as fuck.

Would it be better to rip out the download functionality from the python script and just dispatch the downloads with subprocess commands to something like aria2 or axel, or should I try to figure out how to integrate something like pySmartDL into it?
Either way, I'm completely unsure how I'm supposed to approach refactoring this code to make it work well with the dumb method he's using. I'm tempted to just write the functionality that I want in Rust instead, and I don't even know rust that well.

g.sicp.me/books/
This?

$ sudo apt-get install qtcreator
?

I still try to always think about optimization. I guess that's the difference between a programmer like you and an engineer like me.

It's also about practice and learning. When you never try to optimize and suddenly have to, you are fucked. And no shit do programmers never optimize. That's why everything is so bloated and runs like shit while our simulation tools are marvels of optimization.

Damn, I never knew about this.
How up to date is it?

Thats it thank you!!

Some people just don't like working in a constrained environment, especially if they are already experienced programmers.

>A Quadrupedal Tarantula, or QT for short.
That's actually a pretty fucking good name. I'll make a note for it and possibly use it if i can't find one that is more awesome. Will probably QT-Robot then.
Those days where you actually get good answers on Jow Forums are the reason why i come here. Thank you fren.
I chuckled but it is kind of a rude name. See above

Not that guy but can I also be your friend?

Is this version good? Was the first google result.
ia800205.us.archive.org/27/items/2013TheCPro
grammingLanguageBjarneStroustrup/2013%20-%20The%20C%2B%2B%20Programming%20Language%20%28Bjarne%20Stroustrup%29.pdf

What programming languages would you say are the most useful to know?

I'm just starting out learning programming from the book C Primer Plus, but I'm wondering what other languages will be worth looking into in the future after I've learned C. Looking through all the software I use regularly, it seems most things I use are written in either C, Python or Javascript.

Attached: 1529305526561.jpg (640x622, 105K)

I swiped you to the right, fren ;-)

Attached: nice.png (1000x800, 260K)

i mean we are supposed to do this in c++, i reckon that IDE doesnt matter when it comes to making such simple projects
how does windowing programs actually work for windows/linux
are there some universal functions/calls that are understood and processed by window servers of both operating systems on their own so same code can work on both OSes?

A friend who works at google said C++>Java>Python>rest. I guess it depends on the requirements of the company you want to work at or projects you want to pursue.

I can sympathize, I also felt that no matter what I want to set up, it just wouldn't look the way I wanted it in Unity, and I knew I could just code it in C++ in seconds
But it took me days just to get an untextured box spin in a void, so I gave up on not using some framework

nice

Attached: moving forward.jpg (537x716, 41K)

C++ is the most powerful programming language

>I guess that's the difference between a programmer like you and an engineer like me.
Big words from an user on Jow Forums.
>I still try to always think about optimization.
There are two complementary notions at play. Premature optimization and premature pessimization. The latter is what meant with not being "a complete retard regarding data structures and loopy loops".
Nobody tells you not to think about optimization. You have to leave room for it, but not act on it. Optimized code requires time and utmost care, and before actually writing it you have to understand the problem, profile the it. Simple, but correct, implementation allows you to do exactly that.
As an example, about a year ago on my job a team I was in was writing an application (it dealt with realtime, video and audio). At the heart of it was a playback graph (somewhat reminiscent of DirectShow filter graph if you used it) through which the data flowed. It was a somewhat complex, but we realized it in the most simple way possible: as a C++ class with virtual functions OnStartup, OnData, OnStreamChange, loads of them. An optimizer inside can be heard screaming: "But virtual functions! You'll have many nodes, shitloads of data passing through the graph, it'll kill performance! Use a more efficient approach!". But guess what - the operations on the data itself dominated the runtime so much these virtual functions barely showed up on the bottom list of the profiler. That's where we optimized. Had we done that with the graph - it would be a literal waste of time.

brainlet here, i'm working on understanding how to add the results of a calculation performed by a tail optimised recursive function to a list which i can print at the end - in elixir, my first language.

i know it must be done via [head|tail] but i'm too stupid to understand how, for now.

i know how to do it when you feed a enumerable to the function, but not when a single item is generated after each iteration.

boomers at work make schedules in excel and then copy them manually into google calendar
how do I automate that? never really touched excel macros but I'm looking into it

>never really touched excel macros but I'm looking into it
Keep sharp objects far from yourself and make sure the windows are closed

True. You have to be smart about optimization. Especially when you have to be time efficient.

No shit did I write a snarky and over the top reply to someone who makes a blacked meme.

Safety is the greatest pitfall of modern programming languages

You really like DOS, don't you?

OOP is the greatest pitfall of modern programming languages.

Making your own language is fun

>a programmer like you and an engineer like me.
replace 'engineer' with 'CS student', you reek of it

SIPS - Sips Is (a) Programmable Spider

You really like Prolog, don't you?

t. Memory leaking pajeet

Haskell*

>computer """science"""
>engineer
lmao

Attached: 1529767606739.png (330x316, 213K)

You can't leak memory if you let programs access whatever memory they want

Typeclasses smell of OOP, Prolog is purer.

Attached: 1384025307544.png (256x274, 121K)

you have more control and more potential efficency

I like systems that aren't restricted by an OS

People who write the programs I use should have the freedom to damage or interfere with my system and leak my private data to malicious actors.

Based prolog poster
Literally the most fun language ever concieved

Ironic, because you can do logic programming with type classes.

Why would you need an OS at all then? Write your own loader, then page mapper and thread scheduler (which, unless you're uber-optimizing, aren't really hard if you know what you're doing) - and voila, the system is all yours to play with.

while(1) { new int; }

>he uses software written by other people
>he doesn't even audit it

That's what I'm currently working on
I haven't finished bug testing my assembler yet though

So you want to go the way of C++? The more features the better?

Attached: graphics.jpg (998x989, 228K)

Formal verification and proof carrying code (or compiling from source) mean audits don't have to be manual.

>>he uses software written by other people
Next you'll tell me you buy parts to fix your car instead of designing and molding them yourself