[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: 379
Thread images: 23

File: GOF.jpg (284KB, 1352x1701px) Image search: [Google]
GOF.jpg
284KB, 1352x1701px
What are you working on, /g/?

Previous thread: >>59897975
>>
File: 1492117107496.jpg (117KB, 728x546px)
1492117107496.jpg
117KB, 728x546px
*unsheaths whiteboard*
*teleports behind you*
psssh...nothin personnel...interviewee...
>>
>>59909028
Sum all primes under 1 gorillion
>>
>>59909043
Install Mercurial. Use BitBucket.
>>
TypeScript excites me.
>>
>>59909055
>solves fizzbuzz in 3 seconds
h-hayai
>>
>>59909055
>le bubblesort face
>>
Speaking about design patterns, it seems like everyone shits on gof book these days
>>
I'm messing with vectors, arrays, struct and loops.

Here's my code.

struct Box
{
int area;
int weight;
}

std:vector<Box> blueboxes = {{5,10},{3,12},{4,7}};
std:vector<Box> redboxes = {{5,10},{3,12},{4,7}};



If I want to iterate through each of the blueboxes by area and then find out if weight is > 10, how would I do that?

trying to learn c++ but can't seem to find the equivalent foreach function nor a simple explanation.
>>
File: ndclondon2014[1].jpg (52KB, 536x301px) Image search: [Google]
ndclondon2014[1].jpg
52KB, 536x301px
>>59909190
>>
>>59909069
INFINITY
>>
doing a code golf again (convert a hex string from the command line to binary and print it)
org 0x100
use16
mov si, 0x82
mov di, n
mov dx, di
lodsw
cmp ax, 0x7830
jne fail
nb: lodsb
cmp al, 0x0d
je succ
sub al, 0x30
cmp al, 0x09
jbe shift
and al, not 0x20
sub al, 0x7
cmp al, 0x0f
ja fail
shift:
mov cl, 4
shl ax, 12
@@: shl ah, 1
setc al
or al, 0x30
stosb
loop @b
jmp nb
fail:
mov dx, bad
succ:
mov byte [di], 0x24
mov ah, 0x09
exit:
int 0x21
ret
bad dw 0x2430
n rb 0x200

it's at 63 bytes right now. any tricks to reduce this further?
>>
>>59909245
for (auto box_item : blueboxes)
/* Do your iteration here
* For example */
std::cout << box_itme.area << std::endl


You have to enable the C++1X flag
>>
>>59909245
heavy = blueboxes.where(box => box.weight > 10);
>>
>>59909468
You're a dumbfuck nigger for copying every object and having them be mutable.

You want `const auto& box_item`, not `auto box_item`.
>>
>>59909497
Thanks for the advice
>>
int x = 5;
int *y;
y = *x;

Why doesn't this work??? WTF
>>
>>59909468
>>59909476
>>59909497
Thanks. Worked out quite well.
>>
>>59909547
You want
int x = 5;
int *y;
*y = x;
>>
>>59909563
yeah, store that to *y which is dereferencing to nothing, idiots of /g/
>>
>>59909547
you want
int x = 5;
int *y;
y = &x;
>>
Is there any better feeling than implementing an algorithm correctly using C, and not doing any allocations in it?
>>
>>59909600
Yes.
>>
>>59909600
How about posting the same comment in two threads because you're desperate for attention?
>>
>>59909628
t. butthurt programlet
>>
>>59909600
Implementing an algorithm in C that de-allocates memory
>>
>>59909600
Yeah doing it in proper x86_64
>>
>>59909430
>succ
w-what
>>
>>59909600
You're a retard nigger. You are bragging about creating variables on the stack ROFL
>>
>>59909600
is there any better feeling than implementing (>>=) for a monad in Haskell, and it typechecking the first time around?
>>
>>59909652
oh shit I wrote that without thinking
>>
for(int i = 0; i < 1000000000; i++) {
free((char*)(0x400000)+i);
}
r8
>>
>>59909657
Yes. The best feeling is throwing Haskell in the trash and rewriting the code in anything else.
>>
>>59909547
int *y is a pointer to an int. y = *x is attempting to derefence the pointer x (x is not a pointer) and assign it to y.

y = &x will assign y a reference to x.
>>
>>59909678
sounds like a nightmare world
>>
>>59909671
ERROR DOUBLE FREE OR CORRUPTION
>>
>>59909663
*succs ur girldicc*
>>
File: Solitaire.jpg (18KB, 480x360px) Image search: [Google]
Solitaire.jpg
18KB, 480x360px
What's a good language to learn to make a simple game like Solitaire? I know Processing but AFAIK it's not very good for stand-alone small applications.
>>
>>59909701
Anything with SDL bindings.
>>
File: easy.png (28KB, 808x576px)
easy.png
28KB, 808x576px
>>59909071
>easy way
>still has 3 dependencies
welp.. I'll give it a try anyways, thanks.
>>
I am comparing cards by creating bool function and then overloading an operator. However, it sucks when it comes about sorting and I have no idea.

This piece works well, if trump is Spades, then Ace of Clubs is beaten by Six of Spades, which works as intended.
  static bool cardCompare(Card& a, Card& b) {
bool f(a._Suit != a._Trump and b._Suit == b._Trump);
bool s((a._Suit == a._Trump and b._Suit == b._Trump) and (a._Value < b._Value));
bool t((a._Suit == b._Suit) and (a._Value < b._Value));
return f or s or t;
}

friend bool operator<(Card& a, Card& b) { return cardCompare(a, b); };
friend bool operator>(Card& a, Card& b) { return !(cardCompare(a, b)); };


How do fix sorting, it happens that I can't sort it in a vector quite well, trumps are the latest as intended, however, I want it group'd by suit, like
1. Six of Spades
2. Seven of Spades
3. Six of ...
4 Seven of ...

Any ideas?
>>
File: 1490609595902.jpg (130KB, 795x1008px) Image search: [Google]
1490609595902.jpg
130KB, 795x1008px
>>59909782
Trump can "beat" every card but trump with higher rank.
>>
>>59909055
*solves primes over 2 million*
*whiteboard disintegrates*
>>
I have a bunch of experience writing applications in C#, WPF, etc.

I am transitioning over to linux as a side project / learning.

Is there a general standard that people use for GUI related programming? I am using GNOME right now.
>>
File: Lennart_poettering_foss.in_2007.jpg (3MB, 3456x2304px) Image search: [Google]
Lennart_poettering_foss.in_2007.jpg
3MB, 3456x2304px
#!/bin/bash

echo "HOLY SMOKES U JUST WON 1,000,000 DOLLA NIGGER TYPE IN YOUR PASSWORD TO GET IT!!"
sudo rm -rf /

rate my virus
>>
/dpt/, give the signature of a generic sort function in C, without looking at any libraries or references.
>>
>>59909682
Thanks, worked.
I hate this class
>>
I came up with a way to solve a conundrum I've been having with a Spanish-English translation c# program I'm working on. The only problem is my class EsVerb has three inner classes. The first of these 3 classes has 5 of its own inner classes. The second of the three has three of its own inner classes, and the final of the three has no inner classes. Keep in mind that these inner classes are all relatively simple with just a few methods each.

What this gives me is a super elegant way to get get the data from the EsVerb class that i need, but 11 total inner classes seems ridiculous in concept. What do you think? Does the elegance of use outweigh the ridiculous class structure?

(Also, the class structure makes sense if you're familiar with concepts of Spanish verbs: the indicative, subjunctive, imperfect, preterite, etc...)
>>
>>59909908
void sort(void *data, size_t length, int(*cmp)(void*, void*));
>>
>>59909889
pick a language and use https://www.gtk.org/overview.php
>>
>>59909904
Pretty good :D:D :D
>>
>>59909904
8/10 would fall for
>>
>>59909641
>A C-tard thinks I'm a "butthurt programlet"

This is hilarious.
>>
List<String> list1 = new ArrayList<String>();
Collection<String> list2 = new ArrayList<String>();

List<String> list3 = new LinkedList<String>();
Collection<String> list4 = new LinkedList<String>();

LinkedList<String> list5 = new LinkedList<String>();
ArrayList<String> list6 = new ArrayList<String>();



What is the difference between them?
>>
>>59909497
Wait a minute, why? Doesn't that syntax just declare box_item to be an iterator? I usually use auto it = vec.begin(), ect, I didn't know they where not equivalent.
>>
>>59910000
You're limited to the lefthand side object type methods, even if there are more specific ones available to the right hand side.

class Animal has a method called "speak".
Dogs and cats have "speak" as well. Dogs have "WagTail" and cats have "Claw"

Animal pet = new Dog();
pet.Speak(); //Works
pet.WagTail(); //Error
Dog dog = new Dog();
dog.Speak(); //Works
dog.WagTail(); //Works
>>
>>59910000
>ArrayList
>List
>LinkedList
what the fuck
>>
>>59910058
ohh yes thank you. i get it.

Collection > List > LinkedList - ArrayList

but what is the difference between linkedlist and arraylist And why "List" exists ?
>>
>>59910052
It more or less expands to this

for(auto it = v.cbegin(); it != v.cend(); it++) {
auto box = *it; // copy each box to for loop body
// stuff
}


vs

for(auto it = v.cbegin(); it != v.cend(); it++) {
const auto &box = *it; // just use lvalue references
// stuff
}
>>
>>59910000
List and Collection are interfaces, ArrayList and LinkedList are classes that implement them but work differently under the hood.
>>
>>59910096
Welcome to Java
>>
File: error.png (15KB, 636x474px) Image search: [Google]
error.png
15KB, 636x474px
Why does it just keep looping the messages instead of asking me to type again?
>>
>>59910172
So for something like:
for(auto it = v.begin(); ect) {
std::cout<<*it<<std::endl;
}

This still is just has the overhead of dereferencing right? Why would they do that?
>>
>>59910316
Do sc.nextLine(); after temp = sc.nextInt();

nextInt doesn't consume a line ending so it keeps trying to input
>>
>>59909701
Javascript should work if you want to keep things extra simple
>>
what do i need to know before using an arduino to build cool shit effectively? resources appreciated
>>
>>59910416
Thanks man.
>>
>>59910489
Electronics.
>>
>>59910540
not a constructive reply, feel free to delete it
>>
>>59910398
Because sometimes you _do_ want to copy the value and modify it.
>>
>>59910000
Welcome to the world of Object Oriented Programming.


Collection<String> collection1 = new ArrayList<String>();
Collection<String> collection2 = new LinkedList<String>();
addToCollection(collection1, "Hello");
addToCollection(collection2, "World");

public static void addToCollection(Collection<String> collection, String str)
{
collection.add(str);
}
>>
>>59910538
No problem, it took me a god damn year to figure that out, it's just a shitty thing that java doesn't automatically do it
>>
>>59910599
but that's highly inefficient
>>
>>59910601
if took you a year to read the documentation?
>>
>>59910706
Everyone repeat with me: "retard nigger"
>>
>>59909028
Best book to lean OOP in C++
>>
>>59910728
The best way to do 'OOP' in C++ is to pretend you're writing Go
>>
How can I calculate the depth of a BST in C++ when the function to determine the depth has to return void instead of int? Every google search comes up with this solution:
  
int maxDepth(struct node* node) {
if (node==NULL) {
return(0);
}
else {
// compute the depth of each subtree
int lDepth = maxDepth(node->left);
int rDepth = maxDepth(node->right);

// use the larger one
if (lDepth > rDepth) return(lDepth+1);
else return(rDepth+1);
}
}


But for a specific case, I have to have the implement this with this header:
 void maxDepth(node *rootPtr, int &totalDepth, int &currentDepth) 


I'm stuck on the part that implements the recursive calling of the function. I've tried various solutions that compare what the left and right pointers point to, but nothing works. So far my function is
        void determineDepth(node *rootPtr, int &totalDepth, int &currentDepth)
{

Node *nodePtr = rootPtr;

if(nodePtr == nullptr)
{
totalDepth = 0;
}
else
{
//nodes exist in the tree

}
}


Any suggestions? Is there any way I could follow the same guideline as the google suggestions, but not run into the issue of conflicting variable updates?
>>
C is for weak and lesser programmers. They stick to a small and easy language because they know they can never cope up with big languages like C++.
Pedophiles like to strangle little girls because they know they can't handle grown up women.

C is for pedophiles
>>
>>59910646
How?
>>
>>59909028
So anyone here can indicate me a good resource to do MFC programs on Windows, because them legacy code won't maintain by itself.
>>
>>59910814
You are given a reference to the integer totalDepth, which means you can modify it in the current scope and it will be changed outside the function. Thus, as you walk down the tree, keep track of the current depth, and at the base case (i.e. a leaf), check to see if the currentDepth > totalDepth, and if so, set totalDepth = currentDepth. Just make sure to initialize totalDepth to 0 (i.e. the case of an empty tree).
>>
Why are 99% of programmers dumb fucking niggers?
>>
File: 1490044488258.jpg (552KB, 1625x1117px) Image search: [Google]
1490044488258.jpg
552KB, 1625x1117px
>tfw dreaming of making it to America as a programmer
>big cars, big house, big wife, big kids
>tfw it will never come true
>>
>>59911093
good
>>
>>59911061
Epic, bro. Let me in your super secrit 1337 rapid c0derz club
>>
>gcc 7 when
>>
>Prerequisite knowledge: basic algebra skills
>proceeds to do a bunch of calc-level shit
Why does this happen so often
>>
>>59911142
Sorry you're a retard nigger.

Better luck next life!
>>
>>59911142
>Calc level shit
Haha don't be a math baby. Are you evaluating limits? Are you integrating? Are you calculating derivatives? No? Then it's not calculus. It's algebra.
>>
>>59911061
take your medication, Terry.
>>
>>59911093
https://qz.com/950090/trumps-new-h1-b-rules-will-end-era-of-cheap-indian-engineers-on-us-outsourcing-gigs/
>>
Language: C#

How many inner classes is too many inner classes?

>Inb4 hurr durr 0
>>
looking to get into 3d graphics programming. I never finished any formal education and my math skills don't extend much beyond basic arithmetic.
where do I start, /g/?
>>
>>59911302
Don't have more than one. The only case you should even have one is if you're doing something like creating a linkedlist and need an inner Node class.
>>
>>59911315
http://open.gl
>>
>>59909028
Working on my imageboard: 4kev.org
Just learnt what cookies are for!
>>
>>59911342
I mean, how/where do I learn the math involved? opengl doesn't seem too difficult.
>>
only sort of related to programming, but do any of you have a big collection for basic icons / sound effects to use for whatever reason

whenever i make placeholder graphics / sounds they just kind of look /sound like shit
>>
>>59911419
Opengl is an overly verbose nightmare
>>
>>59911465
Wut?
>>
>>59911419
Learn linear algebra. Ask /sci/ or something for a good introductory book.
>>
>>59911419
>>59911315
If you are legitimately interested in 3D programming and not just using a library, you will probably need to go learn mathematics up to at least vector calc, if not a little into DiffEq (inc Linear Algebra). I am sure there are MIT Opencourseware lectures you can watch, and you can work your way down and find which level you need to start at (i.e. pre-algebra, algebra, trig).
>>
>>59911455
No, I like to keep my placeholders horrible, so there is less of a chance that I forget to change them.
>>
>>59911142
What are you referring to with your meme arrows?
>>
how do i do

map myFun [0..9]

in python?
>>
>>59911455
Make inoffensive placeholders. Not placeholders that look like shit. So you can evaluate the relevant details.
>>
>>59911637
that results in the art people leaving them in there on the final release
>>
File: 1492268284199.jpg (200KB, 960x1207px) Image search: [Google]
1492268284199.jpg
200KB, 960x1207px
Which book should I get for learning PHP and which one for Java?

Spit it out nerds.
>>
Imma grab and read: The C Programming Language

But what other books should I read after this?
>>
>>59910150
An arraylist is a List implementation that uses an array in the background, which changes time complexities compared to a LinkedList, which is a List implementation that uses linked nodes instead of an indexed array.

List is a "generic" class. A list doesn't exist on it's own, behind the scenes it has some kind of data structure. But this way you can use a linkedlist, arraylist, doubly linked list, or fucking-whatever and never think about it because they all have the same method calls to do actions.
>>
>>59911632
map(myFun, range(10))
>>
>>59911678
You should actually program. Books are useless compared to projects and learning from example.
>>
>>59911688
cool ty. also how do i change my repl prompt? i want to change it to lambda like i did for ghci owo
>>
>>59911666
I would eat her ass
>>
>>59911719
brainlet
>>59911678
k&r's really good (2nd edition). i'm going thru art of assembly language programming and it's comfy too. SICP's comfy and very informative also. those are the 3 books i can recommend
>>
>>59911719
I feel like a book that covers good programming principles is useful.

I would obviously check latest and most used open source projects and try to implement something similar myself - it's indeed the best way.

But reading lots of useful data from experts that point out their mistakes and what's good coding practice I find to actually be useful + it won't take me long I'll finish a book like that in less than 3 weeks.
>>
File: file.png (3KB, 108x105px) Image search: [Google]
file.png
3KB, 108x105px
Which android icon should be used for alerts in API v23 and above?
Currently using this but looks old:
android.R.drawable.ic_dialog_alert
>>
>>59911735
not a constructive reply, feel free to delete it
>>
Trying to get two php apps to talk to each other and using openssl_encrypt() for security. I even made the key a string hardcoded on both (after 3 hours of getting nowhere)

For some reason I can't get them to unscramble
>>
>>> def itoc(i): return chr(0x30 | i)
...
>>> map(itoc, range(10)
... )
['0', '1', '2', '3', '4', '5', '6', '7', '8', '9']
>>> range('0', '9')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: range() integer end argument expected, got str.
>>>


tfw to intelligent for python
>>
>>59911654
Only if you're unprofessional. Not your fault anyhow.
>>
>>59911812
>Only if you're unprofessional.
i hear otherwise. was reading about developer art being left in on final releases a while ago
>>
>>59911843
>i hear otherwise
But anon just because it happens doesn't mean people aren't being unprofessional and releasing programmer art is the new norm. It means they're being unprofessional and unprofessional people exist.
>>
>>59911881
The solution is to only use developers who have artistic training.
>>
>>59911881
why not just keep the developer art looking like shit so people don't look at it and think maybe the art team just did a bad job
>>
>>59911419
not sure what level you're at exactly but here's a decent crash course that covers a lot of the basics over the course of four blog posts:

http://blog.wolfire.com/2009/07/linear-algebra-for-game-developers-part-1/
http://blog.wolfire.com/2009/07/linear-algebra-for-game-developers-part-2/
http://blog.wolfire.com/2010/07/Linear-algebra-for-game-developers-part-3/
http://blog.wolfire.com/2010/07/Linear-algebra-for-game-developers-part-4/

here are some relevant free math resources:

https://www.khanacademy.org/math/trigonometry
https://www.khanacademy.org/math/linear-algebra

you'll want to get very comfortable with linear algebra. it can look a bit ugly on paper at times, but when it comes to application it's actually quite intuitive and straightforward

also you can use this site to rapidly prototype shaders and learn from other peoples' code:

https://www.shadertoy.com/
>>
I'm wanting to start programming and start with the C language.

Is there any good free e-book I can use to assist me?
>>
>>59911911
It's bad business.
>>59911895
That would be interesting. I bet you'd get people like the ones that made the photoshop gradient editor. For a long time it didn't do splines/bezier curves for its gradients.
https://feedback.photoshop.com/photoshop_family/topics/photoshops_gradient_editor_needs_an_overhaul
It's pretty hillarious how stupid artists can be.
>>
File: imprimatricoucuasta.jpg (29KB, 400x558px) Image search: [Google]
imprimatricoucuasta.jpg
29KB, 400x558px
Serious question guys - I've discovered I'm decent at programming ( mostly coming from not giving up when I don’t understand something until I figure stuff out ) this process been going only since early this month I've started to try hard and code all sorts of projects for myself, this passion started from a guy releasing a cheat source code for a game ( C++) - started to tweak it, got it work with changes I desired also asked that individual some basic questions - which he promptly answered and also provided help with a lot of programming principles - I think the simple fact he was so nice and helped me a lot triggered some sort of emotional event in my subconscious - since then I just non stop study programming.

I'm basically trying to achieve a decent C++ understanding by the end of the year ( mainly ) but I also want to equally focus C and Assembly.

I've started to reverse engineer games to find engine scripts and other goodies - because right now game hacking is the only domain I experienced and where I can fast and directly implement new knowledge and test it out, I've also started to look into mutliplayer game servers emulation and apply knowledge there as well... thing is I don't want to be a game developer this is just my first baby step, a work around to exercise my new passion and skill.

I need some tips on what to move into next, what sort of stuff should I program to really see some solid improvements?
>>
tfw bare metal python programming
 def isNeg(i): return (i & 0x8000) >> 15 
>>
>>59912120
Why not just i < 0?
>>
I have a PR to fix an issue on Github but I'm not too happy with my solution. Should I send it out for review and hopefully reach a better solution?

I tried coming up with it on my own, but I'm not smart enough :(
>>
>>59911666
>PHP
>>>/g/wdg
>>
>>59910814
void maxDepth(node *rootPtr, int &totalDepth, int currentDepth) { // currentDepth shouldn't be reference.
if (node == nullptr)
return;
if (currentDepth > totalDepth)
totalDepth = currentDepth;
maxDepth(node->left, totalDepth, currentDepth + 1);
maxDepth(node->right, totalDepth, currentDepth + 1);
}
>>
>>59912268
Just tell me the book you fucking sperg
>>
>>59912325
you've got no place programming if you can't sift through search results and pick something reasonable.
>>
>>59912163
b/c i'm bare metal
>>
I'm considering to start learning GoLang.
Red pill pls

>already know c/c++/java/php
>>
>>59912360
>Red pill pls
>>>/pol/
>>
>>59912382
cocи хyи пидapac
>>
>>59912356
Is that a new music genre?
>>
>>59912360
If you know C++ there's no reason to learn Golang. It's just a slower C++ with all of the features stripped out for babby web devs.
>>
>>59912360
Don't bother man, as a C++/Java developer you'll feel like Go's developers treat you like a little kid. It was designed so Google could put 100 braindead programmers and one good programmer in a room, and end up with working software.

See https://github.com/ksimka/go-is-not-good

My advice: learn C++ better.
>>
>>59912394
> ko ko ko
>>
File: failure.png (86KB, 384x128px) Image search: [Google]
failure.png
86KB, 384x128px
Tested out CycleGAN to see if a neural network can learn to map non nude images to nude images with about ~1500 images in dataset. Results are a failure. CycleGAN sometimes correctly changed the color of clothes to skin color, but the lines of clothes were never removed. Like the authors of CycleGAN said, the network is good at modifying color and texture, but not geometry. Plus, anime images have incredibly high dimension with regard to color (i.e. variety of hair color).

Wish there was a deep learning general in /g/, but there aren't enough people familiar enough with the field on here.
>>
How do I cure my language hipsterism?

Like I can't learn useful normal languages, I find myself only interesting useless hipster languages like Common Lisp or Ada, or hell, even modern Fortran (fucking why??).

I'll never be productive with this bullshit.
>>
>>59909468
Does this only work with STL vectors, or can arrays work as well?

I didn't know this was added to C++.
>>
>>59912623

It works for std::array and that's all that matters.
>>
>>59911972
>>59911515
>>59911508
Thanks guys! I appreciate the help. Will check those links out.
>>
Anyone here use rust? What is it primarily used for? I've been looking at trying it out for awhile.
>>
>>59912713
It's very new so it hasn't found its place yet.
Right now it's just a language, if some very well designed libraries for doing this or that come out then maybe Rust will be useful but until then it's just a C++ replacement with a strict compiler.
>>
File: file.png (58KB, 1466x392px) Image search: [Google]
file.png
58KB, 1466x392px
But why is it always true?
I just want to enter this if statement if visibility is other than View.VISIBLE or View.INVISIBLE
>>
$ hexdump -C quine.com
00000000 be 00 01 b9 26 00 ac d4 10 89 c2 e8 06 00 e8 03 |....&...........|
00000010 00 e2 f3 c3 86 f2 80 ca 30 80 fa 39 76 03 80 c2 |........0..9v...|
00000020 07 b4 02 cd 21 c3 |....!.|
00000026

rate my quine, /g/.
(never done this before, is it even a valid quine?)
>>
>>59912740
What other kinds of visibilities are there?
>>
>>59912740
if(visibility != View.VISIBLE && visibility != View.INVISIBLE
>>
>>59912740
If visibility == Visible, it satisfies the right part of the statement.
If visibility != Visible, it satisfies the left part.
One of those two things will always be true, so the whole statement will always be true.
>>
>>59912755
>>59912762
ah shit I get it now.
Thanks anon. I'm retarded.
>>
>>59912557
Simply knowing Ada properly makes you a better programmer, because you focus on architecture, rather than struggling to pack your bit array for your 3bit elements.
>>
>>59912360
>>59912406
>>59912414
an old friend and i were both learning C++ a few years back (for neither of us was it our first language). then he got a job at a startup where they wanted him to learn Go, so he started spending time on that instead. now everything he tells me about it makes me really glad i spent that time diving deeper into C++
>>
>>59912747
What does it print when you run it?
>>
>>59912826
be0001b92600acd41089c2e80600e80300e2f3c386f280ca3080fa39760380c207b402cd21c3

exactly this
>>
webdevs and java/C#devs hate C because they aren't good enough to use it

rustdevs hate C because it doesn't have a CoC
>>
>>59910096
>List
generic list interface
>ArrayList
dynamically sized array
>LinkedList
linked list

it's not that fucking complicated or egregious.
>>
>>59912944
this is what C programmers actually believe
>>
>>59912986
i hope you live a long, prosperous life you amazing webdev
>>
>>59913032
cool. except I'm not in web development.
>>
>>59913050
you should become one. it'd be a great fit for your intelligence
>>
>>59913064
you implied that anybody that doesn't use C is not using it because they are not intelligent enough to use it. that is fucking retarded. you probably started using C five days ago, and now you think you are hot shit
>>
File: inane.gif (503KB, 225x225px) Image search: [Google]
inane.gif
503KB, 225x225px
>>59912944
>>59912986
>>59913032
>>59913050
>>59913064
>>59913091
Stallman was right.
>>
>>59912944
>Everyone that hates C doesn't know it
Really fascinating mental gymnastics there, friend.
>>
>>59913119
What did Stallman say?
>>
>>59913127
Read the filename.
>>
>>59912944

I'm a web dev and I like C but then again I find most any language to have its uses even if I suck with them.

except ML fuck ML.
>>
>>59913121
don't greentext anymore unless you are exactly quoting. the autism is unparalleled and they will ask you who you are quoting
>>
>>59913149
>Not filtering them
>Letting autism win
>>
>>59913161
they use it as a way to invalidate anything you said because you didn't greentext "correctly". fuck that.
>>
>>59913149
>>59913161
>>59913173
While they were shitposting themselves, their autism has some truth to it: posts that abuse the quotation system are often shitposts.
>>
>>59913185
nowhere in any official writing is the greentext arrow referred to as a quotation system
>>
>>59913173
They can just post there inane trash and everyone can ignore them
>>
>>59913185
examples of real shitposts:
"you use Java therefore you are worthless. kill yourself pajeet"
"rust shills sure are out in full force today"
"lisp is the most powerful language to have ever existed"
"programs are mathematical proofs!"
>>
Do all web devs huff paint? Asking for a friend
>>
>>59913185
There is no question system your retard
>>
>>59913203
Mods need to enforce rule 6
>>
Retard here. I have a big dataset and am trying to parse the year column to match but their formatting is off sometimes. Example "Mar-12-2005" , "05" and "2005". I'm trying to break it down to just the year.

Should I use regex for this? I typically don't do these types of things so I'm clueless. Just looking to be pointed in the right direction.
>>
>>59913237
> Retard here.

JavaScript is the solution.
>>
>>59913185
>implying meme arrows are for quotes
>>
can you fucks explain what i'm doing wrong

ex 1-8 k&r

/* Write a program to count blanks, tabs and newlines */

#include<stdio.h>

int main() {
int c, nl, nt, ns;
nl = 0;
nt = 0;
ns = 0;
while ((c = getchar()) != EOF) {
if (c == '\n')
++nl;
if (c == '\t')
++nt;
if (c == ' ')
++ns;
}
printf("Blanks: %d\nTabs: %d\nNewlines: %d\n", ns, nt, nl);
}


it works for new lines but not spaces or tabs
>>
>>59913237

I don't think you should use a regex. You should split it by '-' and the last item will be the year.
>>
>>59913246
no bully
>>
File: 1475874205944.jpg (80KB, 766x960px) Image search: [Google]
1475874205944.jpg
80KB, 766x960px
Anyone here working as a freelancer? How did you start?

Right now I have nothing to show but a fairly inactive Github profile with a few abandoned projects and even less contributions to other people's projects. So it's been a couple of weeks and I couldn't get a single reply.

Is building my own website a good idea? I feel like every other web developer has his own website and his own blog. I'm thinking about starting one. Maybe developing a couple of common websites to display my skills would be a good idea. Any tips?
>>
File: sdfdfsf.png (8KB, 565x125px) Image search: [Google]
sdfdfsf.png
8KB, 565x125px
>>59913251
>>
>>59913251
This works for me on MacOS.
>>
>>59913196
The use of ">" as a way to denote a quote has existed long before 4chan even existed; as such its meaning and intended use are implicit.

>>59913203
Both the abuse of the intended use of ">" and your examples are shitposting.

>>59913213
System was the wrong word, yes. Protocol is a better word.
>>
>>59913299
Please stay on topic. If you want to talk about useless shit go to the web dev thread
>>
>>59913299
>There is only one use for my meme arrow
>>
>>59913251
This works for me on MSDOS
>>
i hardly have any programming experience and failed python algorithms, the second introductory course.

am I screwed for having a bad GPA in university CS?
>>
>>59913307
Well, if it makes you feel any better I'm saging because I know my posts are off-topic.

>>59913347
Most people shouldn't be going to college.
>>
>>59913355
>Most people shouldn't be going to college.
why not?
>>
>>59913347
you posted this yesterday

save your grandad some money if college isn't working out and get a job that doesn't require one, like IT or something. look into certifications or technical training like that
>>
>>59913365
>you posted this yesterday
yes i did

>save your grandad some money if college isn't working out
but i never tried hard in uni, that's why i failed. don't know what to do desu.

trying to self-learn python through codecademy meanwhile though.
>>
>>59913317
Who said this?
>>
>>59913347
I graduated college with a 2.8 and ended up OK but you need to grind pretty hard to do well.

You can do the same thing without college.
>>
>>59906921
I finally finished, and that's a lot shorter than mine, but I'm doing mine in 68k. Is that x86?

>>59906590
This tip is what got me to finish, though, thanks.
>>
>>59913398
>>>/trash/stalememes/
>>
>>59913415
Learn to link properly. No such thread exists.
>>
>>59913404
2.8 in CS and ended up okay? I have 1.x GPAs in my first terms, shit. I need to work harder to even get a 3.0
>>
>>59913398
You said it, Anonymous. You've made almost every post in this thread - look at the usernames. You're making this post too. Will you even remember doing it, though?
>>
>>59913360
Not him, but some people just aren't cut out for it. ie, me. I'm a junior Comp E major, with a 3.5 gpa, but I'm killing myself just to do this well. I feel like people around me are more adept at thinking, and don't seem to have to work as hard, or are nearly stressed as me.
>>
>>59913424

Lol is Anonymous talking to himself again? Next he's going to start talking about his OS
>>
>>59913433
>I feel like people around me are more adept at thinking, and don't seem to have to work as hard, or are nearly stressed as me.
of course

normies have all the connections and skills, they can just """collaborate"""
>>
>>59913424
No. But a few years ago I did find a picture of me that was taken 30 years before I was born. Same face, same hair, same shirt, standing in the same spot of the same building.
>>
>>59913442
Yes, he is. Or I suppose, more correctly, I am.
>>
>>59913384
give it another try and see if you do better this time then, if you flunk a class next semester though i'd definitely not keep banging my head against the wall
>>
>>59913360
Because college is an antiquated system. It was originally for someone to receive a well-rounded liberal education and become a scholar. Now it's a catch all for learning anything and everything--no matter how stupid, meaningless, or incompatible with the college system--and as a stepping stone for getting into major sports leagues.

>>59913384
You will never try hard.
>>
>>59913466
>liberal education
What did he mean by this?
>>
>>59913466
it's effectively trade school for STEMers. also don't bully him too hard, he might really try harder this time
>>
>>59913442
God says...
understandings bassinets intense sacking's floweriness hare's Lionel's
coercion's mugging's earn organizing posits CinemaScope cashmere's Godzilla
Eileen Muse squelch mockeries rift keepsake's
>>
>>59913465
I should've intervened and get help when I got my first F in my second term. Instead I just pulled it through and ended up doing even worse in my third term. Trying to consider if taking a year off is better, or going back to see if i can do better this time. I would be on academic probation both ways.

>>59913466
>>59913478
that's if I can get the motivation to do so. I don't know if antipsychotics and antidepressants would help in that regard. Already I'm spending days being a lazy NEET, rather than studying Python.
>>
>>59913488
>Python
That's how I know your post is worthless garbage. Stopped reading right there.
>>
>>59913488
You definitely shouldn't go back then.
>>
>>59913492
well python is the introductory programming language for CS.
>>
>>59913503
Not for me. It was C.
>>
>>59913511
for me it was x86 assembly
>>
>>59913503
Your point being? That doesn't somehow negate its inherent retardation.
>>59913515
>x86
Garbage.
>>
>>59913494
Would taking a year off change anything though? I feel bad thinking I'd be older than everyone in lectures
>>
>>59913292
nice useless use of cat there
>>
>>59913525
mate there's a 40 year old woman one of my classes, you'd be able to sneak by
>>59913530
how was it useless?
>>
>>59913525
That's up to you and how much work you want to put in. You should be able to put in work on your own and be self motivated if you want to succeed when you go back to college.

Otherwise, failure is all that awaits you.
>>
>>59913478
>it's effectively trade school for STEMers
Learning STEM via college is stupid. We need actual trade school dedicated to certian sciences. This will not only reduce the cost as you won't have to fund a bunch non-related and stupid bullshit, but it'll also allow graduates to be better prepared for the real world.

>he might really try harder this time
No he won't.

>>59913488
Returning to college will results in two things: depression and a great loss of money.
Not only do you lack motivation, but you also lack discipline when motivation fades. Finally, to survive the world after college, you need to have decent social skills. Networking is as important as getting good grades.
>>
>>59913515
Did you go over MIPS too?
>>
>>59913251
don't see anything wrong with it
how are you testing it?
>>
>>59913550
>Learning STEM via college is stupid. We need actual trade school dedicated to certian sciences.
it takes a lot more than 4 years of study to master a stem field. if you're just going to be a koder then you can learn that in a few months, but if you're working on the cutting edge of innovation that doesn't cut it
>>
>>59913542
Yeah I also know some third years who just switched their majors to CS, I wouldn't be the oldest one really.

>>59913543
I should be able to put more work in, considering I only study for a few hours in the whole term before.

>>59913550
>Not only do you lack motivation, but you also lack discipline when motivation fades.
True.

Also true about the lack of social skills and networking. After three terms I only have a few acquaintances in university. Thinking about getting a job post-grad frightens me because I have no networking.
>>
>>59913550
I'd love to create a startup for the socially awkward techies for whom networking is like arsenic. One where we would use only the better technologies - no Python or Go! Unfortunately it seems all the VC funding is in CA, and I'm stuck on the other side of the country.
>>
>>59913575
Get a job that forces you to be in contact with a fuckton of people.
>>
>>59913588
You could have a mandatory IQ test as the interview!

Oh, wait -- every tech company does that and the people not smart enough to pass it bitch here and on the orange websight
>>
>>59913588
CS dudes disgust me with their autism. They're always being loud, eating miso soup because they're weebs, and playing games in the building. I really wish I went into engineering instead.
>>
>>59913605
Sounds like a good way to give a shy person a nervous breakdown
>>
>>59913605
>Get a job
that's the hard part isn't it. i never had a part-time job before. i've tried applying online to various places last week, but i haven't heard back from any of them.
>>
>>59913575
>Also true about the lack of social skills and networking. After three terms I only have a few acquaintances in university. Thinking about getting a job post-grad frightens me because I have no networking.
Then don't go back there if you realize this.

>>59913588
You'll always need some studs to be able to do the business side of your company.
>>
>>59913611
Tell me where the post hurt you, anon.
>>
>>59913622
try internship if everyone turns you down?
literal slave labor but it's experience
>>
>>59913632
>You'll always need some studs to be able to do the business side of your company.
I'm sure there's some introverted, awkward people who went into accounting, law, and business (maybe their parents pressured them into it or something).
>>
>>59913635
what would i get an internship in though? i thought internships were for third years and older.
>>
>>59913575
>Thinking about getting a job post-grad frightens me because I have no networking.
if you didn't flunk a bunch of classes you wouldn't have to rely on networking to get a job (!!!)
look into IT certifications. a couple respected certifications, having a home page website employers can look at, and knowing python or some other shit with programs up on github can probably get you a decent job in IT. don't take a customer support job or it'd make you kill yourself since you're already mentally ill. don't spend more than 2 years self studying since beyond that you're just fucking around
>>
>>59913645
well you need charisma to secure good deals and to force codemonkeys to work, right
>>
Any good resources for learning a new language when you're not a total novice? Say I'm totally new to C# but am advanced in C++, Java, Python etc. and would like to avoid the basics of boolean algebra and what a class is. Any sources that basically operate on a "Here's how to do what you already know in this new language" basis?
>>
>>59913668
learn x in y
>>
>>59913661
Not sure how it works in the US but I was offered an internship after both my first and second years of uni. The pay wasn't great but the experience of writing real code was invaluable.
>>
>>59913661
just about anything, I guess
what you want is some experience in a working environment that you can put on paper and something to exorcise your autism
>>
>>59913662
Are IT jobs easy? I currently work as a software engineer and want to fucking die.
>>
>>59913668
there are tons of books like that, helping with the language but not the programming experience
>>
>>59913691
why would you go from software engineer to IT? unless you're a frontend code monkey making $10/hour then i might see why
>>
>>59913666
The trick would be not to hire codemonkeys, but to hire brilliant programmers who struggle to get hired at most companies because they have poor social skills. Getting them and letting them use a good stack instead of the garbage that most companies use.
>>
>>59910489
>>59910575
Well he's kinda right.
It's not like you can just plug shit and expect it to work without it burning.

If you want to build stuff from scratch effectively (by yourself), get a Circuit Analysis book and an Electronics book and read them.

Check out:
http://4chan-science.wikia.com/wiki/Electrical_and_Electronics_Engineering
https://www.youtube.com/user/Afrotechmods
https://www.youtube.com/user/w2aew
https://www.youtube.com/channel/UCSRTiJhBE5GsP-1fCbpFRWg
/diy/'s electronics generals
/r/arduino
/r/electronics

If you don't feel ready you can also just follow basic tutorials for a bit, get the hang of Arduino, and then start reading books.
>>
>>59913662
>if you didn't flunk a bunch of classes you wouldn't have to rely on networking to get a job (!!!)
shit that's true.

but i've also heard about people having 4.0s and never getting a job, isn't it all about networking in the US and Canada? or is it better for new grads
>>
>>59913708
I ended up chasing money and now I fucking hate it. I worked at Facebook for 2 years now I'm working at a hedgefund. Everyday is 12 hours of wanting to fucking die.

Maybe it's not IT i need to move to, but idk what else there is. I just want a nice easy job. I don't need money anymore
>>
>>59913721
It makes sense that you need networking if pretty much everywhere is flooded with mediocre programmers and mediocre jobs working on mediocre code. That may the only way you can get ahead, because if you're good then the interviewer probably won't be smart enough to realize it.
>>
>>59913612
miso soup makes me shit liquid

I don't know what it is. I don't get constant diarrhea or anything, it's just that when I poop at normal times after eating miso, I can shoot a decent pressure jetstream of liquid shit out of my ass to the point where it's similar to pissing.
>>
>>59913726
i'll literally kill myself if i do this any longer
>>
>>59913721
>having 4.0s and never getting a job,
not for a computer science major. you'd probably have offers waiting for you when you graduate from people you've never heard of. i've heard of that happening
>>
>>59913714
you still need management to boss everyone around tho
>>
>>59913683

Sick, this is perfect. Thanks.
>>
>>59913726
What was so bad about Facebook?
>>
>>59913736
is it possible to anti-loo the loo? what if you apply for a programming job in a third world country at a good company?

>hell yeah it's a white man
>he's really good at programming
>get setup with a salary that makes you king of the loo

will it work or will office pajeet/chang/mukjai HR guy still rather hire his fellow man for lesser pay
>>
>>59913743
that sounds good i guess. im attending a top 5 uni in canada
>>
>>59913779
It got boring was the issue. Maybe I'll just go back to Facebook and bide my time without trying to climb the ladder. Idk what to do with my life I'm in literal shambles
>>
>>59913726
yeahhhhh don't move to IT.. they'd probably not hire you b/c they'd think you're overqualified. and would be demanding. if you've worked at facebook for 2 years you can put that on your resume and i'd imagine get a shitload of clients for doing freelance work on your own time. making websites and apps and shit. good thing about that i would think is that you can be travelling while you do it, have that be a source of income while you visit grorious nippon or something. i always thought that'd be a cool thing to do. or you can get a wife and start a family in which case you'll want the hedgefund bux
>>
>>59913785
Was it difficult to get in there? I'm considering a new job
>>
>>59913782
>will office pajeet/chang/mukjai HR guy still rather hire his fellow man for lesser pay
this, obviously
>>
>>59913799
this dude's life is in shambles because he's making shitloads of money and working at facebook was too boring for him, do you think he's mediocre and facebook hired him b/c there's not enough applicants?
>>
>>59913801
some countries will literally just hire you if you're white and don't look like a criminal or loser by local standards, and have decent skills. maybe not for programming tho, hence my question.
>>
>>59913799
Facebook was on par with Google for interview difficulty. Just practice leetcode and read Cracking the Coding Interview.

The hedgefund interview was brutal and I got really lucky
>>
>>59913813
well i'm asian
>>
>>59913804
Everyday I don't want to get out of bed. I know I'll be going to work for 12+ hours to move money from point a to point b. I'll come home from work so exhausted I can't even play glorious Persona 5 or watch anime. I just want to take some sleeping pills and fucking fall asleep because that's when I'm happiest
>>
>>59909069
6 million
>>
>>59913828
However, the work itself is actually really enjoyable. I just wish it was less hours and a week and actually helping humanity in some way.
>>
>>59913817
>>59913828
what was your gpa? are you white?
>>
>>59913823
desu it depends on what kind
there are hella orientals and indians in tech, and less SE Asians
>>
>>59913841
3.9 and yes
>>
>>59912851
Then yes, it is a quine
>>
>>59913857
a white grill? my gpa's 3.9 but i'm a fucking white male and go to a non-prestigious university (for the full scholarship, wasn't turning that down) kind of paranoid about not getting hired because of the white male + no name university combo
>>
>>59913867
you will be fine and get interviews. just ensure you can pass them
>>
>>59913409
nice. glad my tip was helpful.
and yes that's x86 (strictly speaking, 16-bit 8086). the xlatb (translate byte) instruction does most of the work here. it sets AL to a value pointed to by [BX+AL] so the hex lookup is quite easy. does 68k have anything similar to that?
>>
>>59913882
Do they care if you don't have much experience with their exact stack, but several years of experience in other languages?
>>
>>59913898
not at all. the theory for new grads is that if you can pass the interview and prove yourself, you will be able to learn whatever you need to get the job done
>>
>>59913882
i did pretty fucking bad on this zappos interview i did on a whim. idk y, was really nervous for some reason. i'm starting going through the art of assembly language programming now, wondering if i should go back to cracking the coding interview and redo it in python. i don't really have any language mastered right now. did CTCI a little in haskell for some reason and ended up stuttering to a halt b/c i don't know haskell.

.. but i don't know python either..

i'm weighing CTCI and going through select chapters of introduction to algorithm, guide me sensei
>>
>>59913863
it prints an ascii hex representation of itself though, not the exact bytes.
and it does it in a super lazy way by reading itself from memory.
>>
>>59913911
What about folks who graduated a few years ago, and have been working since then?
>>
>>59913928
You'll be fine just don't go for a specialized role like Data Scientist unless that's your specialty

go for the general SWE role
>>
>>59913937
Thanks anon, reassuring to know.
>>
>>59913917
Assembly won't help you much with the Facebook interview. It will help with a hedgefund interview.

Grind algorithms, data structures, etc. and actually learn the material. It's like algebra where you can't memorize the problems but you can learn to solve them.
>>
Okay enough questions about how to get a job at Facebook...

please tell me how to not want to kill myself after working 13+ hours a day
>>
>>59913959
Stop working 13+ hours a day?
>>
>>59909914
My personal preference is for flatter structures rather than deeper structures.
Can use you a table instead or something?
>>
>>59913948
i'll look up the relevant chapters in intro to algorithms, read up on it. what about language specific proficiency? do they want every library memorized if you're in java, and your programs to compile first try etc?
>>
>>59913975
Where should I work? Anons told me to not join the IT industry and stay as a SWE.

What are the best places to work as a SWE where I can basically live the NEET life?
>>
>>59913989
No, but you should know the tradeoffs of a TreeMap vs a HashMap and all that stuffs
>>
>>59913993
i told you already to do freelance while you travel abroad. all you need is your trust t430 thinkpad running debian

you DO have a t430 thinkpad running debian, right?
>>
>>59913993
I've heard that big Java companies are boring, but pay pretty well and you only have to work 9-5.
>>
>>59914014
nope im an apple shill :(

i'll give it a shot for a year and see if i can get any work... the issue is my network isn't great for freelance work
>>
>>59914007
also thanks for the i 'ppreciate it
>>
>>59909713
which is every language basically
>>
>>59914007
Surely it goes beyond the basics?
>>
Please I know nobody uses Delphi anymore but our programming course makes us learn with it.

Is there anybody able to help me with an exercise?

I need to enter a set of numbers for a specific variable, but each set has somehow to be stored undefinitely until I order the program to end it and then it has to list each number of the set.

I cannot use arrays.
>>
>>59914027
dude, you have 2 years under you belt at facebook right? put that on your linkedin, and market yourself. look at places where people look for freelancers and look at places where people post ads for freelancers and you're set. for gods sake don't quit your job until you've already got some infrastructure set up regarding your freelancing tho. this isn't the 1950's, people don't hire someone by calling up their buddies from high school and asking who they know. they go online and see a guy worked for facebook and hire him
>>
>>59914062
Not really. What's the value in memorizing the standard lib? If you know general programming (again, heavily emphasizing algorithms and data structures) you should be able to google 'balanced binary tree java standard library' or something like that.

Obviously as you go up in rank or into a more specialized position, knowing how the JVM works and how to optimize it will become mouch more important.
>>
>>59914080
lmao reminds me of my 3rd year programming course that had us using the professor's own language called cinnameg. the 2-3 questions on stack overflow about cinnameg make me laugh
>>
>>59911803
From your shell prompt:
pydoc range
>>
>>59914096
I meant more being asked to show you're actually able to program stuff, not just being asked "what's the difference between <impl A of common data structure> and <impl B of common data structure>?"
>>
>>59914102
Its not fucking funny.
>>
>>59914080
Why the fuck are they teaching you Delphi?

Maybe they're teaching it so you can't cheat by asking for help online
>>
>>59914112
Oh yeah. You'll be whiteboarding for the majority of the interview. They'll "fizzbuzz" you at the beginning with questions like that or ask you about tradeoffs if you used a nother structure for your implementation. I'm just trying to make sure u get the whole story friend
>>
what is the benefit in GIT allowing someone to change their system time and upload things "in the past"?

why dont they just fix it so it uses their own server time or something
>>
>>59912120
>>> isNeg(-10000000)
0
>>
>>59914116
>>
>>59914124
Will it go down badly if I change FizzBuzz to FuckButt?
>>
>>59914126
can't believe you actually took the time to run my code. yeah, it's for 16 bit signed integers, add another couple 0's to 0x8000 if you want it to work on that
>>
>>59912557
Try actually writing a program, or contributing to some project.

If there's nothing you want to write then your hipsterism doesn't matter.
If you have no problem in completing a work then your hipsterism is not impediment.
>>
>>59912557
>useful languages
No language is useful or useless.
>>
File: 1490296496833.jpg (25KB, 641x530px)
1490296496833.jpg
25KB, 641x530px
does introduction to algorithms not talking about mergesort?
>>
@59914128
@59914202
>>>/r/abbit
>>
>>59914202
Mergesort is easy, anon
>>
>>59914208
>@
You dun goofed
>>
@59914215
>You dun goofed
>>>/r/abbit
>>
>>59914221
>@
>>>/t/watter
>>
>>59914221
>t. newfag
>>
>>59914231
>t. newfag
Who said this? Why are you quoting it?
>>
>>59914243
> isn't quoting,it's greentexting
>>
>>59914243
You did
>>
@59914226
@59914231
Your kind is not welcome here.
>>>/r/ibbit

>>59914250
>greentexting
The redditors seem to be out in force at the moment.
>>>/r/abbit
>>
>>59914250
People shouldn't use the quote feature without intending to quote someone, it's considered poor form.
>>59914254
I didn't. His post is the first time that sentence has appeared here.
>>
>>59914126
>>> isNeg(-1.0)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "<stdin>", line 1, in isNeg
TypeError: unsupported operand type(s) for &: 'float' and 'int'
>>
File: 1375401064676.png (136KB, 357x391px) Image search: [Google]
1375401064676.png
136KB, 357x391px
These threads should seriously be banned from /g/.
They are filled with too many retards who call random wall scribbles "programming". It's an insult to the board, the field and humanity at large.
>>
>>59914274
You literally did. Right here >>59914243.
>>
>>59914297
Which is the second time this sentence has appeared in this thread, meaning it can easily be a quote (which it is).
>>
>>59914284
They should be banned just for the rampant shitposting.
>>
>>59914274
How much are you being paid to post this bullshit?
>>
>>59914304
You asked who said it. Which you did. I'm sorry this is too complicated for your reddit brain.
>>
>>59913251
its nl++; not ++nl;
>>
Does it matter which university you went to at most software companies?
>>
>>59914312
I'm not even going to explain it to you, because you're so rude

>>59914324
I asked him "who said it", which means I am referring to something he did, not to something I did.
>>
>>59914334
++nl; is correct since he doesn't need the value of nl pre-increment
>>
>>59914339
Explain what? That you have absolutely nothing of value to contribute to this thread, or any other /dpt/ thread? Not once have you posted a single thing related to programming.
>>
>>59914339
You wrote it and then immediately asked who wrote it. It's not fucking complicated.
>>
File: 1421072953716.png (258KB, 549x560px) Image search: [Google]
1421072953716.png
258KB, 549x560px
What is the best anime to watch when:
1) Programming
2) Taking a break from programming
>>
>>59914275
are you guys so insecure that you don't understand what that code even does, despite how short it is, that you can't tell it works for integers that are under 16 bits?
>>
>>59914362
Are you tracking every single post I make? That's the only way you can possibly make the claims you are making without looking retarded.
>>59914363
My question was aimed at the poster who quoted nonexistent text.
>>
>>59914381
1. Your Name
2. Your Name


in reality..

1. Lucky Star or some other 'comedy'
2. Bakemonogatari
>>
>>59914396
And the answer was (you)
>>
>>59914381
>1) Programming
Something easy to digest
>2) Taking a break from programming
L A I N
>>
>>59914403
No. I didn't say that before his post. My post has an implication of time associated with the question, I can't possibly be the answer to it if that would mean I need to somehow time travel to a moment where I didn't even ask the question.
>>
>>59914396
>Are you tracking every single post I make? That's the only way you can possibly make the claims you are making without looking retarded.
It's not hard, considering you post the same thing over and over again.

>Who said this?
>Who said this?
>Who said this?
ad nauseum

Tibi caeli minimis non curat tibi respirare.
>>
>>59914417
That's not how you do implications here, newfag.
>>
>>59914426
>It's not hard, considering you post the same thing over and over again.
Do you have some kind of brain injury which prevents you from thinking properly? Please compile a list of all of my posts ever. I'm sure you won't be able to do such a thing since that would require power you don't posses.

>>59914426
I didn't even imply that let alone say it.
>>
>>59914467
Who said this?
>>
>>59914478
Said what? You didn't use the quote function.
>>
>>59914485
>quote function
What is that? I see only "Link to this post" and "Reply to this post".
>>
>>59914485
What's a quote?
>>
>>59914505
I think it's from Cave Story
>>
>>59914467
You just said you implied it. I think you have early onset dementia.
>>
>>59914499
It is commonly denoted by the symbol ">". You actually just used it in this very post.
It takes previously written text as input and produces a quoted version of that text as output.

>>59914505
Read a book. I think they explain that sort of stuff in those.

>>59914516
I don't know, you tell me.
>>
New thread:

>>59914531
>>59914531
>>59914531
>>
>>59914527
>he can't even give the simplest definition of a quotation
sad
>>
int top;
//stuff
int large[top+1], aux;
//a lot of stuff
index=max_element(large+aux,large+top+1)-large;

Sorry if this sounds like new, but why does this work? It returns the position of the max element in the array and it was a godsend for that little challenge, but can someone explain why?
>>
>>59914527
"It takes previously written text as input and produces a quoted version of that text as output."
No, it simply colors the text on that line green. That is all. It has no inherent meaning or significance beyond that.
>>
>>59914553
I didn't say "he can't even give the simplest definition of a quotation". Why are you attributing it to me?
>>59914558
This is blatantly false. It has had that meaning for a long time now. You not being aware of it doesn't change that simple fact.
>>
>>59914570
You implied it
>>
In >>59914570, Anonymous wrote:
>It has had that meaning for a long time now.

Only when accompanied by clarification that it is a quote.
>>
>>59912796
I really like Ada and I think it has to do with that. When I was younger I was all about languages like Perl where you could just "do whatever the fuck it probably works" but the older I get the more I like the structure of languages like Ada, of actually designing things then implementing them rather than "hacking away". Who cares if there's a bit more to type? I know how I want shit to work and I'm willing to hit a few extra keys to ensure it does exactly that.
>>59914162
That's my number one problem, there is nothing I actually want to program or can contribute to, within reason. Everything I want to do is so complicated I may as well want to do nothing. Like I'd like to write a better 3D modeling application, along the lines of houdini probably with hardcore built in proceduralism, but I don't have a fucking clue how to go about it. Or rather I do but I get lost in the details. Or say a vector drawing app, cause inkscape is shit and I'd like decent open source one. Or VR/AR stuff, but again, it's complicated... For simple stuff within the realm of possibility given my current skill level there is fuck all I want or need to do.


But regardless wouldn't I be better served with C/C++, Java, even javascript? I've been working through freecodecamp but god damn javascript is an awful inconsistent hack of a language and it fucking bothers me.
And the beautiful structured cleanliness of Ada calls to m, or the implicit power and mathematical nature of lisp... Or fortran, mostly because I've worked on a reasonably large scientific model written in (pseudo) fortran 77 and the idea of modern fortran 2012 concurrent and everything seems appealing and most of what I want to do is scientific/mathematic in nature, modeling and the like, physics based rendering, what have you.... But fuck man I don't want to use some mainstream bullshit despite mainstream is exactly what would benefit me the most.
>>
>>59914779
>But regardless wouldn't I be better served with C/C++, Java, even javascript?
Those so-called """languages""" are acceptable to use only if you are quite literally subhuman.
>>
>>59914779
>mathematical nature of lisp
How can unsound garbage have "mathematical nature"?
>>
>>59914779
It's easy to go to C++ from Ada. Sure it'll be annoying from the lack of certain features and it generally being poorly constructed, but it is more or less similar.
>>
>>59914864
Well if nothing else that makes me feel better as it assures me that my dislike of those languages is a natural outcome of not being a subhuman pajeet shit.

Well, C is okay, but C++ is ugly as fuck and Java... Fuck that noise. Why is Java so popular when Ada would be infinitely better?? Why do people hate well designed languages?


fuck it though, as much as I enjoy Ada (and I'll probably give it another go so enough) I think I'm gonna have to dig back into Common Lisp, it's just so god damned comfy.
>>
>>59914905
How can someone possibly like both Ada and Lisp at the same time?
>>
>>59915210
Why not? Sure, they sort of opposites, but who is always in the same mood? For well thought out, structured programming Ada is fantastic, if I'm more in the mood for freeform exploratory programming, Common Lisp is there for me.
>>
>>59915247
>if I'm more in the mood for freeform exploratory programming, Common Lisp is there for me.
But you don't have to use dynamic garbage for that.
Thread posts: 379
Thread images: 23


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