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

/dpt/ - Daily Programming Thread

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 313
Thread images: 37

File: K&R himegoto waifux2.png (1MB, 1000x1400px) Image search: [Google]
K&R himegoto waifux2.png
1MB, 1000x1400px
old thread: >>52356915

What are you working on, /g/?
>>
I'm working on code reading after finishing K&R C.
>>
>>52361824

import Data.Numbers.Primes

fizzbuzz x =
case (isPrime x, x `rem` 3, x `rem` 5) of
(true, 0, 0) -> "fizzbuzz"
(true, 0, _) -> "fizz"
(true, _, 0) -> "buzz"
otherwise -> show x

main = mapM_ (putStrLn . fizzbuzz) [1..100]
>>
I'm working on you all being weeb trash.

You should probably commit sudoku.
>>
>>52361933
What is code reading?
>>
>/dpt/ can't even do the fizzbuzz sieve

Write a program that takes every number 1-100
If it's a prime and a multiple of 3 and 5, output fizzbuzz
If it's a prime and a multiple of 3 but not 5, output fizz
If it's a prime and a multiple of 5 but not 3, output buzz
>>
>>52361956
Reading the programs of people you admire. In my case, reading FreeBSD source code.
>>
>>52361969
(otherwise output the number)
>>
>>52361969
Why is it called sieve?
>>
>>52361980
Filtering for primes is called prime sieving
>>
nth for nim
http://nim-lang.org/
really happy with it, it's a lot like python, but compiled & statically typed
could use more libraries tho
>>
File: 1355901816582.jpg (33KB, 423x474px) Image search: [Google]
1355901816582.jpg
33KB, 423x474px
>>52361991
But the condition must be tantamount, not iterative and in a loop...

What gives, anon? I trusted you..
>>
>>52361933
This guy. First useful C program.
#include <stdio.h>

int main()
{
int x;
printf("1\n2\nfizz\n4\nbuzz\n");
for (x = 4; x < 101; x++) printf("%d\n",x);
}
>>
>>52362036
looks sweet senpai

>>52362044
explain to me how /dpt/ had only a 50% success rate at that fucking prime fizzbuzz challenge
>>
>>52362060
The question was in ebonics
>>
>>52362056
congratulations

btw you can declare the int inside the first statement (within the brackets) of the for loop

for (int x = 4; x < 101; x++)
>>
>>52362056
Shit, it repeated 4. Otherwise all good.
My apologies, anons.
>>
>>52362080
i forgive you
>>
>>52362073
Interesting. What's the scope of that?
I don't really see a problem with creating all variables at the beginning of my program. Are there any benefits?
>>
Nim looks even better than I thought.


>>52362100
The scope is within the loop
>>
>>52361951
since haskell does matching from left to right, you can optimize this greatly by putting the isPrime check last.
you can optimize it even more by realizing the only primes that have 3 and 5 as factors are 3 and 5 themselves.
>>
>>52362036
Glad to see another nimfriend in our midst.
>>
File: 1440878618134.jpg (185KB, 468x500px) Image search: [Google]
1440878618134.jpg
185KB, 468x500px
I have a few questions regarding Python conventions.

If you declared some functions to be used by some other functions, do you put them before or after the functions which will use them? That is, which is correct:

1 -
def mainmethod():
function1()
function2()

def function1():
#...
pass


or

def function1():
#...
pass

def mainmethod():
function1()
function2()

Also, what about variables? Do the same rules apply?

And what commenting and naming practices do you recommend?
>>
Nobody helped me with my chem problem


ughhhhhh


lucky it's just the first day. I will compile a list tomorrow after calculus
>>
>>52362073
>not supporting C89
>>
>>52362206
If it's a single pass read like in a regular .cpp file then build your variables and functions and then call them in a later function, otherwise if you are using a class you can build them in whatever order you'd like as the processor will fetch from a mapped class.
>>
>>52362206
I prefer to put the main function at the bottom

don't think there's conventions for the rest. would be impossible to determine the order in tightly coupled code anyway
>>
>>52362215
There is no reason to use C89 in 2016.
>>
>>52362254
It's almost as if you don't want compatibility with the only relevant C compiler in 2016, MSVC.
>>
>>52362260
I know that you're just baiting, but they actually support most of C99 now.
>>
But is there an actual advantage to not declaring variables at the beginning of main?
>>
>>52362277
it might save memory
>>
>>52362277
int some_long_function()
{
int i,j,k,l,ii,iii,ij,i2,i3,k2,x,y,xz; // loop counters

/// (code)
}
>>
>>52362277
Reduced scope, real const variables, nicer to look at code.
>>
help me, I got addicted to playing vidyagames, specifically minecraft with computercraft and programmable turtles :/

my addiction is keeping me away from developing my system management and monitoring software. I feel defeated :C

I wanted to learn lua anyways tho, so I guess this is a fun way to learn the basics
>>
i'm only 10 minutes into learning javascript and I already hate it.
/* bool */ function isblank(/* char * */ s)
{
/* int */ var i;
for (i = 0; i < s.length; i++)
{
/* char */ var c = s.charAt(i);
if ((c != ' ') && (c != '\n') && (c != '\t'))
return false;
}
return true;
}
>>
Working on lifegame, python.
>>
>>52362313
holy shit, why are you ruining beautiful code with those horrible in-line comments?
>>
>>52362295
I see.
You could probably reuse a few counters though.
>>
>>52362326
Yes, you could

int some_other_function()
{
for (unsigned int i = 0; i < 500; i++)
/*do something*/ ;

for (unsigned int i = 0; i < 500; i++)
/*do something*/ ;

for (float i = 0.5f; i < 5.f; i+=0.3f) //never do this
/*do something*/ ;

for (int i = 0; i < 500; i++)
/*do something*/ ;
}
>>
>>52362344
why would anyone use floats in loop counters?
>>
File: Untitled.png (27KB, 459x1425px) Image search: [Google]
Untitled.png
27KB, 459x1425px
https://github.com/logicchains/LPATHBench/blob/master/writeup.md
>>
>>52362325
It's an art thing. The code is lost in negative space. You wouldn't understand.
>>
>>52362350
cartesian grid mapping

saving cycles on an inner loop that will run differently at particular times.
>>
>>52362350
to fuck with autists and people who suffer from OCD
>>
>>52362363
cant you just do that with normal integers?
>>
>>52362353
Conclusion:
Use nim
>>
>>52362384
This
>>
>>52362353
(The top two use a different algorithm and aren't meant for comparing /language/ performance)
>>
>>52362378
while(average(x,y,x) != 1) {

/* do shit */
}
>>
>>52362416
But anon, /dpt/ keeps telling me that averages are meant to return integers
>>
>>52362447
does /dpt/'s definition of average mean integer division or floating point?
>>
>>52362447
No one has ever said this
>>
Reposting because haven't received any valid criticism:
I'm not an F# shill, but I'm learning it and I don't get why so many people claim it is poorly designer...
Surely it has a lot of flaws, mainly because of interoperability with .NET, which sometimes makes it less appealing than both functional or imperative alternatives, but most of the time the compromises in it seem worthy to me...
>>
>>52362350
To loop over floats.
>>
>>52362463
>sure it has a lot of flaws
that's why

fuck off F# shill
>>
>>52362463
Saying "I'm not an F# shill" doesn't make you not an F# shill.
>>
>>52362473
>valid criticism
>>
>>52362473
>>52362479
>>52362485

>/dpt/'s ongoing prejudice against F#
The future will either be F# or Nim
>>
>>52362479
I like it, I spent the last two week reading an F# book, I hope it is't a meme, but I wouldn't defend it in an argument...
>>
how is luajit so good
>>
>>52362534
cuck
>>
File: ama.webm (2MB, 1280x720px) Image search: [Google]
ama.webm
2MB, 1280x720px
Ask your favorite programming literate anything.
>>
>>52362573
What's the time?
>>
>>52362581
I feel like the longer you take the less useful the answer becomes
>>
>>52362581
python -c "import time;print(time.asctime())"


Mon Jan 11 20:05:47 2016
>>
>>52362633
>importing the whole time module just for one function
>>
What is time?
>>
>>52362645
a function of entropy in euclidean space
>>
>>52362633
>function to print the current time
>written in god damn python

What's the precision on that? Nearest hour?
>>
>>52362645
What is love?
>>
>>52362153
I'm not very bright

>tfw dropped out of high school
>>
>>52362657
the precision is to the nearest second in asctime

if you mean the accuracy then the answer is that it depends on how long it takes to run
>>
File: milk.webm (3MB, 1280x720px) Image search: [Google]
milk.webm
3MB, 1280x720px
>>52362642
cpython imports the whole module anyway and
import asctime from time;print(asctime())
is longer

>>52362657
https://docs.python.org/3/library/time.html#time.time
>>
>Gets a pull request
>Looks at it
>Commit message is "update"
>No description
>Looks at person's profile
>Hundreds of PRs exactly the same
>>
File: python.jpg (435KB, 2000x1334px) Image search: [Google]
python.jpg
435KB, 2000x1334px
>>52362679
>that depends on how long it takes to run
that'sthejoke
>>
import Love;
>>
File: snek.jpg (980KB, 2432x4320px) Image search: [Google]
snek.jpg
980KB, 2432x4320px
>reading alexandrescu's book on D
>Array accesses are bounds checked; code that enjoys risking buffer overruns can scare the pointer out of the array
what did he mean by this?
>>
>>52362690
Did you accept their pull request?
>>
>>52362710
probably *(&arr[0] + k) in C
>>
>>52362706
Error: module Love is in file 'Love.d' which cannot be read
>>
>>52362719
>implying Love.d could be found
>>
>>52362718
>&arr[0]
>&*(arr + 0)

why.jpg
>>
File: monkey.webm (3MB, 640x480px) Image search: [Google]
monkey.webm
3MB, 640x480px
>>52362710
the [] operator also work on pointers like with c and c++

int[100] foo;
int *p = &foo[0];
p[99] = 44; // no checking done.
>>
>>52362733
in some languages you can't just dereference an array or dereferencing an array doesn't do what you want

if it's contiguous memory and [] is a proper access operator and 0 is the first element, mine will work

e.g. std::vector
>>
>>52362693
which you managed to screw up by referring to precision rather than accuracy. You continue to look stupid by not having realised this.
>>
>>52362744
>in C
>>
File: Screenshot - 110116 - 21:19:48.png (10KB, 562x47px) Image search: [Google]
Screenshot - 110116 - 21:19:48.png
10KB, 562x47px
>>52362729
>>
>>52362746
It wasn't a very precise joke
>>
>>52362756
i've been D. Trumped
i will commit son goku immediately
>>
>>52362757
redeemed
>>
How do you commit sudoku to github?
>>
>>52362787
git commit -m 'sudoku'
git push
>>
>>52362798
>5232798
You're a thousand posts too late
>>
Whatever happened to Valutron or Pipes or whatever the fuck that retarded shit was called?
>>
>>52362827
Valutron got dereferenced while pipes | out
>>
>>52362711
I've requested they fix the message. No response yet.

It's bullshit though. How hard is to say "hey, here's what I've done".
>>
has anyone here ever actually finished a project
>>
>>52362875
>has anyone here ever actually finished a project
I finished the project where I banged your mum lol
>>
>>52362855

I got a similar one with these stats:


Commits 25  Files changed 107
+4,707 −9,205 13,912 lines changed
>>
>>52362882
:/
>>
>>52362875
yes
>>
>>52362904
it doesn't count if you were paid or required to do it

teach me how to not get bored
>>
>mfw reading statically typed cancer
>>
>>52362933
type inference
>>
Daily reminder that ocaml is shit compared to nim which is

>more efficient
>more expressive
>more extensive
>more powerful
>more performant
>not shit
>>
>>52362952
Daily reminder that both are obscure as fuck.
>>
>>52362933
>dynamic typing
>not cancer
>significant whitespace
>not cancer
>slow as fuck interpreted langs
>not cancer
I want python babbies out
>>
>>52362875
finished my mum shagging project by banging the piss out of your mum

also, yes I have. it was in thousands of lines complete with unittests. great feeling tbqh.
>>
>>52362983
nim is only 8 years old
ocaml is nearing 20
>>
>>52362875
Yes
>>
>>52362952
Daiy reminder that everything is shit compared to D which is

>literally perfect
>>
>>52362996
>worse performance than nim
>less feature complete than nim
>less powerful than nim
>less extensive than nim
>worse at systems programming, its goal, than nim
>>
>>52362985
>muh compile time errors
Get out
>>
>>52362985
>python babbies
>implying all the oldschool c/c++/java programmers haven't switched to python
>implying anyone other than hipsters still use compiled, statically typed languages
>>
>>52362991
>8 years old
>no traction at all

Go is 7 years old
Rust is 7 years old
Swift is 18 months old

They're all considerably more used than both nim and OCaml
>>
>>52363004
>>52363001
>I would rather have errors cause complicated problems at runtime than show up plainly at compile time with line numbers to show what went wrong an where
okay m8
>>
>>52363000
>>worse performance than nim
need sources
>>
>>52363019
Typo, Rust is 5 years old.
>>
>>52363027
>my code contains errors 'cause I'm a dumbass but at least the compiler will hold my hand
GTFO
>>
>>52363000
>[citation needed]: the post
>>
File: 1451757804978.jpg (44KB, 312x322px) Image search: [Google]
1451757804978.jpg
44KB, 312x322px
>>52362573
wat animu is that? is it good?
>>
>>52363029
see thread

>>52363043
>i'm a slow programmer
>>
>>52363043
>my code never contains errors
translation:
>I have never written more than 1000 LoC in my entire life
>>
>>52363027
>I have no idea what unit tests, regression tests, system tests are automated use case tests
>I would rather delay a project by several months hunting down some memory leak problem that was introduced a gazillion versions ago but wasn't significant until our user base suddenly jumped from 200 to 20000

inb4 hurr durr higher level programming languages such as C# and Java
These are meme languages used by poo in loos and in ENTERPRISE QUALITY software, and you know it.
>>
http://forum.dlang.org/thread/[email protected]
>>
>>52361969
>If it's a prime and a multiple of 3 and 5
i'm not sure you know what a prime is
>>
File: dpt fails again.png (37KB, 743x610px) Image search: [Google]
dpt fails again.png
37KB, 743x610px
>>52363069
I'm not sure you understand the point of the exercise
>>
>>52363066
there no benchmark in dat thread.
>>
>>52361969
>prime
>multiple of 3 and/or 5
lolwut
>>
>>52361969
System.out.println(1);
System.out.println(2);
System.out.println("fizz");
System.out.println(4);
System.out.println("buzz");
for(int i = 6; i <= 100; ++i) {
System.out.println(i);
}
>>
>>52363073
3 is a prime and a multiple of 3, it should output "fizz" not "3"
5 is a prime and a multiple of 5, it shoud output "buzz" not "5"

That implementation is wrong.
>>
>>52363073
nicely done assburger, nicely done
>>
>>52363063
C# and Java are both fine languages for things other than ENTERPRISE. I regularly write simple apps in C#, with and without GUI to fix small problems or to show proof of concepts of data access/manipulation from APIs and databases.

Get off your high horse, you're comparing apples to oranges.
>>
#include <stdio.h>

main(){
int i;

for(i=1;i<=100;i++){
if(i%15==0) printf("FizzBuzz\n");
else if(i%5==0) printf("Buzz\n");
else if(i%3==0) printf("Fizz\n");
else printf("%d\n",i);
}
}


I did right?
>>
>>52363094
>hurr durr only compile languages!!!!
>herp derp only static typing!!!!
>"Get off your high horse, you're comparing apples to oranges."
No fucking shit, sherlock
>>
File: 1452374356242.png (390KB, 850x720px) Image search: [Google]
1452374356242.png
390KB, 850x720px
>>52363080
Is this the start of an ebin new maymay?
>>
>>52363089
oh yeah when i said "nicely done" i was thinking that it was a play on words, that every number is divisible by itself and 1, but there is no requirement that it shouldn't be divisible by 1. so >>52363080 should be correct

i'll blame a lack of sleep and not really giving much of a shit
>>
>>52363101
I don't know what you think I'm advocating for, but that was my first post in this thread.

There's a time and place for scripting languages, just as sometimes you might want to use something functional, or something super concise for a quick-and-dirty.
>>
>>52363103
fun fact: i typed out all those System.out.println's by hand
>>
>>52363123
>I don't know what you think I'm advocating for, but that was my first post in this thread.
Follow the chain of posts.
>>
>>52362353
>D uses LDC, an incomplete, buggy LLVM compiler
D remains unstumped
They could not have gimped D harder if they'd tried
In my experience, DMD with optimisations can stand right up there with g++, and if you can get GDC not to statically link the entire fucking standard library, it would probably be faster
>>
>>52363117
wait it says "and a multiple of only 3" so it is an asplurgian play of words after all, since 3 is also a multiple of 1.
>>
stop wasting time on meme languages and embrace Python
>>
>>52363228
python considered harmful
>>
>>52363228
shame on you
>>
>>52363237
memes considered harmful
>>
>tfw you write a minimax with a more than 2000 possible branches per node in the search
>tfw you have to write in python
>tfw optimising it
fugg :D:D:D:D
>>
>finally learnt what tail call optimisation is
it's a fucking miracle, it turns out
>>
>>52363286
There isn't a machine code compiler for it?
a lot of interpreted languages have one
>>
>>52363254
memes considered python
>>
>>52363286
switching to anything java or lower level will give you a 50-100x performance increase
>>
>>52363347
python considered memes
>>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

char *lines[] = {
"let () =",
" let rec loop oc = function",
" | 101 -> ()",
" | n ->",
" let s =",
" match n mod 5, n mod 3 with",
" | 0, 0 -> \"fizzbuzz\"",
" | _, 0 -> \"fizz\"",
" | 0, _ -> \"buzz\"",
" | _, _ -> string_of_int n in",
" Printf.fprintf oc \"print ('%s')\\n\" s;",
" loop oc (succ n) in",
" let oc = open_out \"fizz.py\" in",
" loop oc 1;",
" close_out oc;",
" ignore (Sys.command \"python fizz.py\");",
" Sys.remove \"fizz.py\"",
";;",
NULL
};

int main (void) {
FILE *file;
char **line;
file = fopen ("fizz.ml", "w");
for (line = lines; *line != NULL; line++) {
fprintf (file, "%s\n", *line);
}
fclose (file);
system ("ocaml fizz.ml");
remove ("fizz.ml");
return 0;
}
>>
>>52363803
why an array of strings ?

char *source =
"let () =\n"
" let rec loop oc = function\n"
" | 101 -> ()\n"
" | n ->\n"
" let s =\n"
" match n mod 5, n mod 3 with\n"
" | 0, 0 -> \"fizzbuzz\"\n"
" | _, 0 -> \"fizz\"\n"
" | 0, _ -> \"buzz\"\n"
" | _, _ -> string_of_int n in\n"
" Printf.fprintf oc \"print ('%s')\\n\" s;\n"
" loop oc (succ n) in\n"
" let oc = open_out \"fizz.py\" in\n"
" loop oc 1;\n"
" close_out oc;\n"
" ignore (Sys.command \"python fizz.py\");\n"
" Sys.remove \"fizz.py\\n",
";;";

int main (void) {
FILE *file;
char **line;
file = fopen ("fizz.ml", "w");
fprintf (file, "%s\n", source);
fclose (file);
system ("ocaml fizz.ml");
remove ("fizz.ml");
return 0;
}
>>
>>52362985
This is the kind of shit that's driving me away from /g/, subjective opinions, baiting, and silly flamewars instead of valid, and constructive criticism.
Instead of helping each other, /g/ simply wishes to be vindictive and bring one another down.
I rarely come here anymore, it's just full of cynical pessimism and unnecessary hate.
>>
>>52362313
Embrace javascript and stop programming so imperatively.

function isblank(s) {
return Array.from(s).some(c => c != ' ' && c != '\n' && c != '\t');
}
>>
>>52362933
what makes static typing cancer?
>>
>>52363877
It has become a very strange place.

Lets say I know nothing about a particular language.

Option A:
Hey anon, can you tell me about Python?
>fuck off retard

Option B:
Yo anons, Python is shit because it's dynamically types, and the variables lose data in every usage, and it doesn't have brackets.
>20 Python advocates respond with lots of interesting facts about Python, allowing me to learn

Bait is the only way to get information from channers these days.
>>
File: interested-frog.jpg (7KB, 225x225px) Image search: [Google]
interested-frog.jpg
7KB, 225x225px
>exam period
>tutoring normies for money
we finally rise
>>
File: godsofprogramming.jpg (100KB, 600x600px) Image search: [Google]
godsofprogramming.jpg
100KB, 600x600px
>>52363922
less expressive, more complicated, static typing handcuffs the programmer.
>>
>>52363938
how is it less expressive and more complicated?

surely passing around all kinds of type data at runtime is significantly more complicated
>>
>>52363933
Jesus Christ how horrifying.
But I'm just getting tired of the language wars. Just fucking program, the language doesn't matter. Sure certain programming languages would be better for the task at hand, but most people in this thread are not knowledgeable enough to optimize their code, we're just here to learn about the fundamentals and that can apply to any language.
>>
>>52363850
I wanted to use char **, but gcc forbid it.
>>
>>52364022

working on my masters thesis
>>
I hope this isn't too bad of me asking but I have a want to better my self and start learning to programming for game development.

Inb4 > 'indie dev'

So I ask if anyone wouldn't mind parting with some advice to help keep me on track and not have everything so oberwhelming. I'm thinking I should start writing small programs to get comfortable with the code I'm using. (I've even thought of making mods for memecraft as a start).

Thank you for your time /dpt/.
>>
>>52363934
just sell adderall.
>>
>>52364176
>>>/vg/agdg
>>
>>52364176
Just go and use unity with the rest of the gamedevbabbies >>>/vg/agdg
>>
>>52364203
>>52364210
Somehow /agdg/ is even worse than /dpt/, which is already a feat itself
>>
>>52364176
that pussy attitude is why people fail at programming and end up in >>>/g/wdg

don't be a faggot, I learned C when I was 14 so unless you're dumber than a 14 year old you should be able to learn it properly.
>>
>>52364176
>game development
pff
>>
I know I know, I figured I'd be able to get some good advice from here as well. I think people here have a better grasp of good coding principles here than at /agdg/
>>52364203
>>52364210
>>
>>52364241
Not really, we just write ASCII meme programs and shit on each others' language of choice.
>>
>>52364241
>quoting with the post number under your message
>>
>>52364231
>implying web development is easier than classic programming
You clearly don't know what you're talking about.
>>
>>52364268
Web development is piss easy.
>>
>>52364268
Fuck off back to /wdg/, web-babby
>>
>>52364268
>web development is as hard as classic programming
nice bait faggot
>>
>>52364253
Using Clover on le smart phone senpai. Not used to posting with it. Mainly just lurk.

[Spoiler]sorry[/spoiler]
>>
>>52364268
>he thinks HTML is hard

HAhahahaH!
>>
File: Owl takes a bath.gif (999KB, 241x135px) Image search: [Google]
Owl takes a bath.gif
999KB, 241x135px
 for i in range(1,101):
if i%3==0 and i%5!=0:
print('Fizz')
elif i%5==0 and i%3!=0:
print('Buzz')
elif i%3==0 and i%5==0:
print('FizzBuzz')
else:
print(i)



D-did I do good, senpai?
>>
>>52364298
you sure didn't.
>>
>>52364295
>[spoiler][/spoiler]'ing parts of your post
>(you)
>>
>>52364295
Stupid newfags shouldn't post at all.
>>
>>52364176
learn opengl

read the opengl superbible

use C++

build your games from scratch, don't use any engine or framework
>>
>>52364325
>how to never finish a project
>>
>>52364277
>>52364280
>>52364288
>>52364297
I've been lurking here for quite a long time, and I never understood that baseless hate against web dev. I'm not talking about making a fucking page in HTML of course. Modern web applications need a good amount of knowledge and problem solving.
>>
>>52364307
>>52364307

This is why I enjoy 4chan, no beating around the bush here.

But desu senpai I'm not a newfag, maybe to /dpt/ but not the chin
>>
>>52364353
>he thinks Angular is hard

HAhahahaH!
>>
>>52364353
Re-read your posts.
If you still don't understand why no one likes uppity web devs, you never will.
>>
>>52364304
Why? Genuine question

Did I do it wrong?
>>
>>52364373
That owl is 100% shit.
>>
>>52364353
bet it doesn't need any of the following:
*complicated algorithms and data structures
*algorithm optimisation
*knowledge of computer architechture
*knowledge of operating systems
*understanding of concurrency
*mathematics
>>
>>52364386
>hating the cleanest owl in the business

Spotted the pleb
>>
>>52364345
it's not as hard as it may seem

just start with a simple arcade game

using an engine/framework also takes effort to learn to use properly and the result will be much worse than a proper custom solution
>>
>>52364203
>>52364210
>>52364231
>>52364239
>>52364325
Holy shit, >>52363933 demonstrated in action.
>>
>>52364389
Not the guy you're responding to, but I worked as a web dev in an earlier job. It was a web-based image and video organising software (so-called DAM system), and as a back-end developer I worked on their back-end system which not only had to do image and video processing, heavy file operations, full-text search in image metadata (see IPTC/XMP), it also had to this while supporting several hundred users doing it simultaneously. The indexing service that allowed faceted search was implemented in C++, so was most of the heavy file operations and image and video processing. The more simple tasks, such as querying the config database and stuff like that was implemented in Python.
>>
>>52364439
Wow!
You noticed a pattern!
You cracked the code!
Genius!
Please senpai teach me how to be as smart as you are!
>>
>>52363877
if you want that shit go to SO I'm here to banter with a computer science theme
>>
File: OyjLSS5.png (87KB, 636x766px) Image search: [Google]
OyjLSS5.png
87KB, 636x766px
>>52364520
Just got to analyze the data, mate.

Today's shit thread in image.
>>
>>52364591

> the day fizzbuzz becomes new meme
>>
>>52364367
>Using that piece of shit out of all the frameworks available
>Implying web dev only means frontend work

>>52364368
>Doesn't state any arguments
>Better use ad hominem
Get off your fucking high horse.
You must be such a special snowflake for being able to make a fizzbuzz one liner in haskell.

>>52364389
>complicated algorithms and data structures
>algorithm optimisation
>mathematics
Sure, if you don't know what you're doing and just blindly follow a library guideline.
There are interesting cases emerging in today's web dev such as dom diffing and immutability optimisations that require at least a medium understanding of algorithms and data structures.

>knowledge of computer architechture
>knowledge of operating systems
>understanding of concurrency
I'll have to agree, mainly because those are abstracted away by the javascript vm & jit compiler. Still funny that they had to add typed native arrays because some computation-heavy applications faced performance issues
>>
>>52364619
>new
>>
can someone tell me why this won't work? it stalls on my laptop and when i run it from pythonanywhere it throws the error "simplejson.scanner.JSONDecodeError: Expecting value: line 1 column 1 (char 0)"

https://spit.mixtape.moe/view/c73f63a2
>>
>>52364630
>Sure, if you don't know what you're doing and just blindly follow a library guideline.
but that's exactly what happens

hence the billion JS frameworks
>>
I still can't program.

What am I doing wrong?
>>
>>52364660
wrong thinking

acquire systems thinking and then use it to break down you problem into loops, function calls, decisions and variables
>>
help me /g/uardians,
>C#
>get a string of words
>get the number of ASCII of every char in the string
>now get the last digit of every char when you convert it to int (I've done it with %10 when converting and put it in a list)

My problem is I think I am missing something, Is there shorter/better way to do this ?

Otherwise the problem is easy peasy and I got 100 points, but still..
>>
File: 1373662916812.jpg (171KB, 600x400px) Image search: [Google]
1373662916812.jpg
171KB, 600x400px
>>52364591
it's me or python is always in the top 3 ?
>>
>>52364717
shit is also in the top 3
>>
>>52364660
if you understand logic chains, then you can program.

you just think you can't either because you dont know syntax or the thing youre trying to program is too complex for your current level.
>>
>>52364427
I'm not the game dev retard, but I know opengl and shaders and telling a wannabe indie dev who can barely write "Hello, World." to learn raw opengl and c++ is just terrible advice.
>>
File: laughing whores.gif (2MB, 500x281px) Image search: [Google]
laughing whores.gif
2MB, 500x281px
>>52364630
You don't even realize why you suck so much dick.
>>
I think the migrant crisis is starting to turn me right wing. I visit left leaning forums and when I see someone post something like "I hope the people can understand the cultural differences" in relation to rapes and murders in Germany I start to fucking lose it. Are these people for fucking real? How does that excuse anything? Next I'll be browsing /pol/
>>
>>52364758
what's the alternative? if he uses unity he will forever be limited to (a subset of) what the unity engine can do. if he uses libgdx, love2d, or pygame he'll waste a huge amount of time and either make a turd of a game or move on to raw opengl. opengl and glsl isn't even hard at all if taught properly. it's actually very simple.
>>
>>52364784
The only logical conclusion that can be drawn from current events and statistics is that mass immigration causes lots of violent crime.

See Sweden for a great example that's a bit older than the new migrant crisis.

>>52364683
What have you tried? Post your code.
>>
>>52364797
Learning high level game dev concepts is infinitely more important than what tool you use to actually make the game.
>>
>>52364830
no it isn't. you need high level concepts too but you'll be crippled by whatever tool you're using.
>>
>>52361970
gayest thing I have ever heard, and I've sucked cock
>>
>>52364797
Wannabe dev fag here, You've got my curiosity about unity. Would I miss out on anything by using that platform? I don't want to make some poorly unoptimised buggy trash mobile game, I want to learn a strong foundation. I'm not planning my entire life career on games, I'd love to be able to have useful code knowledge that can be brought from one project to the next, wether it be a game or some other program.
>>
>>52364780
>can't construct a decent argument
>continues to ad hominem
/dpt/ everyone.
>>
>>52364797
>(a subset of) what the unity engine can do
No.
If he goes the C# route in Unity, then he'll know how to program in C#, especially if he starts making complex games and doing heavy optimizations.

Just the same as if you use Unreal engine, you'll probably learn a good deal of C++(Only if you don't use blueprints). I mean you're basically saying he won't learn a language because of an API/library.
>>
Can someone who still uses archaic languages like C and Java please explain to me why you cling to the past instead of using a modern language like Python in which one line of readable code translates to 30+ lines of unreadable code in "traditional" languages?

I'm not baiting or trying to start a senseless flame war, I really just don't understand it.
>>
>>52364809
        var strInput = Console.ReadLine();
var direction = Console.ReadLine();

var inputChar = strInput.ToCharArray();
var numList = new List<int>();
var numList2 = new List<int>();
var newNumber = new int[numList2.Count];

for (int i = 0; i < inputChar.Length; i++)
{
var lastDigit = Convert.ToChar(inputChar[i] % 10);

numList.Add(lastDigit);
}



Its really long code, and I do some other stuff with it, but this is the part I am talking about.
>>
>>52364638
please respond
>>
>>52364867
>I don't want to make some poorly unoptimised buggy trash mobile game
that's literally what you'll get with unity
>>
>>52364876
C and Java are much faster (especially C)

Strong typing is less prone to bugs, and some would say it makes your code more readable

Scripting languages are best for small programs and quick prototypes, but they aren't ideal if you have a large team working on the same code base.
>>
>>52364871
Most languages have opengl bindings.
Knowing C# has nothing do with understanding opengl or the stuff game engine does under the hood.
>>
>>52364867
>I don't want to make some poorly unoptimised buggy trash mobile game
Do unit testing, isolate slow code, always refactor, google best practices for C#, google best practices for game algos(especially A* path finding).

the engine you use is almost never the reason for bad performance. its just shitty programmers. getting something to work is only half the job.
>>
File: 1413762937354.gif (3MB, 445x247px) Image search: [Google]
1413762937354.gif
3MB, 445x247px
>>52364870
>he still can't figure it out
>>
>>52364902
>Knowing C# has nothing do with understanding opengl or the stuff game engine does under the hood.
You don't need to know about low level 3D rendering unless you plan to write your own graphics library, which you shouldn't be doing if you just want to make game or learn general programming.
>>
>>52364896

> what is FromTheDepths
> what is StarCrawlers

Are you just hating to hate senpai?
>>
>>52364902
i'm not talking about opengl at all. you can still use opengl to make shaders in unity. its incredibly easy.

>or the stuff game engine does under the hood
it depends on the engine. some engines abstract a lot of what happens away from the user, some engines expose it.
>>
File: laughing whore6.jpg (112KB, 1280x720px) Image search: [Google]
laughing whore6.jpg
112KB, 1280x720px
>>52364908
This wasn't even me, but have some laughing whore since you're so good at baiting
>>
>>52364908
I figured out that you suck cocks :^)
>>
>>52364896
its a popular engine.
a lot of people who can't program use it,thus giving that impression.

like i know some people who build their entire games around scripts they bought from the asset store, then mash it together expecting things to work.
>>
File: laughing whore.gif (3MB, 355x201px) Image search: [Google]
laughing whore.gif
3MB, 355x201px
>>52364908
This one isn't free senpai, you owe me one.
>>
>>52364867
>>52364896
Have you perhaps heard of a little game called "Hearthstone" made by Blizzard?
They use the unity engine.
>>
>>52365014
>shitty card game with assets recycled from their other game
>good example
>>
>>52364298
print("\n".join(["fizzbuzz" if x%15==0 else "fizz" if x%3==0 else "buzz" if x%5==0 else str(x) for x in range(1,101)]))
[\code]
>>
File: 1445657514408.png (183KB, 700x500px) Image search: [Google]
1445657514408.png
183KB, 700x500px
>>52365025
Ori and the blind forest.
>>
>>52365036
Got me there.
>>
>>52365049
Faggot
>>
>>52365025
I'm sure there are better examples, but this notion that unity is used by plebs who can't write code is bullshit, was my point.
I don't like Unity myself, but that's for personal preference reasons.
>>
File: 1.png (38KB, 1106x810px) Image search: [Google]
1.png
38KB, 1106x810px
>>52364896
you're telling me my optimized implementation of verlet integration is shit because its in unity, even though it runs insanely fast and has been stress tested under high loads?

nah, you wouldn't know bout that boi.
>>
>>52364638
pls
>>
How do you write a oneline FizzBuzz in Java?
>>
okay, here are my idea.

to have a webpage where you can read a magazine, like those anime magazines, one page each time, similar to how you read comics.

Of course this magazine will be made using html and css, that's easy.

But I want also to have some kind of basic interactivity, like a choose your own adventure book, maybe save a score or other variables that can affect the story path.

At the most advanced level there will be some minigames, like a basic roguelike.

Can this be done with html+css+javascript?

I don't want to use any library or any shit.
>>
>>52365145
You never heard about debugging?
Add a breakpoint, run it step by step, look at variables in the memory and identify the issue which probably comes from a malformed json string
>>
>>52365237
Any how much are you going to pay the artists for the custom content needed?
>>
>>52365237
>I don't want to use any library or any shit.
You've already failed before you've begun.

You're doing webdev; use libraries and frameworks.
>>
>>52365116
fuck off to >>>/vg/agdg kid
>>
>>52365263
I'm mostly an artist that made some games in java but is not longer interested into making games.

I still like the interactivity aspect of games and want to make something like an interactive magazine/comic.

Sound more interesting and less demanding that making a videogame.

>>52365274
what do you mean?
to use stuff like pharser?
I don't want to use complex stuff or set up a server.
I don't know if I should use flash instead.
>>
>>52365244
I've tried that, it fucks up on a perfectly valid line and I can't figure out why for the life of me
>>
File: 33b[1].jpg (63KB, 640x480px) Image search: [Google]
33b[1].jpg
63KB, 640x480px
>>52365237
>anime magazines

>>52365305
>flash
>>
File: 1.webm (987KB, 1280x720px) Image search: [Google]
1.webm
987KB, 1280x720px
>>52365324
uh, it works fine for me, granted it does print the same image over and over.(not sure if intentional or not)

>>52365290
but /agdg/ is already my home family :^)
maybe you should check my game out~
>>
>>52365346
I'm not sure why you're mocking me.
I gave you some buzzwords so you have an idea, but they're not exactly what I want to do.

Like I said, flash sounds a pretty good deal for my goal.
>>
File: 1445340583906.jpg (97KB, 691x960px) Image search: [Google]
1445340583906.jpg
97KB, 691x960px
I'm mostly a web dev (both front end and back end), but I also have a few (almost finished) C and Python projects. Is it still a good idea to add them to my portfolio once they're finished, if I'm mostly looking for web dev jobs?
>>
>>52365363
kill yourself
>>
>>52365380
get out while you still can
>>
See, now that's a good time to redirect to /wdg/
>>52365380
>>>/g/wdg
>>
>>52365363
That's not at all what I was going for. For me it gets thrown into an infinite loop, and on pythonanywhere it gives me a json error.
>>
>>52365377
>flash
kill yourself

just use html and css, not even js
>>
>>52365380
Forgot to add that I have a few years of experience with both Python and C.
>>
>>52365377
Dude. Don't fucking use flash. Are you serious right now?
>>
File: 1447336389114.png (269KB, 546x591px) Image search: [Google]
1447336389114.png
269KB, 546x591px
>>52365377
Flash would do the job fine, but actionscript's learning curve is higher than js, and flash is a tech soon to be deprecated.
You don't need anything more than javascript for what you're trying to do.
>>
>>52365396
>>52365406
what's wrong with flash?
I've seen some cool shit done wiht it.

>>52365454
my concern would be if barebones javascript would be enough to do shit like transitions, tweening, menues tweenings, basic 2D functionality (basic 2D games).

Are there any book for this?
>>
>>52365395
well it seems pythonanywhere is the problem.

i could rewrite it maybe since i think i know what you're doing, give me some minutes
>>
>>52365377
>Two thousand and sixteen
>Flash

Are you clinically retarded? Everyone is dropping Flash support as quickly as humanly possible, it's entirely deprecated now.

Just use JS or something you moron.
>>
>>52365504
I guess I could use some engine like construct, since what I want to do is similar to those flash comics.
>>
>>52365520
pretty sure flash professional supports exporting to javascript and html5 rather than flash m8
>>
>>52365549
I guess I could use unity then, but last time I tried their webl export, it simply sucked hard.
>>
>after having examples of failure given to them on a platter, /dpt/ continued to fail at prime fizzbuzz
can any of you actually program
>>
newguy here. I'm on a win10 system, and want to dive into c-programming. As far as I figure the recommended way to do it is to get my hands really dirty and start coding without an IDE.

Apparently the hardcore way to do it is to sit out the Siberian wasteland, with a boiling thinkpad as my only heat source and running unix.

If I want to be a bitch and still use windows 10 without the hassle of rebooting everytime I want to write a line of code, how do I go about it?

I've googled a bit, and there seems to be options, but I want /g/ to shout opinions at me as well.

Can you feasibly run some kind of set up with something like Notepad++?
>>
>>52364784
Europe is starting to deal with what America has dealt with for decades and what China is about to have to deal with: tons of unattached young men with no reason or desire to contribute to the state. It doesn't really have anything to do with culture, it's all about social engagement. Europe has the chance to succeed where we failed, and it's all about being able to swallow costs and ego: get these guys into jobs and training and get them invested in European society. Give them something to lose. Give them camaraderie in dropping their connections to their old cultures and in building connections to their new ones. Assimilate them. And do it in a way that respects a part of who they are (just not the part that will make them anti-establishment).

Not only does that kind of investment pull an eager new workforce into your fold, you Ben Franklin yourself: you endear them to their struggle by putting a bit of yourself in it.

Remember, if one person is dysfunctional, it's a problem with the individual. If a million people are dysfunctional, it's a problem with society.
>>
>>52365613
>prime fizzbuzz
?
>>
>>52361920
Please stop this programming trap meme.
Thanks.
>>
>>52365622
Just fucking run ubuntu you fuck
>>
>>52365622
>>52365766
or a vm
>>
just realized what tweepy was, here

import time
import requests
import tweepy
import urllib
import os
import bs4
from requests.auth import HTTPBasicAuth

BASE = 'http://danbooru.donmai.us'
BASE_URL = 'https://danbooru.donmai.us/posts.xml?tags=yakumo_ran&limit=10&page={page_id}'
MAX_PAGE = 1000
API_USR = '' #danbooru username
API_KEY = '' #danbooru api key

consumer_key = ""
consumer_secret = ""
access_key = ""
access_secret = ""

#i have no idea what this tweepy shit is
auth = tweepy.OAuthHandler(consumer_key, consumer_secret)
auth.set_access_token(access_key, access_secret)

api = tweepy.API(auth)

def do():
with requests.Session() as s:
headers = {
'User-Agent': 'Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:42.0) Gecko/20100101 Firefox/42.0',
}

for page_id in xrange(0, MAX_PAGE + 1):
r = s.get(BASE_URL.format(page_id = page_id),auth=HTTPBasicAuth(API_USR, API_KEY),headers=headers)
soup = bs4.BeautifulSoup(markup=r.content, features="xml")

posts= soup.find_all('post')

for post in posts:
file = post.find('file-url').text
#large_file = post.find('large-file-url').text
imageSource = post.find('source').text
fullurl = '%s%s' % (BASE,file)
print fullurl
urllib.urlretrieve(fullurl, 'image.jpg')

tweetString = imageSource + " #Touhou #Yakumo_Ran"
api.update_with_media('image.jpg', status=tweetString)
os.remove('image.jpg')



do()



Put in your danbooru api shit, and your twitter shit, and it should work?( i dont have twitter, too lazy to create one to test)
>>
File: 1431471048976.png (63KB, 217x338px) Image search: [Google]
1431471048976.png
63KB, 217x338px
>>52365613
>Prime FizzBuzz bait
>>
>>52362260
Why the fuck would anyone want to support MSVC lol?
All the actually relevant compilers (GCC, Clang) support C11.
>>
>>52365781
>>52365766
>>52365622

jesus dude why not just download codeblocks and get on with the coding?
>>
>>52363052
black bullet, no
>>
What does file.clear() do in C++?
>>
File: 1452530965310.png (193KB, 397x547px) Image search: [Google]
1452530965310.png
193KB, 397x547px
>>52366114
I'm willing to bet it clears the file.
>>
File: 1452448886287.png (248KB, 413x695px) Image search: [Google]
1452448886287.png
248KB, 413x695px
Why haven't you got a gf yet, /dpt/?
>>
File: feed.jpg (106KB, 500x375px) Image search: [Google]
feed.jpg
106KB, 500x375px
>>52366114
http://www.cplusplus.com/reference/ios/ios/clear/
>>
>>52366132
>>52366149
>>52366165

what's with this anime shit. Go buy a fucking polo shirt and cut your greasy hair.
>>
File: 1452447645980.png (611KB, 780x720px) Image search: [Google]
1452447645980.png
611KB, 780x720px
>>52366214
Funny you say that, anon. I just had a haircut about 3 hours ago.

I hate having to force conversation with the hairdresser, makes me feel so awkward.
>>
File: 1318600156603.jpg (95KB, 844x810px) Image search: [Google]
1318600156603.jpg
95KB, 844x810px
>>52366214
>>
File: SknDm.jpg (45KB, 414x509px) Image search: [Google]
SknDm.jpg
45KB, 414x509px
>>52366214
>>
File: 1452420962371.png (4KB, 1280x720px) Image search: [Google]
1452420962371.png
4KB, 1280x720px
Test
>>
>>52366293
Test failed.
>>
>>52365484
There's a lot that can be done by manipulating CSS via JS. Beyond that, you can use SVG or the HTML5 canvas element.

SVG can do basic linear animation without needing any JS, and more complex stuff with JS. Canvas is more flexible but requires more programming. The most advanced option is canvas with WebGL (essentially JS bindings for OpenGL ES 2.0) rather than the 2D API.
>>
>>52366410
>>52366410
>>52366410
>>52366410

NEW
>>
>>52366413
Dumbass
>>
 else 
{
var previousDigit = i == 0 ? 0 : numList[i - 1];

}


how do you interpret this properly and how to read it so you dont get cofused ?
>>
>>52366635
Does i == zero? Yes? Then previoudDigit does too.
It doesn't == zero? previousDigit now = the current i - 1's array element of the array numLIst.
>>
>>52365116
verlet based physics sucks (conservation of energy, jittering if you stack boxes, friction based on normal force, etc). Fidled around with it a long time. Better use erin catto's approach (used in box2d).
>>
>>52366657
thank you, can you give me some exercises to do to get familiar with it, or should I just go along and learn it step by step while I encounter it in the code ?
I mean is there any guide on this, how is it called even ? Any specific name ?
>>
>>52366635
For clarity maybe put parenthesis around the conditional

var previousDigit = (i == 0 ? 0 : numList[i - 1]);
>>
>>52366736
It's the ternary operator. Basically an if.
if (blah) {
do this;
} else {
do that;
}
>>
>>52366758
blah ? dothis : dothat;
>>
File: 1452427389314.jpg (836KB, 1279x1919px) Image search: [Google]
1452427389314.jpg
836KB, 1279x1919px
>>52366754
>>52366758
>>52366685
thanks guys
>>
DPT can you explain what does the array part of this structure does in C?
struct {any val; any val;} bnd[length(y)+2];


Also how the hell do I go about writing it for an old ass C where you have to call malloc for dynamic sized arrays?
>>
I noticed a colleague using ruby
I laughed at him
>>
>>52366952

Nvm am stupid, its just initializing an array of said structure with a variable.
C magic mang.
>>
>>52366685
The problem is that I already tried using Box2D, and the results weren't that great with what I was trying to do.(Hair physics)

Since I don't need to worry about hair collision, my verlet approach was much fast/better and gave me more control than using Unity's Box2D
>>
First you should convert the message into a number. This is done when you take the last digit of the ASCII code of each character in the message and add those digits next to each other. 
For example the string "Soft Uni" is converted to 31262505:
('S' => ASCII(83), 'o' => ASCII(111), 'f' => ASCII(102), 't' => ASCII(116), ' ' => ASCII(32),
'U' => ASCII(85), 'n' => ASCII(110), 'i' => ASCII(105)).
Then you should encrypt the converted number digit by digit. The formula is the following: If the digit is even or '0' - you should multiply it by itself. If the digit is odd – you should add to its value the neighboring digits. If there is a missing neighboring digit, you should add 0 instead of it.
If the result after the encrypting of a digit is a number with two digits, you should concatenate the result to the new number.
For example 31262505 is encrypted to 464364705:
3 => 3+0+1=4, 1 => 1+3+2=6, 2 => 2*2=4, 6 => 6*6=36, 2 => 2*2=4, 5 => 5+2+0=7, 0 => 0*0=0, 5 => 5+0+0=5.
Finally you should fill a square diagonal matrix with the encrypted number. The size of the matrix should be the same as the number of digits in the encrypted number. The diagonal to be filled comes from the console as a character: '\' (backslash) represents the main diagonal; '/' (slash) means the anti-diagonal.
For example 464364705 is filled in the following two matrices:

\ (main diagonal) / (anti-diagonal)
4 0 0 0 0 0 0 0 0
0 6 0 0 0 0 0 0 0
0 0 4 0 0 0 0 0 0
0 0 0 3 0 0 0 0 0
0 0 0 0 6 0 0 0 0
0 0 0 0 0 4 0 0 0
0 0 0 0 0 0 7 0 0
0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 5

0 0 0 0 0 0 0 0 5
0 0 0 0 0 0 7 0 0
0 0 0 0 0 4 0 0 0
0 0 0 0 6 0 0 0 0
0 0 0 3 0 0 0 0 0
0 0 4 0 0 0 0 0 0
0 6 0 0 0 0 0 0 0
4 0 0 0 0 0 0 0 0
>>
>>52367508

[/code]

>Any of you guys can do this ?

using System;
using System.Collections.Generic;
using System.Text;
using System.Text.RegularExpressions;

class EM
{
public static void Main()
{
string input = Console.ReadLine();
byte[] array = Encoding.ASCII.GetBytes(input);

List<int> numbers = new List<int>();
foreach (char ch in array)
{
numbers.Add(ch % 10);

}

List<int> cryptedNumbers = new List<int>();
for (int i = 0; i < numbers.Count; i++)
{
int currentDigit = numbers[i];
int result;

if (currentDigit % 2 == 0)
{
result = currentDigit * currentDigit;

if (result >= 10)
{
cryptedNumbers.Add(result / 10);
cryptedNumbers.Add(result % 10);
}
else
{
cryptedNumbers.Add(result);
}
}
else
{
int previousDigit = i == 0 ? 0 : numbers[i - 1];
int nextDigit = i == numbers.Count - 1 ? 0 : numbers[i + 1];
result = currentDigit + previousDigit + nextDigit;
if (result >= 10)
{
cryptedNumbers.Add(result / 10);
cryptedNumbers.Add(result % 10);
}
else
{
cryptedNumbers.Add(result);
}
}
}



1/2
>>
>>52367531
        string diagonal = Console.ReadLine();
int position;
int update;

if (diagonal == "\\")
{
position = 0;
update = 1;
}
else
{
position = cryptedNumbers.Count - 1;
update = -1;
}

for (int i = 0; i < cryptedNumbers.Count; i++)
{
for (int j = 0; j < cryptedNumbers.Count; j++)
{
if (j == position)
{
Console.Write(cryptedNumbers[position] + " ");
}
else
{
Console.Write("0 ");
}
}

Console.WriteLine();

position += update;
}
}


2/2
Thread posts: 313
Thread images: 37


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

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
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.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.