Previous thread: >>53610616
Lazy ass programmers thread
What are you working on half-assedly?
Help me out please
How can I find a project or community to join and contribute to that will actually value me?
I have some programming skills.
>>53617152
>Requires validation from others
You're weak
please do not use an anime image next time, thanks.
>>53617152
>special snowflake syndrome
>>53617190
When you make your own thread you can have any image you want. In this case, deal with it faggot.
>>53617125
half-assing my way through work
The hardware I'm working with doesn't have any documentation, so I have to look at a similar piece of hardware for documentation and guess and check when things don't work.
>>53617125
Just making a simple account class in Java :^)
First for pl/sql
>>53617239
Noice. Embedded systems?
>>53617125
All my classmates think I'm a whiz kid because I ask a lot of questions, but I'm probably one of the worst in my class. I second guessed my degree choice but fuck it, I like programming, even if I'm not the best at it.
>>53617264
Yeah.
It's fun most of the time, but then you run into some terrible protocol or have to reverse engineer something, and then you drink yourself into a coma so you feel better.
What does /dpt/ think of Rust? I've found that some people in other sites think it's made by web developers that like CSS, HTML and Javascript.
>>53617384
SJW
>>53617334
God damn it I want to be where you are. I'm still a college cuck trying to get an internship. Fuck this shit.
Newfag to C, what is wrong?#include <stdio.h>
int main()
{
int sum, con, n ;
printf("input n\n");
scanf("%d", &n);
for(con=1;con<=n;++con);
{
sum+=con;
}
printf("Sum=%d", sum);
}
You are given a 3 × 3 Tic-tac-toe board stored as a two-dimensional array. Find out the winner of the game, or return ' ' if there is no winner.
char TicTacToe(char[][] board)
{
for(int i = 0; i < board[0].length;i++)
{
if(board[i][0] == 'x' && board[i][1] == 'x' && board[i][2] == 'x' )
return 'x';
if(board[0][i] == 'x' && board[1][i] == 'x' && board[2][i] == 'x' )
return 'x';
if(board[i][0] == 'o' && board[i][1] == 'o' && board[i][2] == 'o' )
return 'o';
if(board[0][i] == 'o' && board[1][i] == 'o' && board[2][i] == 'o' )
return 'o';
}
if(board[0][0] == 'o' && board[1][1] == 'o' && board[2][2] == 'o' )
return 'o';
if(board[2][0] == 'o' && board[1][1] == 'o' && board[0][2] == 'o' )
return 'o';
if(board[0][0] == 'x' && board[1][1] == 'x' && board[2][2] == 'x' )
return 'x';
if(board[2][0] == 'x' && board[1][1] == 'x' && board[0][2] == 'x' )
return 'x';
return ' ';
}
>>53617515
You need to initialize variables in C, otherwise they will have random garbage. Set sum to zero first.
You also should handle user input better, because if someone enters a non-numeric character, your program will crap out.
>>53617529
looks like a project I did in high school
>>53617688
rate my code tho
>>53617674
All I wanted as to take a number a n! it :(. It still doesn't work even though sum=0.#include <stdio.h>
int main()
{
int con, n ;
int sum=0;
printf("input a number n\n");
scanf("%d",&n);
for(con=1; con<=n ;++con);
{
sum+=con;
}
printf("Sum=%d", sum);
return 0;
}
>>53617515
remove the semicolon in the for statement
>>53617718
And n! it*
>>53617729
Jesus fuck I'm stupid and dyslexic. Really..
>>53617718#include <stdio.h>
int main()
{
int con, n, sum = {0};
printf("input a number n\n");
scanf("%d",&n);
for(con=1; con<=n;con++)
{
sum+=con;
}
printf("Sum=%d", sum);
return 0;
}
>>53617799
C would be much better if you could#pragma pythonic-indenting
at the beginning of your code. curly brackets and semi-colons are deprecated, and lead to buggy code.
>>53617384
Rust is pretty awesome. It's a bitch to learn but once you got it everything you make is blazing fast and safer than a retarded baby in a room full of pillows.
Help me out please
How can I find a project or community to join and contribute to that will actually value me?
I have some programming skills.
>got FFI with Vulkan to work no problem in Haskell
>any call from Rust to Vulkan causes a segfault
>>53617729
and this is just one of the reasons why you don't put a newline before the opening brace
>>53617957
It's because I'm on Windows and Vulkan only builds with MSVC, isn't it?
Do I really have to load everything in dynamically?
>>53618140
fucking this
>>53618140
>you shouldn't make this style choice because of an easily avoidable error
Okay bud
>>53617125
An 10th in-memory database using Node.js.
>>53617152
If you have no creativity and just want a project, find something that's abandonware and build upon that.
>>53618191
I'm actually considering requiring all if statements to have braces in my projects, even when they're one liners, because of the number of errors that have been caused by them (i.e. the Apple goto fail bug), despite it being easily avoidable.
>>53618267
Node applications aren't run in a browser.
>>53617190
Fuck you, Black Lagoon was amazing.
>>53618278
HTML isn't programming, get the fuck out
>>53618278
it's still webshit, backend dev goes in /wdg/ too
>>53618278
Javascript has forever etched itself and it's descendants into the category of weebdev
>>53618293
Well I'll go but I'll just correct you before I go. My in memory database has nothing to do with a web backend or web at all even, it's just a project written in Javascript.
Pleb here, working with stacks with ArrayLists for the first time on java
/g/, in what occasion would an insertion to a stack could it cause an exception?
I'm working on a project and the teacher is asking me to do a push method and make it throw an exception
I have an idea in C++ that I'd use try{} and catch(bad_alloc e) which I guess it's what can go wrong
tl;dr What type of exception should I catch in Java when pushing an item into an ArrayList?
>>53618333
>javascript
just fuck off already
>>53618336
Java isn't real programming either.
>>53618333
Java isn't real programming either.
>>53618290
>>53618293
Maybe if we want to kick the web developers out, we should change our name to "Desktop Programming Thread"?
>>53618336
>What type of exception should I catch in Java when pushing an item into an ArrayList?
You could catch it as just an Object, but better check the docs, it will tell you.
>>53618336
if your array is full and at max capacity
>>53618336
Java isn't real programming either.
>>53618336
if it is a circuller buffer, then you can throw buffer_full_exception or something. if it stack extends as you push then not_enough_memory allthough this one will be harder to produce
>>53618359
>>53618367
JAVA ISN'T PROGRAMMING MIND
>>53618336
GET OUT
>>53618336
Just catch exception e and you'll get any exception that could occur. You don't have to be specific.
>>53618378
>>53618372
You should name it Desktop Programming Thread (Node.js doesn't count)
>>53618270
>I'm actually considering requiring all if statements to have braces in my projects
I already do that.. mostly. The only time I don't is if I'm working on a project that doesn't use braces for one-liners.
>>53618389
I'm the Node.js guy but I didn't type that Java part, I just found it hilarious as fuck.
>>53618395
>>53618270
how interesting, please tell us more about your coding conventions name fags
>>53618417
>coding
>>53618427
>java
>>53618336
Post your assignment we will all help do your homework especially Ruby and OSGTP
>>53618438
>memes
>>53618417
>tell us more about your coding conventions name fags
I don't go to conventions, they're for turbo-nerds.
>>53618448
>java is a meme meme
>>53618449
what's the deal with dressing up as fictional characters is it some kind of fetish like with furfags or something
>>53618465
>python isn't shit meme
Almost all programming languages are garbage, and the rest are only partially garbage with some redeeming elements.
>>53618471
There is literally nothing wrong with being a furry it actually helps to program things being a furry
>>53617125
Just made a mobile botnet client, server and naive crypter in golang.
More than 200.000 infected machines (85% mobile) in 12 days.
>implying any language other than haskell and ocaml aren't shit
if you primarily program in a non-functional language you should just kill yourself
>>53618504
>Says the guy who only programs in Java
>>53618513
haskell is literally shit and ocaml is a shitty meme
>>53618535
>muh classes
>muh object oriental cartoons
>muh operator overloading
KEKE
>>53618513
Haskell's got a lot of bad parts. Its type system is a mishmash of extensions upon extensions upon extensions. No totality checking, and lots of standard library functions are partial. On the topic of the standard library, it's in a pretty bad state, especially with respect to functors and all of their compatriots.
I still like it though, it's worlds ahead of every other practical language (so not counting academic or immature projects like Idris) out there in all respects but efficiency.
>>53618535
le true sepples language
>>53618513
Oh, and I haven't used OCaml myself but I'd put it about Haskell's level from what I've seen of it.
>>53618571
>it's worlds ahead of every other practical language
lel, did it overflow to the other side or what.
Hello, this morning I came across a code similar to this one and I've been trying to understand how it works. I was told that it just cast to an integer, but it's not enough for me. Mind anyone telling me what this is called? I want to search for further information but looking for "changing the integer value of characters inside an array" gives me no useful results.char buf[] = "Hello";
unsigned char test[UCHAR_MAX] = {
['e'] = 1,
};
printf("%d\n%d\n", test[(unsigned char)buf[1]], test[(unsigned char)'z']);
>>53618631
This is why C isn't considered real programming but rather rain dancing around a compiler. Why do you need to know this if you just want to write a program that does something simple like changing a character to an int?
>>53618417
I've taken to programming using the stroustrup style for C and C++. Basically, opening brace only goes on a new line for functions, and otherwise shares the line with the if/for/struct/whatever keyword. For if and else, the else keyword is not placed on the same line as a closing brace. This allows for easier commenting of these blocks if necessary.// comments look much nicer
if (condition) {
do_thing();
}
// if they are consistent like this
else {
do_other_thing();
}
For tabbing, I use hard tabs for indentation and spaces for alignment, using a "smart tabbing" technique that allows the code to maintain alignment regardless of tab width. My default tab width in my editor is usually 4.
I sometimes tend to put function types on a separate line from the name and argument(s). For example:static inline bool
does_thing(int thing)
{
// ...
}
>>53618631
god designated initializers are awful, thankfully they are not in C++
it justs sets 'e'th element to 1, I am assuming that code prints 1 0
buf[1] is 'e' test[buff[1]] is 1, all other test values are 0
>>53618703
We need a /jdpt/ and /cdpt/ and a /fdpt/ for Java, C, and functional programming. This is because nobody can get along. In fact there should be separate boards for each one.
>>53618770
That's not true as a Java programmer I get along with all of you other programmers just fine
>>53618770
we already have /sqt/ for java
>>53618705
based stroustrup
>>53618792
>>53618770
we actually used to have a lisp general
>>53618721
>designated initializers
Thanks, that was what I needed.
And yes, that's what it prints.
>>53618939
INITIALIZERS
>>53618939
uh, I can understand open defecation but what is this
I wrote compile-time list comprehension in C++. I feel dirty. I'll post the code if anyone is interested.
>>53618832
it's on lainchan now, but lainchan is slow as fuck so nobody really posts in those anymore
>>53618770
i don't mind C in my /dfpt/
>>53618962
the garbage around them helps them mask the smell of shit on the road
also they can get their daily meal from the sewage at the same time
>>53618972
sounds pretty cool, is it using a lot of templates? desu despite how much templates can be fucking insane to use, they're probably one of the most versatile language features i've seen
>>53618939
We see all these disgusting old men doing this but can we get some pictures of cute Indian girls doing some designated pooing?
>>53619028
but anon, girls don't poop
>>53619048
My wife's daughter does
>>53617152
codingame, you may even get a job
>>53619048
and that's why they're so full of shit
>>53619060
It's because her father is dirty nigger
Best place to learn C#?
>>53619158
buy some proprietary book
>>53619158
iPhone devs
Can't understand it for the life of me.int iexp(int x, unsigned n) {
int p, y;
y = 1;
p = x;
while(1) {
if (n & 1) y = p*y;
n = n >> 1;
if (n == 0) return y;
p = p*p;
}
}
>>53619309
take some example inputs and write it out on a piece of paper
Going from C to Python is spazzing me out. Dynamic typing is uncomfortable.
>>53619336
i hate this C+python meme
C++ and java is a more sensible middle ground
anyway i'm going to bed so i won't argue with you spergs
g'nite
>>53619309p = x;
pointless.
Infinite loop, if the whatever the binary rep of n is AND'd with 0b0001 is > 0 set y = p*y.
Shift n to the left by 1. Loop until n == 0 (meaning all bits are shifted out)
>>53619358
Nope, making an app in python just because I need a quick gui thingy. It's whatever.
>>53619017
LOTS of templates
http://pastebin.com/PXnMm3TW
>>53617529
Look up breadth first search
>>53619293
>>53619288
Thanks for nothing senpai
>>53617701
It's shit.
>>53603476
I improved my code a bit. Is there a better way to do this in C++?string::size_type count_vowel(const string &str)
{
auto size = str.size();
decltype (size) count = 0;
static unsigned char letters[UCHAR_MAX];
letters['a'] = 1; letters['A'] = 1;
letters['e'] = 1; letters['E'] = 1;
letters['i'] = 1; letters['I'] = 1;
letters['o'] = 1; letters['O'] = 1;
letters['u'] = 1; letters['U'] = 1;
for (decltype (size) i = 0; i < size; i++)
count += letters[(unsigned char)str[i]];
return count;
}
>>53619309
It makes more sense recursivelyint iexp (int x, unsigned n) // = x^n
{
return iexp_(1, x, n);
}
int iexp_ (int a, int b, unsigned n) // = a * b^n
{
// a * b^(2x + 1) = (a * b) * (b ^ 2x)
if (n % 2 == 1)
return iexp_(a * b, b, n - 1);
// a * b^2x = a * (b^2)^x = a * (b * b)^x
else if (n != 0)
return iexp_(a, b * b, n / 2);
// a * b^0 = a * 1 = a
else
return a;
}
>>53619739string::size_type count_vowel(const string &str)
{
static const string letters = "aeiouy";
string::size_type count = 0;
for (char c : str)
count += letters.find(to_lower(c)) != string::npos;
return count;
}
I have not tested it, might not compile because of the static initialization or the ligature on "find".
I just realized you tried to get a computationally less expansive method, but, you're initializing your array on every single call, where it should only be initialized once.
The lookup table is pretty much needlessly big, for the problem it's trying to solve. You could reduce it by converting each character to a specific subset of the ascii (lowercase, for example) and applying an offset.
>>53618509
How does it spread?
Anyone know of a good resource for learning how to get c++ custom node.js modules to work in Electron? Sorry for asking to be spoonfed, I've been killing myself over trying to get this to work and I just want to end it
typedef int sq;
typedef sq board[9];
#define EMPTY ' '
#define CHARX 'x'
#define CHARO 'o'
/*
0x00001 0x00004 0x00010
0x00040 0x00100 0x00400
0x01000 0x04000 0x10000
*/
int states[] = {
0x10101 /* 100 010 001 */
0x01110, /* 001 010 100 */
0x01041, /* 100 100 100 */
0x04104, /* 010 010 010 */
0x10410, /* 001 001 001 */
0x00015, /* 111 000 000 */
0x00540, /* 000 111 000 */
0x15000, /* 000 000 111 */
};
sq ttt_winner (board b)
{
int state = 0, masked;
int i;
for (i = 0; i < 9; i++)
{
if (b[i] == CHARX)
state += 1;
else if (b[i] == CHARO)
state += 2;
state *= 4;
}
for (i = 0; i < 8; i++)
{
masked = state & (states[i] * 3);
if (masked == states[i] * 1)
return CHARX;
if (masked == states[i] * 2)
return CHARO;
}
return EMPTY;
}
>mfw i try to build my program on all my linux machines and my makefile works perfectly every time
why is linux so comfy
>>53617125
Implementing A* search in unity using C# scripts. Learned C#, basically Java
>>53620026
It compiles and works. The only thing I changed was to_lower() --> tolower(). I'm quite impressed with your code, anon.
>>53620402
>>53620026
>>53619739#include <stdio.h>
#include <stdlib.h>
int isvowel(char c) {
switch(c) {
case 'a':
case 'e':
case 'i':
case 'o':
case 'u':
case 'A':
case 'E':
case 'I':
case 'O':
case 'U':
return 1;
default:
return 0;
}
return 0;
}
int main(int argc, char** argv) {
char c;
int vowels = 0;
while(1) {
c = getchar();
if(c == EOF) {
break;
}
vowels += isvowel(c);
}
printf("Vowels: %d\n", vowels);
return EXIT_SUCCESS;
}
>>53620655
that is beautiful
>>53620655
this is the best way. Most readable and simplest.
>>53618703
>C isn't considered real programming
butt blasted web "dev" detected.
>>53617125
A quick hex dumper in C:#include <stdio.h>
#include <stdlib.h>
int main(int argc, char *argv[]) {
if(argc <= 1) {
puts("Usage:\nHexDump <file_to_dump> <file_to_save_to>");
puts("Specifing a file to save to is optional.");
return(0);
} else {
FILE *d;
int x, y, byte;
d = fopen(argv[1], "r");
if(!d) {
printf("Unable to open '%s'\n", argv[1]);
exit(1);
}
x = 0;
y = 0;
printf("Hex Dump of: < %s >\n", argv[1]);
printf("Offset 0 1 2 3 4 5 6 7 8 9 A B C D E F\n");
while((byte = fgetc(d)) != EOF) {
if(!(x % 16)) {
printf("x%08X | ", y);
}
printf("%02X ", byte);
x++;
if(!(x % 4)) {
printf("| ");
}
if(!(x % 16)) {
putchar('\n');
y++;
}
}
putchar('\n');
fclose(d);
}
return(0);
}
>>53620655int is_vowel(const char c)
{
const static VOWEL_COUNT = 8;
const static char vowels[] = {
'A', 'E', 'I', 'O', 'U',
'a', 'e', 'i', 'o', 'u'
};
int i;
for (i = 0; i < VOWEL_COUNT; i++)
{
if (c == vowels[i])
return 1;
}
return 0;
}
>>53620788
>8 vowels
Are you stupid?
Godamn you guys, ive embarrassed myself
I could have invoked the first method for everything on the second, why didnt you tell meeeepublic boolean isMultiple(int one, int two) {
return two % one == 0;
}
public boolean isMultiple(int one, int two, int three, int four, int five) {
return isMultiple(one,two) && isMultiple(one,three)
&& isMultiple(one,four) && isMultiple(one,five);
}
>>53620798
you're right, how silly of me, that's 4 vowels too many to checkint is_vowel(const char c)
{
const static VOWEL_COUNT = 5;
const static char vowels[] = {
'a', 'e', 'i', 'o', 'u'
};
int i;
for (i = 0; i < VOWEL_COUNT; i++)
{
if (tolower(c) == vowels[i])
return 1;
}
return 0;
}
>>53620808
>10 vowels
>nope it's 8
>okay let's subtract 4
>now it's 5
Go to sleep.
>>53620828
but there's only 5 vowels
Good night AND STOP STARING AT REVY'S THIGHS kthnx
Looking to get into Android Studio to create some basic apps in Java, maybe a Calculator to see how I fair.
Is there any tutorials that step you through the way and I will be able to understand what's going on with the code?
>>53620808
thats really bad c code.
>>53621196
explain
hey /g/
I'm trying to make this Window run while I'm doing some work on my Main thread
I've been reading a lot and it says I need to make a new thread for my window and then send something to a delegate so the window closes itself when I'm done but I kind of don't get that shit at all. Fuck, I should have taken a C# book out from the library.
Just made this to convert a file to BASE64char table[64] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
void ToBase64(char filename[1024])
{
int a, b, c;
FILE *in;
in = fopen(filename, "rb");
while(1)
{
a = fgetc(in);
if(a == EOF)
{
break;
}
b = fgetc(in);
if(b == EOF)
{
printf("%c", table[a >> 2]);
b = 0;
printf("%c", table[((((a<<6)&0b11000000)>>2)+(b>>4))]);
printf("==");
break;
}
c = fgetc(in);
if(c == EOF)
{
printf("%c", table[a >> 2]);
printf("%c", table[((((a<<6)&0b11000000)>>2)+(b>>4))]);
c = 0;
printf("%c", table[(((b&0b00001111)<<2)+(c>>6))]);
printf("=");
break;
}
printf("%c", table[a >> 2]);
printf("%c", table[((((a<<6)&0b11000000)>>2)+(b>>4))]);
printf("%c", table[(((b&0b00001111)<<2)+(c>>6))]);
printf("%c", table[c & 0b00111111]);
}
fclose(in);
printf("\n");
return 0;
}
>>53621296
do you even understand what you're bitshifting?
>>53621310
Well since i wrote everything, yes
>>53617247
I half assedley done a PL/SQL assignment a few weeks ago. started it the day before and some how got a 2:1 :L
>>53617674
>random
undefined*
>>53621296
Copy-pasting the same line three times won't get you far.
>>53618544
>Implying
I program in C.
>>53618544
>object oriental cartoons
okay I laughed
>>53621861
OCaml has 2/3 of those and Haskell has the other one.
>>53621834
>tfw i never noticed i could make a function out of those three lines
Well i guess thats what you get when an electronics major tries his hand at programming
Thanks for pointing that out
Working on a navigation mesh pathfinding system. Is there any rule of thumb for how many nav mesh nodes I want to make the program place in spots other than polygon corners in order to create more natural-looking paths and avoid wall hugging? I looked at Valve's famous L4D image and their placement of nodes outside of object corners/edges just seems completely random to me. Why would you subdivide all of that open space like that?
>>53622303
you make it be like it is and it do
>>53622105
http://www.valvesoftware.com/publications/2009/ai_systems_of_l4d_mike_booth.pdf
It's A*!
As predicted of course.
>>53622303
Without a range, substring prints all characters after what you specify by extracting the rest. In your case substring(2) would remove the 0,1,2 characters from the string.
>>53622374
thank you
>>53622343
this isn't for an AI program this is how to make a predefined path
>>53622105
i assume that your talking about strategy game lvl AI path finding. so what you need to do is draw a straight line to the object and find the shortest path by (lazy method) finding all the possible combinations of paths with every combination of nodes and any path that crosses another object adds another node to skirt around it. select the shortest path.if your codeing this it shouldn't be to hard as long as there arnt too many objects with this path finding, not too many objects to skirt around, and its running on a decent computer. this is taken right out of the first 2 age of empires AIs.
What gets printed?Why?
>this isn't for an AI program this is how to make a predefined path
sorry misspoke
not how to make an AI path finding program
>>53622524
the answer gets printed and if you dont say print than the computer just dose the problem and dosn't do anything with it. also i dont think you can add strings to intigers could be wrong
>>53622524
numbers
>>53622562
have you tried java
>>53622574
basic java and some others. i half to convert to string or integer depending.
DAMN ITS 1AM
im going to bed
>>53622608
never go to bed without faping
does anyone on /g/ studying programming at uni/college actually want to work in an office? or is everyone a startup fag
Anyone have the image where Rasmus (the creator of PHP) admits he has no idea what he's doing? It was a mashup of his quotes and twitter bio or something like that.
>>53622562
>>53622596
>>53622619
are you 12
>>53622630
a twelve year old who know basic programming architicure
>>53617282
>All my classmates think I'm a whiz kid because I ask a lot of questions
Thats how you become a whiz kid.
If you dont ask these questions you wont know the asnwers then you're just as useful as anyone else (not very)
>>53622663
le tricky hooky meme
>>53622524
I haven't tried it, and I'm not 100% about the semantics of this language, so this is a guess
12 (int+int+int)
345 (string of "3" concatenated with 4 makes string "34" concatenated with 5)
75 (int+int makes int 7 concatenated with a string "5")
756 (int+int makes int 7 concatenated with string "5" makes a string "75" concatenated with string "6")
>>53622619
ugh, porn addict
if i cant go to sleep i would do a bunch of push ups/sit ups or take a lap around the block. that puts me to sleep
>>53622724
its called my penis
>>53622736
dick or gtfo
>>53615366
Hey dependent-typing-in-C++ guy! I love your code! I don't have much time to comment right now tho. Note that you don't need to mark methods which are defined inside their class definition as inline, they are anyway automatically
How much ram do you need on a VPS to run Java Services? Is 512M enough?
>tfw know how to do University assignments
>can't bring myself to go through the code and do so much pointless annoying shit
I have made a huge mistake.
>>53622625
>want
I don't think that's the issue. That's what I will be doing if I can't find a job though.
>>53623022
What level are you?
If it's so easy then you have time for personal projects. When you get to OS and Compiler Arch you will feel the burn.
How do i access the other class without object or making static methods?public class Add {
public void multiple(int[] arr, int numb) {
for(int x = 0; x<arr.length;x++){
arr[x] = arr[x]+numb;
}
}
}
>>53623162
I think you can just do 'multiple()' without the 'Add.'
that or it's 'super.multiple'
I haven't used java for ages
OOP is dumb
>>53623184
HAHAha
>>53623162
>How do i access the other class without object or making static methods?
You don't. You can't.
Stuff in a class can only be accessed through instances (either directly for public members, or through instance methods for other members) or statically (either by using static methods or directly for public statics members only).
>>53622625
I would rather work at a large, successful company, than work at a startup. More job security, and quite possibly, more benefits.
>>53623132
>When you get to OS and Compiler Arch you will feel the burn.
This shit right here. Same with anything involving machine learning.
>>53623132
I'm 3 years in. I just want to listen to my weeb music and cry, not write a substandard kernel no-one will ever use.
>>53623185
what do you use?
>>53623162
Why is test extending add
what
are
you
doing
>>53623295
oh oops
i was "testing" things
>>53623470
>>53623273
whatever makes the nicest code
usually D-style functional programming / composition / generics
that sort of thing
If I'm doing something that's better implemented with global mutable state I just do it
It's great to get things done quickly and well, but I'd never get anywhere in the industry doing this because they all fell for the OO meme
>>53623424
There's clear and compelling reasons to use OO.
>>53623444
name three
>>53623474
>reasons to use OO.
generic plasticity
eliminates redundancy
inherent abstraction of sensitive data
>>53618270
>requiring all if statements to have braces
I do this too
>>53623493
>generic plasticity
a template system as capable as D's or (even) C++'s make these enormous unwieldy inheritance hierarchies that OO guys like to throw around completely pointless
>eliminates redundancy
the whole paradigm is redundant
what's the first thing you have to write in any java program?public static void main
a request that the language ignore the entirety of object oriented programming for a moment because every concept it introduces is superfluous
a concession that this whole 'everything is an object' meme is totally wrong
outside of those little toy examples with little pretty shapes inheriting each other, inheritance is almost useless
OO people can't write anything without trying to make up bullshit abstract noun classes so that they can pretend the 100 lines of procedural code they wanted to write is better implemented with 5000 lines of java where every function has parts of its definition hidden in 20 different files so they can 'reuse' it once
>inherent abstraction of sensitive data
What? You mean it does contract programming but worse?
Object orientation is fine in moderation, but when you have a language that demands you take an axe to your code, turn it inside out and stretch its skin over some sickly, meaningless object hierarchy, you get something truly horrifying
https://github.com/EnterpriseQualityCoding/FizzBuzzEnterpriseEdition/tree/master/src
don't pretend every java project doesn't start looking like that after a while
give me three better reasons
dammit guys I made a thread on r9k posting an email my teachers sent, but forgot to cover up the address. how fucked am i?
>>53623621
link
>>53623653
NO
im gonna stop posting school related shit on here from now on
HOW NICE IS R9K PLEASE???
>>53623621
>r9k
you deserve everything you get and even more
>>53623607
>hurr durr main exists!
>>53623697
/r9k/ is full of autistic neets who hate themselves, but more importantly, hate women and socially well adjusted people for indirectly making their lives hell.
>>53623698
no i dont
IM JUST A KID (over18)
>>53623709
Do you think they would have caught the thread so late? I deleted it like a minute after post
Also would they send an email to the teach? Would they cap the thread and show it?
>>53623726
Only if you gave them a reason to hate your guts.
>>53623754
Well i tried to post as if i was a desperate neet trying to grow out of my neetdom
>>53623766
yeah they hate you then
enjoy your email
>>53623793
okay actually i was asking for help to get a good letter to the teach, it was about a late assignment and I didnt want to mess up the opportunity so i asked for their service. They helped me before on an essay, as if they were professors themselves.
goodnight
i will sleep in fear
>>53622625
>>53623225
I work at a small, successful company. About 35 employees.
All the job security of a big corporation, with the free beer and like 2 months of paid time off of a startup.
/!\ REMINDER /!\
IF YOU CAN COMPILE WITH THIS IN YOUR CODE:int i = 2.5;
YOUR LANGUAGE IS SHITTIER THAN YOUR WAIFU
/!\ REMINDER /!\
(Uncommented, of course.)
>>53624101
You should not have a waifu if you type this kind of code.
Help me out please
How can I find a project or community to join and contribute to that will actually value me?
I have some programming skills.
>>53624101
If you're language complains about shit like this you don't deserve a waifu. Get a real language that doesn't hold your hand.
>>53624172
Consider getting a job, anon.
>>53624101
What's the problem? Can't into integer arithmetic? Do you need your language to wipe your ass for you too?
>>53624185
This, C/C++ is the Dark Souls 2 of the programming world, and they don't hold your hand like a child.
>>53624075
Sounds pretty cushy. Smaller companies are alright too, as long as they have an already established profit model. My big beef with startups (aside from a large number of them being located in a state that I do not desire to live in), is that most of them tend to fail because they're run by people who can't into business.
>>53619432
learn java
https://docs.oracle.com/javase/tutorial/
but seriously, if you want to learn C#, then buying some textbook is probably your best option. which book, i don't know.
>>53619158
>>53619432
Murach's C# is a good book to start with.
Honestly, the easiest way to learn C# is to do a few simple GUI applications after you understand the basics of using Visual Studio.
At that point, you're just Googling how to do each thing you want to do. Then you end up Googling less and less and just writing.
>>53624129
>>53624185
>>53624216
if you do anything beyond fizzbuzz (hahaha, i know you neckbeards don't) it could feasibly happen for example that you change from integer to float arithmetic in your processing and then you get degraded accuracy with no indication whatsoever that something's is wrong
>>53624721
*and forget to change the type in one place
>>53619432
I don't really remember how I learned C#, but I'm pretty sure knowing C/C++ helped me A TON. IIRC I just started to mess around WinForms and .NET in general, it is really pretty straightforward and if there's something you don't understand (most likely because you don't know what the code is doing) there's plenty of documentation / tutorials / stackoverflow questions and really a lot more.
Hey, Im new to programming, about to hand in an assignment, and I have ran into a bug.
my assignment wants me to animate a simple 2d tank that places it self back into place when mouse pressed and changes color when key pressed. however after the half way point it wont change color if the tank has not been reset. im coding in Processing, also general tips for cleaning up my code and being more efficient would be appreciated.
http://pastebin.com/dY6zQf4Q
fucking C sperg neckbards suck balls at programming and only use C because they're unable to understand higher level languages like C++
>>53618703
>rain dancing around a compiler
it may just be the drugs but this mental image is great.
>>53624786void mousePressed(){ //This resets the position of the tank
a= 92;
b = 140;
c = 190;
d = 240;
e = 288;
g = 64;
g1 = 120;
h = 121;
h1 = 260;
i = 261;
i1 = 320;
j = 191;
k = 192;
l = 252;
l1 = 298;
l2 = 326;
}
IT HURTS TO LIVE
>>53624831
>hey im new to programming
>also general tips for cleaning up my code and being more efficient would be appreciated.
thought this was a place for criticism ?
>>53624787
fucking C++ sperg neckbards suck balls at programming and only use C++ because they're unable to understand elegant languages like C
>>53624840
>a place for criticism
to say the least
>>53624786
Your code formatting is shit.
You have way too many variables.
Your variable names are shit.
Your have ridiculous amounts of duplication; use a loop or some shit
Honestly, I'm not even sure what language you're writing in.
>>53624840
You have magic numbers everywhere.
You're dealing in absolutes when you should be dealing in relativity.
If I'm at (2,2) and I want to move to places to the right I will be at (4,2).
I do not set my location to (4,2).
I add 2 to my x-axis location.color m1 = color(196,162,75);
color m2 = color(17,144,16);
color m3 = color(206,89,46);
Use MEANINGFUL variable names.
Name these 'blue', 'green', or 'red'.
Even ColorRed would be fine.text("ITEC 102 - Assignment 1",600,20); // This is the text.
Use MEANINGFUL comments.
Everyone knows it's text, dipshit. Stop insulting people.
Try to comment the WHY not the WHAT.fill(0,0,255);// The blue colour for the text
You defined color variables above, and now you're setting this one manually. Make up your mind.
At least you told us with the hell 0,0,255 was this time.
I can keep going if this is helpful at all.
>>53618336ArrayList<Integer> list = new ArrayList<>();
list.set(-1, 0);
That should throw IndexOutOfBoundsException
>>53624937
please, im here to learn from my mistakes and get better
How hard is HTML? I want to make a website to educate people about the truth of Islam and how it's not the cause of these terrorist attacks and we shouldn't be scared of the refugees.
>>53624937
also not asking for you to do my assignment for me or anything, but how can i use less variables?
>>53624965
>>53624984
Anon already gave you a bunch of advice. If you want help, the most important is to indent your code properly and to use proper variable names. Nobody is going to help you if they need to spend an hour first deciphering your code.
I have to make some kind of "troll" program in visual c# for april 1st as an assingment in school and since my imagination is shit, I'm asking you anons for ideas. Nothing fancy only beginner level shit.
>>53625644
shitpost generator
>>53625677
How are these shitposts generated?
>>53625734
babby's first Markov chains.
Number selector that you see allows for different magnitudes of connections, higher being more englishy, but tends to just imitate the posts if there isn't enough material.
Low ends up in gibberish, but it somewhat humorous; pic related.
You can generate based on a keyword, which just generates results and tosses those that don't contain the keyword. Application crashes if keyword is too complex or not found at the moment.
>good leard shitposts!
>>53625788
>babby's first Markov chains.
That's what I figured. I've never bothered to jerk around with them before, though. Any good resources?
>>53625819
Why would you want to? You saw the result, intelligible gibberish.
>>53625822
>Why would you want to?
Fun? It's the same reason I invented my own shitty lisp.
>>53625819
Here's the website I was looking through when I implemented it on 4chan's APIs:
http://www.informit.com/guides/content.aspx?g=dotnet&seqNum=745
>>53625822
It's actually passed a Turing test (so to speak) on some other boards multiple times.
>>53625863
Thanks, m8.
Lads anyone know what this "697yqf3e3d9e3ej6d80y34y7jqh" could be? Is it info hash?
>>53625917
Me when I program blackout drunk. Translates to "if".
Need some help connect to remote ssh server with socks proxy on Golang.
https://stackoverflow.com/questions/36102036/how-to-connect-remote-ssh-server-with-socks-proxy
What i do wrong?
>>53625917
sixty nine sex
7 years
queef
Be Bed Niney Bej
Apartment 6D, 80 years of Rule 34
Year 7 of Jewish Questions
Helsing
http://pastebin.com/BXH10v5e
What's wrong with this one?
Code compiles but when I run it it doesn't do anything, as if it's running forever, but it shouldn't take time to compute.
It's Project Euler problem 7, by the way.
Can functions be used in conditionals in C like in Python? (I mean since they return 0 or 1).
>>53626054
In nth_prime, when iter=9 the while loop never exits.
>>53626101
Ignore this, I'm retarded.
>>53626054
Inp<pow(n, 0.5+1), shouldn't it bep < pow(n, 0.5)]? This is probably causing your code to slow down significantly.
Also, it should probably bewhile (p*p < n). This is nicer and faster.
>>53626127
im the retard here ;(
>>53626145
yeah you are correct i fucked up the parenthesis, but it still does the same thing when i run it?
So I got a couple of functions to study, trying to figure out what these ones do
>>53626179
Your while loop in is_prime is missing braces.
>>53626194
interesting blogpost, friend
you didnt mean to ask a question or something, right?
>>53618270
nasa does this too
>>53626215
fuck fuck fuck
how could i miss that
thanks m8, excuse my shitting up the thread
>>53626217
yeah the subject of class was what reduce, map, and filter functions, I think I have the concepts of them down but I just need to figure out how to get something to print from these functions.
For the first function even if I put something into x and print it out I still get nothing
Reading C Primer Plus because I can't program yet. I'm easily distracted and have been in chapter 1 for a few weeks now. I'm always behind on anime and YouTube videos so I feel like I should be catching up on those before reading.
Learned what jove was yesterday. Must not be that great to only be mentioned in this book. I don't use emacs, but isn't removing lisp just making it worse? I thought lisp was GOAT.
what small project could I do to practice pointers?
>>53617949
Minecraft modding always needs more people. If you make a decent mod or contribute to one you'll have a thousand fans on your dick overnight.
Is head first c# a bad book?
>>53626416
dive in head first and try it
I've heard it's good anyway
>>53624101
Integers read until a non-int delim. Still better than dynamic typing.
>>53626217
>What are you working on half-assedly?
Pretty sure you're the dumbass here, pedantic fuck.
>>53626194
Run some test input through 'em.
1500+ LoC Python
WHHAAAAT
https://github.com/riccardoscalco/Pykov/blob/master/pykov.py
Need ideas for a cool project to add to my resume...
Currently uninspired since I keep doing terribly in interviews.
>>53625644
any more ideas?
am i dumb for waiting until the summer after my junior year to try to get an internship? is 1 internship experience enough to get a job?
>>53626764
>is 1 internship experience enough to get a job?
Yep, usually. Just make sure you do as many things in that internship as possible. Don't just stick to one area, summer internships are not long enough to gain useful experience in a subject.
>>53626653
1000 lines of comments.
>>53626678
>doing terribly in interviews
Why? Nervous? Don't know the material?
As for a project you don't have to do anything super large. I've seen people put school projects on their resume because they think that's impressive or something. Make it something "useful" (completely useless) and facile, make sure it has a GUI. Assuming you are applying to a place that does programming mainly (which is usually just web dev and mobile applications now) and not an engineering-focused corporation. Managers don't like to see very academic projects on resumes, makes them think you'll go to graduate school after you graduate and not into a job there.
>>53626040
>Year 7 of Jewish Questions
fuggg
>>53626920
little of both
i recently interviewed for my dream job and couldn't do binary search...
i only had time to review the first two chapters of cracking the code interview...
>>53627005
>couldn't do binary search...
Maybe you should wait to apply for jobs until you've taken Data and Algo, my dude. Or if you aren't in Uni, get a book on Data Structures and Algorithms and read the entire thing. BST traversal is basic stuff, some book specifically dealing with interview questions isn't going to help you with the basics.
How do I remove an element in a map?
I tried removing the node itself and have the node before it point to the next one, but it seems inefficient once it becomes a huge list.
Maybe replacing the node to be removed with the pair in the next node and deleting said node, but the contents in the pair are const.
This is more Web Development, but do any of you sexy boys know anything about Apples Safari Reader?
The little tool that let's you read the content while blocking out everything else on the page in Safari.
It seems to block out many block level elements like Divs, and any elements that have short amount of text.
The documentation by Apple on it is absolute garbage and my boss wants our site to work well with the Safari Reader.
A program that count new lines, spaces and tabs. IT counts properly but it doesn't close when given 'n'. What I fucked up?/*programa super util que conta espaços*/
#include <stdio.h>
#include <stdlib.h>
int e, l, t;
char c,d;
main ()
{
e=0;
l=0;
t=0;
printf ("Digite a frase que gostaria de contar\n");
while((c=getchar())!=EOF)
{
if(c==' ')
++e;
if(c=='\n')
++l;
if(c=='t')
++t;
}
printf("O numero de espaços é de %d, o de linhas é %d e o de tabs é %d\nVoce gostaria de contar outra frase?(y/n)\n", e, l, t);
if((d=getchar() ||d=='y'||d=='Y'))
{
return main();
}
else
{
printf("Adeus!");
exit;
}
}
>>53627114
Firefox also has Reader View, perhaps it has better documentation?
>>53627178
Everything. Just go back to making porches.
my chinese professor's parring web devs so hard right now. "you think this is hard? you will be 40 years old making websites, making UI. your boss will tell you make button bigger. make shaded. you will have no money, no house, no wife, no friends. this is not hard, pay attention!"
my sides are in orbit
>>53627178
programming in any other language than english
>lol
>>53627104
>How do I remove an element in a map?
>I tried removing the node itself and have the node before it point to the next one,
That's exactly how you do it. Keep the previous node cached during the search, update previous cached node after deletion.
>>53627178
You have to make a case that catches 'n' and returns or calls exit(). How else are you going to make it do that besides writing code to make it do that.
>>53626653
that's a lot of comments
>>53627199
KEK
high neanderthal DNA masterrace
>>53627178
>int e, l, t;
char c,d;
Fucking stop this shit.
>>53627193
I don't like making porches, the only thing I do well is your mother.
>>53627525
My mother has self-respect and isn't a race traitor. She could also probably program better than you.
>>>/tacopaco/
what would you recommend to a beginner who wants to learn C++/JavaScript/VisualBasic programming?
>>53627559
no, your skills are obsolete
learn MongoDB + Express + Angular + Node.js
>>53627559
You can kill yourself.
Wait, you only know c++ so you would probably kill everyone in the family except for yourself.
there's LITERALLY nothing wrong with C++. prove me wrong
>>53627604
It's not C.
>>53627532
Not him but he is not typing in spanish ,Cleetus. It's portuguese.
>>53627178
/g/, why am I yet to see any good code produced by non-english speakers? Why are they so terrible?
>>53627551
VisualBasic for sure, although I will admit I learned VB with pseudo code but VB is so different that when I was going to C++ it made it harder to learn. I don't mean declaring variables but passing and modules and cases I understand the logic but C++ syntax is so different. I wish I learned C++ or C#. Java is just as easy but my company moved away from because of all the security updates it began to system rot.
>>53627637
It's the same shit
It is backward compatible with C.
Still with subtle differences that make some C code unable to compile in a C++ compiler.
The standard libraries offer very poor functionalities compared to other languages' runtimes and frameworks.
C++ doesn't enforce a single paradigm. Neither procedural nor object-oriented paradigms are enforced, resulting in unnecessary complication. [Some people consider this as an advantage.]
Too hard to implement and to learn: the specification has grown to over 1000 pages.
Not suitable for low level system development and quickly becomes a mess for user level applications.
The standard has no implementation for exception handling and name mangling. This makes cross-compiler object code incompatible.
No widely used OS supports the C++ ABI for syscalls.
What is 's', a function or a variable?
std::string s();
Answer: it's actually a function; for a variable, you have to omit the parentheses; but this is confusing since you use usually the parentheses to pass arguments to the constructor.
The value-initialized variable 's' would have to be:
std::string s = s(); /* or */ std::string s{};
Horrid Unicode support.
Operators can be overloaded only if there's at least one class parameter.
This also makes impossible concatenating character array strings, sometimes leading programmers to use horrible C functions such as strcat.
catch (...) doesn't allow to know the type of exception.
throw in function signatures is perfectly useless.
The exception system is not integrated with the platform: dereferencing a NULL pointer will not throw a C++ exception. [Some people consider this as an advantage.]
mutable is hard to use reasonably and, since it fucks up const and thus thread safety, it can easily bring to subtle concurrency bugs.
>>53627673
They sound absolutely nothing alike.
>>53627604
Closures have to be expressed explicitly in lambda expressions (never heard about anything like that in any functional language).
You can use [=] and enclose everything, but that still adds verbosity.
The nature of C++ has led developers to write compiler dependent code, creating incompatibility between different compilers and even different versions of the same compiler.
An std::string::c_str() call is required to convert an std::string to a char*. From the most powerful language ever we would have all appreciated a damn overloaded operator const char* () const.
Developers may have to worry about optimization matters such as whether declaring a function inline or not; and, once they've decided to do it, it is only a suggestion: the compiler may decide that was an incorrect suggestion and not follow it. What's the point? Shouldn't developers worry about optimization matters?
To rectify this nonsense many compilers implement __forceinline or similar.
Templates are Turing-complete, hence compilers have to solve the halting problem (undecidable) to figure out whether a code will even compile.
Unused global symbols do not generate any warnings or errors, they are compiled and simply increase the size of the generated object file.
>>53627730
I assume he meant in terms of worth.
>>53627739
racist
>>53627735
>__forceinline
You're gonna love this this. Even if you use that the compilers might ignore it. I've seen it happen.
In my C textbook I came across this code. It's a simple prime number array program but the second 'for' loop I am struggling to wrap my head around.
When it analyses the number 5, I thought that the conditionp / primes[i] > primes[i]would never be satisfied as 5/3 < 3. But when I copied it into my compiler it works fine. What is going on?#include <stdio.h>
int main()
{
int p, i, primes[50], primeIndex = 2;
_Bool isPrime;
primes[0]=2;
primes[1]=3;
//printf("%i\n\n", 5/primes[2]);
for(p=5; p<=10; p = p+2)
{
isPrime=1;
for(i=1 ; isPrime && p / primes[i] > primes[i] ; ++i) //This shit right here
{
if(p % primes[i] == 0)
isPrime = 0;
}
if(isPrime==1)
{
primes[primeIndex] = p;
++primeIndex;
}
}
for(i=0 ; i < primeIndex ; ++i)
{
printf("%i \n", primes[i]);
}
printf("\n");
return 0;
}
>>53627765
White is right, get over it.
>>53627812
Black is wack.
def function_one(my_list):
x = []
for i in range(0,len(my_list),2):
x.extend([my_list[i]])
print(x)
function_one("naggers")
So apparently what this program does is take every second word from the original word given then prints it out.
However the original piece of code was this, why does the second code print nothing while the first one does? Am I misunderstanding how to use return?def function_one(my_list):
x = []
for i in range(0,len(my_list),2):
x.extend([my_list[i]])
return(x)
function_one("naggers")
>>53627806
5 is a prime, it ignores i loop and push it to prime array. what is wrong?
>>53627832
>Am I misunderstanding how to use return?
yes
use the doc
Tfw bad at programming.
>>53627869
I don't understand why it skips the loop. The condition (5/3 < 3) isn't being met
>>53627884
Keep at 'er.
Tfw good at programming.
>>53627923
because 5%3 is not 0? it checks all previously found primes with p. if it finds a i that divides p, it marks it as not-prime and breaks the loop.
Whats a good indentation look for python where theres loads ofand and and...
see picture
>>53627965
I can see that. But it doesn't satisfy the conditionp / primes[i] > primes[i]in the 'for' loop at any point. Wouldn't it then proceed to primes[2] (which hasn't even been initialised yet) and so on and so on and just loop indefinitely?
Sorry if I'm not explaining it particularly well, I'm new to programming.
>>53628005
you can put entire condition in brackets and then put every 'and' in new line
>>53628005if a
and
b
and
c
and
d
and
e:
>>53628035
my bad, it never iterates inside of for loop for 5 because is for i=1, (5/3 < 3) is false, it simply skips the loop. it does not check for i=2.
for loops are like
for(init; condition; after) statement
it runs init once, then before each iteration of loop it checks if condition is true. if it is true, then it execute statement and do the after part. then it moves to next iteration and checks again if condition true and repeats this until it is false.
in this case condition is false after running init part and it breaks the loop without running statement at all
>>53628005
multi line is allowed inside parenthesesif ( input('a').count > 1
and input.startswith('a')
and input.endswith('a')):
self.do_some_shit()
>>53628100
>>53628139
it looks like shit :(
and pep8 wants line ending with "and"
and it would also scream if result of after the :
would be at the same indentation
no solultion seems pretty and readable, and I already have above that few ifs:
>>53628139
>>53628132
lol, python fags learned that enforced white spaces does not work so they have to make some compromises
does something like this worka = (b
and c)
>>53628135
Got it, thanks anon.
/!\ A L E R T /!\
New thread
>>53628171
>>53628171
>>53628171
/!\ A L E R T /!\
>tadpole operator
>>53628160
are you retarded ? literally every practicable programming languages enforce white spaces.
>>53628192b = -~a; // b = a+1;
it is a great operator. I love c14
>>53628219
>sperm cell operator
>>53628247
yeah, it is jokingly called like that at my work place! -~a is 'a-impregnated'
>>53628247
>>53628270int main(){
int a = 1;
printf("%d\n", -~-~-~-~a); //5
}
it is a bukkake
>>53617416
I would seriously kill to get out of that job
>>53628544
yeah, I was in embedded for ~2 years. worst job ever. It wasn't even that 'embedded', it was smart tvs but still sucks your soul. in two years, I pretty much learned nothing at job
>>53628202
>>53628247
>>53628270
>>53628296
Sperm operators in a tryhard fizzbuzz.
How can I write fizzbuzz in the shortest possible amount of code in c++?
>>53628966main(i){for(;i<101;puts(i++%5?"":"Buzz"))printf(i%3?i%5?"%d":"":"Fizz");}
>>53628966#include <iostream>
#define d(a,b) a b
#define _(a,b) d(#b,#a)
#define b(b) _(b,b)
#define y _(i,f)c
#define x _(u,b)c
#define c b(z)
#define i int
#define p main
#define s char
#define q 810092048
#define h for
#define m 48
#define a ++
#define e ==
#define g 58
#define n 49
#define l <<
#define oe std::cout<<
#define v '\n'
int p (i, s*t ){i j = q;h (*(
i * ) t = m ; 2 [ t
]? 0 : 1 ??( t ] ? a
1 [ t ] e g ? 1 [ t
] = 48, ++0 ??( t]e g?0 ??(
t]= n ,1[ t]=
2 [ t ]
=m : 1 :
1 : a 0
[ t ??) ==g
?0[ t ] =49 ,1[
t ] = m : 1
;j= ( j / 4
) | ( ( j &
3)l 28) )oe (j&
3?j & 1?j &2?
y x : y
:x : t )
l v ; }
i f =m& ~g;
>>53629004
not standard disgusting
>>53628966int n=0;
while(n!=100)
{
n++;
if(n==3|n==6|n==9|n==12|n==15|n==18|n==21|n==24|n==27|n==30|n==33|n==36|n==39|n==42|n==45|n==48|n==51|n==54|n==57|n==60|n==63|n==66|n==69|n==72|n==75|n==78|n==81|n==84|n==87|n==90|n==93|n==96|n==99){std::cout<<"fizz\n";};
if(n==5|n==10|n==15|n==20|n==25|n==30|n==35|n==40|n==45|n==50|n==55|n==60|n==65|n==70|n==75|n==80|n==85|n==90|n==95|n==100){std::cout<<"buzz\n";};
}
>>53629057#include<iostream>
int i;int main(){for(auto&o=std::cout;++i<101;o<<'\n')i%3?o:o<<"Fizz",i%5?i%3?o<<i:o:o<<"Buzz";}
>>53629004
what he said >>53629057
>>53629027
copied straight from the obfuscation codegolf stackexchange post
>>53629075
would be cool if it worked, everything is either fizz or buzz
>>53629088
Thank you, one that actually works.
>>53629169
My bad.int n=0;
while(n!=100)
{
n++;
if((n==3|n==6|n==9|n==12|n==15|n==18|n==21|n==24|n==27|n==30|n==33|n==36|n==39|n==42|n==45|n==48|n==51|n==54|n==57|n==60|n==63|n==66|n==69|n==72|n==75|
n==78|n==81|n==84|n==87|n==90|n==93|n==96|n==99)&(n==5|n==10|n==15|n==20|n==25|n==30|n==35|n==40|n==45|n==50|n==55|n==60|n==65|n==70|n==75|n==80|n==85|
n==90|n==95|n==100)){std::cout<<"fizzbuzz\n";}
else if(n==3|n==6|n==9|n==12|n==15|n==18|n==21|n==24|n==27|n==30|n==33|n==36|n==39|n==42|n==45|n==48|n==51|n==54|n==57|n==60|n==63|n==66|n==69|n==72|n==75|
n==78|n==81|n==84|n==87|n==90|n==93|n==96|n==99){std::cout<<"fizz\n";}
else if(n==5|n==10|n==15|n==20|n==25|n==30|n==35|n==40|n==45|n==50|n==55|n==60|n==65|n==70|n==75|n==80|n==85|n==90|n==95|n==100){std::cout<<"buzz\n";}
else{std::cout<<n<<'\n';};
}
What's the name of the anime in op's picture?