[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: 366
Thread images: 31

File: daily programming thread2.webm (2MB, 600x338px) Image search: [Google]
daily programming thread2.webm
2MB, 600x338px
old thread: >>57757949

What are you working on, /g/?
>>
>>57762899
>Fagposting
Fuck off
>>
Why is doing math in snake_case more scary than doing it camelCase? Especially when you throw in a

val = SCREAMING_SNAKE_CASE/PROG_WIDTH
>>
>>57762899
messing with bittorent stuff but i can't get the checksum of the torrent file to match correctly?

torrent = open('/home/debiankek/debian-8.6.0-amd64-CD-2.iso.torrent', 'rb')
d = bencoder.decode(torrent.read())


hashcontents = bencoder.encode(d[b'info'][b'pieces'])

new = hashlib.sha1(hashcontents).digest()

link = urllib.parse.quote(new)

print(new)
print(link)


b'\x9eH\x06_\ng`d\xcbXy\xfe\xb8\x97d} \xe6R\x15'
%9EH%06_%0Ag%60d%CBXy%FE%B8%97d%7D%20%E6R%15


you have to send that in a request as the file_hash to get a response of seeders but it's not working?
>>
File: 1474321545115.jpg (62KB, 690x460px) Image search: [Google]
1474321545115.jpg
62KB, 690x460px
>>57762962
Hime isn't a fag, he's straight
>>
File: out.webm (150KB, 640x480px) Image search: [Google]
out.webm
150KB, 640x480px
i think i finally got my fucking box2d editor working

https://krogank9.github.io/box2d_editor/editor.html
>>
what's the easiest, most newfag friendly way to make a simple python gui?
>>
>>57763027
>create something
>use it to destroy
why
>>
>>57763030
Learn a real language.
>>
>>57763016
No, YOU'RE the fag.
Stop spreading your LGBT/SJW agenda.
>>
File: 1418673922875.png (125KB, 318x368px) Image search: [Google]
1418673922875.png
125KB, 318x368px
Is this how URL rewriting is done?
url.rewrite-once = (
"^/(.*)/thread/([0-9]+)$" => "/board.cgi?board=$1&thread=$2",
"^/(.*)/([0-9]+)$" => "/board.cgi?board=$1&page=$2",
"^/(.*)/$" => "/board.cgi?board=$1",
)


It works, but I feel like it's gonna screw up at some point.
Can I also do url-rewriting on URLs embedded in the page?
>>
>>57763090
What the fuck are you blathering about?
>>
>>57762899
kek, what subs are these?
>>
>>57763110
[&] subs
>>
File: fall.webm (754KB, 640x480px) Image search: [Google]
fall.webm
754KB, 640x480px
>>57763074
for fun
>>
>>57763131
you're a monster
>>
>>57762899
so I know using pyinstaller I can get one .exe that works on windows systems without python or the libraries used in the script. is there something like this for linux i.e outputs a .sh file or even a .py file that would work without having the necessary libraries
>>
>>57759844
>The key of Church encoded data is that the values are their folds. When you have a Church numeral m, you apply a value z and a function s to it and get a result that is z with f applied to it m times. So if m = 3, mzs = sssz.
>Successor is taking a numeral m and adding 1 to it, i.e. the fold of m+1 applies the function to the fold of m. The fold of 0 is simply the initial value.
>
Zero = λz s. z
Succ = λm z s. s (m z s)

Not the anon you were answering to but this implies that s is a function that returns a function, right?
Also, in the Succ function, why is m needed at all? Why can't Succ just be
Succ = λm z s. s (z s)
?
>>
>>57763120
Thanks
>>
>>57763095
>(.*)
That's the only thing I think could possibly be 'problematic', as it will allow 'empty' boards: "mychan.tld//thread/12345"
Also, I personally would be more explicit about what is allowed. ([a-zA-Z0-9]+) or something.
>>
File: pump it up.webm (1MB, 640x480px) Image search: [Google]
pump it up.webm
1MB, 640x480px
>>57763149
>>
>>57763249
you have to be stopped
>>
>>57763131
>9-11_simulator.cpp
>>
>>57763249

responding because black gril.
>>
File: chloe got ugly.jpg (373KB, 2000x1494px) Image search: [Google]
chloe got ugly.jpg
373KB, 2000x1494px
>>57762899
w-what anime is this?
>>
>>57763280
Don't bother. It's shit.
>>
>>57763280
Boku
>>
thread theme: https://www.youtube.com/watch?v=CduA0TULnow
>>
>>57763320
approved
>>
>>57763298
>Boku
this isn't plebbit you retard. gtfo!
>>
I can't believe I forgot about hashtables/maps, such a massive improvement over two arrays because of the O(1) search time

Received: ok
Using cached data for: 5834
Using cached data for: 10028
Searched : 15679 visual novels.
Most similar visual novels to: Irotoridori no Sekai (5834)
Irotoridori no Hikari: 0.6906065416836789
Akai Hitomi ni Utsuru Sekai: 0.3375752366440113
Himawari to Koi no Kioku: 0.33451765706306413
Hime-sama, Ote Yawaraka ni!: 0.30345141345976734
Suzukaze no Melt -Where Wishes are Drawn to Each Other-: 0.298207664647376
Hoshizora no Memoria -Wish upon a Shooting Star-: 0.287907080777765
Sakura Strasse: 0.2861597642933576
Dekinai Watashi ga, Kurikaesu.: 0.26033535528338553
Amnesia World: 0.2583107415055369
Ashita no Kimi to Au Tame ni: 0.25411398985461553
Boku ga Tenshi ni Natta Wake: 0.2507292835494647

Irotoridori no Sekai (5834) vs Irotoridori no Hikari (10028): 0.6906065416836789
Time elapsed: 1263ms
>>
>>57763336
>gtfo!
This isn't reddit retard, >>>/out/
>>
File: comeagain.png (38KB, 514x616px) Image search: [Google]
comeagain.png
38KB, 514x616px
Catching up on chatbot stuff after a data failure causing me to lose about six months worth of work.

Basically, wrote in the capacity for concise "yes", "no", and "maybe" statements with meaning derived from conversational context, so that verbose imperative statements aren't necessary all the time.

Hoping that with this in place (and a bit more functionality revolving around semantic inquiries on the part of the system next on my list), I'll have the bare minimum foundations for taking a shot at discourse-driven unstructured natural language learning.

Though I sometimes wonder whether this bloated implementation is worth it. But hey, it's here, and I'm always free to experiment with other approaches on the side.
>>
File: the-fall-of-westen-society.png (132KB, 420x473px) Image search: [Google]
the-fall-of-westen-society.png
132KB, 420x473px
>>57763249
>>
>>57763572
haha manlet
>>
>his language doesn't even add drink coasters

https://hackage.haskell.org/package/profunctors-5.2/docs/src/Data.Profunctor.Types.html#Costar
>>
Excluding differences in directives and syntax and stuff, do all assemblers ultimately produce the same binary from the same assembly source? Do some assemblers try to optimize your code?
>>
>>57763002
>you have to send that in a request as the file_hash to get a response of seeders but it's not working?
botnet
>>
>>57763661
>do all assemblers ultimately produce the same binary from the same assembly source
Basically.
>Do some assemblers try to optimize your code?
I've never heard of any that do. 99.99% of code that assemblers receive is already optimised by compilers, and when a human writes assembly code, there is usually a specific reason and/or special instructions that they've used, so they can't have an assembler fucking that up.
>>
Could a struct in C have function pointers as variables, and therefore effectively be a class?
>>
>>57763814
Sure, but there is no point, and that would only hurt performance.
>>
Please direct me to what to use for learning Java. I want to obtain super thorough knowledge. I am down with purchasing books. I will use it for writing free software.

Thanks.
>>
>>57763814
Why would that make it a class?

Method's are more like this:

ret_t my_method(class_t* this, param_t...);
>>
>>57763828
Java is a horrible language.
OOP is a horrible programming paradigm.

Don't use either.
>>
>>57763814
YES
>YES
YES
>YES
YES

I was reading about it last night
http://stackoverflow.com/questions/840501/how-do-function-pointers-in-c-work

>>57763826
>>57763835
fug u, i wuz first ;_;
>>
.>>57763154
Package it with the necessary libraries
>>
>>57763846
Why the hell are you posting like a complete retard?
There are actually some standards here. Fuck off if you're not going to adhere to them.
>>
>>57763661
I think LEA is sometimes optimized to a MOV on x86
>>
>>57763846
see >>57763867
>>
>>57763837
OK. What did you use to learn your preferred language?
>>
>>57763826
Do function pointers hurt performance? Should I avoid them?

>>57763835
>Why would that make it a class
Functionally it is only different in that it does not have a constructor, right?
>Methods are more like this
I learned C++ first, probably unfortunately, you might have to explain that one.
>>
Why is OOP a considered bad paradigm? I get that a lot of people use it terribly, but that doesn't make it intrinsically bad.
Is it objectively terrible other than how people use it?
>>
>>57763908
No, VIRTUAL methods are like structs with function pointers - because they change depending on the instance.

Regular methods (*and virtuals) just take an extra parameter
>>
>>57763908
>Do function pointers hurt performance?
Usually, yes.
- They make your struct bigger (more copying, more cache space taken)
- Compilers usually can't inline them
- Extra dereference to call the function

They have their uses, but this is not a good one.
>>
How do you set unusual size types in C?
I want to set, like, 13-bit type, how can I do that?
>>
File: inthebag.jpg (56KB, 358x429px) Image search: [Google]
inthebag.jpg
56KB, 358x429px
>>57763280
It's Himegoto

>>57763796
This isn't true - well, it's true that the binaries will be almost the same, but to say that the binaries are the same - as in hash-to-the-same-value kind of same - is false.

>>57763661
Nope, not always. The problem is not everything is quite specified exactly. One example is labels. What address does a label point to when you write it in assembly? The programmer doesn't have to care, much like higher level languages. But it turns out that in x86 (likely every other architecture worth its salt) the size of a jump instruction varies depending on how far you have to jump.

It's actually a bit more complicated than that, ( http://x86.renejeschke.de/html/file_module_x86_id_147.html ) but the important thing is if you don't have to jump very far, x86 has short, relative jumps which are faster and take less instruction cache.

So here's the problem: the assembler can't know for sure which type of jump it can use just from one pass. Using better jump instructions actually makes the code smaller, which can lead to being able to use better jump instructions elsewhere. So this becomes an optimization problem - which some assemblers don't bother to solve.

These types of "variants" of instructions are all over the x86 architecture. For "simpler" parameters (or simply for archaic reasons), certain instructions can be encoded in a special smaller way than if you used the "generic" format. The whole setup is messy to be quite honest. I'm going to brush up on my x86 encoding and give you an example of encoding the same add instruction two different ways.
>>
>>57763929
>but that doesn't make it intrinsically bad
Sure, misuse doesn't make it intrinsically bad, but that doesn't mean that it's not for a different reason.
The reason it's shit is because it encourages shared mutable state in programs, making them hard to reason about, and leads programmers to design their programs in ways that don't fit the problem (or any problem).
https://www.youtube.com/watch?v=QM1iUe6IofM is a pretty good critique of the paradigm.
>>
>>57763976
>but to say that the binaries are the same - as in hash-to-the-same-value kind of same - is false.
I never claimed that. I said "basically". I meant it's the same for all practical purposes.

>>57763974
You can't.
You will have to use a larger type and just ignore the extra high bits.
>>
>>57762899
do people unironically watch sexual themed cartoons like this and get off to it?
>>
>>57763996
>>57763974
Actually, I want to make an addendum to what I said about unusual types.
You sort of can make unusually sized integers, but only as part of a struct:
struct int13 {
unsigned val: 13;
};

However, these will be represented as an int, so there will be no space savings.

The feature is called 'bitfields'.
>>
>>57763977
>video watching in progress
If OOP is the vast majority in the industry, then why should I bother trying to switch myself off of object oriented programming?

Also what are the general thoughts on OOP patterns in C?
>>
>>57764021
yeah
>>
File: style.png (6KB, 677x545px) Image search: [Google]
style.png
6KB, 677x545px
What do you think about my programming style?
It seems that the braces take a lot of screen space.
>>
>>57764035
>If OOP is the vast majority in the industry, then why should I bother trying to switch myself off of object oriented programming?
The video addresses this.

>Also what are the general thoughts on OOP patterns in C?
A waste of time. It only leads to more confusing code with worse performance.
>>
>>57764035
>Also what are the general thoughts on OOP patterns in C?
laughing and mockery
>>
>>57763996
>I said "basically".
I see; sorry for the confusion.
>>
>>57763796
Most compilers have options to completely disable all optimizations. Optimizing assemblers have the same.
>>
Does anyone have a reference manual for the C standard libraries? All I want is a list of the libraries, they're contents, and a brief description of what they do.
>>
>>57764220
>Does anyone have a reference manual for the C standard libraries?
There is only one standard library. Calling a header file a "library" is wrong and misleading.
>All I want is a list of the libraries, they're contents, and a brief description of what they do.
www.open-std.org/jtc1/sc22/WG14/www/docs/n1570.pdf
But just google for the header files in my screenshot.
>>
>>57764287
>There is only one standard library. Calling a header file a "library" is wrong and misleading.
Eh.

Thanks, annex B is want I wanted, more or less.
>>
I know java and C#, give me a new language to learn to make 2D games.
>>
>>57764471
Sepples, Lua.
>>
>>57764471
Haskell
>>
>>57764053
>The video addresses this
The video doesn't address this. It provides very compelling arguments against object oriented programming, and I may be a bit convinced, but the industry uses OOP, and I'll likely have little choice in the matter
>>
>>57764027
I thought bitfields are only up to 7.
>>
>>57764512
>t-the industry
t. the industry's bitch
>>
>>57764471
68000 assembler
>>
>>57763977
>video
I'd wish for some transcript
>>
>>57764525
It believe the limit is the number of bits in the representation type. So sizeof(unsigned) * CHAR_BIT, usually 32.
>>
>>57764561
Don't try to make everything an object to minimize scope, instead limit state through program flow and scope. There, I saved you 3/4ths of an hour.
>>
Why am I getting banned for off-topic discussion everytime my post does not contain tech-related buzzwords like Windows, macfags, pajeet and Javascript?
Mods please stop bullying me
>>
>>57764050

I personally prefer my left braces to be beside the parentheses, not below. But that's okay, it's still readable like that.
>>
>>57764050
they do

try :{
or: {
>>
>>57764530
Yes it is but, unfortunately, we must all submit to it, unless you want to go freelance.
>>
>>57762899
im working on your mom
>>
>>57764634
That's just butthurted jannies.
>>
>>57764471
try bixnood. it's really hard to use
>>
File: h.jpg (67KB, 720x1143px) Image search: [Google]
h.jpg
67KB, 720x1143px
Reminder that /dpt/ isn't a trap general, it's a stoic masculine general.
>>
>>57764602
But how would you handle GUI without objects?
>inb4: use some language with real classes
You wish! If I wanted to run OOP programs on raw machine, there's no such language! C++ is horrendous, Object Pascal is dead, Rust and Go are jokes, Java and C# run inside VM, and C# is primarily Windows-only.
>>
File: 1439321766063.png (47KB, 350x339px) Image search: [Google]
1439321766063.png
47KB, 350x339px
>>57764780
Ada
>>
>>57764780
>Rust
Rust is not an OOP language.
>>
>>57764812
It doesn't comply with the joke state of Rust.
>>
>>57764812
He didn't even respond to my post in a way that made any sense. He's out for (you)'s.
>>
>>57763977
try to make and maintain a AAA video game without OOP

go ahead faggot

hardmode: do it with a team and try not to get murdered
>>
>>57764806
is cute
>>
>>57764806
I think it's nice.
Can you advertise it?
>>
>>57764860
I don't know any AAA game worth playing.
>>
>>57764780
>C++ is horrendous
why?
>>
>>57764860
>I don't know how to write non-OOP programs
>Therefore it's not possible to write non-OOP programs
Good one, idiot.
>>
I've compiled some c++ programs with visual studio's visual c++ compiler but it doesn't work on other computers.
What should I do?· change the compiler?
>>
So DPT I'm planning on learning programming in my free time at work, my boss said he's fine with this as long as I only do it in spare time anyway he's said I can't install any software on the system (vim & git) so I was thinking of putting codebox and git on my server this way the files are always saved on my server and I can just SSH in git push etc. anyone here use codebox or have used it? I know this isn't the perfect setup but will it be good enough?
>>
>>57765321
Either link statically against msvc libc/c++ or tell people to the install the vcredist for whatever visual studio version you're using.
>>
>>57765321

Are you running same program same operating system or same program different OS? Former should work unless you've got some issues with dynamic linkage. In the latter case, you're an idiot. Only x86 Windows understands an .exe compiled for x86 Windows, unless the target OS is using some sort of compatibility layer or emulator.

On a slightly related note, if you ARE trying to port to other operating systems, I would suggest using a different compiler. You probably shouldn't be using VC++ either way, but you can't use it if you want to target, say, Linux or Mac OS X. You'll need Clang or GCC. The former has bindings for being integrated into Visual Studio, the latter is more mature and is able to target quite a few more operating systems and CPU architectures.
>>
>>57763106
he's not wrong. You're trying our patience.
>>
>>57764860
Quake3 is not objected oriented, it's procedural idiot. And it was an AAA title moron. Stop smoking the reefer for a second and use your brain for once, lel.
>>
>>57765321
You can cross-compile if you know the target architecture you're trying to build to, i.e. from x86 to ARM64. Otherwise, use something like LLVM or icc if you want somewhat sane cross-platform capability.
>>
Is there a function in string.h in c that checks if a certain element is a certain character and if it is it exchanges it with another character?
>>
I want to learn something new and was thinking of Racket or Clojure.
>>
>>57765592
I compiled using the x86 setting in a pc with windows 8 and tried to run the program in a pc with windows 7.
It seems the problem is that the pc with windows 7 doesn't have the needed Visual C++ Redistributable packages.

>>57765540
>tell people to the install the vcredist
that's not something I would like to do.
>>
>>57765750
>he doesn't know what a hash table is
>>
>>57765824

Dynamic linking problems then. Welcome to DLL hell, friend. One of the many problems that could be solved if Windows used a FUCKING PACKAGE MANAGER!
>>
>>57765750
if (s[x] == 'c') s[x] = 'f';
>>
File: ObolcBf.webm (693KB, 640x360px) Image search: [Google]
ObolcBf.webm
693KB, 640x360px
Ask your favorite programming literate anything! (r/IAMA)

>>57765781
http://braveclojure.com/

>>57764860
almost every aaa games are now data oriented
>>
>>57765839
>he confuses a lookup table for a hash table
>>
>>57765865
>http://
>>
Should I learn C++ or C--?
>>
>>57766364
C+=
>>
>>57766375
im afraid that isn't a language
>>
>>57766393
You're wrong.

https://github.com/ErisBlastar/cplusequality
>>
>>57766399
its not a language.
just a more inclusive version of c++
>>
>>57766409
Don't tell it what it identifies as, shitlord.
>>
I have finally cut down execution time of my back-end tool from the 9 seconds of the initial Python proof-of-concept to under 500ms.

And it only took two weeks of rewriting the whole thing in C (plus a vital bit of inline assembly).
>>
File: let the bodies hit the floor.webm (1MB, 800x600px) Image search: [Google]
let the bodies hit the floor.webm
1MB, 800x600px
i think i finally got all the bugs out
>>
>>57766450
>inline assembly
What fucking tool were you writing where inline assembly improved performance significantly?
>>
Can I ask for basic JS help?

I want a text input to go to a url when text is entered and the enter key is pressed.

I've got it half working with

function doSearch(query) {
var destUrl = "https://www.youtube.com/results?search_query=";
window.location.href = destUrl + query;
}

<form action="#"><input type="text" onchange="doSearch(this.value)"></form>


The first time text is entered and enter is pressed it appends the input value to the current URL and then the second time it will go to the destination url. But SOMETIMES it goes to the destination URL on the first time. Wtf is going on?
>>
File: SOS.png (31KB, 1222x443px) Image search: [Google]
SOS.png
31KB, 1222x443px
My program stops working at test 1.6, I get no compile errors, can you guys spot what might fuck it up?
>>
>>57766532
SSE2 sorcery in the service of clustering fairly large (30+GB on input, though a lot is pre-computed) datasets.
>>
So my cousin is autistic and she is a c programmer.
>>
>>57766666
*I might end up rewriting that using compiler intrinsics just for readability.
>>
>>57765854
Don't support Windows. Fixed.
>>
>>57766515
he's a big guy
>>
>>57766613
Could games be uninitialized?
>>
>>57766666
Nice quints
>>
>>57766705
for you
>>
>>57766762
No I initialize it in my main, I used games the same way in a function further up, so I really can't figure out why it's fuckng up at test 1.6.
>>
Man, fuck winapi
>>
>>57766704
That's my solution to that problem as well.
>>
>>57766704

Don't support 90% of desktops. Lovely idea.

>>57766824

Windows driver model is worse by an order of magnitude.
>>
How come SQLite is such an excellent piece of software?
>>
>>57766922

SQLite has 787 times as much test code as it does have actual library code.

https://www.sqlite.org/testing.html
>>
File: 1480472863063.png (159KB, 222x306px) Image search: [Google]
1480472863063.png
159KB, 222x306px
>spend 3 hours trying to access windows services from my program
>it's a fucking mess of retarded winapi syntax and handler passing

>end up writing "net start [servicename]" into a .bat file and calling it from my program
>took 1 minute

FUCK WINAPI
>>
>>57766948
for what purpose?
>>
>>57766983

Making sure absolutely nothing can go wrong.
>>
Does this thread have a disproportionate amount of leftists like in a certain other general? I'd like to know beforehand what I'm getting myself into.
>>
>>57766983
You wouldn't want your db to fuck up would you?
>>
>>57767024
>leftists
I'm not a dumb american, so political terms like "left" and "right" mean nothing to me.
>>
>>57767001
for what purpose? it's a couple of guys and a public domain codebase
>>
>>57767037
>it's a couple of guys and a public domain codebase
So? It's a vital piece of software that a lot of people depend on.
>>
>>57767036
I'm not one either so I don't even know what you're on about, retard
>>
>>57767049
sure but what do those guys get out of it?
>>
>>57767057
Some people enjoy software development.
>>
>>57767036
"Left" and "right" originate from France, though.
>>
>>57766951
How hard it is to make three consecutive calls?
OpenSCManager
OpenService
StartService
>>
http://vocaroo.com/i/s1liCOwMUhuZ

This was made by a neural network. What are you working on /dpt/?
>>
>>57763908
You should just do
struct foo { int x; };
void foo_method (struct foo* f) { ... }

struct foo q;
...
foo_method(&q);


Rather than
struct foo {
int x;
void (*method) (struct foo*);
};
void foo_method (struct foo* f) { ... }

struct foo q;
q.method = foo_method;
...
q.method(&q);

unless you need the ability for the method to be dynamically reassigned (which would require a function pointer anyways). It should be very obvious why the former is much more simple.
>>
>>57767170
the first is completely different than the second and none of these are methods.
>>
File: communist-symbol.png (27KB, 800x800px) Image search: [Google]
communist-symbol.png
27KB, 800x800px
Which programming community has the most communists?
>>
>>57767414
haskell, probably
>>
Hello /dpt/
>>
>>57767470
Hi!
>>
>>57767414
the GNU federation
>>
>>57767470
Hey!
>>
>>57767452
Why?

>>57767480
I mean what language
>>
>>57767492
what does the language have anything to do with the programmers
>>
>>57767492
Academic language (naturally more leftist), mostly used in industry by small shops.
>>
which is better:

user = input()
if 'key1' in user:
function(arg1)
elif 'key2' in user:
function(arg2)
elif any(x in user for x in ['key3', 'key4']
function(arg3)

or

dict = {'key1': function1, 'key2': function2, 'key3': function3'}

user_words = input().split()
for word in user_words:
if word in dict.keys():
dict.get(word)
else:
pass


I much prefer the second way as elif statement after elif statement quickly gets out of hand but there's issues with storing two keys for one value.
>>
>>57767507
forgot to end code heh
>>
>>57767414
please spoiler such images next time.
i was eating
>>
>>57767517
Communism is good.
>>
Making your own service is the only way to make a system wide keybinding to an arbitrary function on windows, right?
>>
-> 57767539
nah, it's shit.
>>
>>57767507
Second is sexy.
>>
>>57767501
>(naturally more leftist),

Er... what the fuck am I reading?

Since when has critical thinking been "leftist", you mouth breathing fucking retred?
>>
>>57767553
i wish most academics would use it outside their field as well
>>
>>57767553
Haskell is a language used in academe, many people in academia are far-left.

2/10 you got me to reply.
>>
File: SOS.png (58KB, 1569x480px) Image search: [Google]
SOS.png
58KB, 1569x480px
I'm having some trouble with a fscanf this is the input:
R1 Lor 18/07/2015 16.00 FCM - VFF 2 - 0 7.232
My program puts the awayteam name onto the hometeamname, it also copies both names onto the time of day.

Can you guys spot what I'm fucking up, or what I should do differently?
>>
if you aren't a leftist, you aren't thinking
>>
Need to learn WPF.

I have decent background with WinForms.

Anyone has a decent book recommentdation, or shall I just go with the msdn tutorial (seems to only grasp the basics)?
>>
>>57767576
What the fuck, m8.
>>
>>57767591
?
>>
>>57767567
>many people in academia are far-left.

Logic failure...

Has /pol/ left their backdoor open again? One of their inmates appears to have escaped.
>>
>>57767540
>windows
>>>/sqt/
>>
-> 57767611
>>>/lgbt/
>>>/leftycuck
>>>/r/fullcommunism
>>
>>57767616
When my video game becomes a smash hit and a cult classic, you'll regret posting this because I'm not going to port it to GNU/Linux just to spite you.
>>
>>57767634
>GNU
theres no such thing
theres just Linux
>>
Hello guys, can I have some help? I'm just learning C# and already trying to work on something to my uncle's store.

Basically I have some .txt files generated by a program as the following: http://pastebin.com/TbwQr4uE

How can I manipulate the data from this txt file? I was considering using StreamReader. Pass each line to an array and then turn the data into a CSV file.

Okay, I have no clue on how to do this or if this is possible. You don't have to give me all the code of course, I have been trying StackOverFlow and some google research but I couldn't find a tutorial about this.

Can someone enlighten me? Which methods can I use etc.
>>
Guys, is PostgreSQL just shit? Does it have an input limit or something? I can't seem to input a lot of shit at once, but doing it by parts seems to work fine. I've checked for error, and there are literally none.
>>
>>57767576
>Unbounded %s in (f)scanf
It's like you WANT buffer overflows.
I'm going to need to know about how local_game is defined to be able to help.
>>
>>57763030
Anybody?
>>
>>57766922
It isn't. The API sucks balls and it's a pain to use.
It's actually easier to roll your own binary format.
>>
>>57767611
I come from /pol/, and the guy you're replying to is retarded. He must be from reddit
>>
>>57767705
Local_game is type struct.
>>
>>57767739
Yes, but I want to know the struct definition.
>>
>>57767728
I come from reddit, and the guy you're replying to is retarded. He must be from reddit too
>>
File: struct.png (14KB, 456x303px) Image search: [Google]
struct.png
14KB, 456x303px
>>57767754
Here
>>
>>57767786
What are DAY_SHORTEND, CHARACTERS_TIME_OF_DAY, and TEAM_SHORTEND defined as?
>>
>>57767540
No? What are you even trying to do?
>>
>>57767797
I want to write the contents of the clipboard to a file with a press of a button.
>>
>>57767797
Those are just ints, it's how many characters there are in the arrays
>>
>>57767808
>>57767794
Oh shit wrong commen, thoe are just ints
>>
>>57767808
You probably replied to the wrong post: >>57767794

>Those are just ints, it's how many characters there are in the arrays
Yes, I know how C works. I'm trying to see if you have a buffer overflow, so I need to know the exact sizes.
>>
>>57767820
That might be the problem I think I'm allocating 1 to many spaces
>>
>>57767804
ahk is way to go. It has functions to work with files and the clipboard.
>>
>>57767839
Fuck that, I want it to be native.
>>
>>57767833
>>57767820
No that wasn't it sadly. Day_SHORTEND is 3 TIME_OF_DAY is 5 and TEAM is 3
>>
>>57767843
> Fuck that, I want it to be native.
wut

Regardles of that you dont need to make it a service to work. Regular application can have global hotkeys registered to them.
>>
How useful is IRC for programming? I mean every programmer I've ever spoken to about chatting and stuff says they use IRC and I have a spare server so I'm thinking of setting up a bouncer and getting into IRC (using IRRSI on windows and linux) should I bother? how newbie friendly is it? and what servers/channels should I be using?
>>
>>57767833
It's really a symptom of you using (f)scanf. %s doesn't know about the size of the buffer, so it will happily write past the end. It's the exact same reason why gets() was so shit and removed it from the standard.
The 'fix' is to use %4s, which will read a string of at most 4 characters. Note, this DOESN'T include the null terminator, so the buffer must be at least 5 characters big.

>>57767867
No, that's exactly it. You haven't left space for the null terminator. So when you read "time_of_day", it will go past the end and read "hometeam" as well.
>>
>>57767540
>>57767843
You don't have to have a service; as long as you have a running process, you can detect keypresses.
>>
>>57767689
pls help
>>
>>57767886
Fuck IRC, i use /dpt/.
>>
>>57767890
Holy shit thanks dude, I've been trying to figure this out forever, it works now.
>>
>>57767886
why do you need a spare server unless you want to start an irc server?

just join some established ircs for what technologies you use.
>>
File: 1429017313721.png (239KB, 512x512px) Image search: [Google]
1429017313721.png
239KB, 512x512px
>>57767414
lisp
>>
>>57767918
sever will be for an IRC bouncer so I can receive messages when offline and since I swap from laptop to pc a lot the channel scrollback would be nice

also thanks I just googled it and you can list all channels so I'll just do that and join whatever looks interesting
>>
>>57767886
https://discord.gg/AhNST
>>
>>57767886
Find the discord related to your language.

That's where I get the most feedback, and discord has decent code tags.
>>
>>57767930
>sever will be for an IRC bouncer so I can receive messages when offline and since I swap from laptop to pc a lot the channel scrollback would be nice

Holy shit, just use Discord

It will do all of that without requiring a spare server, and it's likely there's a very active channel for your language.
>>
>>57768050
>Just use this proprietary software, because I hate programming and you should hate it too!
>>
>>57768083
But I like programming, anon. And I think other people should like it, too.

I don't see setting up and maintaining a server for something so silly as being enjoyable, and I can't imagine many people actually wanting to go out of their way and do that, beyond thinking that it's the only way to get the behavior they desire.
>>
>>57768050
No I'm not using that
>closed source
>voip
>spys on you
>mines your data
>no way to make it encrypted
>marketed to gaymers
>bloated
>>
>>57762899
Can someone recommend me a quick tutorial to become acquainted with javascript? There are thousands and it would be nice to have a non meme one recommended, preferably something that's not going to waste my time explaining what a for loop is.

>inb4 javascript
I know I know, I just want it to be as painless as possible.
>>
>>57768050
Real 1990s hackers use IRC in their terminal
>>
>>57766670
That's redundant.
>>
>>57768205
Are you already experienced in programming? Then I'd suggest you just implement a bunch of data structures and algorithms in javascript a la:

https://github.com/classicemi/ebooks/blob/master/Data%20Structures%20and%20Algorithms%20with%20JavaScript.pdf
>>
>>57768208
they also wear leather, fingerless gloves, balaclavas, use rollerskates and smoke
>>
File: shit.png (191KB, 512x512px) Image search: [Google]
shit.png
191KB, 512x512px
this piece of worthless shit just made me lose hundred of lines of a SAVED file because system partition was full

should i switch to Emacs?
I'm on Debian Linux
>>
>>57768382
Emacs is great. Vim is good too. If you'd rather have a Notepad++ like editor you should check out TextAdept.
>>
>>57766670
>>57768250
kek

Anyway is she fat?
>>
File: sew.jpg (227KB, 1000x1407px) Image search: [Google]
sew.jpg
227KB, 1000x1407px
COMPLETE THE FOLLOWING SENTENCE

http://www.strawpoll.me/11767105
>>
>>57762899
"Lazy Load is a good candidate for aspect-oriented programming. You can put Lazy Load behavior into a
separate aspect, which allows you to change the lazy load strategy separately as well as freeing the domain
developers from having to deal with lazy loading issues. I've also seen a project post-process Java bytecode to
implement Lazy Load in a transparent way."

key sentence is last sentence. level 99 pajeets and java wizards, I need your help understanding how this would work.
>>
>>57768251
Thanks, I studied computer science and was hoping more for a quick "These are the functions in the standard lib, here are the datatypes on offer and the syntax is thus...btw here are some quirks and common pitfalls, also the conventional style is...." But this looks likes it will do. Thanks anon,
>>
>>57768472
>c
I bet the tutor that makes his/her noblegirl learn C also makes her practice the violin until her fingers bleed.
>>
>>57768491
>Open conf file
>Read dependencies
>Dinamycally load classes depending on what you need with ClassLoader
>>
>>57768448
thanks
>>
>>57768472
Where's the HTML option?
>>
>>57768611
Over at >>>/g/wdg/
>>
File: 1473589644715.jpg (91KB, 303x357px) Image search: [Google]
1473589644715.jpg
91KB, 303x357px
>>57767786
>number_of_spectators
>double
>>
>>57768699
He just considers anime fans as half human
>>
>>57768611
I would have added it if I could force people to pick a second option besides that. Obviously a young lady should have at least one real programming language at her disposal.
>>
>>57768749
>html
>not a programming language
triggered
>>
What's the best programming soundtrack
>>
>>57768815
it's a markup language
>>
>>57768824
https://www.youtube.com/watch?v=idXdwV0FOWU
>>
>>57768824
ASMR
>>
>>57768716
Why do you need double precision for that?
>>
>>57768824
https://r-a-d.io/
or if you actually want to be productive
http://musicforprogramming.net/
>>
File: so it is.gif (520KB, 302x270px) Image search: [Google]
so it is.gif
520KB, 302x270px
i need to learn c# in 20 days or less or my mother dies
this is my first Programming language but i know the very basics of how shit works
Any reccomendations on Ebooks/webportals/tutorials ?

i have 59 Ritalin Pills ready
>>
>>57768949
Here's what I usually recommend to complete newbies:
http://www.robmiles.com/c-yellow-book/

There's links to the EBook on the page, as well as code examples and other goodies.

Use Visual Studio Community 2015.
>>
>>57765865
>almost every aaa games are now data oriented
no thats just a meme
>>
File: 1476300038529.gif (4MB, 374x490px) Image search: [Google]
1476300038529.gif
4MB, 374x490px
>>57768986
Thank you very much for the information
ive heard of the yellow book before ill download it and start reading right away.
I have Visual studio 2013 Pro tho
Should i still get Visual studio community 2015 like you mentioned ?
>>
>>57769036
I would recommend it, yes.

There are some additional features that will make your life a little easier as your learn, like better IntelliSense suggestions and some language features.

Hell, VS 2017 will be coming out soon (it's in release-candidate), and you'd be way behind the times.

I don't know why you have Pro; there is virtually nothing pro/enterprise has that a budding programmer would use.

Also, stop putting a space before your question marks. Are you french or something?
>>
>>57768949
https://learnxinyminutes.com/docs/csharp/
>>
>>57769094
Not him but why do non french humans get so much irritated by our spacing ?
>>
>>57769094
No, i just got a new mechanical keyboard with usa layout after 5 years of using a microsoft sidewinder x4 keyboard with Latin american layout.
having lots of typos still adjusting
i should maybe elaborate on my goals on learning
i depend on programmers for my work and im sick and tired of hiring hindu fruits on freelancer and loosing money so ive decided to learn.

why c# ? cause i have like 10 projects with source code of custom software i had developed for about 10k USD by some badass hackerish doods and i wanna learn from their stuff
>>
>>57769151
When you're attempting to type English, you ought to type English.

It is incorrect to put a space before any ending punctuation in English. However, this is apparently correct in French, so I can understand the mistake.

>>57769168
Seems as good of a reason as any.

Feel free to post questions here. I can get you links to the /dpt/ and C# discords if you want more instant feedback.
>>
I just want you all to know how much I love Mackey.

Also I'm new to programming without an IDE, is Vim or Emacs worth learning over just using Gedit?
>>
>>57769211
>I can get you links to the /dpt/ and C# discords if you want more instant feedback.

That would be great breh.
>>
>>57769211
It's not and will never be "the /dpt/ discord"
>>
>>57769253
Nah. Just use geany or something.

Vim/emacs are only worth using if you're ssh'd onto the machine without x11 forwarding. Even that, it's better just to use nano
>>
>>57769260
>breh
>>
>>57769260
C#:
https://discord.gg/g9ZbD

/dpt/:
https://discord.gg/WNkvh

The C# discord is actually really good, plenty of active people. There's one kraut that is always online, rude as hell, but knows his stuff.
>>
>>57769253
Gedit > nano > vim > emacs > IDE shit

Prove me wrong.
>>
>unironically using discord
>>>/reddit/
>>
>>57769350
vim > gedit > nano >> IDE shit >> Sublime
>>
>>57769317
thanks
>>57769364
i already use it to scheme with my niggas
and clique dramas on vidya game groups i dont even play
>>
>>57769350
IDE master race > maintaining 30+ 3rd-party addons for a "Totally-Not-An-IDE" frankenstein text editor
>>
>>57769350
You're wrong.
>>
>>57769389
You're right.
Gedit > nano > vim > emacs > IDE memesterace >>>>>> Atom
>>
>>57769407
"""It's too simple.... i-it can't be efficient"""
>>
>>57769350
Every single development environment outside of autistic GNU/HURD users use an IDE to program.

Proven wrong :))))))
>>
>>57769427
Vim, Emacs, Nano and Gedit don't even come close the features I use every day out of the box.

I'd rather have those features available and ready-to-go when I set up my DE.
>>
>>57769454
Why are you stuttering on a text imageboard?
>>
>>57769465
>features I use every day out of the box.
like what?
>>
>>57768716
half god
>>
>>57769495
Because he's wrong and literally shaking because his bubble got burst.
>>
Non pajeet here.
Is java knowledge a must to find a job?
>>
>>57769496
I've already gone over this in multiple threads, I'm not typing it all out again just for you to essentially say either I don't "need" them, or you have no use for them.

Someday, I'll write up a comprehensive copypasta of features for a response, but that'll have to wait for another day.

Here's 3:
>Paste Special (allows me to copy JSON/XML/etc. and paste the data structure as a usable class)
>IntelliSense with hotkey filtering for class/method/property/etc.
>Add Service Reference which automatically creates usable class libraries from web resources, like a SOAP API with a WSDL
>>
>>57769540
C# has a fuckton of jobs.

Python, C, and C++ have about the same, and all have great job prospects, too.
>>
>>57769540
the real question here is: when pajeets will let java die?
>>
File: Polite_maid.png (761KB, 1000x1758px) Image search: [Google]
Polite_maid.png
761KB, 1000x1758px
http://www.strawpoll.me/11767105
>>
>>57769618
Stop posting this faggot. Nobody cares
>>
>>57769634
It's very important.
>>
>>57769643
Nobody cares
>>
>>57769618
Where's Haskell?
>>
>>57769656
It's still very important though.
>>57769662
I forgot Haskell, I'm sorry. I thought I'd limit it to some of the more popular languages, but I agree that haskell deserves to be an option
>>
How do you actually get good at programming? I feel like I'm stuck at the basics, unable to advance from doing extremely basic applications
>>
>>57769681
Create a game.
>>
>>57769681
Take on a project that is outside of your comfort zone.

Don't do something that you think you can do; do something that you have no idea how to do, and break it down into tiny tasks so you can properly research them as you go.
>>
>>57769696
>
>>57769681
don't be a vidya fag
>>
>>57767414
https://www.quora.com/What-programming-languages-are-used-in-north-Korea
>>
>>57769618
can someone explain why C is leading so overwhelmingly?
>>
>>57769681
Read "The Secret"
>>
>>57769736
Memes.
>>
>>57769736
Like calligraphy or knitting, it's an art that is quickly being forgotten.
>>
>>57769702
>Take on a project that is outside of your comfort zone.
aka. go to an uni
>>
>>57769675
>It's still very important though.
And yet nobody cares
>>
Fix my code please.
http://ideone.com/FYAby5
Output has to be "23146"
>>
>>57769764
Or get a job.

I didn't feel like I really knew how to develop applications until I was thrown into the deep end and learned all the ins and outs during my first year of employment.
>>
>>57769754
would it help you land a good husband?
>>
>>57762962
>>57763016
>>57763090
wtf this isn't some loli shit? It's even worse than I thought
Anime was a big fat mistake
>>
>>57762899
>>57762899
>>57762899
>>57762899
>>57762899

NEW THREAD >>5776930
>>
>>57769950
Wait AT LEAST until 310 posts in this thread, you stupid ass.
>>
>>57769871
Nah, if you want to win the Stall-Man's heart you need to know Lisp.
>>
>>57770130
lisp sucks hards, that's because is the language for women
>>
>>57770152
>that's because is the language for women
Because they're better at maths?
>>
>>57763169
>this implies that s is a function that returns a function, right?
Yes, because any Church numeral is itself a function.

>Also, in the Succ function, why is m needed at all? Why can't Succ just be
Succ = λm z s. s (z s)
?
Folding is recursive. That definition is totally incorrect.
>>
>>57770188
>women
>maths
top kek
>>
>>57769777
Bump
>>
C++ noob here. Explicit instantiation vs. specialization. What is the difference?
>>
>>57770188
Where did you get this idea from?
To me everything points to the opposite.
>>
>>57770211
Fair enough, your top kek says more than real evidence ever could.
>>
>>57770230
If you think of a template as a function, instantiation is calling the function with a particular value and specialization is having a branch inside the function.
>>
>>57770239
I assume you never went to college. I assume you neither read math related papers.
>>
>>57770208
>Folding is recursive. That definition is totally incorrect.
I'm sorry to be so dumb but if you were to encode 3 as a church numeral, it'd look like
Succ(Succ(Succ(Zero, S), S), S)
, right? Why exactly are the other arguments needed? I have the feeling that what's bugging me is that I'm trying to mix both abstract and concrete representations but I can't exactly put the finger on what I'm visualizing wrong.
>>
>>57770278
No, just
Succ (Succ (Succ Zero)))
. Then applying z and s gets you
s (s (s z)))
.
>>
>>57770262
I went to university? And I'm aware of some female mathematicians.
https://en.wikipedia.org/wiki/List_of_women_in_mathematics
>>
>>57762899
What does the editor''s note say trapfag?
>>
>>57769681
Set a goal that's quite high but has many 'this is useful' breakpoints.
People often suggest games because they're completely arbitrary. You can make something like asteroids easily but you can also make it a very large and complex project (mmo endless world asteroids in 3D with rpg elements).

But you can do something like solving a problem you have. Me for instance had issues sorting my porn effectively. So I started with a simple program that moved images between two folders based on shortcuts (1 for 'hentai' 2 for '3D'). It eventually became more advanced. Didn't just sort images, did searching and playback in videos. Deferred moves for performance reasons with optional in the background moving. Generated 'notable scenes' from videofiles so I could recognise them better etc etc.

That way you can actually push yourself without going through the easy bits again. And you learn to effectively evolve applications. Which is what you do as a programmer in the real world 99%of the time.
You rarely start from scratch.
>>
>>57770302
That list is like every phd woman ever in the history. Most of them are people like me: know a lot of maths and teach in academy and stuff, but never did nothing big.
>>
>>57770245
I don't like this explanation.
It's more about allowing the compiler to work with a more specific case. Where specialisation lets you implement for a specific type and instantiation lets you partially specialise a specific value. (I.e your pow function might not handle the pow(n, 0) case well. So you do partial specialisation and have it always return 1. You'd probably also want to deal with cases where n=0 and exponent = 1then and assert that's incorrect)
>>
>>57770302
https://en.wikipedia.org/wiki/List_of_men_in_mathematics
Do you know what it means?
>>
>>57770359
So? The implication made was that women can't do maths.
>>
>>57770302
Maybe you should see the success rates per student of x gender in pure maths or whatever.

Tends to be overwhelmingly in favor of women. But that goes for almost all degrees. Simply because women are better at academia and society hates men.
>>
>>57770376
What's wrong with my analogy?
>specialisation lets you implement for a specific type
i.e. branching on the type and doing something differently
>instantiation lets you partially specialise a specific value
That's not even right.
>>
>>57770390
they can, they are bad at it
>hurr I can multiply every number lower than 100 with 11
>>
>>57770404
>that's not even right
Well you can do it without implementing but that gives a fairly limited usecase.
And your explanation doesn't really fit that usecase.
>>
>>57770393
m80, I only asked "because women are better at maths?" to probe the anon claiming that Lisp is a women's language as it is it based around the evaluation of mathematical functions.
>>
>>57770442
Instantiation is whenever you use the template, like std::array<int, 16>.

>And your explanation doesn't really fit that usecase.
Why? Templates are just functions from types and integers to types.
>>
>>57770245
Thanks!
>>
>>57770412
That doesn't make sense, being bad at maths doesn't count as being able to do maths. You're either good at it or you aren't. Historical evidence proves that women can do maths.
>>
File: download.jpg (6KB, 314x160px) Image search: [Google]
download.jpg
6KB, 314x160px
epitafag reporting in.
>>
>>57770474
Unfortunately I now have a followup question.. Why not just make a non template version of the function or overload an already made one instead of using specialization. Sorry if I missed something pretty blatant that would tell me why just overloading instead of using specialization is not a good idea.
>>
>>57770489
I can also play drums, it's easy, but I will never be able to be in a band.
>women logic
>>
>>57770645
Just keep with the analogy. Why do you add a branch in a function instead of writing the new result out wherever it's needed?
>>
>>57769777
*fixes your code*
>>
>57770571
to the filterfag you go :^)
>>
>>57770667
Maybe the issue isn't >women logic but rather that you're using the wrong words to express what you mean?
>>
>>57770667
Did you intentionally come up with the worst possible metaphor? Being good or bad at playing the drums is an opinion that, while there is a consensus about what makes a good drummer, is still just an opinion.

There is no such thing as being a "bad" mathematician because if you cannot work out the correct solutions due to a lack of ability then you're simply just not a mathematician. Bearing that in mind, there were female mathematicians. So what would that seem to imply? Now whatever bullshit, smart arse, evasive answer you provide will not disprove your statement that women cannot do maths.
>>
>>57770728
I may just be retarded, but is it just for the sake of simplicity? I quite honestly cannot think of any other reason to not just overload. I read some more from the book and have not found an answer yet.
>>
>>57770939
>>57770412
>>
>>57770939
Prove*
>>
>>57770947
It's for the sake of reducing duplication.

For example, std::vector<bool> is specialized to be more efficient by packing the bits together instead of using an array of bools. If this was an entirely different type std::bit_vector or something, a type templated over T with std::vector<T> inside would not be able to benefit from it. You'd need to specialize it (or continue with not specializing and make a whole different type altogether).
>>
>>57770390
>>57770939

">women >maths" does not imply that women cannot add 2 and 2 together.

It implies there are little to no notable female mathematicians, and potentially only that the average female has much less of a propensity to learn and pursue maths than the average male.
>>
>>57770965
Great, so you're ending this debate by being as retarded as possible.

What is that even supposed to mean? That she's bad at maths because she can get those sums correct? Are you implying that this fictional person believes they're a mathematician based on that ability?
>>
>>57771024
that's what happen when a brain is flushed with feminist propaganda man
>>
>>57770997
Okay. That makes more sense, thanks.
>>
>>57771024
If that statistic is correct, how do we know that's proof of their lower intelligence. Because by acting like such a cock, you've provided the counter evidence that women are just as capable but they feel pressured out of mathematical-oriented academia by egotistical tosspots like yourself.
>>
>>57771087
I'm not the anon you're arguing with.

It is true; there are much less women in mathematics than men.

I never implied or otherwise said women have less intelligence.

However, women have less geniuses than men, as well as less retards; their bell curve is more centered and less extreme than the IQ distribution of men.

Women are also actively pursued with scholarships and affirmative action favoritism in under-represented careers and jobs, to the detriment of a potentially more qualified candidate, in some cases.
>>
>>57771087
By correlation, niggers do almost as bad as women in science.
>>
>>57771157
>niggers
African Americans.
>>
>>57769777
I can't honestly tell you what the fuck am i doing. but here.

#include <iostream>

using namespace std;

template<int a> class T {
public:
class A {
public:
static int f1();
static int f2();
};
class B {
public:
static int f1();
static int f2();
};

class te {
public:
void test();
};
};

template<int a> void T<a>::te::test() { cout << a << A::f1() << A::f2() << B::f1() << B::f2() ; }
template<int a> int T<a>::A::f1() { return a + 1; }
template<int a> int T<a>::A::f2() { return a - 1; }
template<int a> int T<a>::B::f1() { return a * 2; }
template<int a> int T<a>::B::f2() { return a * 3; }

int main() {
T<2>::te t;
t.test();
cin.get();
return 0;
}
>>
>>57771153
Where did you get any of that information from?
>>
>>57771178
Good solution.

I'd question why not just cout the value directly but C++ madness is C++ madness. Can't argue with it.
>>
>>57771177
no, pure africans, if not I would say black people, but black people does better than women (except than black women, of course)
>>
>>57771157
Why are you clinging on to this concept of being bad at stuff? You can't be a "bad" scientist because you either are one or you aren't.

Are you just making up with parameters so you can justify your anger that women and minorities are invading your sekrit club?
>>
>>57771178
i mustn't change the class declaration. I can only change the functions definitions. And i need two namespaces.
>>
>>57771326
tits or gtfo
>>
>>57771365
I'll take that as an admission of you being wrong.
>>
>>57771408
Do it if that makes you feel better with yourself and reinforce your delusions. After all, I'm a gentleman.
>>
>>57771445
Kek, alright m8.
>>
>>57771331
>homework
Gtfo
>>
>>57771553
It's not my homework. It's part of a larger project.
>>
>>57768946
r/a/dio is shit.
>>
where the fuck is the new thread?
>>
>>57771906
Got to wait for an OP to pick an Anime girl to post. Formalities right?
Thread posts: 366
Thread images: 31


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