/dpt/ - Daily Programming Thread

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

Attached: 1558318472609.png (1500x1500, 829K)

Other urls found in this thread:

amazon.com/Language-Implementation-Patterns-Domain-Specific-Programming/dp/193435645X/?pldnSite=1
amazon.com/Compilers-Principles-Techniques-Tools-2nd/dp/0321486811?pldnSite=1
twitter.com/NSFWRedditImage

Should I learn Go before javascript? I've literally never programmed before

I would use C# if I were in your position.

Start with C#. It's the easiest C-like language, but it's close enough to C, C++ and Java (and other C-derived languages) that switching between them isn't going to be a massive pain in the ass.

i want to nakadashi chino

Risc-v enthusiasts here? Can you name me any advantages over x86? Thank you in advance.

Dude! Yuck! Those are just children! Seek help immediately.

i want to nakadashi chino and kill that dyke trying to take her from me

I'm the best programmer here, look what I just made.
;)

Attached: anonmatch3.webm (640x360, 1.01M)

How do I fix this problem?

For the past year or so, every time I try to program anything, I constantly feel like any implementation I throw at it is too bloated. I can't help but prematurely optimize everything to death until I just give up because nothing's optimized enough, and anything optimized enough is too hideous and unwieldy. Nothing I do satisfies me, and as a result, I can't get anything done. I've tried just not prematurely optimizing at all, but I can't help myself, I can't restrain myself, I just type out something, look at it, and immediately wince in disgust and can't allow it to stand as-is.

My mom died 15 and a half months ago, this started at around the same time, could it be related? What can I do to fix it?

Attached: ueEUNte.gif (240x134, 1.02M)

Anyone want to trade bosses?

Is it true?

Attached: 1538141564256.png (1702x2471, 1.01M)

based anons in /c/ute thread
more modular design and better instruction set. x86 security is almost non existent though risc-v is not that much better.

Attached: 1557787177846.jpg (960x1440, 723K)

based and cawfeepilled

What's a nice compiled language with a robust ecosystem around it?

Attached: output_0002.jpg (768x768, 168K)

From a Computer Science perspective, are compilers like those found in Typescript (which translate one lang to another) fundamentally the same in operation as those that compile languages to machine code (e.g. C/C++)? And what about run time languages like Python? What does one miss that the other has?

I'm just curious. I'm thinking about self teaching myself languages and compilers with the dragon book and I wanted to see if translating some weird JSON abomination syntax into HTML would be an appropriate self project for myself.

Attached: rubyonrails.jpg (600x676, 124K)

c

C

I know this has asked before, but I'm going to ask again.

Is there seriously *no* comfy programming channel on youtube? I just want something to watch while I eat or when I'm too tired to code.

Attached: space.gif (768x432, 2.22M)

which one?

C++ is all of that except nice

ecosystems go against the unix philosophy, which most C programmers subscribe to
so no

neither

translating from one language to another is easier and involves less steps

Could you just spurt out the differing keywords that I could google (just as a precursor before I jump in)?

Like, "compiling to one language in another requires W and X" and "compiling to machine code requires "W, X, Y, and Z"

I implemented quicksort in my toy lang Jazzy. What other challenges can I do in low level langs?

transpiled language goes from text to tokens to AST back to text again (converting from AST to text is trival)
compiled languages go from text to tokens to AST to assembly/machine code but the process of covnerting an AST to assembly is by far the most involved part of compilation and is where all the optimization takes place
AST is abstract syntax tree

Implement an Array Deque. Create a standard library.

intel swiss cheese game

try the "see how long I can go without posting on /dpt/" challenge

rude

This might be a better plan. Plus a department at my company that I've wanted to get into uses C# extensively. C++ is more general purpose though (as far as I understand), and might be more useful long-term if I have to pick a new language to get into.

Not necessarily the windows API (unless that's the only way to use those Windows bits). I want to use Windows forms to submit and pull from a third party, with part of that communication using an API. If I come across anything good I will report back to /dpt/.

Learn something typed like C, C++, or Java, Its way easier to switch from a typed language to a non typed language than vice versa

neat!

the icons are adorable

That's exactly what I wanted. Do you have a book suggestion? I'm choosing between this:
amazon.com/Language-Implementation-Patterns-Domain-Specific-Programming/dp/193435645X/?pldnSite=1

and this:
amazon.com/Compilers-Principles-Techniques-Tools-2nd/dp/0321486811?pldnSite=1

I hear the latter is a dense as book written for professors to pick and choose chapters/content to spread across 2 semesters. The first one is more oriented towards practical engineers but it skips over some key concepts (not sure which ones).

Help a zoomer out,should l study software engineering? or is it a meme

i havent read any books on the topic i just figured it out myself

No, JS/Python is 'interpreted' (compiled as theyre ran)and languages like Java/C are compiled then ran

Rewrite an old pixel sorter or work on my generative art?

Attached: 1508962489629.jpg (1561x2048, 319K)

>Implement an Array Deque.
Will do.
>Create a standard library.
I probably should really. After months I still haven't stopped using it so might as well pack it with useful features.

No dont do it user I want all the demand for myself

Yeah just start creating all the basic data structures with all their neat methods. Then start extending to some applicable applications (e.g. async, http requests, file reader, et cetera).

Oh okay. I'm pretty brainlet but I think I can figure out the same.

I wish Cocoa was my overbearing onee-chan

>i figured it out myself
are you sure about those though? i'm not the person you replied to but would like to know how reliable those info are, since i'm not sure if every function from lang A is translatable into lang B without breaking it into smaller parts like assembly/machine code (i actually don't know though, but i'm curious to learn about it)

an abstract sytnax tree can respresent anything, because it's abstract. It's whatever you want it to be. The main difference is the AST is hierarchial, it's represented as a tree because it's much easier to deal with than machine instructions which are a flat series of statements. If there's a particular piece of code that also needs to be flat well there's nothing stopping you from having an AST node that has a flat section of code either. It's just a representation

Writing C++ code on Windows 10 with gcc compiler. How do I get SFML to work with this setup?

both C# and C++ are general purpose but C# is objectively better for webshitting and dealing with windows apis

Quit your job
Make video games

Attached: meter_polyneux.jpg (372x372, 57K)

if /agdg/ is anything to go by, writing video games is for mentally retarded small minded goal oriented children

>goal oriented
how is that an insult

Graduating with a stats degree next year and I’m loaded with debt and worried I won’t get a job bc of my poor gpa. Is learning html/css/JS a viable backup plan?

Sepplers are brainlets

If you can't understand why the ends don't justify the means, I can't help you

>C++ is complicated, bloated, and unlearnable
>sepples is for retards
pick an insult

So you're seriously putting someone else down for actually trying to achieve something instead putting the process over the result
fucking hobbyists

you can make high IQ videogames.

not real reason why games can't be anything you want.

you mean fucking academics
self improvement and learning is more important than making an irrelevant video game

$ cat .gitignore
.gitignore


Anyone else do this?

You don't self-improve or learn without a goal, you just mentally masturbate yourself over what you already think you know

Does creating an os cause mental illness or does it require mental illness to to take on such a massive challenge that is creating a large os?

Attached: E334CE82-B249-46D0-9772-1A6E56E37EF9.jpg (220x202, 16K)

yes, but the goals themselves are not important, merely stepping stones to the betterment of the self

People will be willing to make shitty solutions to some problem because >muh shipped product

In theory that is true, but certainly not in the way someone who puts down others for programming with a goal in mind thinks it is
Anyone who thinks programming with a goal is bad has done very little self-improvement in the field

Attached: .jpg (540x141, 14K)

Retro programming stuff.

Attached: halpanc.webm (320x240, 2.01M)

Learn C first to get the basics. When you do, it'll be easier to learn Go. Avoid JavaScript.

I told you you wouldn't understand, and I couldn't help you
said, they're singularly focused on the goal, taking the easiest route possible to get to it, instead of the route that would teach them the most
babbies first turd in unity teaches you basically nothing and is nothing to be proud of

What feature or change would you add to your favourite language?

I wish I knew. Guess we'll find out.
t. user creating a large OS

Attached: 1507152851459.png (396x395, 279K)

Whoever advised me to just pull my program into nohup, thanks user!

Attached: comment_rqgnoaYduZwJMbYKs6EPFvfhGkT0ShTB.jpg (2000x3001, 2.34M)

Self-improvement is putting yourself against reality and having to overcome your own delusions to become a better person. With no goal this is impossible, seeing your delusions will never be challenged. I understand perfectly how intellectuals and programmers do this, retreat inside their minds and jerk themselves off of what they already know and understand without pushing themselves any further because they're cowards. They may be smart, but they aren't improving. Improvement only comes from coming face to face with harsh objective reality. If you think goals are too easy, all you need to do is pick a harder goal. People who use Unity may not be good at programming, but at least they're becoming good at something

I see, might as well give those a recap since they seem to be more complex than I first thought. thanks user!

ASTs aren't complex. I already told you, they're whatever you want them to be. It's just a tree representing your program syntax

shellcode on x86 wangblows

Attached: D6oySk-UYAAvzaO.png (1448x460, 161K)

>time_t now = time(NULL);
>Segmentation fault

Attached: sad.jpg (370x699, 34K)

I highly doubt that is where your issue is happening, unless your libc is broken.

I guess Dennis Ritchie said fuck you.

>good at something
oh wow becoming good at unity
so wonderful
I was wrong, guess I should start sucking them off, like /agdg/ then, instead of pushing them to be better.
what you define as "harsh objertive reality" is about as harsh as a pillow

you want actual goals?
>embedding a scripting language
>creating and deploying a multi-platform application
>getting to the point you can understand most code written in a language without looking shit up
>understanding a basic memory model
>understanding a transactional memory model and lockfree programming
>understanding the principles and theory behind physically based rendering
>understanding category theory and lamda calculus
>writing a compiler
these are goals
but more than that, they have more advanced goals that follow them as well
they also enable you to do things beyond what you have learned
learning how to use unity prefabs on the other hand is completely worthless

like i said
so focused on the little picture they can't see the big

That's where gdb says the error's at.
Evidently it happens when I allocate too large of an array beforehand.

good at game development assumedly, which would be better than you bragging about your junior programming knowledge

static types for R
CRAN for haskell

I mean the whole compilers thing, we've only learned about it to a superficial level at school because I started it recently, but I want to learn more about it on my own before we dive in deeper into the subject later on the course

Speaking of ASTs any good graph visualization software? I figured it would be nice to have a way to spit out an SVG for my AST.

>Python
Optional static typing
>Java
Concise syntax
>C
A complete overhaul with modern good macros, exception handling, strings, and no headers while still maintaining simplicity.
>sepples
Better compiler errors, not a wall of text for forgetting a semicolon.

Maybe it's stack overflow or corruption then.

talking about by webserver library the other night made be realize I hadn't worked on it in 8 months, so I've been making progress towards v1.0
refactoring my socket class has made me realize adding in web client functionality may be simpler than I thought, and end up a cleaner design too

>having your hand held at every moment means you're good at something
i guess that means iToddlers are actually smart

didn't attach the screenshot like a retard

Attached: Screen Shot 2019-05-20 at 9.46.02 PM.png (2878x1712, 1.18M)

you can have you hand held with the programming but that isnt making a game, like you said, look at the big picture

Welp, rewrote my code to malloc the array instead of statically allocating it, and it ran.
I feel like such a fucking retard.

If you need a big fixed size array then allocate it globally. You won’t need to worry about overflowing the stack or allocating it. You can even write your own allocator to manage it and control your memory usage.

I am an allocator

Is there a set of problems out there that are listed such that you can go from a beginner to an expert in a language by working each problem in the sequence?

you cant become an expert by following other peoples instructions

This is the stated purpose of Project Euler. But realistically you just learn about prime numbers and end up making loads of kluge code if you're a beginner. I like Code Wars for programming challenges. User-made puzzles that are community-rated from easy to hard.

You’re not skilled in a language until you can use it to run doom on a toaster.

>Static types for R
but why? Half the fun of R is finding out which one of a billion types your function puts out, so that you can can choose the appropriate function to randomly change it again. It's a thrill like going to Vegas, but the chips are hours of your life!

But yes CRAN for everything, RStudio for everything while we're at it.

If people want generics so fucking bad in Go why don't they just shut the fuck up and use Python?

Attached: 1520465894208.jpg (800x600, 72K)

>Use the general number field sieve to factor huge numbers on Project Euler
>Declare self expert in [insert language]
>Get job in [insert language]
>"Hey user, we need you to make a program that turns a string is a palandrome haha don't worry it will be easy!"
>Suddenly discover all you learned was computational number theory
help plz

i want to fug vulkan
so logical
so explicit