[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
/dpt/ - Daily Programming Thread
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /g/ - Technology

Thread replies: 255
Thread images: 20
File: timetocode.webm (2 MB, 1152x648) Image search: [Google]
timetocode.webm
2 MB, 1152x648
This is /dpt/, the best subreddit of /g/

Umaru-chan edition

In this thread:
r/programming
r/compsci
r/ReverseEngineering
r/softwaredevelopment

code of conduct:
no racism
no insult
no sexual harassment
no gender discrimination

wat r u working on, anon-chan ?
>>
for(int i = 0; i < 9; malloc(i))
{
++i;
}

find a flaw.
>>
>>51961669
Shitposters just keep impressing me. Literally every line in the OP is a meme except for 'In this thread: '
Truly, you are a master baiter.
>>
>>51961691
being this new
https://archive.rebeccablacktech.com/g/?task=search&ghost=&search_text=Umaru-chan+edition
>>
>>51961690
the flaw is your program doesn't do shit except waste memory
>>
I want to add a version check to my application.

If I host my shit on github, and make a "latest.txt" would I be able to go and directly read that file and check the current version against the value there?
>>
Thank you for including a code of conduct.
>>
>>51961716
Can't you just use preprocessor defines? That's kinda their intended purpose.
>>
>>51961732
If I wasn't such a complete novice and knew more about C#, WPF and developing in general then I'd possibly know what you mean.

I just want users to be able to match their version to whatever the publicly accessible "latest" is.
>>
>>51961749
I don't think your meme language supports the preprocessor...
>>
>>51961669
Fuck your leftist shit you fucking niggerfaggot cunt.
>>
>>51961835
Oh well, not difficult. I'll just read the latest.txt from github (somehow) and compare it to currentVersion, if there's a missmatch then it'll prompt the user about an update and provide a link.

No harm done.
>>
>>51961749
You could use toast notifications to send your users a message about a new update.
>>
What's a beginner-friendly way to learn about header files? So far I've only programmed in a single .cpp file, but as I want to move on to larger projects I feel like I shouldn't do that anymore.
>>
>>51961835
.NET does support preprocessing. It isn't as powerful as C's (no macros), but #define-ing is still there.
>>
>>51961907
You can #include any file into your .cpp file, and the compiler will basically copy paste the contents of that file into where the #include statement is.

So if you make a .h file with your structs and defines, you can #include it at the top of your .cpp file and the compiler will treat it as if it was just one giant file.

That's all there is to it. If you buy into the retarded OOP bullshit, then some memers will tell you that there's more to it, but there really isn't. They'll suggest incremental compilation, which is a travesty and the #1 cause of compile time bloat.

Most (competent) programmers have switched over to "Unity" builds, which means literally #include-ing everything into one single file, just like I said. This benefits compilation time greatly, as the compiler doesn't have to parse and reparse files. The "downside" is that all functions and structs exist in the same global namespace, which enforces strict discipline. You are namespacing your functions properly, right?
>>
>>51961949
No, I don't even know what a namespace is. Bear with me, I'm switching over from Python.
>>
>>51961978
Well you have a lot to learn, grasshopper.

A namespace is, simply put, code that's collected into abstract groups. Namespaces can contain pretty much anything. Every program you've written in C++ has had a namespace, you just didn't know it (C++ files implicitly have a global namespace containing everything you write unless you specifically override this).

Namespaces are generally used to enforce encapsulation, as C++ doesn't have what you'd considered "classes" or anything of the sort.
>>
>>51962019
Alright, got it.
So why don't you just wrap a namespace around every header file for that "unity" build?
>>
>>51961978
http://www.cprogramming.com/tutorial/namespaces.html

You know how you call std::cout << "Hello World!"; or whatever? "std" is the namespace. cout is a function in the std namespace, so you call it by doing std::cout.

You can define your own namespaces just as easily:

#include <iostream>
namespace hello_world
{
void do_it()
{
std::cout << "Hello, world!" << std::endl;
}
}
int main ()
{
hello_world::do_it(); // this works
do_it(); // this doesn't
return 0;
}
>>
>>51962087
In order to access functions/data within namespaces you have to be explicit.
namespace1::function()
is totally different from
namespace2::function()
.
The reason you don't wrap entire header files in a single namespace is because of, well two reasons:
1: That wouldn't really offer many benefits over having no namespaces at all, and
2: That means that the functions inside the header would all be lumped together

It's hard to explain why having multiple namespaces is a good idea without actually looking at a program large enough to benefit from it. For small stuff it usually doesn't matter - just throw all your #includes and function prototypes and constants in a header file, include it in your main file and be on your way. Once you get into GUI stuff though, you'll realize how important it is.
>>
File: not_today.webm (1 MB, 720x404) Image search: [Google]
not_today.webm
1 MB, 720x404
Ask your beloved programming literate anything.
>>
In C#, I'm reading a raw .txt file, but for some reason it inserts a linebreak on to the end of the string essentially making it worthless.

What gives?

https://raw.githubusercontent.com/sirdoombox/SimpleFOMOD/master/latest.txt

            var http = new HttpClient();
string latestVersion = await http.GetStringAsync(new Uri("https://raw.githubusercontent.com/sirdoombox/SimpleFOMOD/master/latest.txt"));
string msgTemplate = "({0}) An Update is available - Press OK to go to download page.";
string msgData = latestVersion;
string updateMessage = string.Format(msgTemplate, msgData);
if (currentVersion != latestVersion)
>>
File: giTpDCb.png (11 KB, 414x354) Image search: [Google]
giTpDCb.png
11 KB, 414x354
>>51962165
Proof that the linebreak exists.
>>
>>51962165
Can't you just set the final character of the string to '\0'?
>>
>>51962213
C# strings aren't null terminated.
>>
Any language (besides Python) that's modern, easy to write one-off scripts in, can do web shit, doesn't require pages of boilerplate, and is interpreted, preferably with a REPL?
>>
>>51961669
i'm not even the slightest fazed by this OP after all those fucking himegoto OPs
>>
>>51962231
Then decrement the length of the string? Or are they immutable too? Then copy the characters into a new string that's length-1 length.
>>
>>51962240
F#
>>
>>51962249
>i'm not even the slightest fazed by this OP

Why would you be? You wouldn't happen to be one of those people who hates anime but willingly browses an anime website, would you?
>>
>>51962256
Yep C# strings are immutable.
>>
>>51962272
Holy fuck why does anyone use such a shitty language.
>>
>>51962200
Cast your version number to a hex then convert that to a string. Shouldn't be any \n in that case.
>>
>>51962321
I just did remove(templatestversion.length -1)
>>
>>51962307
It's really great when it works. Stuff like IEnumerables are godtier concepts.
Really the whole language serves two purposes:
1: When you want Java's functionality but know that Java is a shitty language
2: When you want a website with actual functionality and hate Python

Attempting to use it in more or less any other way results in...well, shit.
>>
In case you guys didn't understand why C# is better than Java.

Java:
package jtestbuild;
public class JTestbuild
{
public static void main(String[] args)
{
java.util.Scanner sc = new java.util.Scanner(System.in);
int i = Integer.parseInt(sc.nextLine());
System.out.print(i);
}
}

C#:
namespace CSTestbuild
{
class CSTestbuild
{
public static void Main()
{
int i = System.Console.ReadLine();
System.Console.Write(i);
}
}
}
>>
>>51962263
umaru is an unusually juvenile anime
>>
>>51962572
Yeah, nothing like Lain.
>>
>>51962465
first of all, you're fucking retarded

import java.util.Scanner;

public class JTestbuild {

public static void main(String[] args) {
Scanner s = new Scanner(System.in);
int i = Integer.parseInt(s.nextLine());
System.out.print(i);
s.close();
}

}


and Scanner can be used with input streams other than System.in

kill yourself, fucking whore
>>
>>51962572
:^)
>>
>>51962603
import java.util.Scanner;

public class JTestbuild {

public static void main(String[] args) {
Scanner s = new Scanner(System.in);
int i = s.nextInt();
System.out.print(i);
s.close();
}

}
>>
Advent of code Day 20 solutions

data=34000000
pph=10 #presents per house, part 1=10, part 2=11
tData=data/pph+(data%pph>0)

#first is part 1, second is part 2
stopCond=lambda x:tData+1
#stopCond=lambda x:min(x*50,tData)+1

house=[0]
for i in range(tData):
house.append(0)

for i in range(1, tData+1):
for j in range(i, stopCond(i), i):
house[j]+=i

for i in range(1, tData+1):
if house[i]>tData:
print i
break
>>
package jtestbuild;

import java.util.Scanner;

public class JTestbuild {

public static void main(String[] args) {
Scanner s = new Scanner(System.in);
int i = s.nextInt();
System.out.print(i);
s.close();
}

}


vs.

namespace CSTestbuild
{
class CSTestbuild
{
public static void Main()
{
int i = System.Console.ReadLine();
System.Console.Write(i);
}
}
}


>wow so much better
>>
>>51962603
If you want to use Imports, C# looks even better:
using static System.Console;
namespace CSTestbuild
{
class CSTestbuild
{
public static void main()
{
int i = ReadLine();
Write(i);
}
}
}
>>
>>51962648
package jtestbuild;

import static System.out;
import java.util.Scanner;

public class JTestbuild {

public static void main(String[] args) {
Scanner s = new Scanner(System.in);
int i = s.nextInt();
out.print(i);
s.close();
}

}


kill yourself
>>
>>51962307
aren't strings immutable in most languages?

it just creates a new string object behind the scenes in Java afaik.
>>
>>51962348
epic meme faggot
>>
>>51962684
Only in shit languages. C doesn't have this problem.
>>
>>51962684
Java strings are indeed immutable. Just like any other sane language.
>>
>>51962667
Removing some boilerplate that can be safely excluded:
using static System.Console;
class Program
{
static void Main()
{
int i = ReadLine();
WriteLine(i);
}
}

>tfw java will never be this compact
>>
>>51962706
>expanding an array without using extra space
>>
>>51962706
>C-fag
>talking about strings
>>
>>51962719
Java has static imports too.
>>
File: 1439779749929.jpg (95 KB, 630x421) Image search: [Google]
1439779749929.jpg
95 KB, 630x421
>>51962719
>taking pride in that your language is more similar to python
>>
>>51962719
#include <stdio.h>
int main()
{
int i; scanf("%d", &i);
printf("%d\n", i);
}

>tfw C# will never be this compact
>>
>>51962730
Well yeah, but in Java you have to have all the other shitty boilerplate, such as having to declare an entire instance of the scanner class just to read a line from stdin.
>>
>>51962748
and how is that a bad thing? how often do you read from stdin you fucking autist? and Scanner can be used with other input streams so you don't have to fucking hardcode that it's from stdin
>>
>>51962744
print(io.write())

>tfw C will never be this compact
>>
>>51962769
kill yourself
>>
>>51962735
Python strings are immutable bruh
>>
>>51962760
>java can't reasonably do something basic that most programming languages can do
>"you'll never need to do that"
sums up javafags pretty well
>>
>>51962769
ECHO %1

>tfw lua will never be this compact
>>
>>51962769
Hold on I'm retarded.
print(io.read())

There we go.
>>
>>51962790
it takes a few seconds at most to write the code to instantiate a Scanner and you're FUCKING RETARDED FUCKING KILL YOURSELF RETARD
>>
>>51962806
have fun making $30k a year while everyone else is using real languages and making three times that, javafag
>>
>>51962806
>justifying boilerplate.
>>
>>51962790
>all i do is write CLI apps for muh fucking loonix because i'm a lazy NEET who only cares about getting text input as conveniently as possible but somehow i don't use python because i'm even more of a fag enough to use C# in the belief that it's vastly different to java when it really is more like a mix of java and python which is fucking disgusting
>>
>>51962790
what can't it do exactly?

Scanner just supports using any input stream. to do that statically be retarded, as you'd need to store info on an arbitrary number of data streams at all times. Declaring an instance specific to an input stream lets you only store as much as you need.
>>
>>51962798
Read-Host | Write-Host

>tfw bash will never be this verbose
>>
File: 1450586681092-1.png (226 KB, 900x969) Image search: [Google]
1450586681092-1.png
226 KB, 900x969
>>51962838
>Attempting to justify Java when Scala and Clojure exists
>>
>>51962684
yep, immutable even in python, another sane language
>>
>>51962823
>importing everything globally scoped in System.Console and then having to type ReadLine() each time is better than simply typing s.n (nextLine() comes up in autocomplete suggestions)
>>
>>51962608
import java.util.Scanner;

public class JTestbuild {

public static void main(String[] args) {
System.out.print(new Scanner(System.in).nextInt());
}

}


Closing the Scanner is not required, every object is destroyed after the program stops.

Java is beast.
>>
File: 1450586383158-1.jpg (326 KB, 999x1446) Image search: [Google]
1450586383158-1.jpg
326 KB, 999x1446
>>51962886
>Using a language that requires an IDE to write
>>
>>51962886
>autocomplete suggestions

holy shit the memes are writing themselves
>>
File: africanamerican.jpg (56 KB, 482x856) Image search: [Google]
africanamerican.jpg
56 KB, 482x856
>>51962893
>there are programming languages that will create memory and never deallocate it
>>
>>51962906
>not using an IDE
enjoy your linux autism

>>51962908
enjoy hardcoding input from stdin when Scanner can take any input stream
>>
>>51962635

What you c# dweeps don't realise is that System.Console.ReadLine() does the same shit as the java code does, someone already wrote it. Anyone can do the same in java. Just create a console class and create a static method doing all the work.
>>
>>51962886
You know a language is shit when you need autocomplete.
>>
anyone here tried Powershell? I'm being asked to study it for a project at work, but even after reading all of the documentation, I can't really find much use out of it until I have full system admin access. I only currently use it to open 10 of a combination of websites, apps, and folders that I open up anyway when I start work
>>
>>51962893
>>51962925
Csharts BTFO
>>
>>51962921
C# has datastreams as well. Unlike Java, you don't have to waste memory and speed trying to use them when every kernel ever made supports raw IO.
>>
>>51962935
nope, lets you build large-scale applications with ease. enjoy your fizzbuzz and printing a number from stdin, kid
>>
>>51962936
It's interesting. It's very, very different from something like bash.
It supports the entire .NET Framework, so it's almost literally cmd.exe mixed with C#.

It isn't really supposed to be used as a system shell - more like a programming language that you'll want to use when you're just doing small things that C# would be too verbose for.
>>
>>51962942
What is a Cshart?
>>
>>51962912
>create memory
i want to learn a language that can create memory, id write a program that would create some DDR4 sticks in my pc
>>
>>51962954
>lets you build large-scale applications with ease
Any language does that.
>>
>>51962954
>what is visual studio
>what is WPF
>what is javac

If you are literally so shitty of a programmer that you need AUTOCOMPLETE just to do basic input/output, then you seriously are worse than curryfags. Have fun making $22k a year on your meme language.
>>
if you had to learn one of the following two meme-languages, which would it be?

Rust or Go?
>>
>>51962968
a person who uses C# (C sharp)
>>
>>51962988
Go because the syntax is a little nicer, but there's really no reason to use them when C++ still exists.
>>
>>51962988
rust

go is just... no
>>
>>51962965
I actually haven't used .NET before despite being recommended it for the past decade. Any random useful applications it's used for commonly? And how that functionality would integrate well with piping? It definitely is less verbose and easier to get things running or tested
>>
>>51962988
What about the big black D?
>>
it's funny how it's always the Csharts that attack java and not the other way around... shows who's insecure about their copy cat language
>>
>>51963022
D is actually good and barely memetic, so it's an easy choice
>>
>>51962988
Neither. Use Crystal
>>
>>51963005
Here's an example program I stole and then cleaned up.
$Processes = Get-Process | Select-Object ProcessName
$I = 1
Foreach($Process in $Processes)
{
Write-Host "Process " $I "'s name is " $Process.ProcessName;
$I++
}


Throw that into a powershell prompt (you can do it one line at a time!) and it'll give you the name of every running process, as well as a running counter of how many processes were counted.

Piping is actually the main way PS functions work (the main difference between C#'s .NET calls and PS's .NET calls are that C# uses functions with parameters while PS uses cmdlets with arguments).
>>
File: 1419680040383.png (141 KB, 586x329) Image search: [Google]
1419680040383.png
141 KB, 586x329
Recommend some books to learn JavaScript f︂︂a︂m.
>>
>>51963086
>JavaScript
would rather you suck a fuck tbf
>>
>>51963086
>>>/g/wdg
>>
Since I'm 2 weeks off and have no friends, I want to start a new project in a meme language. The application has to play together with some C library, so any binding to C is a must. The application basically takes the result from the C library, parses it and writes it to file. What's the best language to use? I'm thinking of Go, Rust or D.
>>
>>51963116
H A S K E L L
A
S
K
E
L
L
>>
>>51963128
The only constraint is no FP.
>>
>>51963110
Disgusting. Why split /dpt/? This was never a thing when I was a kid.

No wonder this place is so slow now.
>>
>>51963128
K I L L Y O U R S E L F
I ᠎ I
L ᠎ ᠎ ᠎ L
L ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ L
Y ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ Y
O ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ O
U ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ U
R ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ R
S ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ S
E ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ E
L ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ L
F ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ ᠎ F
>>
>>51963043
did you write this thing?

looks like maybe 4 people have ever used it
>>
Why the fuck can't I have an unused variable in my Go program? I'll be using it in just a few minutes Jesus.
>>
File: my_face_when.png (44 KB, 225x171) Image search: [Google]
my_face_when.png
44 KB, 225x171
>>51963086
You know any other programming languages?
>>
>>51963133
Why? It has a GUI framework you can use and it has C bindings. What's not to love?
>>
>>51963149
I don't need a GUI and I don't like a pure functional programming language.
>>
>>51963028
That's because most Java fags already know they're inferior.
>>
>>51963161
Well then use LuaLaTeX and become the master of memes.
>>
>>51963143
go was designed by the assburger... the hybrid of a normie and an autist, truly the worst kind of person in all regards.
>>
>>51963161
haskell isn't pure fag
>>
>>51963141
ITS MORE LIKE 450 PEOPLE ACCORDING TO GITHUB. But I didn't write it, I just like it.

>>51963143
Use it when you need it. S I M P L E
>>
>>51963134
Web devs aren't real devs
>>
>>51963169
Doesn't bind with C.
>>
>>51963174
gimme something to make in it and I'll do it

make it good though i dont' wanna u to meme on me that wouldn't be good
>>
>>51963171
Hasklel is only good at solving hypothetical problems.
>>
>>51962165
https://msdn.microsoft.com/en-us/library/system.string.trimend(v=vs.110).aspx

Learn how to use Google and not be a useless leech, idiot.
>>
>>51963178
You sure? I always heard that there were C bindings for Lua.
>>
>>51963146
I can create FizzBuzz in pretty much every language, anon. If that helps.

>>51963176
I don't care, anon. /dpt/ shouldn't be divided.
>>
File: Untitled.png (1 KB, 193x93) Image search: [Google]
Untitled.png
1 KB, 193x93
>>51962165
>>51962200
How about you save latest.txt without a line break?
>>
>>51963206
>>51963206
fucking lel
>>
>>51963201
Why have discussion about things other than programming in a programming discussion thread?
>>
>>51963197
AFAIK it's the opposite. C can bind to Lua.
>>
>>51963143
Just call the variable _ and change it to a real name when you use it. It works this way so that Pajeet can't enable some "ignored unused" flag and fill every method with hundreds of unused variables.
>>
File: 1446785180965.jpg (326 KB, 1536x591) Image search: [Google]
1446785180965.jpg
326 KB, 1536x591
>>51961669
>calling threads subreddits
>weebshit outside /a/
Is this the newfag containtment board?
>>
>>51963223
JavaScript, PHP, etc. are all programming languages.

You can only make an argument about HTML and CSS (which together are turing complete together anyways).

And for graphic design they have >>>/gd/.

He's right, /wdg/ should not exist.
>>
Write-Host (((Read-Host) + (Read-Host)) / 2)

Was this really so hard, guys?
>>
Trying to make a customizable character. Calculating the x and y co-ordinates like such:
hairAnimationActor.setPosition(headX+hairAnimation.getKeyFrame(0).getRegionWidth()*0.04f, headY + headHeight*0.39f);

I'm undoubtably doing something very very wrong. Please point out the flaw in my reasoning. I know that this means that if one hair sprite sheet has a bigger width than another, they won't both get the same position. This means that this method is infeasible. Has anyone here ever done anything like this before?
>>
>>51963232
Just don't do diversity hiring
>>
>>51963261
It is, welcome newfag.
>>
>>51963216
>>51963206
I did, GitHub forces a linebreak into the file though.

I tried saving it a variety of different ways but it absolutely refused to remove line2 from the file.
>>
>>51963274
Then leave it there and just read the first line from the file.
>>
>>51963288
I ended up trying to force it out of the file, which it did just fine.
>>
>>51961690
for(int i = 0; i < 9; malloc(i++));
>>
>>51963274
GitHub allows for files without linebreaks at the end (it will even tell you so when you view the file in the source list that there's no linebreak). It's probably your editor inserting it.

You can also add this to your .gitattributes:
latest.txt -crlf


Which will automatically removeempty newlines from the saved file on commit.
>>
>>51963170
Don't talk about shit about Rob Pike-sama

>>51963183
An ssh client

>>51963189
Using Haskell is like the giving your first blowjob. At first you're like "w0w that wasn't that bad, maybe I should experiment more" Next thing you know, you're a crossdressing faggot.
>>
>>51963263
web devs are retarded faggots
>>
>>51963170
So Rob Pike is sits in middle between Linus Torvalds and Richard Stallman?
>>
>>51963170
>tfw assburger
>that hybrid definition actually makes sense
>tfw really would prefer to either be a normie or a full blown autist, since both are happier in their own worlds
>>
>>51963346
Linus isn't a normie. Just a different kind of autist.
>>
>>51963320
>Using Haskell is like the giving your first blowjob. At first you're like "w0w that wasn't that bad, maybe I should experiment more" Next thing you know, you're a crossdressing faggot.
The only person I'd give a blowjob is myself, but I'm not flexible enough. So no Haskell for me ;_;
>>
I thought this thread was supposed to be about programming. Not about fucking for loops you learn on the first god damn day you turn on the computer. Jesus Christ. Go back to fucking elementary school.
>>
>>51963395
Well, post your ebin code :DDDDDD
>>
Unity

yay or nay?
>>
>>51963405
nay
>>
>>51963402
I just did and no one replied because you faggots probably don't even know what it said.
>>
>>51963416
We normally don't reply to normie code.
>>
>>51963395
to be fair, this is the same general that argued about averaging ints in c for the past month and a half
>>
>>51963416
We can't all be genius programmers like you.
>>
>>51963320
>an ssh client
shit i've never made this in any language. Any advice? I wouldn't know where to start but I can just start googling.
>>
>>51961711
Umaru chan is shit
>>
>>51963432
HTML.
>>
>>51963432
L U A L A T E X
U
A
L
A
T
E
X
>>
>>51963445
I know right Death Note is WAY more better XDDDDDDDDDD
>>
FIND A FLAW FAGGOTS (FFFF)

cout << "Hello, World!" << endl;
>>
>>51963459
Is that the new meme language?
>>
>>51963477
wouldn't compile
>>
>>51963477
Completely unrunnable.
>>
>>51963482
Can't be worse than Haskell.
>>
c-can we talk about programming
>>
>>51963465
Go project somewhere else
>>
>>51963477
>
cout << "Hello, World!" << endl;

>not
cout << "Hello, world!\n" << flush;
>>
>>51963432
Here is the RFC
https://tools.ietf.org/html/rfc4251

I suppose you could look at examples from github but that would be cheating
>>
>>51963477
it's not in code tags you goddamn spacker
>>
im wondering how many threads ago we last had a worthwile discussion
>>
>>51963268
I'm not in charge of Google's hiring, kiddo.
>>
>>51963498
sounds gay as fuq
>>
>>51963501
>still using cout at all
Are you fucking KIDDING me?

Are you people "programming" fucking C++ console programs? Holy fuck. How old are you morons? Twelve? I'm genuinely asking.
>>
How do I learn HTML, /dpt/?
>>
>>51963505
thanks. I have 3 weeks of christmas break so I think I can at least get a sizable chunk of this done.

only problem I'd probably want to make it in Rust instead jsut because.
>>
>>51963521
>>>/wdg/
>>
>>51963521
http://www.w3schools.org
HTML is not a language, FYI
>>
>>51963521
>>>/g//wdg/
>>
>>51963538
http://www.w3fools.com/
>>
>>51963520
sorry dad
QDebug("Hello, world!\n");
>>
>>51963521
You don't.

>>51963531
Literally why
>>
>>51963550
https://www.w3memes.org
>>
>>51963554
QDebug already adds a newline.
>>
>>51963560
because Crystal is slightly more of a meme language
>>
>>51963561valid URLs only, fagfag
>>
>>51963267
You need some kind of metadata on the sprites. Typically when you load the sprites in, there'll be a "hot" pixel, and you align things based off of that.
>>
>>51963562
I'm just encouraging it.
>>
>>51963538
It is a language, a markup language.

>>51963533
>>51963546
Nobody likes /wdg/, stop dividing /dpt/.
>>
>>51963550
http://nicememe.website/
>>
>>51963568
N I C E A R G U M E N T F A M
>>
>>51963592
HTML is merely a text document filled with tags that tells a browser what to display
>>
>>51963592
I thought /wdg/ was more newfag friendly.
>>
>>51963601
it's not a formal argument just my reasoning

maybe I'll do it in both languages at the same time.
>>
>>51963575
I don't really understand what you mean. I've thought about an approach where I basically one x,y co-ordinate of a hair sprite which has to be at a certain static point of the head. Is that what you mean? How would I implement something like that? Some kind of database / json file?
>>
Can we get a better Code of Conduct? I don't feel safe contributing to this thread as-is.
>>
>>51963606
It is still a language though (https://en.wikipedia.org/wiki/Markup_language).
>>
>>51963610
Thats some pretty shit reasoning senpai
>>
>>51963623
Wikifag
>>
>>51963606
Like I said, a markup language.

HTML literally stands for HyperText Markup Language.
>>
>>51963633
>i've been told so i'll start name calling
>>
>>51963623
>inb4 Japanese is a language, let's talk about it in /dpt/
>>
>finish my engine, which would take a shit ton of effort
>use my editor how is it and hardcode the programming logic
what do?
>>
>>51963633
You don't regularly contribute to wikipedia? What are you? A normalfag?
>>
>>51963660
その通りだよね、お兄ちゃん!
>>
>>51963643
I know that, but many programming experts (eg. Derek Banas, people.who created Blink, etc etc) agree that it is the browser engine doing the work
>>
>>51963675
I want anime speakers to leave
>>
>>51963660
No, there's a difference between a programming language and any other form of language, however, he implied that HTML is not a language (what the fuck does the L stand for then?) and it's merely text while it's actually a markup language that's supposed to have distinguishable tags from plain text (as the article states).
>>
>>51963690
I just called my dick "LEO". Is my dick now a programming language as well? It doesn't matter what they call it.
>>
File: 1450611265064.jpg (537 KB, 1200x1264) Image search: [Google]
1450611265064.jpg
537 KB, 1200x1264
>>51962465
>>51962603
>>51962608
I'm a new friend with Java, senpai pls we advice now baka desu senpai just want to make simple games for myself, possibly share them with /g/ and /v/
public class Niggers {
public static void Niggers(String[] args) {
var opIsaFag = true;
if (opIsaFag) {
System.out.println("All is right in the world");

}
else {
System.out.println("OP is a sand nigger")
}
}
>>
>>51963708
Did you not read my post, or do you have some issues with reading comprehension?
>>
>>51963710
Fix your goddamn indentation, shithead.
>>
>>51963710
>var
>java
pick one
>>
>>51963690
are json files now a language because it has tags?
>>
>>51963710
Your indentation and use of a plural as class name disgust me.
>>
>>51963717
I stopped reading after I read "HTML" and immediately assumed you were making retarded comparisons. Turns out I was right, huh?
>>
>>51963751
He never said HTML is a programming language, he only pointed out the L in HTML stands for language.
>>
>>51963271
>unironically defending chinese cartoon shitposting on /g/
>>>/out/
>>
>>51963769
>He
You misspelled "I" there, old boy.
>>
>>51963769
my fucking taco speak is also a language.
>>
>>51963730
It could be defined as a language since it has characteristics of a formal language.

>>51963751
see >>51963769
>>
>>51961669
>>
>>51963790
>It could be defined as a language since it has characteristics of a formal language.
No it doesn't. Read this before posting again, please...
https://simple.wikipedia.org/wiki/Turing_machine
>>
>>51963790
So we should discuss spanish and japanese because it also has the structure of a language, right?
>>
>>51963606
C is merely a text document filled with syntax that tells a compiler what to compile.
>>
>>51963790
If I see "JSON" under the "Language proficiency" header on a resume I will not even think about interviewing them. Never make that argument in real life. You'll blow your chances forever. People will all think you're retarded.
>>
>>51963802
>For something to be a language, it has to be turing complete

Please kill yourself, you uneducated shitposter

For the guy saying that HTML is a language: Just give up, these contrarian retards will collectively fling their shit at you until you give up anyway. Better to do it now and move on to greener pastures.
>>
>>51963781
Well, it is some sort of natural language, I guess.

>>51963802
The question here is if something is a language or not, the question isn't if something is a programming language or not.
>>
>>51963802
What about it?

>>51963810
No, I never said that, I only counter argued the dude that said HTML is not a language (while it certainly is). I never implied that HTML is a /programming/ language, however.

>>51963829
You see, that's the problem, "language proficiency" is too vague of a term and seems like some people can't grasp it. Are we talking about communication/spoken language, programming language, or what? I'd obviously never state JSON under a "programming language" section, but I never implied that either HTML or JSON are /programming/ languages.
>>
>>51963843
>>51963834
Sorry, this is the daily PROGRAMMING thread. Markupfags are not tolerated. Leave.
>>
>>51963710
public class Nigger {

public static void main(String[] args) {
boolean opIsaFag = true;

if (opIsaFag) {
System.out.println("All is right in the world");

}
else {
System.out.println("OP is a sand nigger");
}
}

}


https://eclipse.org/
>>
>>51963880
XSLT is programming
>>
>>51963890
public class Nigger {

public static void main(String[] args) {
boolean opIsaFag = true;

if (opIsaFag) {
System.out.println("All is right in the world");

} else {
System.out.println("OP is a sand nigger");
}
}

}
>>
>>51961669
>no racism
>no insult
>no sexual harassment
>no gender discrimination
Fuck you, nigger bitch.
>>51962988
Depends on what you want to do with a programming language. For writing command line utilities and small web services that you would otherwise write in Perl/Python/Ruby, use Go. For anything real-time where you can't afford GC pauses (like video game engines), Rust. That said, Go is a somewhat awkward language to use. People complain about the lack of generics for a reason. I hope Swift or Nim or Crystal will eventually replace it.
>>
>>51963908
Microsoft Word is an IDE.
>>
>>51963927
EDGY
>>
>>51963920
disgusting
>>
>>51963940
Just doing my job keeping progressivism in check here.
>>
>>51963956
>wasting space for no-gains on readability
>>
how do I write a GUI without using gay drag and drop shit?
>>
>>51963976
Q T
T
>>
>>51963976
By writing code instead

Your question is ambiguous as fuck
>>
>>51963976
Drag & drop usually generates an XML file. Edit that file yourself.
>>
>>51963989
>>51963991
I just want to write a GUI like I would code a CLI.
drag and drop shit just confuses the shit out of me.
>>
>>51964007
Use Swing. You won't regret it.
>>
>>51963876
It's fucking common sense you giant fucking idiot. How can anyone in this field be so dumb? If you think HTML, JSON, XML or spoken languages are programming languages you should be put in the god damn loony bin.

Try accounting or something. This job isn't for you.
>>
>>51964007
WPF, QT, or Tcl/Tk all support hardcoding your GUI. So does GTK# but lolgtk#.
>>
>>51963970
the else opens a new block, it should be on a new line, not on the same line as where the previous block gets closed
>>
>>51964031
>It's fucking common sense you giant fucking idiot. How can anyone in this field be so dumb? If you think HTML, JSON, XML or spoken languages are programming languages you should be put in the god damn loony bin.
Yes, this is a common sense, yet a bunch of neckbeards outraged when I said that HTML is a language because they thought I said it's a programming language...
>>
FOR i = 1 TO 100
IF i % 3 EQ 0 AND i % 5 EQ 0 THEN
PRINT "FizzBuzz"
ELIF i % 3 EQ 0 THEN
PRINT "Fizz"
ELIF i % 5 EQ 0 THEN
PRINT "Buzz"
ELSE
PRINT i
END IF
NEXT
>>
>>51964033
https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md

To anyone new here, don't take any advice posted here, including mine. All these script kiddo's think they're wise or whatever while completely disregarding fact and established prevalent guidelines.

Do some research.
>>
>>51964031
do you even know what a formal language is?
>>
>>51964057
That one of a million coding standard looks fucking awful

>>51964033
It's part of the same construct. You can't start an expression with else if there isn't a if before it.
>>
Does anyone know of any sites that list quick low-paying bounties? I money for bills next semester and I won't have much time between school and a school-affiliated project I'm working on for my Senior Design to do real work.
>>
>>51964081
PSR-2 is by far the most used one in any industry. I doubt you've even passed your second year of webdev school.
>>
>>51963920
is that how you're supposed to indent else blocks?
>>
>>51964007
Just write the code the "drag & drop" shit generates for you.

Button btn = new Button("faggot", new Size(32, 32));
form.attach(btn);

etc
Thread replies: 255
Thread images: 20

banner
banner
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [Home]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.