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

pɐǝɹɥ┴ ƃuiɯɯɐɹƃoɹԀ ʎliɐp - /dpt/

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: 315
Thread images: 24

>>58860551 :pɐǝɹɥʇ plO

¿/ƃ/ 'uo ƃuiʞɹoʍ noʎ ǝɹɐ ʇɐɥM
>>
Stop posting threads early, you fucking faggot.
>>
>>58866073
Green Is My Pepper
>>
I like this thread, can we keep it?
>>
File: 1440427881714-1-w.jpg (110KB, 960x911px) Image search: [Google]
1440427881714-1-w.jpg
110KB, 960x911px
>>58866073
This is prime times for aus shitposting
>>
File: 1474364835290.png (232KB, 1178x1248px) Image search: [Google]
1474364835290.png
232KB, 1178x1248px
>>58866121
and where do you think OP's from?
>>
File: 1456625557320.jpg (208KB, 1319x606px) Image search: [Google]
1456625557320.jpg
208KB, 1319x606px
>>58866136
>tfw running your overclock"s during the heatwave
>>
#include <iostream>
#include <atomic>
#include <cstdlib>

template<typename T>
struct vect {
T x, y;
};

template<typename input, typename data>
class indexable_stack
{
public:

indexable_stack();
int push(input d);
input pop();

private:

int current_size = 0;
data* data_array = 0;

};

template<typename input, typename data>
indexable_stack<input, data>::indexable_stack()
{
data_array = (data*)std::malloc(10 * sizeof(data));
}

template<typename input, typename data>
int indexable_stack<input, data>::push(input d)
{
if (current_size < 10){
int pos = current_size;
data_array[current_size] = d;
current_size++;
return pos;
}
return -1;
}

template<typename input, typename data>
input indexable_stack<input, data>::pop()
{
input d;
if (current_size > 0){
current_size--;
d = data_array[current_size];
}
return d;
}

template class indexable_stack<int, int>;


template struct vect<int>;
template struct vect<std::atomic<int>>;

//I tried to create the missing function, does not compile
template<>
vect<long>& vect<std::atomic<long>>::operator=(const vect<long>& other)
{
x.store(other.x, std::memory_order_relaxed);
y.store(other.y, std::memory_order_relaxed);
return other;
}

template class indexable_stack<vect<int>, vect<std::atomic<int>>>;

int main()
{
//compiles:
indexable_stack<int, int> is_int;
is_int.push(20);
std::cout << "pushed: " << is_int.pop() << "\n";

vect<int> vect_int;
vect_int.x = 10;
vect_int.y = 20;

//does not compile:
indexable_stack<vect<int>, vect<std::atomic<int>>> is_aiv;
is_aiv.push(vect_int);
std::cout << "pushed: " << is_aiv.pop().x << "\n";

return 0;
}


How do I make indexable_stack<vect<int>, vect<std::atomic<int>>> work? Help please.
>>
File: 1460207177038.png (368KB, 636x694px) Image search: [Google]
1460207177038.png
368KB, 636x694px
>>58866073
>>58866136
australians are literally the best
>>58866073
thank you for using an anime image!
>>
>>58866199
What's the error?
>>
>>58866405
>pic
cute
>>
i need to practice android. someone give me something to make
>>
>>58866446
make a toilet simulator
>>
>>58866199
I'll take a guess and say because you're pushing
vect_int
, which is of type
vect<int>
, into is_aiv when you need to push an object of type
vect<std::atmoic<int>>
into is_aiv.

I don't normally do STL though
>>
dvorak > qwerty

prove me wrong
>>
>>58866469
Why do you want me to prove you wrong?
>>
>>58866448
so basically a zoomable map of india?
>>
>>58866487
i was thinking zoomable map your house but india works too
>>
>>58866469
Colemac for programming
Dvorak for writing English
>>
>>58866446
Computer vision with a phone camera
>>
>>58866481
cos u cant
>>
>>58866510
why would he do that then? how can you disprove something which can't be disproved? what kind of retardation is this?
>>
>>58866510
Do you want people to prove you wrong? Is this your sick fantasy?
>>
File: newseventsimages.jpg (91KB, 700x484px) Image search: [Google]
newseventsimages.jpg
91KB, 700x484px
>when you use call/cc in conjunction with traditionally functional processes like folds to gain performance but retain expressiveness
>>
>>58866541
who are you quoting though?
>>
>>58866541
my other car is a cdr
>>
File: nigga shit.jpg (155KB, 1385x1390px) Image search: [Google]
nigga shit.jpg
155KB, 1385x1390px
>>58866567
myself
I'm self-referential
>>
>>58866591
are you perhaps recursively defined as well?
>>
>>58866614
It's me all the way down.
>>
Doing a java project.
I have some code that might be shared my some classes, some of this code are general purpose algos.
I don't want to put it in some class that i then have to extend because i feel like this methods should be private if put into those classes and testing is going to be a pain in the ass.
Should i just make a myproject.Util package and stuff that code into various single purpose classes? Seems the cleaner method for testing.
>>
>>58866724
>java
stopped reading right there
>>
>>58866744
It's because you are a retard that can't understand that different languages fit different purposes.
>>
@58866790
You made this post because you are a retard who doesn't understand that some languages don't fit any purpose.
>>
>>58866790
Not him, but that's just a stupid argument that just tries to brush aside criticism.
You need to be able to evaluate your tools and be able to conclude that some tools really are useless and/or outclassed by different things.
>>
>>58866790
>uses java
>asks stupid beginner tier questions
>calls somebody else a retard
what did he mean by this?
>>
>>58866810
So java is outclassed by something in every single niche it could be applied to? Seems strange.
What if i want to prototype algorithm?
>>
To: 58866832
Java is by definition outclassed. It simply doesn't make sense for it not to be.
>>
>>58866808
this
>>
>>58866832
Does it have a REPL?
>>
>>58866849
What's a REPL? Is that some kind of special object?
>>
>>58866861
What's a Google?
>>
File: Guile-hdstance.gif (136KB, 313x475px) Image search: [Google]
Guile-hdstance.gif
136KB, 313x475px
>>58866073
Guile theme goes with everything, so does Scheme. He is also ameriburger and therefore has a commitment with defending your freedoms. It is the only true Scheme implementation. https://www.gnu.org/software/guile/
>>
>>58866832
>What if i want to prototype algorithm?
You use Python.
>>
>>58866888
>ameriburger
>defending your freedom
kek'd pretty hard right there.
>freedomS
also, fuck off with your retarded bullshit.
>>
>>58866897
Can't, python is too slow for the kind of shit i am prototyping.

inb4 i get asked what i am prototyping so faggots can waste more time telling me the algos they know nothing about would be ok in python

this general can be really shit
>>
File: 1453303001612.png (362KB, 700x700px) Image search: [Google]
1453303001612.png
362KB, 700x700px
>>58866920
>Goes on about performance
>Uses Java
>>
>>58866920
>ask a question without details
>get a general answer
>sperg out

lol
>>
File: 1474335032895.png (115KB, 289x277px) Image search: [Google]
1474335032895.png
115KB, 289x277px
>>58866920
Why the hell do you space your posts like that, redditor?
>>
>>58866912
freedom 0 1 2 3 fag
>>
>>58866930
That's just over generalization

>likes performance
>uses C
>instead of ASM
>>
>>58866950
Freedom is by definition singular. Anything plural is left wing garbage and not worthy of mentioning outside of your subreddit.
>>
>>58866930
python is slower than java if you don't use shit with c++ bindings, feel free to google

>>58866933
>get told that java is outclassed in literally everything, it is known
>i point out a case in which it is not
>woha you didn't tell me that!

lol
>>
>>58866973
>thinking Anonymous is one person
lol
>>
>>58866964
Singular means that a matrix has no inverse.
>>
>>58866973
see >>58866936
>>
>>58866956
You're incredibly naive if you think you can outperform an optimising C compiler in the general case.
It's not the 80's anymore.
>>
>>58866973
you really should fuck off back to your "sub". we don't need your reddit stink nearby
>>
>>58866998
Don't know about you, but I usually can. It takes more time of course, but the performance gains are worth it.
>>
>>58867004
>>58866988
never been to reddit

i find it tiring that instead of having a simple answer for a simple question this shit must devolve in anons trying to be the smartest kid on the block every fucking time, there is always someone that needs to let you know that your language is not ok, that what they do is better , avatarfagging, that you are a redditor and so on; you need to understand that if someone choose something like a language and it's question is not "hey anon rate my language pls" you need to either answer the question or shut the fuck up because you don't know the details behind what this person is talking about and why that language or whatever was picked
>>
>>58867047
I'm going to need proof of that.
Please post a non-trivial program you've written, as well as a similar and appropriately written (i.e. no fucking around) and we'll benchmark them.
>>
>>58867070
>written
written C program*
>>
   100000f10:    66 b9 00 f0              mov    $0xf000,%cx
100000f14: b1 04 mov $0x4,%cl
100000f16: 66 d3 c1 rol %cl,%cx
100000f19: b8 01 00 00 00 mov $0x1,%eax
100000f1e: 0f b7 c9 movzwl %cx,%ecx
100000f21: 83 f9 0f cmp $0xf,%ecx
100000f24: 75 16 jne 100000f3c <_main+0x2c>

Why does this code jump at 100000f24?
>>
>>58867070
It's proprietary so you will have to sign some papers first. I will be visiting the US this week so we can meet up if you're American.
>>
>>58867094
What a believable excuse you have there.
>>
>>58867060
>you need to either answer the question or shut the fuck up

back to stackoverflow
>>
>>58867060
No one needs to answer your question, friendo :^)
>>
>>58867060
This is 4chan, you fuckface.
People are going to reply to whatever the fuck they want to, and they don't give a shit about your feelings.
Also. you are not (and never are) entitled to an answer.
>>
>>58867089
is my computer sick?? or am i just clobbering flags?
>>
>>58867105
What makes you think this is an excuse? And I didn't refuse, I just disclosed the full extent of the situation to you.
Are you white and not from California? That's the only two conditions you need to fulfill.
>>
>>58867060
>she thinks there are avatarfags in this subreddit
yup, plebbitor confirmed.
>>
>>58867107
>>58867120
you forgot your anime avatar to sound even more smart, low level general killing here
>>
>>58867136
>Are you white and not from California?
Sure. But I'm not a burgercuck.
>>
>>58867165
>Reaction images are avatars
Learn the fucking definition of terms before you use them, you fucking redditor moron.
>>
>>58867165
"The most powerful programming language is Lisp. If you don't know Lisp (or its variant, Scheme), you don't know what it means for a programming language to be powerful and elegant. Once you learn Lisp, you will see what is lacking in most other languages." -Richard Stallman
>>
http://codepad.org/GcI7hJay

I'm fairly surprised the code with a lookup table is faster by an inch than the "unrolled", more imperative version. And really surprised the version with cached size and memcpy is twice as slow as either of the others.
But I haven't looked at the machine code yet and it's possible there's some aliasing issue I've missed.
>>
>>58867167
Are you from a European "country"? If you're not Swiss German or at least Austrian I'm afraid we can't meet.
If you're from any Anglo country except Canada then you can still see my code.
>>
>>58867225
No, I'm from New Zealand.
>>
>>58867089
Because ecx is 0x004f, not 0xf
>>
>>58866591
>whom
>subject
>>
>>58867238
That's good.
So when and where shall we meet then? I'm currently in Australia.
>>
>>58867127
i didn't imply that i am entitled to an answer, but this is one of the best generals of 4chan, and /g/ is not /b/, shitting up good threads with random shit is as newfag as it gets, thanks for explaining me about 4chan fucking faggot
>>
>>58867291
>but this is one of the best generals of 4chan
how can someone be this delusional?
>>
>>58867291
>this is one of the best generals of 4chan
Seriously? I'm sure /po/ has much higher-quality generals than this shithole.
>shitting up good threads with random shit is as newfag as it gets
You're clearly new here if you think that isn't par for the course.
>>
>>58867256
Thanks, I'll look into that.

The GNU extended inline assembly documentation is, how you say, a bit garbage.
>>
>>58866724
Make your common functions public static. Of course, you'll have to deal with the fact that you must include them in a class, but you don't have to instantiate the class to access these methods, so I guess that fits your case.
>>
>>58867322
>GNU is a bit garbage
removed the unnecessary parts
>>
>>58867313
It's true
>>
>>58867351
I don't mind most of their other docs.
>>
>>58867354
You must have low standards.
>>
>>58867321
not new, but as i wrote sometimes it gets very tiring when you ask something and a fucking anime retard starts shitposting because he learned other retards what he has to like or dislike

>>58867330
thanks, i ended up doing that, had to ask because i usually don't write in java and having to create a class just to write a function in it feels gay
>>
>>58867368
see >>58867375
>>
>>58867381
That's because Java is deficient.
>>
>>58867391
Maybe. LLVM though, while a far better compiler system, is even worse. Which may be why I'm so OK with GNU.
>>
I want to teach myself a bit of python since I'm a complete noob to programming. Are there any recommended guides or books I should read to learn it correctly?
>>
>>58867438
Why python?
>>
>>58867438
don't infect your brain with python, especially if it's your first language. Try something like C first.
>>
>>58867455
I want to write small terminal programs but C seems to difficult ;_;
>>
>>58867438
http://www.gigamonkeys.com/book/
>>
>>58867465
sh -> bash -> C -> long time nothing - > python,ruby,whatever
>>
>>58867481
Yo I think your brain is broken.
>>
>>58867465
That's actually a valid reason.

Go download Learn Python the Hard Way and read.
>>
>>58867465
oh, then learn python. you don't deserve anything better.
>>
>>58867486
ty
>>
>>58867466
defun ruins the fun in programming.
>>
>>58867507
keep at it and don't listen to the misanthropic wannabe greyboards on here.

good luck friend
>>
>>58867522
>not using lambda for everything
You deserve to be punished.
>>
>>58867532
anyone else gotten adult onset dyslexia from writing too much c?
>>
>>58867578
Nope, but parentheses are invisible to me now from writing too much Lisp.
>>
>>58867624
ya'll think we're kidding but this stuff changes your brain, man

if you ever wish to be an orator please stay off this game
>>
I've got a mySQL database with the following table:

user: foreign key
channel: not pk candidate

Should I add a surrogate key, or should I use a composite key of user and channel - which will be unique. Does it even fucking matter? Am I splitting a hair's worth of difference over this shit?
>>
>>58867536
reading on lambdas on scheme, shit is concentrated cancer tbqhwymf
tis a gay version of define
>>
>>58867710
>he doesn't know define is defined in terms of lambda
Anon, I've got something to tell you...
>>
>>58867688
Either will work. I usually prefer to create a single unique identifier, but as long as your composite key is unique, you will be fine. It is just a matter of preference.

Though not creating a new single ID would reduce the amount of data you need to store, so there is that to consider.
>>
>>58867688
You ought to have a Channel ID key. You can make it an auto-incrementing identity column.
>>
File: prog.png (69KB, 800x500px) Image search: [Google]
prog.png
69KB, 800x500px
How does DPT feel about this?
https://motherboard.vice.com/en_us/article/the-most-popular-weekend-programming-languages
>>
>>58868018
We don't even know the absolute values here. It's really fucking useless.
>>
>>58868018
The tyranny of corporate bullshit vs. the tyranny of
hipster hobbies.
Living the CS/IT life is hell, to be honest.
>>
>>58868018
Hard to imagine any useful things arising from this data as presented, but it certainly makes sense that people who are actually employed are working with SQL Server, Sharepoint, Windows Servers, IIS, and Excel.

I find it amazing how people like to think that Linux "rules the server market", whereas nearly every company of any size either uses O365 or has Windows Servers set up to host Active Directory, Exchange, Sharepoint, and various 3rd-party line-of-business applications backed by SQL Server. The issue is that these are behind private corporate firewalls and so are unable to be shown on any of these reports that only look at public webhost servers.
>>
>study cs 2nd year
>be in java class
>3 girls total
wew
>>
File: 1469726064285.jpg (192KB, 800x533px) Image search: [Google]
1469726064285.jpg
192KB, 800x533px
Can this be shorter?
e=echo;for i in {1..100};do(((i%15==0))&&$e FizzBuzz)||(((i%5==0))&&$e Buzz;)||(((i%3==0))&&$e Fizz;)||$e $i;done
>>
>>58868018
So basically Haskellers flip burgers all week long only to flock to SO on weekends because they finally have time to overengineer fizzbuzz?
>>
>>58868138
who the hell are you quoting?
>>
>>58868140
You should be asking yourself if it can be more readable, maintainable, modular, and extensible.
>>
>>58868196
It's a greentext story. You new, mate?

>>58868138
What did you expect? Women don't like to program, and all of the clubs and programs pushing them into CS are unnecessary.
>>
>>58866998
I sure can. Webshits like you are out of luck tho.
>>
>>58868208
Really though, who were you quoting? I want to read the full list.
>>
>>58868229
>He doesn't know about meme arrows
>on 2ch-.co
>>
>>58868229
>le quote confusion memoo
>>
>>58868250
Quote properly next time, please.
>>58868252
Don't skip out on medication, boy.
>>
>>58868252
>confusion
sup, reddit.
>>
>>58868282
>fuccboi
>>
>>58868316
Really, who are you quoting?
>>
Function.prototype.cutoff = function (argc) {
var ref = this;

return function () {
return ref.apply(this, [].slice.call(arguments, 0, argc));
};
};

Function.prototype.rbind = function () {
var ref = this;
var argv = [].slice.call(arguments);

return function () {
return ref.apply(this, [].slice.call(arguments).concat(argv));
};
};

Array(4).fill('10').map(parseInt.rbind(16).cutoff(1)).map(print.cutoff(1));
>>
>>58868345
You keep posting similar code.

Why?
>>
>>58868342
>animoooooooo
>>
>>58868349
To put smug Hasklellers in their place
>>
>>58868342
>triggered
>>
>>58868138
>study cs
>3 girls total
wew
>>
>>58868361
How does that put anyone "in their place"?

Any language with basic functional features can do this.
>>
>>58868345
>javascript
looooooooool
>>
>>58868356
What does anime have to do with this? Did you forget to take your meds again?
>>58868365
Can you stop tying in this retarded fashion if you aren't quoting anyone?
>>
Definitely a contender for best general on 4chan right here.
>>
>>58868384
>REEEE! STOP TRIGGERING MEEEEE
>>
>>58868378
>How does that put anyone "in their place"?
Are you new to /g/?

>Any language with basic functional features can do this.
That is exactly my point, but Hasklellers pretend that their language is the only one that can do this.

>>58868381
Proves my point.
>>
>>58868398
Haskell does have things that Javascript does not, though. You've picked low-hanging fruit to compare against.
>>
>>58868384
>Can you stop tying in this retarded fashion if you aren't quoting anyone?
do you have aspergers? not him and this is a serious question
>>
>>58868393
The only relevant country is slowly waking up right now.

It's ass-end of Aussie hours right now; shitposting should taper off in the coming 3 hours.
>>
>>58868394
can you please answer my question? who exactly are you quoting here?
>>58868413
>do you have aspergers?
as far as I know, nope.
>>
>>58868405
>Haskell does have things that Javascript does not, though. You've picked low-hanging fruit to compare against.
I'm picking the exact thing a couple of Haskell users in an old DPT smugly told everyone couldn't be done, and I'm reposting it to remind them of their shame.
>>
>>58868432
Fair enough.

Just note that anyone who's relatively versed in both languages you're comparing is seeing this as petty and silly, without the context of whatever was posted before.
>>
>>58866469
Brahms > Dvorak
>>
>>58868140
for i in {1..100};do((i%3))&&x=||x=Fizz;((i%5))||x+=Buzz;echo ${x:-$i};done
>>
>>58868420
>The only relevant country is slowly waking up right now.
but it's night time in australia
>>
>>58868445
>Just note that anyone who's relatively versed in both languages
No such person would bother spending time on this board, let alone this thread.

>inb4 but I am
Well, now you know the context.
>>
how to use yt api to play videos? any good fast tutorial?
>>
>>58868420
>doesn't shoot antifa retards on sight
>country
Nope
>>
>>58868423
>whom
ftfy
>>
>>58868467
some of us are miserable alcoholics despite our academic "achievements"
>>
>>58868496
Right in the feelings.

At least I have lots of money, right?
>>
When you run a curses program, do you prefer ASCII characters only or would you enjoy unicode like … for ...?
>>
>>58868513
Define a lot.
>>
>>58868516
curses is broken for unicode
>>
>>58868518
Never mind, I guess I'm poor ;)

>>58866073
Trying to figure out if there is a quick, elegant way to perform an intersection of two rectangular arrays.
>>
>>58868516
I hate curses and ncurses with a passion.

>>58868445
How can a simple example with no comment at all be perceived as petty and silly?

Is this random example any worse than the shoddy fizzbuzz implementations people are posting all the time?

I would even say it's a good thing. Maybe some aspiring pajeet or webdev will see that their language is able to do FP and learn something.
>>
>>58868516
unicode can look like crap on some fonts
always go ascii
>>
>>58868530
hell most teletype emulators are broken for unicode

just write a gui program instead
>>
>>58868540
>>I hate curses and ncurses with a passion.
alternative?
>>
>>58868540
>I hate curses and ncurses with a passion
Why?
>>
>>58868575
Sadly, none.
>>
>>58866510
Yes I tan
>>
>>58868540
I should have clarified: it became petty any silly as soon as you said this:
>To put smug Hasklellers in their place
because you weren't putting any competent programmers in their place; rather, only weekend dev NEET retards.
>>
>>58866724
>>58867381
Can't you inherit from an abstract class that implements them?
>>
>>58868586
ioctl.h

not like you'll ever be able to port your terminal software to a non-unix platform

trying to do interactive graphics on what amounts to a printer protocol is a mistake
>>
>>58868593
>only weekend dev NEET retards.
Well, that's 95% of DPT.

>>58868610
>ioctl.h
If you need to communicate directly with your video driver, then that's not really an alternative.
>>
so I want to play a bit with brainfuck. what's a good interpreter/program that let's me run bf code in the terminal?
>>
>>58868637
Write your own, that's half the practice.
>>
What kind of data structure should I implement for a board in Battleship?
My language is Prolog.
>>
>>58868653
just use an array
>>
>>58868653
2D array of chars/bytes
>>
>>58868653
hashmap with coordinates as the keys
>>
>>58868658
>>58868660
>>58868672
>prolog
>array
>hashmap
>>
>>58868674
Don't use prolog
>>
>>58868674
http://www.dcc.fc.up.pt/~vsc/Yap/documentation.html#Arrays
?
>>
>>58868679
can't
>>58868687
Mine is Visual Prolog.
>>
>>58868653
>Prolog
in Prolog the answer is always a List
>>
Are there any good resources for learning algorithms through Javascript?
>>
File: 1478885117144.jpg (17KB, 225x225px) Image search: [Google]
1478885117144.jpg
17KB, 225x225px
I'm making a game
>>
If you want to make Haskell faggots squirm, ask them why their retarded FP shit language takes about 400mb for the fucking toolset, while even a so-called bloated-af pajeet language like Java takes like 100mb.
>>
>>58868930
Unity based? I want to make a Zelda-like for Android but can't be fucked writing an engine, just want to use some OSS shit like libgdx or whatever
>>
>>58868959
*uint32_t

sorry, I couldn't copy a larger code snippet (different machine) and just typed it out
>>
>>58868965
I'm making a Binding of Isaac clone in C with OpenGL.
>>
>>58868971
>>58868959
Sorry, it was actually just:

uint32_t l_count = 0;
while (count >>= 1) ++l_count;


anyway I still don't know what's going on
>>
>>58868965
As an idiot with no game experience, might I suggest you make a proof of concept in Unity, and then work toward making it work in another engine that won't make you pay.
Just an idea.
>>
>>58868954
I don't mind that at all, really
>>
So I've recently been employed in a new job.
I used to hate working with SQL and databases, but after making a script generator script, it's not so bad.
If I want to get really good at that stuff, is there anything I need to read or look up, or is it something where the more you do it, you'll pick up more as you go through the random googling for shit you need?
>>
File: 1457280710822.png (722KB, 834x1367px) Image search: [Google]
1457280710822.png
722KB, 834x1367px
What anime should I watch in between programming sessions?
>>
>>58869019
Ghost in the shell.
>>
>>58869019
You posted your answer.
>>
>>58869026
>>58869057
why do you think I haven't seen that?
>>
>>58869061
Rewatch you double nigger
>>
>>58869068
why do you think i haven't rewatched them, you triple nigger?
>>
>>58869019
>>58869057
>>58869061
>>58869068
Yuru Yuri is shit and you should feel bad for liking it.
>>
>>58869019
battle pogrammer shirase
>>
>>58869093
at no point have I claimed to like it. or did I miss my own post somewhere?
>>58869095
does it feature OO or web "dev" "languages"?
>>
>>58869120
it features hacking into a building with a dumbphone from 2003. Cant remember if any actual languages get mentioned
>>
>>58866073
Thank you for using no anim-
>>
>>58869120
>why do you think i haven't rewatched them, you triple nigger?
>>
>>58869140
maybe he rewatched it to confirm its shit?
>>
>>58868745
Yes, and it would be a pain in ass to work through it recursively.
>>
>>58866920
It's literally just the time it takes to start, running it just as fast as anything else.
>>
>>58869151
how does watching an anime even 15 times say anything about me liking or disliking it?
also >>58869151 would be a more sane assumption based on the amount of information given so far.
>>
>>58869061
Because you ask stupid questions that only someone that didn't understand Ghost in the shell would ask.
>>
>>58869185
obviously meant for >>58869140
>>58869186
how did you get that from my post?
>>
>>58869151
Why not watch better animu like Serial Experiment Lain, Ghost in the shell, Ergo Proxy etc.
>>
>>58869206
>Serial Experiment Lain, Ghost in the shell
I rewatch them on a pretty regular basis and the last time wasn't that long ago.
>Ergo Proxy
I don't like Reddit Proxy nor do I think it can be called "better" than pretty much anything (excluding literal trash)
>>
>>58869195
You asked what anime you should watch in between programming sessions.
>>
File: 1366303416.jpg (45KB, 300x400px) Image search: [Google]
1366303416.jpg
45KB, 300x400px
>>58869237
>Ergo Proxy
>Worse than Yurishit.
>>
>>58869241
true, but how does the conclusion in your previous post follow from my question?
>>58869261
yurishit doesn't necessarily have to be trash, while reddit anime is by definition worse than anything else so it's at the bottom of literally any comparison imaginable.
>>
Using mono and .net, if I have two .cs files, how do I tell the compiler that one uses the other or whatever, so I can separate my classes into separate files?

I guess I have to manually write one of the files visual studio normally generates, unless I want to build manually with mcs file1.cs file2.cs each time?
>>
>>58869327
Yes, create a project.json file and tell it what to include.
>>
>>58869353
>project.json
wrong

>>58869327
https://blogs.msdn.microsoft.com/dotnet/2016/11/16/announcing-net-core-tools-msbuild-alpha/#dotnet-cli-tools
>>
>>58869315
You are the type of person that should be asking yourself what should you program in between anime watching sessions.

Or just watch ghost in the shell and try hard to understand it. take notes, consult people online and offline that have watched it.make a thread on /a/, haha don't do that those faggots only watch moe cancer.
>>
>>58866073
So suppose I have this shit:
#include <stdio.h>
#include <stdlib.h>

int evil_code(void)
{
printf("KOK");
return 0;
}

int read_req()
{
char buf[16];
gets(buf);
int i = atoi(buf);
return i;
}

int main(void)
{
int x = read_req();
printf("x=%d\n", x);
return 0;
}


How do I use this buffer overflow to overwrite the return address of read_req and jump to evil_code instead of back to main?
>>
>>58869406
how brave of you to reveal your true colors. now i know I have been talking to one of 'them' this whole time.
>>
>>58869468
You are the one that doesn't know what anime to watch and what anime to avoid watching.
>>
Just came across this one. Write a solution to each of the following problems:
1. Read a string and output all combinations of it's characters.
2. The "8 queens" problem. Print all the chess configurations where eight queens can be placed on a board without attacking each other.
3. Given N, list all the prime numbers up to N.
4. Write a subroutine to multiply two arbitrary-sized matrices together.

In each of the following languages:
C
APL
Lisp
Fortran

The assignment is one week long for a CS graduate level class. Obviously it's an old assignment.
>>
>>58869384
Cheers, that worked.
>>
>>58868980
but you don't know C
>>
File: 1365427332200.jpg (87KB, 600x600px) Image search: [Google]
1365427332200.jpg
87KB, 600x600px
>>58869019
Watch Nichijou.
>>
What should I be using instead of visual studio?
>>
File: 1484328882417.png (2MB, 1080x957px) Image search: [Google]
1484328882417.png
2MB, 1080x957px
>>58869019
Love Live
>>
>>58869657
For what?
>>
>>58869557
Didn't say to solve the 8 Queens problem
>>
>>58869708
Script editing for my game in Unity.
>>
>>58869528
>You are the one that doesn't know what anime to watch
this applies to any person who hasn't seen every anime is existence, which is virtually impossible.
>what anime to avoid watching
there is no such thing. the very fact that you know you should avoid it means you have watched at least some of it. you can't tell for sure otherwise.
there can only be "anime you should avoid continuing" but the phrase itself implies that you have started watching.
>>58869634
thanks for reminding me, wanted to watch it a long time ago.
>>58869672
see my earlier posts.
>>
>>58869733
VS Code

https://code.visualstudio.com/Docs/runtimes/unity
>>
>write clean code that has no compiler errors under my GCC version

>10000 compiler warnings under gcc 6
>warning: statement is indented as if it were guarded by... [-Wmisleading-indentation]
>warning: statement is indented as if it were guarded by... [-Wmisleading-indentation]
>warning: statement is indented as if it were guarded by... [-Wmisleading-indentation]

AAAAAAAAAAAAAAAAAAAAAA
>>
>>58869857
>10000 compiler warnings
I don't believe you. Please post a screenshot.
Also, who the fuck are you trying to quote here?
>>
>>58869745
Why even ask what to watch then.
>>
I've been learning Java for about 3 weeks and decided to mess around outside of the exercises in the course I'm using. I'm trying to use a method to grab the first entry in a list, if it were in alphabetical order, but for some reason I can't even get it to output using .get(0) without the method.

I'm sure there's a better way to go about it, but what I'm concerned with is why this doesn't work. Excuse the messiness and experimentation in it.

import java.util.Scanner;
import java.util.ArrayList;
import java.util.Collections;


public static String listAlpha1(ArrayList<String> list) {
Collections.sort(list);
return list.get(0);
}

public static void main(String[] args) {
Scanner reader = new Scanner(System.in);

System.out.println(""); //Prints a line break
ArrayList<String> bodyParts = new ArrayList<String>();
System.out.println("Let's make a list of body parts.");
System.out.println("When you're done, just hit 'Enter'.");
while (true) {
System.out.print("Enter a body part: ");
String part = reader.nextLine();
bodyParts.add(part);
if (part.isEmpty()) {
System.out.print(bodyParts.get(0)); //This is the only time .get() works
break;
}

}
String alphaFirst = listAlpha1(bodyParts);
System.out.println(""); //Prints a line break
System.out.println("Excellent. We have our list.");
System.out.println("The first part alphabetically would be: " + alphaFirst); //Only prints the line in ""'sort
System.out.print(bodyParts.get(0)); //Does nothing
System.out.println("Let's check that against the list. Just to be sure.");

for (String partprint : bodyParts) {
System.out.println(partprint);
}


Does .get() not work outside of the brackets where you first add the entries?
>>
>>58869886
>also, muh mental illness
>>
>>58869857

Fix: Do not leverage misleading indentation
>>
>>58869895
there's two reasons
well, three actually
1 - to find people who have seen about the same number of anime as me but have seen some anime i haven't.
2 - to find people who have seen a lot more anime than me.
3 - to try and find a person who has seen every anime in existence just on the off chance that he might be in this thread right now.
>>
>>58869857
They added that shit because of the goto fail bug. Either change by our code or -Wno-misleading-indentation in your CFLAGS.
>>
>>58869921
I didn't say anything about any mental illness. Why are you quoting nonexistent posts?
>>
>write thing that works well
>use it many times, pretty easy to do a specific task that our company needs
>go to teach co-worker how to use it
>it doesn't work
>tell him it was just a joke and I've actually been manually inputting the data this whole time

wakarimasen lol
>>
>>58869951
where are these quotes from? I want to read the full story.
>>
>>58869951
speak up
>>
What's the best way to merge multiple sorted lists into a single sorted list?
>>
>>58869423
>How do I use this buffer overflow to overwrite the return address of read_req and jump to evil_code instead of back to main?

buf is allocated on the stack, as well is i. Use a disassembler to find the address of the evil_code function. Then pipe 4 + 16 + sizeof(address) + the address to the program. This overwrites the return address that's also on the stack.
>>
File: Screenshot_20170209_125521.png (810KB, 1271x717px) Image search: [Google]
Screenshot_20170209_125521.png
810KB, 1271x717px
Is she /our guy/?
>>
>>58870136
>What's the best way to merge multiple sorted lists into a single sorted list?
Merge sort you fucking imbecile.
>>
>>58869951

???
>>
>>58869927
It was not a question.
>>
File: Tailshasbeenthinking.jpg (70KB, 535x655px) Image search: [Google]
Tailshasbeenthinking.jpg
70KB, 535x655px
So I have a cron job that runs a Python script

The job runs successfully, but every time the job runs, I get the following error in /var/mail/[myusername]:

sh: sysctl: command not found

What does this mean? Even though the program runs as expected, I don't know why the error is being raised
The following is my crontab:

46 11 * * * PYTHONPATH=/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/ /usr/bin/python2.7 ~/Desktop/python_project/access_politics.py
>>
>>58870001
>>58870190
I wrote the thing that works well but it didn't work well and I was embarassed so I just said I was a hard workers instead

I tell him it was just a joke and I've been manually doing the data
>>
>>58870235

Why did it stop working?
>>
>>58870248
It doesn't need to keep working if I am a hard worker

Either way I get paid the same so why pretend I'm smart if it breaks

Maybe I write another code to do the same, because the current one is not working
>>
>>58870268
is your name raheed?

your english is terrible and it's taken 3 posts for you to clarify your story and I still don't get it
>>
>>58866724
Keep your classes and methods small. Say you have a function that parses a tab separated string to an array of ints, just put that one function into a class called StringToArrayParser (or something like that).
Put that class into a util namespace if you like. Make the function internal and you're good.

Check up on SOLID, if you don't know the principles already. (Especially the S, but the rest is important too)
>>
>>58866502
Is it really possible to keep more than one keyboarding style in your head at once?
>>
>>58870189
Not really the case in my situation from the benchmarking I'm doing so far.

I have several hundred lists of several million values each, and the values in each list span approximately the same interval, meaning I end up with a situation where when I'm joining list A with list B and the resulting sorted list would tends to have elements from A and B alternating throughout, every other element being from a different list. Merge sort does better if the lists more continuously span different intervals which makes them easier to merge.

At the moment I make a red-black tree directly out of the first list and then insert all the others and it trumps all sorting functions I've tried.
>>
>>58870235
Is it considered good to be a 'hard worker' were you're from?

I call that being inefficient.
>>
>>58870296
Yes. I frequently switch between Norwegian Mac layout and US English layout and I'm currently in the process of learning Colemac.
>>
>>58867532
This.
It's pretty sad, that every simple question here degenerates into a discussion about which programming language/... is best.
>>
>>58870279
Look, it is easy:

>create program to do a data entry
>proud of program because it does this good
>use it many times
>show coworker
>its like dancing and singing frog from looney tunes (hello my baby hello my honey)

Rather than singing frog I work hard.
>>
>>58870296
probably
it's such a waste of energy tho
why bother when every keyboard on earth is qwerty?
There's probably only a few thousand dvorak capped keyboards on the planet and they're all owned by autists.
>>
>>58870316
I may give Colemac a shot. I tried Programmers Dvorak and lost a lot of speed typing qwerty, like 50%
>>
>>58870303
>when I'm joining list A with list B and the resulting sorted list would tends to have elements from A and B alternating throughout
This is the scenario where merge sort is ideal, so I don't understand your problem.

>At the moment I make a red-black tree directly out of the first list and then insert all the others and it trumps all sorting functions I've tried.
Are you fucking insane? Giving a sorted list as input to a (balanced) binary tree leads to fucking worst-case behaviour.
>>
>>58870324
anon go back to ESL class
>>
>>58870312
>Is it considered good to be a 'hard worker' were you're from?
Isn't this everywhere?

work hard = job done
be smart = job done
try to be smart = job not done

Easier to work hard.

Muscles create less errors than compiler. Maybe programming isnt for me.
>>
>>58870327
The operating system can determine which input method to use. I don't look at my keyboard when typing. Dvorak is very comfy
>>
>>58866964
>left wing
You have to go back
>>>/pol/
>>
>>58870332
There's not a lot of difference between programmer's dvorak and colemac though, so probably not worth it. Loosing speed is common until you've been using it for 6 months ++
>>
>not listening to programming themed ASMR
https://www.youtube.com/watch?v=XrFegNHpHfc
>>
>>58870340
In my experience, hard work is only rewarded with MORE work.

So yes, you do as little as possible just so you'll get paid and not get fired.
You're a disposable cog and the company can get rid of you at the click of a spreadsheet.
>>
>>58870296
It's definitely possible. I just don't know how long it would take to get proficient if you didn't use them for your whole life.
>>
>>58870356
Disgusting.
>>
>>58870356
muh dick
>>
>>58870347
so you admit that you only learned dvorak to be a hipster?
>>
>>58870363
Yeah, but programming is like creating a machine

You create machine to do your job and why does the company pay you again?

You made the machine, you get fired because you made a machine to be you instead of yourself.
>>
>>58870350
Why did you send me to a left wing board? Doesn't that post strongly imply I hate that kind of shit?
>>
>>58868138
Are any of them cute though?
>>
>>58870385
Because if they find out you automated your job, they'll fire you and ask for your scripts, because you DID write them on company time and it's company property.

The nail that sticks up gets hammered down.
>>
>>58868018
The stats they published are nice and flashy but don't actually have any value.

You could interpret it as working people being active during weekdays and students being active on weekends.

You could also interpret it as technologies used at certain days.

Their whole article being about programming languages used is also pretty vague, since they list math, algorithm, pointers, opengl, recursion, etc as tags in their data.

Also, did they actually take local time zones into account? There can be up to 26 hours difference between two time zones, basically 'delaying' the weekend for more than a day.
>>
>>58870340
>Isn't this everywhere?
No.

In Japan people stay late at their job just for show, often they do no actual work or they sleep there, just to look like they 'work hard'.

In some other countries people spend days doing menial tasks that could be automated in a matter of hours and then time wouldn't be wasted on it ever again.

But now some people realize that working hard has nothing to do with being a good worker, and they value producing a lot of things over taking a lot of time.
>>
>>58870403
>2nd semester CS course
>literally 2 girls left
>one of them is transgender

wew lad
>>
>>58868653
I don't know prolog, but you could use a list / array IF that's available to you.

If you have a 10x10 field the array would have 100 entries (0 - 99), you can 'translate' between the index and your x/y coordinates using this formula:
<code>
x = i % 10
y = round(i / 10)

i = y * 10 + x
</code>

Don't quote me on the math, but you should get the general idea.
>>
>>58868485
>>58869857
>>58869921
>>58869951
>>58870324
>>58870356
Who are you quoting?

>>58868653
Inverted green-black ternary search tree
>>
>>58870432
That doesn't actually answer the question though...?
>>
>>58870477
><code>
>>
>>58870485
>Who are you quoting?
hello newfag
>>
>>58870558
Please do not respond to obvious bait.
>>
>>58870485
Never, ever quote me or my wife's son.
>>
So I parsed the JSON from https://a.4cdn.org/g/threads.json
and got the result in pic related.

I want to print out all the "no" keys within the "threads" list, but how would I do it?

The entirety of the JSON object I have in my script is a "list" object in Python, and all of the "threads" are unicode objects, so i'm unsure how I would iterate through the list of dictionaries... Any suggestions?
>>
>>58869857
>C-x h tab
AAAAAAA
>>
>>58870662
doesn't python do this natively?
just go on stack overflow, the entire python philosophy centers around not thinking
>>
karen posters are the worst and they can't even code
>>
>>58870703
What's a karen.
>>
File: 1483040896377.jpg (58KB, 582x582px) Image search: [Google]
1483040896377.jpg
58KB, 582x582px
>>58870703
wrong
>>
>>58870703
I'm a qualified fizzbuzzer
>>
>>58870758
Do some good code right now
>>
>>58870758
Post good code.
>>
>>58870773
>>58870784
main = putStrLn "Hello World"
>>
>>58870703
kanna posters are best posters
>>
>>58870806
worst dragon
>>
>>58870773
>>58870784
import fizzbuzzer
fizzbuzz(100)
>>
>>58870806
Mathematically correct
>>
File: 1475121143384.jpg (53KB, 760x950px) Image search: [Google]
1475121143384.jpg
53KB, 760x950px
>Start looking for internships/part time jobs
>They'll probably want to look at my github
>Realize I haven't committed anything in nearly a full year
>Everything that I have committed is half-working, unfinished C# projects and ruby bots
fuck
>>
NEW THREAD!

>>58870848
>>
New thread:

>>58870859
>>58870859
>>58870859
>>
>>58866073
Go away Aussie
>>
>>58870857
>>58870875
doshio kana
>>
>>58870432
>one of them is transgender
You mean a girl(male), or a boy(female)?
>>
>>58869731
No, it didn't. But having 16 programs to write in 4 different languages in the 1st week seems like a fair amount of work.
Thread posts: 315
Thread images: 24


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