/dpt/ - Daily Programming Thread

What are you working on, Sup Forums?

Old thread:

Other urls found in this thread:

youtube.com/watch?v=xDj0DkFYAEA
youtube.com/user/VEVO
youtube.com/user/PewDiePie
idea.popcount.org/2013-07-24-ir-is-better-than-assembly/
twitter.com/NSFWRedditGif

A few questions.

I have a tiny bit of programming experience, basically just a basic understanding of how it works, which I've been able to apply to C#/C++/Pascal/visual basic.

Anyway, so I kind of want to make the best game ever, probably a phone game (or a computer "phone game").

So the questions
>What language and free engine should I use to make something like pic-related
>How long would it take to make it?
I really would want to make you have a party of up to 5 people, that you control all the character, and they have to be a certain distance away from each other. Then you'd have some spells that your characters can cast.
Then I'd want to apply an "instanced MMO" setting upon it (PvP, and instanced dungeons).

First for perl

Thanks, the linked list approach sounds like a great idea!

>tiny bit of programming experience
>I kind of want to make the best game ever
>MMO

Not going to happen bud.
If you have never made a game before you cannot ever make something you have in mind.
Learn programming first, game development theory and start with much much smaller projects.

Games like you show are made by 10+ people at a time and even they can take years.

...

I'm here to shitpost. when i compare, all the hussles & tweaking in the 90-ties, needed to get some kernel 1.3 / 2.o.35 GNU/Linux up & running, on some Pentium1/24 MB ram or on classicAmiga_12oo 68o40/PowerPC_G2 hybridSymetricMultiprocessing; nowDays allmost every localised desktop distros (Mint, simplyMepis, AntiX, ubuntu,...) which i put in multiBoot, during gnuFeministic & cyberFeministic advocacy & activism, to new folk, who look for help inSide & outSide of a hackLab, i can say: -GNU/Linux is easier & less time consuming to install (halfAnHour per distro, compared to a day to patch, protect (fireWall), driverSolve & userLand (apps) equip any winblou$) -GNU/Linux is easier to use -- all the techical details are hidden from common desktop user, & left to root/admin realm...to the point that some desktop distros have their terminal/shell dissabled.. :) (control panels & centers reigns... :) ) -GNU/Linux saves time in general -- my estimate is 80 % after full switch (support) -you are on the legal side -- no cracking -one can recycle way old hw -- Pent2 / 64-256 MB ram with AntiX (exception to above is maybe hw egsotics like Debian GNU/Linux on new dual or Quad c0re Power6 AmigaOne x1ooo or x5ooo/4o 2.4 GHz :) & other non x86 hw like ARM/rasperyPi or the like. ) ...recently, we had an interesting phenomenon with g33ks in hackLab: experienced Slackware, Debian, Gentoo, arch,... powerUsers figured that, staying on a bleedeng rollingRelease tweakingTheLast edge "as-per-se" has no point any more, & that leaving developers, betaTesters, maintainers & packagers job is better to outSource to the people that do that things the best, so they switching to versionin "newbie" distros... :) ...actualy now than ever, it is more a question of psichologycal, sociologycal...maybe culture acceptance; than technical excelence.

>Tiny amount
>Best game
>Phone game

working on my poker engine. so far only teh flush logic is made but my solutions are far from elegant.

heres how many flushes were dealt to a player in 100 hands

['h', 6, 'h', 6]
['h', 7, 'h', 2, 'd', 5, 'h', 6, 's', 9]
flush
['h', 7, 'h', 6]
['h', 8, 'd', 8, 'h', 'J', 'h', 7, 'c', 'Q']
flush
['s', 7, 'h', 5]
['s', 6, 'c', 'Q', 's', 9, 's', 'K', 's', 4]
flush
['d', 2, 'd', 'A']
['c', 10, 'h', 'J', 'd', 4, 'd', 'A', 'd', 'A']
flush
['s', 'K', 's', 8]
['d', 'J', 's', 3, 's', 'J', 'c', 3, 's', 5]
flush

I hate the phone game era so much.

CLRS worth reading from cover to cover?(At least most of it, I guess it's hard to finish all the chapters)
I wanna gitgud @ algos

its mostly a reference
study mathematics rather

if you are good, you can make a game that's interesting

You can't make the kind that a non programmer would think up (with a story and art and half a gigabyte of shit) but you can make an interesting game

Minecraft when it was released was an achievable game for one person to make, for example

what mathematics?

Anons say that it's a kinda heavy on theory book, I prefer a practical path. Just grab an algos book (preferably C).

Because noth just used the infiniminer code and tweaked it until it was a game.

set theory, logic

What book do you guys recommend to learn about algorithms? Also, a book that helps me "think" like a programmer(problem solving, preferably in C) would be greatly appreciated.

Cracking the coding interview has some interesting problems to solve, but if you want real-world experience there's no substitute for starting a challenging personal project and optimizing the shit out of it.

>C
shit language
try Java

>calls C shit
>recommends Java

Update on the icosahedral grid project from the previous thread.

I'm partway to being able to generate an adjacency matrix for the nodes in the mesh. The idea is to generate the grid in 10 'diamond' segments and then 'stitch' these together. Here's 3 diamond segments drawn with their own 'internal' adjacency graphs.

alright fixed it so it doesn't deal out multiples of same card. i was forgetting ot remove the cards from the global dictionary.

['h', 5, 'h', 'K']
['h', 2, 's', 9, 'd', 'Q', 'h', 'Q', 'h', 'J']
flush
['c', 7, 'c', 10]
['h', 9, 'c', 8, 'h', 'J', 'c', 4, 'c', 2]
flush
['d', 8, 'd', 4]
['d', 'A', 'd', 5, 'c', 2, 'd', 2, 'c', 10]
flush
['h', 'Q', 'h', 3]
['h', 9, 'd', 5, 's', 'J', 'h', 5, 'h', 'K']
flush

Cool, gonna order that book(I am aware that I can get the pdf, but I prefer to have the physical copy).
Yes, I need to start creating my own apps, and as I get better at programming, I start optimizing the shit outta them. Thanks user.

off topic but isn't logic a philosophy course?

Which one makes more money, an Android dev, or an iOS dev? I personally prefer Android(I like how much more customizable it is compared to iOS), but I could learn swift if I need to.

Anyone have that script for sorting a thread by reply count?

Whats Sup Forums's opinion on Clojure?

There's lots of kinds of logic. Including mathematical logic.

Why don't you write one

That looks familiar.

Which dere is that?

It's an incredible true meme

Are you trolling?
It's literally a feature of the catalog.

I'm working on Half-Life 3.

My eyes are bleeding.

Sorting posts inside a thread, dingus.

And what sort of logic would you classify as non-mathematical logic?

fuck off

Philosophy

...

take one jar of peanuts

take one peanut out of jar

place peanut on counter at mark a

get drawer pull the handle on drawer marked b toward urself

oh wait

not him, but there's different kind of ways to express logic.
when he's talking about "mathematical" logic, he's presumably talking about a course that teaches logic in terms of mathematical expressions.
essentially, a philosophical logic course and a mathematical logic course teach similar lemmas in different languages (obviously lemmas differ in terms of specialization, e.g. it's benefitial to construct proofs via some very formal calculus, while it doesn't matter as much in a philosophical course).

Was this all some sort of clever shenanigan to say "be yourself"?

Ah, so same concepts, different approach.

Modern games in general are awful.
30 fps console cinematic experiences and bad pc ports.
Esports casualized multiplayer games with the same toon art style.
It's enough to drive one mad.

I'd call it technical as mathematical is. Though I wouldn't put it all on a color just because it's print ready versus web ready. Philosophy is the syntax in words. Philosophy would be the binding between English clarity and concise-ness and any valuable technical nature. If your english isn't very strong, I wouldn't want to be stuck arguing these objective traits because logic is reasoning and separate logic from the reasoning and calling it logic is...

>we will never have tournaments like this
youtube.com/watch?v=xDj0DkFYAEA
good match too

Does /dpt/ use edgy programming screen names?
I'm thinking about becoming "!sherlock".

>when talk to yourself in your code comments and use the royal "we" even though you're the only one that will ever see the comments

Hi guys i've got to do a mini project in java for school, i don't have any idea what to do. do you have any ideas?
I've got networking & security knowledge

This was definitely instilled via public schooling. When you'd be seated around the teacher and had to answer on behalf of the student body. "We learned that...".

I feel like most of my life's knowledge is carried in that form...
"We, humans,..."

>java
I want normies to leave.

>I've got networking & security knowledge
You don't.

Implement Diffie-Hellman key exchange.

If someone is brave enough:
Comment on two youtube videos on two tiny channels, post those channels here.
Want to see if something works.

What are you guys talking about? Where the hell did you go to school?

This is me, all the time. I even started using the royal we with my inner voice when I'm thinking.

Nice try, GCHQ

The smallest I know:

youtube.com/user/VEVO
youtube.com/user/PewDiePie

I'm referring to when we may have been kids. Teacher's ask for discussion on "what we learned" and eventually take to teaching with supplants like "we".

After that I was just commenting, really. It could be meaningful. Any self-respecting programmer can see that.

I'm implementing Shamir's secret sharing

let's say i'm making a program in a certain language then maybe i might want ot extend it into a web application or a cell phone application how hard is it to port that over?

i'm using python so know i could use like django or flask to port it into a web application instead of just on my comp, but don't know about cell phones with python?

is it a lot of work?

It's more work than saying it. And probably more work than the original offline one.

What does the program do?

well it's a poker engine minus computer graphics atm.

>poker engine
Is that a euphemism for your penis?

You're going to have to do a lot of modification to get the IO working over the web

More geodesic stuff. I figured out how to knit together the five 'diamonds' connected to the 'pole' of the icosahedron.

That's vague. What does the program do?
In the simplest situation I can think of and if the original program is well designed, it should not be hard.

If it has a chance of ever getting big django is the best option.

You mean python on mobile? It's not impossible but will not be pleasurable.

I'm working on a technical spec for a feed processing service

Here's the script:

var replies = document.querySelectorAll('.replyContainer');
var replyCount, n = 0;
var chanX = document.querySelector("[title='Sup Forums X Settings']") !== null;

function getReplyLength(node) {
if(chanX) {
return node.querySelectorAll('.desktop .container a').length;
}
return node.querySelectorAll('.desktop .backlink > span').length;
}

for(var i = 0; i < replies.length; i++) {
replyCount = getReplyLength(replies[i]);

if(replyCount > n) {
n = replyCount;
}
}

while(n !== -1) {
for(var i = 0; i < replies.length; i++) {
replyCount = getReplyLength(replies[i]);

if(replyCount === n) {
document.querySelector('.thread').appendChild(replies[i]);
}
}

n--;
}

This place really has gone to shit. Nothing but egotistical fuccbois.

I wrote a botnet for practice. Will Github ban me or remove it if I put it in a public repo?

not if you say it's a botnet

Samefag?

name it something IoT related

why not gitlab?

its better, it's expanding and it has no all that SJW bullshit

disclaimer: im not in gitlab team

+1 for Gitlab

Github itself is not open-source, it's a joke at this point.

I did because I studied theory. Would I recommend engineers/developers to read it cover to cover? No. CLRS covers a vast array of material, a large portion of which is just not useful in the real world. Fibonacci Heaps? They have virtually no application outside of theory. It's not feasible to build one, especially when you have better data structures as alternatives.

Let's be practical for just a second: will you ever develop quicksort on the job? Probably not. That's all been done for you, libraries have that covered. I think understanding fundamentals is important, and many of the things in CLRS like sorting, dynamic programming, hashing, and complexity ARE useful, but reading the book cover to cover is not a smart strategy.

>will you ever develop quicksort on the job? Probably not.
No, but you will in the interview.

"zero cost abstraction" is a lie

>tfw adding a new option to your bloated gooey

The cost is paid at compile time.

muh call function overhead

This thread is pathetic. It is not about programming. It's just a bunch of computers illiterates and first semesters memeing about whatever they just learned.

A quick search shows that most arguments used here are not original and have been copied from some trendy tech blog or other shit site.

The only real programming questions I have seen so far are from beginners(it's fine to be a beginner btw).

This entire site is shit and I don't know why anyone would regularly come here.

Nice blog post

>not enough options
>0/10 would not bang

What a nice picture that deserves to be /dpt/ OP.

ty

kys

I don't think reading CLRS cover to cover for interviews alone is an optimal strategy; I think it'd be a waste of time, especially considering the breadth AND depth of CLRS. And on that particular point, very few companies will ask you to code quicksort outright. They'd ask about running time perhaps, why it's superior to bubble sort, in what case(s) bubble sort is a better choice, etc. I say this, admittedly, from personal experience (as well as anecdotes, discussions with peers). In many cases, a hiring manager doesn't care if you memorized the code for a sorting algorithm, but that you have the essentials down.

I won't. Your move?

too spooky for Sup Forums

idea.popcount.org/2013-07-24-ir-is-better-than-assembly/
so, for LLVM, this is a great idea, but... if the golang devs do something similar, it's not OK

programmers are a very special kind of people

ur dum

dis

I think it was more Go did it poorly, but I have no idea

Kill your children and don't reproduce.

>everyone on the internet is the same person
>programmers are all the same

happy new year guys.
getting into more subtle stuff here.

on an HTTP server, when i get a request of an executable i fork a child that first redirects stdout to a socket file descriptor and then execl a shellscript that prints HTTP replies.

i have to somehow get the first line of the reply, so i think i should use a another redirection in the execl call, that redirection should be to stdin.

so in the father process i should scanf the stdin to get it.

how can someone redirects bash stream to stdin ?

That's not funny. My mom died 5 years before I was born.

i meant the father should somehow get the first line of the execl response in the forked child

"most arguments used here are not original"

This can be said about every argument on every board on this site or any other forum site. Arguments are going to be reused no matter what. What are you getting at?

What kinds of programming-related posts are you expecting to see?

If you pay the cost, it isn't zero.