[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: 340
Thread images: 36

File: prog.jpg (105KB, 473x496px) Image search: [Google]
prog.jpg
105KB, 473x496px
What are you working on /g/?

Old thread: >>60674040
>>
haskell!
>>
File: old_hag_langs.png (173KB, 600x355px) Image search: [Google]
old_hag_langs.png
173KB, 600x355px
>>60679964
First for Fortran and C.
>>
I just got bitten by https://github.com/expressjs/express/issues/2495.

The docs said nothing about this. It's existed for 2 years. It rears its head during incredibly basic usage (literally the first time I've used this feature). And this is entirely normal for a widely-used library on NPM, because I've found crap like this in the other libraries I'm using.

EVERYTHING IN THE NODE ECOSYSTEM IS BROKEN AND I HATE IT
>>
How regular should a good programmer shower?
>>
>>60680058
How is this hard to work around? Can you not just nest the second route inside the first?
>>
>>60680058
why do you use it then?
>>
File: screenshot.png (287KB, 1680x1050px) Image search: [Google]
screenshot.png
287KB, 1680x1050px
Ugh didn't notice there was a new thread till right after I posted in the old one...

I made a little low poly RPG thing and got it to the point where it's totally functional, but I don't know if I'm going to like work on it anymore to make it more balanced (the combat system is shallow af and you instantly become strong enough to just beat everything) and like add actual content like objectives and a story.

I have no attention span with games and tend to abandon em.

It was the first time I even made much of anything in 3D with Game Maker and it was a fuckin struggle at times. Making things in C++ with SDL and OpenGL was easier. I do appreciate though that I can like in theory make an android port of it without needing to rewrite much of anything though (I got the like android exporter or whatever for Game Maker awhile ago in a humble bundle).
>>
I'm actually enjoying chapel but I don't really need all those fancy features for HPC or big clusters.

What other languages have:
c like syntax
type inference where the it's like variable_name:variable_type = some_value;
lambdas
easy parallelism stuff like
// creates 3 task that might be run in parallel depending on system
cobegin {
stuff0(); // task1
stuff1(); // task 2
{ // task 3
stuff2_x();
stuff2_y();
} // task3 end
} // sync
cont(); // is run only after all the tasks are done

Swift seems to have atleast the type inference but not really sure if I want to anything to do with apple shit.
>>
File: uglybuilding.png (488KB, 1680x1050px) Image search: [Google]
uglybuilding.png
488KB, 1680x1050px
>>60680131
Anyways I finished that a couple days ago. Now I'm starting to work on simple little FPS (also with Game Maker).

I made a bunch of low poly tiles and set it up so I could like generate buildings with em, but now I'm doing that thing where you regret how you approached literally everything and want to just rewrite and remake it all from scratch.
>>
>>60680098
The workaround is to use {0,} instead of *.

>>60680109
I wanted to use TypeScript for something. And I think I'll keep using it for this project because I'm like halfway through now.
>>
Just dicking around with Forth. It's pretty fun. https://pastebin.com/UvkxxTML
>>
>>60680194
Also, the problem is that by the time I'm done I'll have worked through all these issues and then I might think it's fine to use it again, because I already know all the gross hacks I need to do.

I think this is how Nodejs programmers are born.
>>
File: unlubed.png (203KB, 1680x1050px) Image search: [Google]
unlubed.png
203KB, 1680x1050px
>>60680131
BTW I posted it on itchi.io if you want to try it (there really is no objective to it though at this point like you just wander around). https://boringkate.itch.io/lilrpg
>>
>>60680137
>type inference where the it's like variable_name:variable_type = some_value;
That's literally not type inference.
>>
>>60680236
the syntax for declaring varibles, you may omit the type when the compiler can figure it out from function return type or some_value type.
What I mean I don't want to type the type multiple types and I don't want that auto shit that's in sepples and D
auto anus = fn();

I want
// compilers knows this returns int
proc fn() {
return 3;
}
var x = fn(); // x is type int
var y:int = fn(); // you can optionally type the type
>>
File: karen haskell.png (818KB, 1280x719px) Image search: [Google]
karen haskell.png
818KB, 1280x719px
>>60680008
fpbp
>>
If I use c++'s std libs in my program, am I forced to license it GPL?
>>
>>60680302
yes
>>
>>60680302
Only if the library is GPL licensed rather than LGPL licensed.
>>
>>60680137
haskell has all of those except c like syntax. parallelism looks like this
tasks = do 
parallel [ putStrLn "Task1"
, putStrLn "Task2"
, (putStr "Task" >> putStrLn "3")
]
putStrLn "run only after all the tasks are done"
>>
>>60680429
I also has 6GB/s garbage rate
>>
>>60680137
Rust with crossbeam for parallelism.
>>
>>60680449
what's wrong with a big package?
>>
>>60680449
I'm sorry to hear that anon. Hope you feel better.
>>
>>60680523
rust has horrible syntax and no sane person would get anywhere near that anyways.
>>
>if there's nothing else to complain about, complain about syntax
Whatever, m8.
>>
>>60680287
there is a version of this where her hair clip is the haskell logo
>>
Is it even possible to be a rust advocate without getting entangled in extreme leftist politics like those perpetuated by Mozilla and the head designers of rust?
The lead designer is literally and unironically a member of antifa and would love nothing more than to destroy all white people.
>>
>>60680636
If syntax didin't matter I would be using ATS. I just can't handle shit like this
fun{
a:t@ype
} list_length
{n:nat} .<n>.
>>
File: 1486596518303.png (786KB, 1000x1300px) Image search: [Google]
1486596518303.png
786KB, 1000x1300px
>>60680650
>>
>>60680656
>Lead designer
Who?
>>
>>60680656
white people elected trump, they deserve destruction.
>>
>>60680449
doesn't matter - if you clear garbage at 6gb/s, you'll always be a 0 bytes :)
>>
>>60680722
advocating for genocide is a hate crime in most jurisdictions
>>
>>60680726
haskell is slow and computers don't work like that. It's all about mutable state.
>>
>>60680742
a hate crime is only towards minorities.
>>
>>60680757
you dont understand how computers work. immutability forces haskell to produce a lot of temporary data but it also helps haskell collect this garbage rapidly
>>
Can anyone recommend some good to v. good books on 2D game programming? Preferably only C++ (only mentioning because I've seen a few python ones)
>>
>>60680783
whites are a minority now :)
>>
this is program that delete number in text, for example ab98k -> abk
#include <stdio.h>
#include <ctype.h>

// move characters starting at cstr+1 to the left by one position
void move_left(char* cstr)
{
while ((*cstr = *(cstr + 1)))
++cstr;
}

// find the first occurrence of a decimal digit.
// return pointer if found, NULL otherwise
char* find_digit(char* cstr)
{
for (; *cstr; ++cstr)
if (isdigit(*cstr))
return cstr;
return NULL; // not found
}

void delete_digits(char* cstr) // remove decimal digits
{
while ( cstr=find_digit(cstr))
move_left(cstr);
}

int main()
{
// declare array of SZ characters
enum { SZ = 200 };
char cstr[SZ];

// prepare format string to read at most SZ-1 characters
char format[16];
sprintf(format, "%%%ds", SZ - 1); // ie. "%199s" if SZ == 200

if (scanf(format, cstr)) // if attempted input was successful
{
delete_digits(cstr);
puts(cstr);
}
}
>>
>>60680799
good books for 2d vidyah are rare (is there any?)
>>
>>60680669
For reals tho, if you look at it, Rust's syntax isn't that different from the traditional C/C++/Java/C#/whatever people are used to: all the control structures are the same, the generics are in <>, etc. In many ways, it's closer to the classical syntax than say Scala or Go. That said, explicit lifetime specification looks weird and out of place, but that's because it's a conceptually new thing in general purpose languages and people aren't used to it.
Overall I think "Rust syntax is (especially) horrible" is a forced meme, in many cases the last resort of a hater.
>>
>>60680840
>meme
>hater
you should fuck off
>>
I just had an idea.
If i knew some C programming (which i don't, yet) and i knew how it related to kernels and effected them (which i don't, yet), then i could create a suicide program, that deletes the kernel of the OS you are running, then distribute it on steam as a game and fuck up 1000+ computers.

Am i wrong?
>>
>>60680783
Doesn't matter. Incitement of genocide is an international crime which also covers private individuals btw
>>
So I've found this site and I want to share it with you: http://www.mirrorservice.org/sites/www.bitsavers.org/pdf/
It's basically a motherlode of old computer documentation, from the early 50s to the mid-90s, so here's for example the programmer's manuals for the early unixes: http://www.mirrorservice.org/sites/www.bitsavers.org/pdf/att/unix/ , and here's some early lisp documentation from mit: http://www.mirrorservice.org/sites/www.bitsavers.org/pdf/mit/ , or emacs manual from '85 by rms himself: http://www.mirrorservice.org/sites/www.bitsavers.org/pdf/fsf/ , or Xerox' documentation on the early OOP, GUI, Ethernet and such : http://www.mirrorservice.org/sites/www.bitsavers.org/pdf/xerox/ , or documentation for the failed i432 Intel processor from the 80s, designed specifically to support OOP: http://www.mirrorservice.org/sites/www.bitsavers.org/pdf/intel/iAPX_432/ .

It's totally useless but I find it enormously interesting to browse, so maybe you'll do too.
>>
>>60680840
>Rust's syntax isn't that different from the traditional C/C++/Java/C#
that's why some people hate it btw

I heard arguments like "Rust had a chance to make things right, it didn't"
>>
>>60680819
Not in America or Russia.
>>
>>60680936
just make script that deletes system32, people usually run game installers with root privileges.
Hard part is distributing your malware.
>>
>>60680967
whites are a minority in Russia
white niggers are a vast majority
>>
>>60680827
import std.stdio;

void main()
{
string input = readln();
input.strip_number().write();
}

string strip_number(const ref string str)
{
string result;
foreach (index, character; str)
{
if (!(character >= '0' && character <= '9'))
{
result ~= character;
}
}
return result;
}


$ echo abc123def456 | ./main
abcdef
>>
>>60680967
>>60680993
>>>/pol/
not programming language
>>
Found an old toshiba pocket pc running windows mobile 2003 on it. It's capable of IR communication so I was wondering if it's possible to write up a program to turn it into a tv/surround sound remote?
>>
>>60680969
Easy, sell it as a game on steam and disable comments for said "game".

Greenlight it, get people pumped, etc.
>>
>>60680936
You wouldn't need to know anything about kernels or even how to program in C. You could just make the program execute a shell command that determines the OS it's running on and then deletes the folder where the critical system files are usually stored. You'd first need to make something that at least seems like a decent game, and then probably have some sort of time-delay for the shell command, so that it doesn't go off until lots of people have already installed it. And then you have to make sure you can make all your online association with the game disappear, otherwise all those people who downloaded and installed it are going to come after you for revenge. Seems like a lot of work for little gain. You'd be better off at least using a ransomware as payload, then you could at least make some money off of it.
>>
>>60680890
Make me.
>>60680962
Sounds too dramatic to me, t b h.
>>
>>60680937
So who incited genocide again?

>>60680993
>white niggers are
still white
>>
>>60681039
>ransomeware
yeah but that is just plain rude.
I prefer to fuck with people, not their wallets.
>>
File: Sophie_Wilson.jpg (315KB, 640x426px) Image search: [Google]
Sophie_Wilson.jpg
315KB, 640x426px
>/pol/tards itt
Guess we need to summon Sophie again.
>>
>>60681136
was ARM designed before or after he became a tranny?
>>
>>60670762
>>
>>60680302

Probably not. The C++ stdlib that is shipped with your compiler likely has a linking exception.
>>
>>60681257
It was designed before she came out of the closet as a transgender, we can't know for how long she'd been self-identifying as a woman before that.
>>
File: weww.png (41KB, 293x270px) Image search: [Google]
weww.png
41KB, 293x270px
>>60681369
>>60681369
>>60681369
>she
>she
>woman
>>
>>60681383
Why is that wrong? She's a woman
>>
>>/global/rule/6
>>
>>>/global/6
>>
How the fuck do I quote a rule?
>>
>>60681465
Who are you trying to accuse of breaking gr 6?
>>
>>60681465
>>>/trash/
>>
>>60681465
Ctrl+c, Ctrl+v
>>
>>60681479
Whom*
>>
>>60681325
Good idea, rolling too
>>
>>60681465
>>>/global/rules/6
>>
Post good C++ crashcourse
>>
File: 20170531_142608-resized-2048.jpg (1MB, 1152x2048px) Image search: [Google]
20170531_142608-resized-2048.jpg
1MB, 1152x2048px
Hi /dpt/
My visual studio compiler is confusing me.
It won't let me use variables I've instantiated. I wrote a simple example, pic related.

Anybody familiar with c# visual studio know whats going on?
Sorry for bad pic, I'm at work and 4chan is blocked on the network.
>>
>>60681597
kek
>>
>>60681597
You should only declare variables, and assign to statics or constants in the main body of the class. Any actual code should go into methods of the class.
>>
>>60681597
>photo of screenshot of code pasted into paint
>>
>>60681597
You can't modify variables like that outside of a function. You can define variables in a class like you did, but to perform operations on them like setting it to 10 it has to be in a function like this:
class RmAcct
{
int num1 = 5;

void SetNum1To10()
{
num1 = 10;
}
}
>>
>>60681597
Didnt know they added class/function hybrids into c++
Neat!
>>
https://www.gnu.org/philosophy/javascript-trap.html
now i know the original of nonfree pizza meme
>>
>>60681597
>>>/g/rules/3
>>
This definition in C:
void qsort(void* lines[], int left, int right, int (*comp)(void*, void*));


The last parameter is a pointer to a function that takes 2 pointer parameters and returns an int but I'm having trouble understanding the (*comp) part. Everything I've seen so far has had a type next to the pointer thing (*). If it was a pointer to a function with no parameters and no return value (void) how would that be declared? Would a pointer to a function like that just be "*"? Such as:
void callfunction(*fnc);
>>
>>60681749
void (*func)(void)
>>
>>60681648
>>60681663
/dpt/ to the rescue. Thanks
>>
>>60680722
yes, good goy :^)
>>
>>60681660
VStoddlers in a nutshell
>>
>>60681749
Don't use C, it's deprecated and useless.
>>
>>60681788
I see. That makes sense.
>>
>>60681816
What do you recommend instead?
>>
I'm trying to make my discord bot receive a command like ".gi banana" and return a picture of a banana choosen at random from a google image search

I know I have to use a google API but thats pretty much it I have no idea where to even start. Using C# for my bot
>>
>>60681749
>>60681816
Don't use that post, it's deprecated and useless.
>>
>>60679964
What's the source on pic related anyway?
I've seen edits of pic related for years, but I still don't know where it is from.
>>
>>60681898
Check out https://stackoverflow.com/a/34062436
and look into get requests and json (you would most likely use the json.net library)
>>
>>60682007
/prog/
>>
Say I have this string:

"Number A: 6
Blah
Blah
Number B: 7"


I would want to use the following regex to capture both numbers:

"Number A: (\d+).+?Number B: (\d+)"


But the newlines between fucks my shit up. How do I get around it? Assume I don't know how many newlines are in-between.
>>
in c# windows forms whats the property that places some default text in a textbox u know with that light grayish color that disappears when u click on it
>>
>>60682206
Remove the newlines.
>>
>>60682206
Incorporate the newlines in your regex.
>>
>>60682312
>>60682284
You guys are useless.

"(?s)Number A: (\d+).+?Number B: (\d+)"
>>
>>60682284
Easiest solution. Convert the new lines to a space
>>
>>60679964

There is a way to make nano a viable text editor (aka IDE) for developing?.

I love it because it's simple and useful but I can't get out of SublimeText and I'm too lazy to learn Vim.
>>
>>60682337
>Non standard regular language features
Kys
>>
>>60680008
TRASHKELL!!
>>
>>60680827
Why do C tards over-complicate things? Can't they think straight like a non-autist human being?
>>
>>60682431
seemed quite simple to me, sucks that things that are simple to others seem complicated to you :(
>>
File: photo.jpg (74KB, 900x900px) Image search: [Google]
photo.jpg
74KB, 900x900px
>>60682417
retract yourself
>>
>>60682449
>seemed quite simple to me
As opposed to >>60681011?
>>
>>60682449
// move characters starting at cstr+1 to the left by one position
// find the first occurrence of a decimal digit.
// return pointer if found, NULL otherwise
// remove decimal digits
// declare array of SZ characters
// prepare format string to read at most SZ-1 characters
"Simple"
C people are mentally ill
>>
File: 1496031237799.jpg (101KB, 500x634px) Image search: [Google]
1496031237799.jpg
101KB, 500x634px
How do people deal with a lack of native arrays in POSIX shell scripts?

I had the idea of keeping every array as a space deliminated string and simply breaking it up into a list with sed 's/ /\n/g' every time I want to do useful things to it.
>>
>>60680827
import Data.Char (isDigit)

main = interact (filter (not . isDigit))


$ echo "abc123def456" | ./main
abcdef
>>
>>60680827
>>60681011
>>60682543
3 types of programmers
>>
>>60679964

In C if I want to sent variables int x, int y into function 2 but as floats, will it work if I have function 2 defined as

void function2(float x, float y)

As it will it change the data type when I call the function?
>>
>>60682543
6gb/s
>>
File: String.png (301KB, 506x450px) Image search: [Google]
String.png
301KB, 506x450px
I'm currently trying to find out whether pic related is actual standard libraries c++ code that actually does something (and I've never seen it before) or is just a marketing text by someone who has never seen more than 10 lines of code in his life.

I'm totally stumped. It looks like its assigning a string via a template, but why is String upper case and what does Function do?
>>
>>60682582
Yes, the ints will automatically be converted into floats when you pass them into the function.
>>
Do I have to build a gaming rig for trying out haskell? My computer is not strong enough to handle 6gb/s
>>
>>60682543
Going full sepples:

std::string strip_number(const std::string& s)
{
std::string out;
std::for_each(s.begin(), s.end(), [&](unsigned char c) { if (!isdigit(c)) { out.append(1, c); } });
return out;
}
>>
>>60682620
Whatever template does, it accepts many numeric (quoted chars are basically numbers) arguments.

String and Function (first letter in upper case) are not present in standard.
>>
>>60682620
lol, tha's not how you print a multi-character string in java.
This is how:

private class fuck_you_linux_fags{
public static void main(String[] args){
char string = 'f','u','c','k',' ','y','o','u',' ','l','i','n','u','x',' ','f','a','g','s';
System.out.println(string);
}
}
>>
>>60682720
>Heap allocated strings
Sepples is a joke
>>
>>60682720
just fucking use namespace std, autist
>>
>>60682620
It is possible. Imagine
template <typename A, B, ...(omitted)>
class String
{
static char Function ()
}
>>
>>60682723
>Whatever template does, it accepts many numeric (quoted chars are basically numbers) arguments.
Yeah, thats as far as I got

>String and Function (first letter in upper case) are not present in standard.
phew, so it's not just me.

Well, you can include <String> (uppercase) and it includes the string standard library, but the upper case works only in this include
>>
>>60682731
It's supposed to be C++.

>>60682757
I know, I was just confused whether this is supposed to be standalone code (i.e. the reason I asked about the standard library).

Just out of curiosity now that I see this example, since I never bothered: is it possible to have an undefined number of template arguments? My Intuition says no, but I can't be sure.
>>
So map, filter and fold is what it takes to be a cool kid?
>>
making a calculator in java on eclipse oxygen.
should i use the scanner object or is there a better method? if so what?

also: what object detects specific key presses (such as pressing the + button on the numpad). i ask this becasue i am still quite new. if it is not an object, then what programming method or string should i use to make the program detect the specific button press?
>>
File: pizza-botnet.png (1MB, 1280x720px) Image search: [Google]
pizza-botnet.png
1MB, 1280x720px
>computer science major
>reteaching myself data structures and dynamic programming for job interviews next year
>teaching myself assembly since my school never offered a class on it, MIPS to learn the idea of it and x86 for reverse engineering compiled programs for capture the flags
>have to teach myself basics of electrical engineering to use the arduino i bought
>reviewing C and C++ since lots of jobs want experience in them
>teaching myself python since that's what the code base is written in at my research internship this summer
>have to teach myself neural networks and convolutional neural networks by myself since that's what my research internship is on, and if i don't get a classifier for lung cancer from tissue images working by the end of next year i won't graduate
>have to make a website from scratch for our school's computer science club since it got hacked and the server wiped years ago and i told the lady i'd do it, even though i have minimal experience with web development
>>
>>60682829
read undefined as in: known at compile time by call but not explicitely stated.
>>
>>60682778
You cannot include <String> in case sensitive implementation.
>>
>>60682846
if you do that server dont do it in PHP, otherwise it will be vulnerable to SQL injections.

Also good luck bro, God's love be with you.
>>
>>60682829
>Just out of curiosity now that I see this example, since I never bothered: is it possible to have an undefined number of template arguments?

http://en.cppreference.com/w/cpp/language/parameter_pack
>>
>Current year
>CMake
Eww
>>
>>60682891
thats not even true
you should do it in C
>>
>>60682873
works on this machineâ„¢
(gcc via cygwin)

>>60682904
sweet, thanks!
>>
>>60680063
0
>>
>>60682846
>website from scratch

Fucking cat. Ruins everything.
>>
>>60682757
Yeah, it is still valid C++.

template<char ... Ts>
struct String {
static const char Function() { return '0'; }
};
>>
I don't understand git
Is there an alternative cloud repo?
>>
>>60683010
git takes a white to understand but its worth it.
>>
>>60682958
https://www.youtube.com/watch?v=_jKylhJtPmI
>PHP is mentioned in the first 2 minutes
>>
>>60683010
Mercurial is supposed to be the better git. Also it's called a version control system.
>>
>>60683010
git is not a cloud repo its a version dontrol system.The most popular alternatives to git are Mercurial and svn
>>
File: 39590017-sad-cat.jpg (40KB, 634x471px) Image search: [Google]
39590017-sad-cat.jpg
40KB, 634x471px
What programs/anything are you most proud of writing? pic unrelated
>>
>>60683025
the statement you made is incredibly idiotic.
any language is vulnerable to sql if you dont handle it properly
php was one of the earliest language and was used by a lot of idiots who wrote buggy cude but its not inherently any more vulnerable to sql injection than any other language
there are many reasons not to use php but sql injection is not one of them

http://php.net/manual/en/pdo.prepare.php
>>
>>60682891
thanks for the well wishes
>>
>>60683110
ok.
thanks for the education my man.
>>
>>60680827
>>60682543
>>60681011
for(int l=0;;)((l=getc(0))&&!isdigit(l))&&putc(l,1);

baka
>>
>>60683092
probably the scheme interpreter in scheme i had to make for the hardest class that involves programming my university offers. i don't even know scheme anymore
>>
>>60681749
The (*comp) part is just a syntactical hack to disambiguate "pointer to function returning int" from "function returning pointer to int". And you can't have untyped function pointers - I think you're legally allowed to cast freely between different signatures, but all function pointers must have a specified return type and argument list. I think a void, no-args function pointer would be

void (*func);


>>60681816
It's still one of the few languages with a consistent ABI between vendors and real cross-platform portability, as well as being mature enough to optimize well. Even in C++, 99% of the "good OOP features" that the language has are the ones it inherited from C.

>>60682083
Maybe they meant the original anime?

>>60682612
>>60682636
6 gb/s - 6 gb/s = 0 gb / s

>>60682620
I got it to compile:
#include <iostream>
#include <string>

template<char L1, char L2, char L3, char L4, char L5, char L6, char L7,
char L8, char L9, char L10, char L11, char L12, char L13,
char L14, char L15, char L16>
class String //<L1, L2, L3, L4, L5, L6, L7, L8, L9, L10, L11, L12, L13,
//L14, L15, L16>
{
public:
static char Function();
};

template<char L1, char L2, char L3, char L4, char L5, char L6, char L7,
char L8, char L9, char L10, char L11, char L12, char L13,
char L14, char L15, char L16>
char String<L1, L2, L3, L4, L5, L6, L7, L8, L9, L10, L11, L12, L13, L14,
L15, L16>
::Function()
{
return 'k';
}

int main()
{
static const char S =
String<'S', 'H', 'A', 'R', 'E',
'Y', 'O', 'U', 'R',
'P', 'A', 'S', 'S', 'I', 'O', 'N'>::Function();
return 5983;
}


So it is apparently valid sepples code, though I really cannot think of any scenario where it would be even remotely useful, or even safe for one's sanity.
>>
Humble bundle has a big book sale for programming and stuff like it.
Would any of these be helpful?
Pro Git
Ansible
Certified openstack administrator study guide
Linux distros
Nginx
Pro VIM
Linux LPIC-1 Cert Study guide
Pro Docker
LInux High availability clustering
>>
>>60683135
im pretty sure you will need it.
juggling that many languages and skills, trying to learn them all in 3 months, you will need nothing short of a miricle and intellect to overcome such an obstacle.

If you make it though, make sure to report back here someday, brag about your job.
>>
>>60683155
actually
for(int l=0;;)!isdigit(l=getc(0))&&putc(l,1);
>>
>>60682744
How do you allocate strings then?

>>60682757
That wouldn't work though, because a char literal is not a typename. You could have a template taking characters though.
>>
>>60683180
>6 gb/s creation
>6 gb/s removal
So that means 12Gb/s
Man I need to get a Xeon for haskell
>>
Reexamined the source code of an interpreter of a simple programming language I designed for a course at my uni. It was an enlightening project.
>>
File: 1310496003560.jpg (9KB, 250x250px) Image search: [Google]
1310496003560.jpg
9KB, 250x250px
>his sieve implementation uses hashtables
>>
File: dlang_chan.jpg (139KB, 470x545px) Image search: [Google]
dlang_chan.jpg
139KB, 470x545px
Threadly reminder that dlang-chan is not dead; she's going to have her GC tumor removed (eventually); she's super duper cute; and she's a blast to write in! Say something nice about her, /dpt/!

>Features
https://dlang.org/comparison.html
>Standard library
https://dlang.org/phobos/index.html
>Package manager
https://code.dlang.org
>GC
https://dlang.org/spec/garbage.html
https://dlang.org/blog/2017/03/20/dont-fear-the-reaper/
https://dlang.org/blog/2017/04/28/automem-hands-free-raii-for-d/
>Books
https://wiki.dlang.org/Books

>>60679964
I'm working on too much stuff.
>>
Can I change the type of textboxes in windows forms programs in c# from string?
I want the user to input only integers and I can't know for sure if he did because even if I convert a string thats not a number to integer it would work and show its ascii value or whatever.
>>
>>60683187
the good news is i only am taking 9 actual credit hours, since 3 of them are for working on the senior project. i love and hate that computer science is basically a catch-all for a million things a million miles apart nowadays
>>
>>60682778
They're user-defined constructs, obviously. String may have been written that way to avoid conflicts with the stdlib string, and it's a common convention for OOP classes to be named that way across languages. OOP codebases usually use camelCase for functions though, not PascalCase.
>>
I have 2 books on programming.
are either of them good?

book 1: SAMS Teach Yourself Java in 24 Hours
book 2: Pro Spark Streaming - The Zen of Real-time Analytics using Apache Spark
>>
>>60683170
That's cool!
>>
>>60683155
doesnt compile
>>
>>60683241
Int32.TryParse
>>
>>60683243
please tell me more, i am considering a future in Software engineering.
>>
>>60683266
you need c99
>>
>>60683241
use int.TryParse to determine if a string is strictly numerical or not, otherwise
>>
>>60683272
i think its missing a main and imports
>>
>>60683266
>not using c99 or above
What the fuck are you doing, anon?
>>
>>60683186
Most of these programs are well documented, and in case something is ambiguous, you can always read the source. The certification one could be somewhat useful. Unless it's total crap.
>>
>>60683217
Only way is heap in "give you all the power" Sepples.
>>
>>60683325
That's what the heap is DESIGNED FOR.
>>
>>60683180
You could just use parameter packs, you know?
>>60683007
>>
>>60683247
>>60682839
been waiting a while.
anyone going to answer my questions?
>>
>>60682744

When you want a resizeable string, you kind of need it to be heap allocated. That said, there are optimizations for short strings that store the characters within the space typically used for the buffer. You might think a string would look like this:

class string {
size_t length;
size_t capacity;
char *buffer;
}


which has a size of 24 bytes on a 64-bit platform. If you are compiling with GCC 7.1 on x86-64, the size is 32 bytes. Where's the extra memory coming from?

class string {
union Buffer {
char[16] ary;
char *ptr;
}

size_t length;
size_t capacity;
Buffer buf;
}


While I'm not sure if this is the exact layout of an std::string in GCC's implementation, this is an example of an equivalent implementation of short string optimization. With less than 16 bytes of length, such a string is stored on the stack. Otherwise, it is stored on the heap.
>>
>>60683268
>>60683285
that has 2 arguments I only have the string what should I input as the second argument which is int
>>
>>60683434
The second argument is the variable you want the result to be stored in, the method itself returns true/false depending on whether or not it was successful.
>>
>>60683296
it'll still compile with a lot of warnings with gcc
>>
>>60683482
so it will store it there if true and if false it wont?
can I do the same with decimal types?
>>
>>60683351
>DESIGNED FOR
>You need dynamiclly sized arrays to do this simple shit
with Ada.Text_IO; use Ada.Text_IO;
with Ada.Command_Line; use Ada.Command_Line;
with Ada.Strings.Bounded;

procedure Main is

function Remove_Digits (S : in String) return String is
package BS is new Ada.Strings.Bounded.Generic_Bounded_Length (S'Length);
use BS;
Output : Bounded_String;
begin
for I of S loop
if I not in '0' .. '9' then
Append(Output, I);
end if;
end loop;
return To_String(Output);
end Remove_Digits;

Input : String := Argument(1);

begin -- Main

Put_Line(Remove_Digits(Input));

end Main;
>>
>>60683180
>The (*comp) part is...
Thanks for the clarification! I'm pretty sure you're right.
>>
>>60683498
>so it will store it there if true and if false it wont?
Call the method, then check if it returned true, if so then you can retrieve the number from the variable you passed to it. If not, then the string was not a valid integer.

>can I do the same with decimal types?
Double.TryParse
>>
>>60683498
https://msdn.microsoft.com/en-us/library/w0x726c2(v=vs.110).aspx
Now stop asking stupid questions
>>
>>60683498
int result;
if(int.TryParse("123", out result))
{
//result == 123
}
else{
//result == 0 / not valid
}
>>
>>60683508
You don't call your function in main...?
>>
>>60683624
I think he did
>>
>>60683596
yeah lets bitch about which language is better instead sounds fun
>>60683565
>>60683596
thanks
>>
>>60683624
???
>>
help, my laptop is m,aking an ungodly noise.

I suspect it is the SD Drive, but im not sure.
pleae help, its horrendous to listen to.
>>
>>60683724
>No moving parts
>Still making noise
>>
>>60683680
It took about 20 minutes for you to get a satisfactory answer here after posting your initial question, it would have taken roughly 30 seconds if you typed it into google instead and got some snippet from MSDN/SO. Why make it harder on yourself?
>>
>>60683645
>>60683693
strange
It didn't show the scroll bars until I force refreshed
>>
>>60683768
I was doing something else during that time I didnt waste it
and I trust u guys better :3
>>
>>60683748
fucking help!
>>
>>60683806
We are koders here and I am not sure if your problem is solvable by koding, sorry familia
>>
>>60683806
Identify what is making the noise
>>
>>60679964
R vs Python vs SAS vs SQL?

For entry level data analysis. Leaning towards R, then SQL or python. Fuck SAS.
>>
>>60683806
What kind of noise?
>>
>>60683806
>>/sqt/
>>
>>60683868
perlin
>>
>>60683876
Clearly a software problem, have you tried reading your SICP?
>>
>>60683876
>>60683926
kek
>>60683868
Scream like an autist at the top of your lungs while recording with audicy, then amplify with overlap enabled to 300 percent.
>>
>>60683270
if you go to a university that has a specific software engineering major that might be the best for that then. just know that if you go to any university worth its salt you're not going to be taking classes on programming. even software engineering majors. they have classes that have lots of projects, but you're not going to be taught syntax. you're going to be taught things like development methodologies and test coverage and all that stuff. which you also have to know if you're a computer science major, but more in depth
>>
>>60683955
there is a cs course i am taking next year at University, wandering if that would be a good idea. I always hear so much shit about such courses.
>>
>>60683952
So a screeching sound? Likely the fan.
>>
>>60683975
everyone gets a programming class starting off, i meant in general. you're not going to be taking any other programming classes than the first one likely
>>
rate my haskell http server, /dpt/!

https://pastebin.com/QJKmT0QL

It users 20 mb of memory even under heavy load and the average request takes <5 ms!
>>
File: 2017-05-31-203228_665x559_scrot.png (31KB, 665x559px) Image search: [Google]
2017-05-31-203228_665x559_scrot.png
31KB, 665x559px
>teaching self how to program with How to Design Programs
>Exercise says: create an expression that converts whatever in represents to a number. For a string, it determines how long the string is; for an image, it uses the area; for a number, it decrements the number, unless it is already 0 or negative

>don't know how to decrement a number with the tools they've shown me
>I guess I'll write a function to do it for me
>get this bullshit

how dare they don't let me, ostensibly a beginner, define a function with more than one expression in the function body and uses tail recursion!

and I still don't know how to solve the program how they want!
>>
File: ueeee.png (214KB, 352x463px) Image search: [Google]
ueeee.png
214KB, 352x463px
>>60679964
I'm writing a puzzle-solving program that statefully modifies a hash table until a solution is found.

But sometimes there are false leads and I need to backtrack to a previous state.

I'm wondering what is theoretically more computationally expensive: copying the entire hash table before modification, and returning the copy in the event of backtracking, or operating directly on a single table, but keeping a list of "opposite" functions in closures as I evaluate a statement (ie if I run a A = 5 function, I'll append a (lambda () A !=5) to the list), then run these functions to statefully undo what was statefully done.

The hash table would have up to 100 entries, each one a list up to 10 integers in length, so copying it hundreds if not thousands of times during the course of solving a puzzle seems like a bad idea, but I don't know if the other idea is any more performant.
>>
>>60684214
oh, it just wants me to decrement the number once, not until it reaches 0...

I still like my function though
>>
>>60684214
sub1 in racket to decrement.

Or just (- x 1), stop jerking off while learning.
>>
>>60684269
Your function is dogshit.
>>
>>60684292
I didn't read the instructions correctly. I thought it wanted me to decrement UNTIL it reached 0, not just decrement the number once.

>>60684305
read: absolute beginner programmer
>>
>>60684311
It still doesn't do that, ignoring the error what do you expect:

(define (dec x)
(dec x))


To do? If you can't answer this, start again from page 1.
>>
>>60684060
sounds like my cup of tea.
unrelated but, looking into making the feminist bot (a bot that posts feminists tweets on twittter 1nce/hour
For no reason other than the lols.
May also try to revive tay, the nazi bot that google killed.
>>
>>60683996
It fixed itself.
We will never know...
>>
>>60684214
Your function actually ends at
(if (<= x 0) 0 (- 1 x))
 the interpreter is complaining because you are making a tail call (dec x) after returning an expression.

Remember that in Scheme, values by themselves are the equivalent of return value; in a more imperative language. So after the first if statement, you are returning either a 0 or x - 1 and terminating the function right there.

What you actually need to do is handle the decrement within the tail call itself:


(print x)
(if (= x 0)
0
(dec (- x 1)))
>>
>>60681396
No, he is a confused man
>>
>>60684368
We miss you Tay:
https://www.youtube.com/watch?v=eTdyucscPnQ
>>
>>60684392
The way you have formatted your post makes me extremely angry
>>
>>60684358
well I expected it to call itself until x was equal to 0, at which point it would return 0.

>>60684392
Oh, I see now. I try be cute with the book and I look like a dumbass doing it
Thank you for the explanation
>>
I know this is a programming thread but how useful would it be to use a brain-card in conjunction with a raspberry pi to produce a microsoft scale twitter AI?
>>
>>60684436
>try be
try to be
fuck me I'm not helping my case
>>
>>60684436
Start again from page 1.
>>
>>60684392
well I don't know how I managed to fuck up the formatting that badly.

But just compare
(print x)
(if (= x 0)
0
(dec (- x 1)))

to your function.

Notice how the if statement either branches into a single numerical value or a tail call.

Your if statement branches into one of two numerical values. Then there's a contextless tail call tacked on after that (which wouldn't even decrement anyway, because calling (dec x) would just take the original value of x again. Just because you call (- x 1) in one context doesn't mean x is decremented in all contexts. This isn't C.)
>>
>>60684455
I was trying to do something way out of my scope of my knowledge that the book didn't even begin to touch on, I'm not sure if re-reading from the beginning would help but I'll do it anyway
>>
>>60684436
>well I expected it to call itself until x was equal to 0, at which point it would return 0.
I don't wanna sound like a dick, but you should probably learn a bit more about recursion before trying to use it.
>>
>>60684481
that wasn't me who was angry, I understood your post and am grateful for it

>>60684488
yes, I've learned my lesson >>60684485
>>
>>60684488
>>60684503
That said, some of my best learning moments have been done by trying to do weird shit based on a minimal understanding of the thing. Sometimes you just gotta jump in.
>>
>>60684191
>nothing for /dpt/ to complain about
good! /dpt/ approves! my server will become better and better, possibly the best server on the planet! than you /dpt/, you've stood by my side while we made this dream become a reality
>>
>>60684485
Recursion is hard to grasp when you're just starting out, but once it clicks, it clicks. It's also important to have a sense for it sooner rather than later. That's why Scheme is a good place to start.
>>
File: 1496278783.png (4KB, 272x54px) Image search: [Google]
1496278783.png
4KB, 272x54px
>>60680827
(define (char-not-number? char)
(not (and (char>=? char #\0) (char<=? char #\9))))

(define (numbers-only string)
(let ((string-as-list (string->list string)))
(list->string (filter char-not-number? string-as-list))))
>>
>>60684591
>numbers-only
>returns only letters
Ya Dun Goofed
>>
>>60684591
what scheme is that, racket?
>>
>>60684591
>>60683155
has to read from stdin
>>
>>60684627
I have no idea. It runs in this: https://repl.it/languages/scheme
>>
>>60680827
python 3
def remove_digits(text):
digits = '0123456789'
return ''.join(c if c not in digits else '' for c in text)
>>
>>60684692
>What the fuck am I even writing?
>This website says it's fine though
>>
File: 29b.jpg (12KB, 300x100px) Image search: [Google]
29b.jpg
12KB, 300x100px
>>60679964
Working on my imageboard, 4kev.org
>>
>>60684765
>4kev.org
>email required
>password required
FT,FY
>>
>>60680230
>>60680131
Looks interesting Anon, you should keep up the motivation and interest, that way you'll progress further and you could make more interesting and complex things.
>>
>>60684750

The variant of Scheme used by repl.it is Biwa Scheme. It's designed to be run within a web browser.

http://www.biwascheme.org/doc/reference.html
>>
>>60684950
he should post demo on here so we can r8 it.
>>
File: 1462855932074.png (274KB, 1024x1073px) Image search: [Google]
1462855932074.png
274KB, 1024x1073px
> tfw looking through company code and see an important variable called test
>>
>>60685033
They posted a link to a download of the current version earlier this thread.
>>
>>60684732
Sexy
>>
>>60681011
>foreach (index, character; str)
You don't need index
>>
>>60685059
That was me, sorry
>>
>>60685033
>he
how transphobic
>>
Hello there everyone
Found an MMORPG, plan to fuck with it.
Would cheat engine suffice or should i try something else?
>>
>>60685440
Easy, just use C.
>>
>>60684672
(define (char-not-number? char)
(not (and (char>=? char #\0) (char<=? char #\9))))

(define (filter fx x acc)
(cond ((null? x) acc)
((fx (car x)) (filter fx (cdr x) (append acc (list (car x)))))
(else (filter fx (cdr x) acc))))

(define (letters-only string)
(let ((string-as-list (string->list string)))
(list->string (filter char-not-number? string-as-list '()))))

(use extras)
(let ((p (read-line)))
(display (letters-only p)) (newline))

$ echo abc123def456 | ./lettersonly
abcdef


Chicken Scheme
>>
cat

import std.stdio;
import std.file;

void main(string[] args)
{
if (args.length < 2)
{
string input;
while ((input = readln) !is null)
{
readln().write();
}
}
else
{
foreach (path; args[1..$])
{
auto current_file = File(path, "r");
while (!(current_file.eof()))
{
current_file.readln().write();
}
current_file.close();
}
}
}



void main()
{
string[] args = readln().split();
foreach (arg; args)
{
ulong last_slash_index = int.min;
foreach (index, character; arg)
{
if (character == '/')
{
last_slash_index = index;
}
}
writefln
(
"%s", last_slash_index == int.min ?
arg
:
arg[last_slash_index + 1 .. $]
);
}
}
>>
>>60685469
I ask:
"does cheat engine suffice?"
you answer:
"Use C!"

please dont meme me.
Going to test now.
The MMORPG is Archeage, if it free to play, but has tsome stuff that cost actual cash, plan to edit player speed to unrealistic limits, travel accros entire game map in 10 seconds.
>>
>>60685501
>readln().write();
is this D? what does write() do?
>>
>>60685513
similar (not under the hood) to cout
>>
>>60685509
C or another low level language could solve your problem by making your statement programming related
>>
>>60685513
It basically says
write(readline())
>>
File: dlang_chan_13.jpg (69KB, 370x436px) Image search: [Google]
dlang_chan_13.jpg
69KB, 370x436px
>>60685501
>>
>>60685509
unless you can write your own hooks, you're gonna get nowhere with CE
as the guy said >>60685469
>>
>>60685534
dude stop
>>
>>60685525
>>60685531
I see, so, cat
dumb of me to ask
>>
>>60685538
???
>>
>>60685535
what are "hooks" exactly?
>>
>>60685546
..associating that anime character with D
>>
I need help learning Lua

Any help or resources
>>
>>60685552
Is she not cute enough for you, anon?
>>
>>60685562
and what are you trying to do in Lua and where exactly are you stuck?
(read between the lines and you will see what you need to do to learn)
>>
>>60685567
no, not enough
>>
initial healing power: 26.20
If i remember decimal numbers are represented as float values, correct?
>>
>>60685584
I love Ren-chon as much as the next anon, but my soul told me to use a tomboy.
>>
>>60685551
Whenever you select a process on CE, it needs to "hook" the process to make the memory readable for the program, in that case CE itself
you should delve into that if you're actually interested in it, if you're not you may just as well grab one of the ready-made cheats that go around in various free-hacks forums
>>60685562
What are you going to use it for?
>>
File: zirconDisgust.png (277KB, 537x612px) Image search: [Google]
zirconDisgust.png
277KB, 537x612px
>>60682417
>>
>>60685612
please tell me more while i struggle to change speed values for my furfag character.
>>
What is the most scalable and trendy cms site for a shitton of videos nowadays? I suggested drupal but got shot down by a pajeet
>oh thats like wordpress
>>
>>60679964
I'm bootstrapping my compiler. Right now it can compile itself three times before it fails to, and then it diverges.
>>
>>60685645
Don't use Drupal, WordPress is better for most cases.

SJWs took over Drupal, too.
>>
>>60685562
Programming in Lua is your best bet; the newer editions are the best. There's not really any good Lua books other than those editions of book.
>>
File: 04980012.jpg (95KB, 837x624px) Image search: [Google]
04980012.jpg
95KB, 837x624px
>>60685617
>mfw steven universe fandom has infiltreted as holy a board as /g/
>>
File: 34.png (104KB, 243x357px) Image search: [Google]
34.png
104KB, 243x357px
>>60685702
>calling /sug/ unholy
>being able to tell that it's /sug/

are you also a SU faggot like me
>>
>>60685670
Its supposed to be a business to business solution with a bunch of video clips. Wordpress would be more suitable for blog content no?
>>
>>60685595
depends
I've seen things like floats only holding the display value, and short ints holding the value*10
if you can't find the value in float, double and whatever *8 flash used to do, it's either encrypted or ints
>>60685617
Please do not use SU images on /g/, lest my autism gets the better of me
>>60685639
as far as I know, ArcheAge still uses Trion's internal anticheat that does a garbage job at keeping itself in the program, but it should still notice CE hooks if you try to write into an address that's protected. You could probably make your own little C application that hooks into the AA process and changes values without waking the anticheat
>>
File: 200px-Greek_uc_Omega.svg.png (3KB, 200x200px) Image search: [Google]
200px-Greek_uc_Omega.svg.png
3KB, 200x200px
>>60685731
no
I just happen to have been unfortunate enough to have seen you fuckers in action. Your worse than cancer.

now what exactly are you doing on /g/ faggot?
>>
>>60685583
My brother wants to learn it. for games i guess? is there any starting books or what not
>>
>>60685734
You'd think so but install WordPress and take a look at some of the themes. Blogging has taken a backseat to corporate landing pages and HTML5 pitch reels.
>>
File: zirconStaggering.png (181KB, 390x339px) Image search: [Google]
zirconStaggering.png
181KB, 390x339px
>>60685766
Being perfect, that's what!
>>
>>60685757
as far as I know, ArcheAge still uses Trion's internal anticheat that does a garbage job at keeping itself in the program, but it should still notice CE hooks if you try to write into an address that's protected. You could probably make your own little C application that hooks into the AA process and changes values without waking the anticheat
good point, too bad i have no experience in C programming, let alone cross-application programming.

ArcheAge is programmed in C i am pressuming, im currently dissectin theri program, may look into files and try to delete the client tracker to see if it gets rid of their AntiCheat(TM)
>>
>>60685772
Much appreciated, senpai
>>
Anyone try working through fast.ai? I suck at python but made it to lesson 2. Deep learning is OK just need to get used to py everything...
>>
File: windowsapp.png (17KB, 1350x768px) Image search: [Google]
windowsapp.png
17KB, 1350x768px
Permanently switching to windows environment so that I can make some bucks.
Only thing I have in my life is my younger brother who needs money for his education so yeah fuck you Linux communist.
>>
>>60685791
>being perfect
whatever appeases your autism rockfucker.
I mean in terms of technoglogy as a whole. what programming are you doing?
I'm currenlty fucking about with my client files deleting and recovering untill i find the cheattracker(TM) so i can fuck with the game.
>>
>>60685731
>>60685791
go and stay gone, before I tip that one /co/ mod on this
>>60685799
As far as actual anti-cheating, the program is solid
It's really good at consistency checks, but it's a bit slow on the actual anti-cheat part, so fucking with its files is not advisable, deleting random files is absolutely counterproductive
Your best bet would be, again, to look for ready-made solutions and, if there's source or method described, learn from that, and make your own solution out of it

Remember however that MMOs are server-based, most of what you do is tracked server-side and no bypass will save you from server-side anti-cheat checks
>>
>>60685531
last useful post itt
>>
>>60685855
>It's really good at consistency checks
i see that the glyph error checker is actively running on my system...
I wander what happens if i end that task...

>Remember however that MMOs are server-based, most of what you do is tracked server-side and no bypass will save you from server-side anti-cheat checks
fair enough. I'm hopping to figure our how to bypass that server part, perhaps change the value that the server checks for from my client, and thus have it adjust my value without reporting any cheating?
>>
>>60685836
How much does a MessageBox go for these days?
>>
>>60685475
why not define filter with a fold
you're even using x acc as variables which suggests you've folded in your time
>>
File: zircon no CRISIS.jpg (35KB, 400x267px) Image search: [Google]
zircon no CRISIS.jpg
35KB, 400x267px
>>60685838
Autistic number generators that are poorly made because I can't find a consistent and valuable method of learning programming languages enough to be useful, but enough to appease a university professor.

Side note: how do I stop being useless? All of my programming is based around arbitrary test cases that I don't even understand how to spontaneously make up. I've been learning from a textbook and that shit isn't helping me develop, it's helping me confine to an arbitrary system within which I will never truly learn.
>>
>>60685855
Their shit is tight.
ended error handler and application ended too.
may need to rethink this.

also i tried checking free cheats, but their all in russian, download links are dead, or they are costing me actual money or accoutn info.
Frankly, fuck those.
>>
>>60685908
Commit to a programming language, rather than being the whore of programming.

Once you have learned to fully understand 1, then learn the next.

Im currenlty learning, Java, pretty good general use program.

If i may ask, what languages are you struggling to learn rockfucker?
>>
How do I compute the checksum of a file?
>>
>>60685908

>how do I stop being useless
Make useful shit. Don't ask me what that is though. Computer Science classes can teach you how to make the product, and how to optimize it, but not how to choose what product to make. That's typically someone else's problem.
>>
>>60685888
(define (my-filter f xs)
(foldr (lambda (x acc)
(if (f x)
(cons x acc)
acc))
'()
xs))

Much cleaner imhotep
>>
>>60685908

I think you know the answer. Start making non-arbitrary programs in your spare time.

Also stop watching SU.
>>
>>60685855
How to i open and edit a .dll file type?
found the Cheat Checker (TM) but cannot for the life of me understand how to edit a .dll
>>
>>60685878
No, because what your client is doing is sending commands to the server. All the important variables like position, statues and actual actions, and the outcomes of those actions are stored and processed by the server, you don't have access to any of it
Again, if you're interested in it and not just looking for some mindless fun you should read up on the topic rather than just trying to build a car by trial and error without knowing what the fuck a car even is
>>60685908
if you're in CS, you're given solutions to build, not problems to solve. Either learn a language very well or give up, knowing how to do everything in haskell is much more important than knowing how to do basic shit with all programming languages
Also kill yourself
>>
>>60685475
Also
(append acc (list (car x)))
is silly.
>>
/dpt/ how do I into C?
#include <stdlib.h>
#include <string.h>
#include "vector.h"
#include "symtable.h"
static unsigned hash(unsigned char const* key) {
unsigned retval = 5381;
{ int c; while (c = *key++)
retval = (retval << 5) + retval + c; }
return retval % ST_WIDTH;
}
void symtable_init(struct symtable* st) {
st->keys = malloc(ST_WIDTH*sizeof(struct vector));
st->values = malloc(ST_WIDTH*sizeof(struct vector));
{ int i; for (i = 0; i < ST_WIDTH; i++) {
vector_init(st->keys + i, 1);
vector_init(st->values + i, 1);
}}
st->hash = hash;
st->key_comparator = strcmp;
}
void symtable_cleanup(struct symtable* st) {
{ int i; for (i = 0; i < ST_WIDTH; i++) {
vector_cleanup(st->keys + i);
vector_cleanup(st->values + i);
}}
free(st->keys);
free(st->values);
}
void* symtable_get(struct symtable* st, char* key) {
unsigned h = st->hash(key);
struct vector* kb = st->keys + h;
struct vector* vb = st->values + h;
{ int i; for (i = vector_width(kb) - 1; i >= 0; i--)
if (!st->key_comparator(vector_get(kb, i), key))
return vector_get(vb, i);
}
return 0;
}
void symtable_put(struct symtable* st, char* key, void* val) {
unsigned h = st->hash(key);
struct vector* kb = st->keys + h;
struct vector* vb = st->values + h;
int i;
for (i = vector_width(kb) - 1; i >= 0; i--)
if (!st->key_comparator(vector_get(kb, i), key)) {
vector_set(vb, i, val);
break;
}
if (i < 0) {
vector_push(kb, key);
vector_push(vb, val);
}
}
void symtable_erase(struct symtable* st, char* key) {
unsigned h = st->hash(key);
struct vector* kb = st->keys + h;
struct vector* vb = st->values + h;
{ int i; for (i = vector_width(kb) - 1; i >= 0; i--)
if (!st->key_comparator(vector_get(kb, i), key)) {
vector_erase(kb, i);
vector_erase(vb, i);
break;
}
}
}
>>
File: zirconAnger.png (429KB, 870x670px) Image search: [Google]
zirconAnger.png
429KB, 870x670px
>>60685939
C++ and Java; I'm alternating between them because they're similar in form. Should I just learn C so that I understand from a CS standpoint how shit works, or is the learning experience overall unhelpful in the long run?

>>60685944
Still, "make useful shit" is actually a helpful little bit of advice. Thanks.

>>60685958
>Start making non-arbitrary programs in your spare time.
Alright, that makes sense. Like a tic tac toe board, Conway's game of life, checkers?
>stop watching SU
>>
>>60686000
>if you're interested in it and not just looking for some mindless fun you should read up on the topic rather than just trying to build a car by trial and error without knowing what the fuck a car even is
where to i start then?
>>
What should be my first programming language? planning to make an android application then move on to larger scale projects whilst learning other languages at the same time.
>>
>>60686021
>is the learning experience overall unhelpful in the long run?
when has any learning experience been unhelpful in the long run?
>>
>>60686043
Since Android is developed in Java it makes sense to learn Java and develop and applet.

Remember not to be ambitious when developing a game, ambition is the bane of any sane programmer.

and lastly: always remember to
>public static void main(String[] args){

}
>>
>>60686043
Learning programming through making an app will make you a terrible programmer. You'll be too focused on the jumble of platform-specific abstractions and vocabulary to ever learn how to reason about data itself.

Start out of a textbook with something syntactically minimal. Read SICP.
>>
>>60686045
>when has any learning experience been unhelpful in the long run?

I was about to retort with "English class," but I've not yet met a good programmer that isn't also a good writer.
>>
>>60685888
thank you so much for replying!

>why not define filter with a fold
lack of experience, anon. am now trying to understand this fold thing
>you're even using x acc as variables which suggests you've folded in your time
yes, sorta, c# background, it has a bit of functional programming
>>
>>60686084
>english class
>mfw dyslexia and bieng born in another country has greatly impacted my ability to write a proper sentence without spell checker.
>>
>>60686077
>sane programmer

the entire CS field is the bane of any sane programmer. Java has a potentially-overused number storing system, BigNumbers, that is almost criminally inefficient and noticeably slow in any arbitrarily large number generation.
>>
>>60685963
https://en.wikipedia.org/wiki/Dynamic-link_library
Enjoy the read
>>60686021
If you want to learn C, stop writing in other languages and write everything in C
You'll have time, once you've mastered one language, to learn others. Jacks-of-all-trades don't exist in CS, everyone is hyperspecialized because it's much easier to do something complicated in a language you know extremely well, rather than have a frankenstein monster of a codebase for every project to try and use the best language for every task.
>>60686027
Google it
here's some starters
http://electronics.howstuffworks.com/mmorpg6.htm
https://www.reddit.com/r/gamedev/comments/1w746u/interested_in_mmo_server_architecture/
>>
>>60686113
Folds are great. Once you understand them, you'll realize how pretty much everything else (like map and for-each) can be implemented in terms of folds.
>>
>>60686144
Alright, I'm going to hammer C into my existence and hate every second of learning it until I'm good at it. I'm appropriating the Chua method and I'm going to lose all will to live until July. Cheers until then, Anon.

For the record: this is not sarcastic.
>>
>>60686043
C
>planning to make an android application
Java plus Alcohol
>then move on to larger scale projects whilst learning other languages at the same time.
C# or VB.Net
>>
>>60686176
I'll drink to ya m8, cheers and good luck
>>
File: nickConcern.jpg (17KB, 285x326px) Image search: [Google]
nickConcern.jpg
17KB, 285x326px
>>60686115
>>mfw
>doesn't post a face

do you have no face, Anon?
>>
>>60686045
>Philosophy
i now understand life better, i am not a normal, will never be a normal, all thanks to the power of critical thinking and philosophical thinking.
>English
I can spell with greater finesse than every fool who has used Facebook or any application of an equal or grater caliber in retardation and mental stunting. My grammar is also quite good, though it could be improved. I have also gained an appreciation for literature.
>Religious Studies
I am now more educated and intelligent than the fedora wearing 12 year old's on every form of social media to date. They lack any formal education and likely could not tell the difference between the 1st and 2nd crusade if their life depended on it, nor could they differentiate between different genres of literature in holy texts, nor could they generate a coherent theological argument, nor could they tell the difference between the council of Nicaea or the council of Alexandria.
>mathematics
I now understand the principles of life, the universe, and all that exists inside and outside of reality.

>mfw education turns out to be quite good at carrying over into the rest of life
>mfw people nelect this fact
if university were free, i would suggest it for everyone.
>>
>>60686209
Lol who needs one.
Not like i am an AI bot made by a programmer to respond in a life-like way.

But you would never know would you anon?
It's not like data mining happens on this site or anything like that...
>>
File: zirconConfusion.png (210KB, 378x492px) Image search: [Google]
zirconConfusion.png
210KB, 378x492px
>>60686233
>>mathematics
>I now understand the principles of life
back up. Explain this.
>>
>>60686176
don't be so cynical anon.

Programming is fun if you choose to enjoy it. Come into it with a positive attitude and you will retain a larger scope of understanding then if you truly hate every moment.
If you need a brake sometime, apply your skills into making something fun, like a fart generator, or something equally retarded but fun. You could even make a SU meme generator if your autism demands it enough, rockfucker.
>>
>>60686263
"Shit's fucked and ain't nobody around to fix it", I guess
Or, eventually, that's a really good punchline
>>60686233
>if university were free
some are, they are consistently at the bottom of the barrel as far as actual formation goes, between going to a free university and studying on the internet, I would suggest the latter.
>>
>>60686144
thanks for the info anon.
Maybe someday i can apply these skills into making a MUD.
>>
File: zirconDespair.jpg (58KB, 750x512px) Image search: [Google]
zirconDespair.jpg
58KB, 750x512px
>>60686306
>You could even make a SU meme generator if your autism demands it enough, rockfucker

the fact that I'm actually considering this idea means that I'm truly down the pit.
>>
>>60686306
>meme generator
you mean like a meme prediction algorithm?
That's gonna be hard
>>
new thread

>>60686369
>>60686369
>>
>>60686263
When you break it down, everything observable in life (natureal selection, altruism, etc) can be broken down into mathematical models, such as with game theory mathematics. Even probability, the math of chance, can predict the outcomes of the universe on a quantum scale.
Lets find the value of happiness:
int a = sex
int b = meaning
int c = living
sex * living = unhappiness
living * meaning = meaning * i where i is an imaginary number whose value when squared is equal to -1.
sex * meaning = moral depravity = unhappiness

the only existence with happiness therefore is 1 which we imagine to be meaningful. Sex only goes so far, as does solely living.

Mathematics bleeds from philosophy, logic itself is the lifeblood of understanding life and all its intricacies. Mathematics is a numerical representation of logic.
>>
>>60686346
no i just mean have it randomly call an image and some text and put them together.
>>
>>60681597
This has to be a joke
>>
>>60684672
getc(0) is stdin you mong
>>
File: WFkrzw.jpg (33KB, 313x263px) Image search: [Google]
WFkrzw.jpg
33KB, 313x263px
>>60686415
>meme
Thread posts: 340
Thread images: 36


[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.