[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
/dpt/ - Daily Programming Thread
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /g/ - Technology

Thread replies: 255
Thread images: 30
File: dptoop.png (932 KB, 1200x1200) Image search: [Google]
dptoop.png
932 KB, 1200x1200
Daily Programming Thread

What are you working on, anonymous ?

# New & Revised /dpt/ Code of Conduct #
We want to ensure that the /dpt/ community, while large and diverse, remains
welcoming and respectful to all participants. To that end, we have a few
ground rules that we ask people to adhere to.

- *Be friendly and patient.*

- *Be welcoming.* We strive to be a community that welcomes and supports
people of all backgrounds and identities. This includes, but is not limited
to members of any race, ethnicity, culture, national origin, colour,
immigration status, social and economic class, educational level, sex,
sexual orientation, gender identity and expression, age, size, family
status, political belief, religion, and mental and physical ability.

- *Be respectful.* Not all of us will agree all the time, but disagreement
is no excuse for poor behavior and poor manners. We might all experience
some frustration now and then, but we cannot allow that frustration to turn
into a personal attack. It’s important to remember that a community where
people feel uncomfortable or threatened is not a productive one. Members of
the /dpt/ community should be respectful when dealing with other members as
well as with people outside the /dpt/ community.

- *When we disagree, try to understand why.* Disagreements, both social and
technical, happen all the time and /dpt/ is no exception. It is important
that we resolve disagreements and differing views constructively. Remember
that we’re different. The strength of /dpt/ comes from its varied community,
people from a wide range of backgrounds. Different people have different
perspectives on issues. Being unable to understand why someone holds a
viewpoint doesn’t mean that they’re wrong. Don’t forget that it is human to
err and blaming each other doesn’t get us anywhere. Instead, focus on
helping to resolve issues and learning from mistakes.
>>
First for Rust
>>
>>54184228
>in the making
>not made
This is one of many reasons Rust is a meme
>>
>>54184883
> everything that is still being developed is a meme

retard. You must realize how dumb you are.
>>
EE major, we're programming Pacman on the LandTiger LPC 1768 board for our final assignment.

I spent four hours programming Pacman. I went from a murderous rage, to autisming, back to murderous rage by the end of the night. I see why some people program compulsively.
original header donut steel:
#ifndef _GLCD_UTILS_H
#define _GLCD_UTILS_H

struct directional
{
int x;
int y;

};

extern void GLCD_draw_circle( int x0, int y0, int radius);
extern void GLCD_draw_half_circle( int x0, int y0, int radius);
extern void GLCD_draw_circle_full( int x0, int y0, int radius);
extern void GLCD_draw_line( int x0, int y0, int x1, int y1);
extern void GLCD_draw_smiley_face( int x0, int y0, int radius);
extern void GLCD_draw_square( int x0, int y0, int size);
extern void drawgrid(int x0, int y0, int level[]);
extern void draw_pacman( int x0, int y0, int radius, struct directional *direction);
extern void draw_smallpellet( int x0, int y0, int radius);
extern void draw_largepellet( int x0, int y0, int radius);
extern void draw_mouth( int x0, int y0, int radius, struct directional *direction);
extern void joystickdirection(struct directional *direction);
extern void trymovepacman(int *pacmanx, int *pacmany, struct directional *direction);

#endif
>>
File: rawrxD.jpg (75 KB, 572x556) Image search: [Google]
rawrxD.jpg
75 KB, 572x556
I'm trying to write a simple game bot for a social media platform in python. As an example, assume that I'm using Facebook. If I use the available python library for the Facebook API, I'm given event handlers for various events, each of which call a specific function when they occur, like onReceiveMessage() or similar. onReceiveMessage gives me details about the message I've received. What's the best way to interface this with my game?

Assume my game is something simple, like a multiplayer text-based RPG where players can attack and defend based on skill points. With a normal game, where I'm not using an external library to attempt to interface with a social media platform, I just pass player objects around and all of my functions use them to determine outcomes, return player objects, etc.

But how do I reconcile that with an event-based library for a social media platform? Say I want Bob to be able to message my central game bot account a command for his character, which should then be executed. What's the best way to associate Bob with the correct player object? Is my only option to use a dictionary with string keys ("Bob") and object values as an intermediary?
>>
>>54184941
1) sounds like you're going to have a huge layer of bullshit to keep track of users/sources of messages

2) use a switch or something block because you have a finite number of received notices. In my preference, I'd have a function which got xyz message, and another which decoded it based on the situation

3) "sample and hold" would be a method you'd want to use, to prevent your program sperging out if commands are erratic. creates an opportunity for lost commands, but could prevent weird behavior
>>
>>54184983
>1) sounds like you're going to have a huge layer of bullshit to keep track of users/sources of messages
Exactly, and that's what I'm trying to figure out. What's the best way to implement this layer of bullshit with the least amount of headache? My only solution, as a total novice who may be lacking in even the basics, is a dictionary which contains entries like {"Bob": bob's player object} where Bob's player object was read in from a database/table/save file/whatever

Because obviously the event-based library for the social media platform has no direct connection to Bob's player object
>>
File: justCaptcha.png (376 KB, 408x589) Image search: [Google]
justCaptcha.png
376 KB, 408x589
>Qt
I just want to show a tooltip on the status bar on hovering and item

BUT IT ONLY WORKS IF I CLICK

FUCKING BS

How do i do it? i made my
Menu Bar on the Designer

Menubar>File>New

File hovered slot
setStatusTip("Creates new file");

it doesn't work
>>
>>54185165
.setToolTip
>>
>>54184891
>the epitome of le "don't reinvent the wheel" me, doesn't bring anything new to the table
>still in development
>>
>>54185290
> Rust doesn't bring anything new to the table

It's like you really a retarded.
>>
>>54185290
>me
meme
>>
File: pc.png (378 KB, 1450x1080) Image search: [Google]
pc.png
378 KB, 1450x1080
>>
>>54185219
now nothing happens
void MainWindow::on_actionNew_hovered()
{
setStatusTip("JUST");
}

Only works when clicked not when hovered

I read it here
http://doc.qt.io/qt-4.8/qstatustipevent.html
I'm on 5.6 though
>>
>>54185299
>We do not employ any particularly cutting-edge technologies. Old, established techniques are better.
>>
Why isn't this working? It only prints out the root node.

void printTree ( node *root ) {
printf( "%d\n", root->key );
if (root->left != 0)
printTree(root->left);
if (root->right != 0)
printTree(root->right);
}
>>
>>54185338
Just do in your constructor setToolTip TOOLTIP NOT STATUSTIP. And don't only do it when you hover over it. If you set the tooltip on the statusbar widget it will automatically display when you hover.
>>
>>54185355
You bore me, low-effort troll.
>>
>>54185371
ok fag
>>
>>54185338
Wait I'm a tard, I misunderstood what you wanted to do. Sorry, I don't know about that. I would think you want showMessage or something
>>
Haskell or Lua?
>>
>>54185396
Lua
>>
>>54185396
neither
>>
I tried to write a "coin algorithm" today, that returns the coins a number consists of
e.g. 5€ = 2€ + 2€ + 1€

And noticed that my algorithm works fine when using floats but not when using doubles.

Here's an example:
Float returns 5.05€ = 2€+2€+1€+0.05€
Double returns 5.05€ = 2€+2€+1€+0.02€+0.02€

Does anyone have an explanation for that?

Here's the code:
void coin_f(float sum)
{
for (float coin : {2.00f, 1.00f, 0.50f, 0.20f, 0.10f, 0.05f, 0.02f, 0.01f})
{
while (sum >= coin)
{
std::cout << coin << ";";
sum -= coin;
}
}
std::cout << std::endl;
}

void coin_d(double sum)
{
for (double coin : {2.00, 1.00, 0.50, 0.20, 0.10, 0.05, 0.02, 0.01})
{
while (sum - coin > 0)
{
std::cout << coin << ";";
sum -= coin;
}
}
std::cout << std::endl;
}
>>
>>54185410
Imagine you have to chose one?
>>
>>54185418
rounding errors. floats work "by chance" because of rounding errors that add up on each sum -= coin. use integers
>>
>>54185360
I don't know how to do it, if i use
setToolTip nothing shows in the bar at all
>>
>>54185437
lua

>>54185418
>while (sum >= coin)
>while (sum - coin > 0)
are different
>>
>>54185360
>>54185447

MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
ui->actionNew->setStatusTip("TESTING");
}


Well this works, maybe is the guetto way but it does it right now
>>
File: gki.webm (3 MB, 1280x720) Image search: [Google]
gki.webm
3 MB, 1280x720
Ask your elegant and much beloved programming literate anything. (IAMA)

>>54185396
>>54185437
Haskell

>>54185418
http://0.30000000000000004.com/
>>
Is there any difference at all, as far as the compiler is concerned, between
#define AN_INTEGER 12345

and
const int AN_INTEGER = 12345;
>>
>>54184851
>CoC
kill yourself
>>
>>54184861
Rust could have been interesting, but it's basically dead in the water at this point.
>>
>>54185557

The former will be replaced with a literal in every area it occurs before the standard compilation process begins (preprocessing).

You can pass a const pointer to the latter to a function.
>>
>>54185620

Are you kidding? Rust is gaining momentum.
>>
C is really interesting, I like having direct access to the memory.
>>
File: 1434040534579.png (214 KB, 400x462) Image search: [Google]
1434040534579.png
214 KB, 400x462
>>54185734
Fuck off tripfag.
>>
>>54185358
Because the node has no children.
>>
>>54185784

>Comes to thread full of conversations
>Expects people to know who is who without names
>>
>>54185764
>I like having direct access to the memory.

Sure, it seems like fun and games, but everything you write in C will have a CVE number attached to it soon enough.
>>
>>54185329
rollin
>>
>>54185797
Neo-/g/, ladies!
You asked for it and here it is! This is what happens when you spoonfeed newfags! This is what happens when you let a gook known for ruining another imageboard take over your imageboard! Reddit takes over!
>>
>>54185797
>conversations
fuck off to leddit
you don't need to know who is who, it's about the content of the posts, not who wrote them
>>
>>54185812
see >>54185784
>>
>>54185834

Thank you for responding. It makes me more powerful.
>>
>>54185487
Got a degree?

>>54185753
Just barely, but give it a decade.

>>54185764
Being able to understand what kinds of transformations are being done to memory for one's day to day programs is pretty useful. There's a reason I recommend everyone to learn C.

>>54185842
I would post the "don't feed the tripfags" image, but I'm on my phone. And I shall be on my phone all day at Linuxfest Northwest.
>>
File: yamchabadass.webm (3 MB, 512x384) Image search: [Google]
yamchabadass.webm
3 MB, 512x384
>>54185557
Of course, macros are invisible to the compiler since they are handled by the preprocessor before the compilation.

Also, this code shall compile with C++ but not with C

const int size = 10;

int array[size]; // Forbidden in C.

int main ()
{

}


>>54185764
Same for any programming languages having pointers.

>>54185329
https://better-dpt-roll.github.io/
>>
>>54185864
>go to neckbeard convention
>browse /g/ the entire time
>>
>>54185864
Let me slip my rootkit into your backdoor bby
>>
>>54185834
trips take a big risk. if they ever get doxxed everyone will know they spend all their time on mongolian manga boards, how embarrassing.
>>
What language should I pick to start learning programming?
>>
>>54185943
java

https://docs.oracle.com/javase/tutorial/
>>
>>54185943
assembly
>>
File: doyouevenlambda.png (29 KB, 811x805) Image search: [Google]
doyouevenlambda.png
29 KB, 811x805
>>54185943
Scheme or Python
>>
>>54185961
>python
I puked
>>
>>54185329
some of the medium/hard challenges are extremely easy and some of the easy challenges are fucking ridiculous

why is towers of hanoi yellow?
why is conway yellow?
These are projects you can do after one week of any coding class

any "crossword game" is yellow? why?

who made this shit
>>
>>54185943
read the thread's sticky
>>
>>54185979
Why ?
>>
>>54185984
Make a better one and post it.
>>
>>54185992
Read the archive.
>>
>>54185992
python is literally shit

lisp too
>>
>>54186005
how about an actual answer u fukin jerk!!!
>>
>>54185358
void printTree(node *root) {
if (!root) return;
printTree(root->left);
printTree(root->right);
}

:)
>>
>>54186029
first result on google
https://www.quora.com/What-are-the-pros-and-cons-and-uses-of-the-major-programming-languages

now go away
>>
>>54185890

I'm on the bus to get there. I'll likely be spending a decent amount of time in the various sessions, since there's a few good ones this year. Unfortunately, I'm going to miss one of the ones on Cryptography, as it starts at 9:30, and the bus starts late on Saturdays.
>>
>>54185961
Alright I found http://www.learnpython.org/, is this a good place to start?
>>
what is this convention
>>
>>54186127
theres not a bad place to start if you know nothing.

shoo shoo little pleb
>>
"For example, one difference between Python 2 and 3 is the print statement. In Python 2, the "print" statement is not a function, and therefore it is invoked without parentheses. However, in Python 3, it is a function, and must be invoked with parentheses."

OMG, should I start with Python 2 or 3?
>>
>>54186157
Nobody uses python 3.
>>
>>54185888
>// Forbidden in C89
ftfy
>>
>>54186157
neither you disgusting shitter or fuck off to >>/g/wdg
>>
>>54186151
Yeah, you have a good point. haha
>>
>>54186127
no python is fucking shit for learning programming
>>
>>54186176
wtf? I'm just starting with programming and picked this language. To be honest I know nothing yet. Should I start with another one?
>>
File: othgd5W.jpg (387 KB, 1195x1593) Image search: [Google]
othgd5W.jpg
387 KB, 1195x1593
>>54185943
>>54186127
The path to programming literacy is hard, you will have to pass through one of these

:: Structure and Interpretation of Computer Programs
http://sarabander.github.io/sicp/
http://paste.lisp.org/display/151208/raw

:: How to Design Programs
http://htdp.org/
https://www.edx.org/xseries/systematic-program-design-0

:: Concepts, Techniques, and Models of Computer Programming
not free

:: Composing Programs
http://composingprograms.com/

:: CS for All
http://www.cs.hmc.edu/csforall/
https://www.edx.org/course/cs-all-introduction-computer-science-harveymuddx-cs005x

:: Program Arcade Games With Python And Pygame
http://programarcadegames.com/

>>54186166
Have read somewhere that python 3 is now more used

>>54186171
Both gcc and clang refuse to compile, even with -std=c11.
>>
>>54186198
What language is a better one?
>>
>>54186200
yes start with java or C++ those are the only decent ones to start with if you want to become an actual programmer
>>
>>54186215
Thank you. I appreciate the effort.
>>
>>54186218
all the statically typed ones
also ruby, erlang, clojure
>>
>>54186171
>implying C is not the same thing as C89
>>
>>54186200
Yes, python is shit for learning programming the first time. It hides everything from you to make it easy. So if you learn python first, everything else will be impossible (maybe ruby, lua, etc will be okay)
Learn a language that will teach you how programming works, like C, Java, maybe C++ but it's a bit complicated for a beginner I guess, but if you can handle C++ you can handle most languages.
>>
>>54186244
>also ruby, erlang, clojure
not sure if trolling or just retarded
>>
>>54186224
Why these two you suggested are better than Python?
>>
>>54186263
see >>54186251

you learn fuck all with python, after several months the typical python shitter knows basic control flow and how to use libraries, that's literally first day or so of java
>>
>>54186244
What is a statically typed language?
>>
>>54186215
>Both gcc and clang refuse to compile, even with -std=c11.
Ah, doesn't work if the array is at file scope, neat
>>
>>54186259
all of them are better than python
python designed by an almost-php-level retard
it's difficult to find a shittier language than python
so maybe it's you who's retarded
>>
>>54186275
Future.
>>
>>54186278
they're better than python but i mean they're not good for starting with

ruby is arguably worse than python
>>
>>54186245
>int i;
>for (i = 0; i < n; i++) { /* ... */ }
> // never uses i again
>>
>make morning cup of green tea
>use way too many leaves because I live on the edge
>drink cup, big wad of leaves at the bottom
>every two minutes theres a tiny bit more tea available to drink
>in the meantime, chew on leaves
I'm a god damned genius.
>>
>>54186263
there not, those guys are confusing programming with computer architecture.
>>
>>54186251
Solid points.

>>54186273
Hmm, interesting.
>>
>>54186294
What?
>>
>>54185329
rawlin
>>
>>54186291
>they're not good for starting with
clojure would be alright imo, if a bit unusual since lisp.
Also I was answering as to "better" not "best"
>>
>>54186218
http://cacm.acm.org/blogs/blog-cacm/176450-python-is-now-the-most-popular-introductory-teaching-language-at-top-us-universities/fulltext
>>
>>54186308
you can declare i in a for loop header in c99
>>
>>54186323
>you can declare i in a for loop header in c99
Totally useless.
>>
it's time to bid fair adieu to the 80's faggots. get on a modern standard or get left in the dust.
>>
>>54186322
because merry burgers are literally retarded and completely disinterested in programming so courses have been dumbed down so much that pretty much anyone can get through them while learning as little as possible
>>
>>54186322
Jesus fuck, why? It's a dreadful language
>>
>>54186340
makes code more readable
>>
>>54186322
implying that people at universities know what the fuck they are doing, and everybody who's going to end up being a software developer and not in meme learning research won't have to learn pretty much everything language/frameworks/tooling related (what they will actually do a ttheir jobs) by themselves
>>
>>54186340
kill yourself fucking retard

it makes it so you can declare another variable named i later on in the function
>>
>>54186356
No.
>>
>>54185734
>const pointer to an int
for what purpose?
>>
>>54186368
It also pollutes the scope less with unnecessary variable names.
>>
>>54186396
Code monkeys will always code monkey.
>>
>>54186405
delusional C sperg
>>
>>54186405
Well observed anon.
>>
>>54186396
Lets Collab Orb I like you and we should program something together for fun
>>
>The first complete Lisp compiler, written in Lisp, ...
How is this possible? Was there an incomplete compiler written in machine code first? The heck?
>>
>>54186423
Almost certainly. It's common to bootstrap using a shitty compiler for a language in another language, and then use it to compile the 'real' compiler that's written in the language itself
>>
>>54186423
Lisp machine.
>>
>>54186423
the sentence doesn't rule out the possibility that there was a lisp compiler written in a language other than a lisp before it
>>
>>54185487
What anime is this and is it drawn with opengl?
>>
>>54186375

Well if it was a pointer to multiple ints, I could think of a few reasons. Otherwise, I tend to use const only for string literals, and function parameters that are pointers that will not be mutated. For integer constants, macros (or constexpr in C++) make the most sense.
>>
>>54186445
autism

>>54186455
It rules out there being a complete lisp compiler

>>54186444
That's pretty neat. I can't imagine people actually writing a compiler in asm and/or machine code though
>>
>>54186495
>write compiler in C to compile Lisp code
>able to compile Lisp code
>write Lisp code to compile Lisp code
>compile it with C compiler
>now compile Lisp code with native compiler
the strategy is not complex, the implementation is
>>
>>54186495
To be fair, LISP is a pretty simple language to compile if you don't care about optimizing it. I'd much rather try to write a LISP compiler in asm than a C++ compiler.

Also, the first compiler necessarily had to be written in asm or machine code.
>>
>>54186521
C didn't exist famalam
>>
>>54186547
shows how much I know about Lisp
>>
>>54185487
What anime is this?
Also where can I learn cryptography?
>>
>>54186481
looks hand drawn with post processing effects
>>
>>54186495

The first Fortran compiler was written in machine code, I think. But then again, there weren't any other languages at the time to make a complete in.
>>
>>54186590
But whats the anime?
>>
>>54186598
Lets collab Ruby
>>
>>54186610
you're mom
>>
>go to Lisp wikipedia page
>"Lisp uses a Polish prefix notation"
>Polish
annnnnnnnd dropped
>>
>>54186634
this

the only reason it's necessary to have it like f a b instead of f(a, b) is because the use of parentheses is already absurdly high
>>
>>54186598
answer me >>54186129
>>
>>54186677
linuxfest northwest
>>
>>54186686
What anime is this?>>54185487
>>
>>54186582

1. Zero no Tsukaima/Familiar of Zero. It's pretty interesting. Unlike the other pink haired "girl" that keeps getting posted in the OP, the girl here does in fact have a vagina.

2. University is good for these kinds of things, senpai. Otherwise... you're gonna want a nice big number theory textbook.

>>54186677

Linuxfest Northwest. Once a year Linux and general open source convention held in Bellingham, WA.

>>54186614

On what?
>>
>>54186634
Ever read SICP faggot? It's easy as shit to learn.
>>
>>54186698
that's cool, what do you do there just listen to keynote speakers and talk about arch/scratch your neckbeard?

how do you hear about stuff like this? I need to go outside more and do things that involve people

also
>food menu lists $20 items as $$$
kek, poor freefags. when will they learn
>>
what is your opinion on data mining sites?
>>
>>54186827
>ever read SICP
no I haven't, I probably should
>first page has quote from John Locke
>realize I've never read Locke either outside of small excerpts in philosophy classes
god dammit why have I allowed myself to be such a pleb
>>
>>54186857
They'll mine your data for free
>>
File: dpt.png (716 KB, 1200x1200) Image search: [Google]
dpt.png
716 KB, 1200x1200
>>54184851
>Only male computer scientists
Please consider using a more inclusive dpt image in the future. I have attached one that effectively deprecates the particular one in the OP.
>>
when entering input for a C program that can take any number of inputs how do you tell the program you have stopped entering inputs? for example if I've got a program that counts the number of words and when you run it you have to first type in the text?
>>
>>54186932
who is 2r, shes a qt
>>
>>54186968
>she
>>
>>54186954
In a real program, you either take a fixed amount of inputs in a form or you press the [MORE] button to add another field.
Either way, the program knows how much memory to allocate for your input.

or, you could just read from a file, it's easier
>>
>>54186912
no i meant you mining data off sites
>>
>>54186968
hedy lamarr
>>
>>54186857
depends on if you have something useful you can do with the data
>>
>>54186987
I think I'll go look at reading from files, sounds interesting. thanks man
>>
>>54187040
am going to mine a wiki for a desktop database
should i ask for permission first? i feel like if i ask they are just going to say no
>>
>>54186352
It's the most used language in the science part of computer science.
>>
File: hedy lamarr ecstacy.jpg (58 KB, 520x383) Image search: [Google]
hedy lamarr ecstacy.jpg
58 KB, 520x383
>>54187030
holy fuck she was literally a goddess. surprised I've never heard of her.

I now unironically approve of >>54186932
>>
>>54186215
I completed the first part of MITx 600x, any idea how far along I am? They call it 6.00.1x nowadays

I feel like I have a good grasp of most of the basics of OOP but I don't have a lot of actual code under my belt yet. People have been recommending design patterns books based on what I tell them I know so far

Should I look into any of these?
>>
>>54187106
why is there a lewd pic of a ""computer scientist""
>>
>>54187141
because she was also an artist and an innovator you simple minded slug
>>
>>54187141
she did lewd movies before inventing the internet
>>
>>54187205
>slut
>""artist""
>>
>>54185329
rolling
>>
File: mind blown.jpg (34 KB, 355x236) Image search: [Google]
mind blown.jpg
34 KB, 355x236
>a struct can inherit from a class in c++
>>
File: 22-delivered.png (64 KB, 960x588) Image search: [Google]
22-delivered.png
64 KB, 960x588
>>54185821
Done, Racket's 2d libraries are pretty comfy
>>
>>54187257
broken language
>>
>>54187141
Well it was very hot day so he wanted to cool off.
>>
File: mind blown bert.gif (880 KB, 291x204) Image search: [Google]
mind blown bert.gif
880 KB, 291x204
>>54187257
>>
>>54187269
i am running software maintained by this guy
he sure is ripped
>>
>>54187257
C++ structs and classes are the same thing except for the default visibility. That's one thing C++ did right.
>>
>>54187269
>having that pic saved
it brings me joy that I am not you
>>
>>54186273
>>54186302
Can an objective third party tell me if these posts are accurate or if these guys are just sperging out and being pedantic cunts?
>>
>>54187313
if you're not retarded it doesn't matter what programming language you start with, since you'll pick up some useful things anyway, and will be able to learn new language/paradigms and get rid of any bad habits you picked since the premise is that you're not retarded.

Actually, if you ARE retarded it doesn't matter what language you start with either
>>
>>54187351
thought so, thanks
>>
>>54187106
>>54187030
>she died within 15 minutes of where I lived at the time
heck
>>
>>54187313
The worst thing you can do is believe whatever language you start with is what you're stuck with, forever.
>>
>>54186845

Mostly just the keynote shit. Also, the EFF and a bunch of companies have booths.
>>
>>54185812

What makes it unsecure?
>>
>>54187571

C isn't insecure. It's just really easy to write insecure software in C.
>>
>>54187621

I know but what about it makes it easier to be insecure?
>>
>>54187571
look up the underhanded c contest for more info on that. It's educational and interesting
>>
File: hydra_by_yoso999-d7bmpqg.jpg (686 KB, 2000x1167) Image search: [Google]
hydra_by_yoso999-d7bmpqg.jpg
686 KB, 2000x1167
>Fix a bug, two more come out.
>>
>>54185797
wow, that's a pathetic excuse for being a pretentious shit
>>
File: 1435870612833.jpg (46 KB, 810x714) Image search: [Google]
1435870612833.jpg
46 KB, 810x714
>>54187269
I want him to take me into his strong manly arms and slowly but forcefully ravage me.
>>
>>54187644
The language does not check things for you, you have to check them yourself.

The most blatant example:
int myarray[5]; // an array of 5 ints, indexed 0 through 4
myarray[7] = 10; // error! there is no myarray[7]

This will compile , run, and won't tell you that it doesn't work. Most languages will say "Error: out of bounds" or something.
>>
>>54185812
>everything you write will have a CVE number attached to it soon enough.
ftfy
>>
File: noch.webm (3 MB, 826x464) Image search: [Google]
noch.webm
3 MB, 826x464
>>54186582
>>54186481
>>54186692
https://en.wikipedia.org/wiki/The_Familiar_of_Zero

>>54186582
>Also where can I learn cryptography?

With the matasano crypto challenges

http://cryptopals.com/

>>54187390
Dijkstra actually believed in that.

>>54187313
It's accurate.

>>54187118
SICP may enlighten you on abstraction.

>>54187571
Horrible type system
No default initialization
No bounds checking
Total lack of abstraction
Unspecified/Undefined behaviors.
...
>>
>>54187713
Fuck off ctard. You're literally so retarded you don't even know C despite shilling it all day.
>>
>>54187726
You seem upset, probably because you realize you're wrong.
>>
anyone know how to output binary data to stdout in nodejs?
>>
>>54187698
>>54187650

So it's because it is hard to tell what the program will do when it is run so you can miss things that could later be exploited?
>>
File: crj.png (247 KB, 620x413) Image search: [Google]
crj.png
247 KB, 620x413
>>54187571
>examine someone else's code
>produce undefined behavior
>get code to call code you've put in memory
>maybe
that's all you've gotta do. give it your number, it's pretty crazy
>>
>>54186215

so once I go through all this....

???
>>
>>54187912
>???
be unemployed and come here to shitpost
>>
What programming language is the best to start with?
>>
>>54184851

>what are you working on?

I'm designing a mobile app. Its on Google Play
>>
>>54187974
scala
>>
>>54187988
App name, let /dpt/ judge you.
>>
>>54188018
Baby Shaker 2: Revenge of the Babysitter
>>
>>54187912
only one, not all
>>
File: 1453166080002.png (309 KB, 435x460) Image search: [Google]
1453166080002.png
309 KB, 435x460
>>54187974
Scheme. It's supreme simplicity lends itself well to learn about broader concepts in programming, and makes it easier to translate learnt concepts to other languages. It also can be used in a wide variety of styles; functional, procedural, object-oriented and logic-oriented. Apart from its simplicity it also is a really powerful language that will continue to grow with you.
>>
What's the best website to learn how to code in Java?
>>
>>54188056
google
>>
>>54188018

its in closed beta, we plan to release to the general public in the fall.


the original concept was to create a form of 4chan that would work on the mobile environment in a non-autistic manner. To allow OC to be created and shared as easily as someone sends a snap.... but that was over a year ago
>>
Can I use _Generic in C11 with typedef'd structs? I would think not since those types are made at compile time
>>
>>54188056
Be careful, some java websites give off mustardgas!
>>
>>54188111
>a form of 4chan
>non-autistic
kek
>>
>>54188068
The 1 million dollars answer!
>>
>>54188119
Haha!
>>
>>54188111
Interesting.
>>
>2nd year CS student
>start noticing some students pulling out rubber ducks and talking to them while writing code
>look it up
>it's a debugging technique
>the duck is just a visual cue and it doesn't even have to be a duck, and you certainly don't have to talk to it out loud

Why are CS people so autistic?
>>
>>54188111
So like a global YikYak?
>>
>>54188056
>What's the best website to learn how to code in Java?
1. You write code in Java, i.e. you program in Java. You don't "code". You're not a "coder" either.
2. You shouldn't learn how to program from websites, especially if it's your first language. There are some exceptions, like learning Python as your fourth programming language, where all you have to do is lookup some functions and syntax.
3. Java a shit. >>>/out/
>>
how do i git gud
>>
>>54188174
>Hey, here's a neat technique: talk through your code to a rubber duck. It'll help you find errors!
>>It doesn't have to be a rubber duck, it can be any visual cue, and you don't necessarily have to talk through your code out loud to the visual cue you use, you can think through it. Why are you so autistic?
gee
>>
>>54188198
>verb
>2.
>write code for (a computer program).
>>
>>54188212
Practicing C.
>>
>>54188212
read book
>>
>>54188123
I meant non-autistic, as in reference to how much easier it would be to use 4chan mobile if there were a real app for it, rather than just a website.

>>54188186
I loved Yikyak's concept, but they devoted so much of their product into trying to make everyone act nice.

Sorry, but people don't act nice when they're anonymous. So sorry, Yikyak, get cucked.

Also, our app will be like a forum, whereas yikyak is a feed. And, yikyak censors, and we will not.
>>
>>54188174
>the duck is just a visual cue and it doesn't even have to be a duck, and you certainly don't have to talk to it out loud

It does seem to help to talk to it out loud.
I don't do it at school, but i generally do it when working on stuff at home.
>>
>>54188225
>it's grammatically correct therefore I don't sound like a retarded ruby rockstar when I say it
>>
Is there a list of small things to create in order to learn a language and its syntax
>>
>>54188225
>>>/reddit/
>>
>>54188198
Are you okay anon?
>>
>>54188254
go do the easy challenges on codeeval
>>
>>54188252
this is a pretty autistic reaction to someone using a pretty common word that was used to refer to the process of writing code before ruby was a thing

>>54188256
where do you think you are?
>>
>>54188254
Hello world.
Sort algorithms.
OS kernel.
>>
File: smirk.jpg (14 KB, 464x464) Image search: [Google]
smirk.jpg
14 KB, 464x464
>>54188225
>Look guys, I found a definition that says it's a verb!
>Just ignore the fact the definition itself only uses the word as a noun.
>>
>>54188142
>>54188198
>>54188212
>>54188214
>>54188225
>>54188228
>>54188229
>>54188236
>>54188252
>>54188256
>>54188279
>>54188290
>>54188321
/shitpost/

AND I HAD SOMETHING INTERESTING I WANTED TO TALK ABOUT
>>
>>54188283
thanks, learning c++ is kinda hard, so that might help
>>
>>54188290
>where do you think you are?
On reddit-lite.
>>
>>54188335
Go fuck yourself pedantic asshole.
>>
File: 1365401936920.gif (462 KB, 250x141) Image search: [Google]
1365401936920.gif
462 KB, 250x141
>>54188335
>>
>>54188290
>codeeval
I'm gonna shill for hackerrank here for a bit, it has a better interface for solution submission.
>>
>>54188373
-> >>54188283
>>
whats the best place to start learning c++? I know basics of python
>>
>>54188421
Absolute C++
>>
File: books.jpg (78 KB, 620x310) Image search: [Google]
books.jpg
78 KB, 620x310
Which book should I get next?
A book about AI (reinforcement learning), or a book about applied cryptography?
>>
>>54188480
>which thing do I like more, /dpt/?
>>
>>54188486
typical tripfag with useless shitposts
he's obviously going to enjoy learning about cryptography more
>>
File: nojoy.jpg (106 KB, 720x713) Image search: [Google]
nojoy.jpg
106 KB, 720x713
>>54188254
i think there is nothing better for demonstrating your knowledge of a pl than writing an implementation of that pl.
>>
>>54188510
why reply to him
>>
>>54188460

thanks, do people post progress itt or is it just for shitposting
>>
>>54188480
The only RL book worth reading is sutton's.
>>
>>54188533
so that he gets a (You)
>>
>>54188545
>>54188533
>>54188510
Honestly the trip was an accident, I meant to make my name "Sperglord #512" for this post: >>54188198 because I was sperging, and then I forgot to take the name off on my subsequent posts
I didn't realize trips were with #, never used one before
this'll be the last post from me
>>
what's with the new tripfags? there weren't so many before, I think
>>
File: fight to the death.webm (3 MB, 1280x720) Image search: [Google]
fight to the death.webm
3 MB, 1280x720
So I'm learning to program in an effort to become a low-paid codemonkey (no degree). I'm in the US. I've been at it for a couple of months now. I feel like I've learned a lot of random shit but I have no clue where I am in terms of actual ability relative to some random Pajeet (no offense intended to Pajeet). I've covered the basics; variables, functions, classes and objects, data types, inheritance, some basic data structures stuff, sorting, searching, etc., tinkered with git a little bit, looked at trees (but don't know shit about these yet). I've written a couple of super simple programs like hangman and such and I can do all of the "easy" and some of the "intermediate" programming challenges on any of those challenge websites. I've written a few Twitter bots using the JSON API. I can fizzbuzz, I can write recursive functions, I could probably reverse a linked list if I read up on it (I haven't yet and I plan on reading Cracking The Code Interview). I've learned some mobile dev shit too like frameworks/toolkits for android and ios

Being a neckbeard NEET I'm also very familiar with ganoolinucks, the terminal, bash, etc., and I've dabbled in various *nixy stuff, filesystems, virtualization, the list goes on

What I want to know is: When will I be ready to get a job doing something with my skills? I don't care if it's making $25k a year--I'd be happy with that.
>>
>>54188335
what interesting thing did you have? I just see points to uninteresting and shitty java
>>
File: CIACAT.jpg (479 KB, 1223x865) Image search: [Google]
CIACAT.jpg
479 KB, 1223x865
>>54188526
>>
>>54184851
Why are all of the people in that picture white men? This is an outrage.
>>
>>54188636
It'll be easier to land a job (or even an interview) if you have a lot of good projects on your GitHub, perhaps have contributed to some open source projects, etc.
Give it a year.
>>
>>54188636
>bulge
>>
>>54188673
fuck I forgot to take the trip off
>>
>>54188673
>>54188688
if I'm willing to move anywhere and take any shitty salary will that make it easier?
>tfw my mom won't let me live in her basement anymore and I'm out of tendies
need money for tendies before the 1yr mark
>>
>>54187974
ASM
>>
>>54188111
>stealing moots canvas idea
>already crashed and burned
>not aware
wew lad
>>
>>54188703
havent you heard? stealing other peoples ideas is how alot of fucks get rich just look at notch
>>
>>54188697
If you can get a shitty minimum wage job in the meantime it'll help.
No, it won't make it easier, it's a competitive field I think. Web dev is easy to find jobs with, though. Learn JavaScript, Python, whatever (node, angular, etc etc), make some shitty but sleek websites, put em up on your github, apply to startups.
Thread replies: 255
Thread images: 30

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

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.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.