[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: 319
Thread images: 34

File: yukihax.gif (1MB, 1680x1050px) Image search: [Google]
yukihax.gif
1MB, 1680x1050px
Previous thread: >>56757796

What are you working on, /g/?
>>
>>56763328
Following a terrible video tutorial to learn C#.

Any better resources?
>>
File: C vs C++.png (126KB, 2374x868px) Image search: [Google]
C vs C++.png
126KB, 2374x868px
>>
>>56763347
MSDN

I'm learning emacs lisp.
>>
>>56763350
>C
>Quality
>>
>>56763347
>google "good c# books"
>find a good one
>torrent it
>>
vim > emacs > np++ > sublime > atom
>>
>>56763357
I need step by step tutorials. Not documentation.
>>
>>56763386
You're right, I forgot
>Trash
>C#
>>
>>56763394
sublime > *
>>
>>56763388
why not just look on library genesis senpai
>>
>>56763398

Wew
>>
>>56763406
kindof similiar to torrenting tbqhf
>>
>>56763396
MSDN has a tutorial.
>>
>>56763400
I would agree if I could fucking figure out how to compile c with sublime. Til then it's vim
>>
>>56763400
t. webdev on wangblows
>>
>>56763394
How is vim better than emacs?
>>
>>56763394
What's the problem with a proper IDE?
>>
>>56763437
name a proper IDE
>>
>>56763428
>I would agree if I could fucking figure out how to compile c with sublime.

Tools -> Build System -> C
or
Ctrl + b

>>56763430
dont even use windows
>>
>>56763441
emacs
>>
#define u8 uint8_t
#define u16 uint16_t
#define u32 uint32_t
#define u64 uint64_t
#define i8 int8_t
#define i16 int16_t
#define i32 int32_t
#define i64 int64_t
>>
>>56763441
vim
>>
>>56763469
you have passed the test
>>
>>56763417
i just think it's a better experience, at least for the books i read
there isn't a popcorn time-type thing for books, is there?
>>
>>56763479
you may cross the bridge
>>
>>56763480
What do I win?
>>
>>56763518
emacs
>>
>>56763518
passage across the bridge
>>
>>56763502
>>56763531
there's a fat bearded man guarding the entrance

what do
>>
>>56763531
I don't want to cross the bridge though.
>>
>>56763540
ask him to name a proper IDE
if he fails, he will be cast into the depths
>>
>>56763540
Sing the FSF song and pass safely.
>>
>>56763540
C-xC-c
>>
>>56763554
>>56763564
>>56763579
He said i need a special item to enter. but i don't have that

what do
>>
File: 1472657215005.png (596KB, 1420x1067px) Image search: [Google]
1472657215005.png
596KB, 1420x1067px
>>56763597
>forgetting your programmer license
How did you even get into this thread?
>>
Wait.... what?

Akari-bbs has more than 500 rotating banners:
https://github.com/microsounds/akari-bbs/tree/master/img/banner

How the fuck can you waste this amount on time and some random trivial thing?.?
>>
File: 1429017313721.png (239KB, 512x512px) Image search: [Google]
1429017313721.png
239KB, 512x512px
>>56763540
Just say "me too i'm not glad he's dead, but I'm glad he's gone"
>>
>>56763620
>the images are not even optimized

TOP KEK
>>
Learning Java, and they tell me:

>Now, you probably start to wonder why does the value of the parameter get copied and the original variable stay intact when the parameter is of int type, but the original list is given to the method when the parameter is of ArrayList type? In Java only the values of primitive data types (which are int, double, char, boolean and a couple of others that we have not yet discussed) get copied to the method.

Why did they do this?
>>
>>56763620
Akari confirmed masterrace
>>
>>56763461
There is no C build system in sublime. I tried building one by getting code from stack overflow but it's all shit
>>
>>56763641
Larger types, like objects are passed by reference (hence they are reference types). It's an optimization.
it works the same in e.g. C# or Python.
>>
is pokemon go good for losting fat after my programming sesh's?
>>
>>56763681
of course, it's an text editor.
>>
>>56763702
Just don't be a fatty in the first place lardo
>>
>>56763620
Are you really this stupid or are you self-promoting this way?
>>
>>56763687
> It's an optimization
I understand. Thanks for the explanation.
>>
>>56763714
well im trying not to be ... duh.....
>>
>>56763711
But vim is sooooo fucking annoying. Memorising all the shortcuts through vim tutor takes too much time
>>
>>56763687
>are passed by reference
wrong
>>
File: kdsjfh32894.png (44KB, 531x345px) Image search: [Google]
kdsjfh32894.png
44KB, 531x345px
>>56763681
>>
>>56763715
Not related and am stupid

What's your point?
>>
>>56763737
To do that you had to build system, it's not default for C only cpp
>>
>>56763737
Why make an int main and return 0 instead of making a void main if your only purpose is to puts?
>>
>>56763732
Lol?
>>
>>56763735
Elaborate.
>>
Am I the only one programming on the most basic Linux text editor? (MousePad)
>>
>>56763759
Because if you compiled with -Werror and -Wall you still have to return 0 or you get ab error (at least in vim) which is why I hate it
>>
>>56763780
Oh, so that's how it is in C.
(Javafag here.)
>>
>>56763778
>most basic Linux text editor?
>(MousePad)

try ed
>>
>>56763780
>in vim
Jeezus.
>>
>>56763770
static void newInteger (Integer x)
{
x = new Integer(4);
}

public static void main()
{
Integer i = new Integer(5);

newInteger(i);

if (i == 5)
printf("pass by value");
else if (i == 4)
printf("pass by reference");
}


run this
>>
>>56763800
>muh macro
egoinflating oldshits like vi are useless if your programming style is good
>>
why do people put `void` where the args are supposed to go in functions that dont take args when it works without?

is it something wizardy for the compiler like const?
>>
>>56763903
Because they're gay
>>
>>56763903
Old versions of C required this, because empty argument list meant the function was taking variable argument list. I.e.
foo()

Meant the same as
foo(...)
>>
>>56763903
In C:
>void foo() means "a function foo taking an unspecified number of arguments of unspecified type"
>void foo(void) means "a function foo taking no arguments"

In C++:
>void foo() means "a function foo taking no arguments"
>void foo(void) means "a function foo taking no arguments"
>>
>>56763903
only does matter with prototypes.
>>
>>56763903
It's was required back when there were still compilers that parsed K&R C code. It signified that the function doesn't take any arguments instead of filling in the first n variables declared in the function like in K&R C. It's unnecessary now, and it's mostly there as an anachronistic 'style'.
>>
Is there a way to generate default views from models in django in the way ASP MVC does it?
>>
File: 1446340712743.png (390KB, 720x702px) Image search: [Google]
1446340712743.png
390KB, 720x702px
vim or emacs?
>>
>>56763981
notepad++
>>
>>56763981
no
>>
>>56763981
post better 2d and i might tell you
>>
>>56763981
actual question is: atom or sublime?
>>
>>56763981
Vim. Evil mode is shit. Spacemacs is bloated. All I need it an editor, a terminal, and a debugger.
>>
>>56763981
VS Code
>>
File: 1455113475892.png (866KB, 800x1200px) Image search: [Google]
1455113475892.png
866KB, 800x1200px
>>56764024

Waht's wrong with Noire-sama?
>>
File: kissu.webm (3MB, 1280x720px) Image search: [Google]
kissu.webm
3MB, 1280x720px
/dpt/-chan, daisuki~

Ask your much beloved programming literate anything (IAMA).

>>56763981
http://spacemacs.org/

>>56763960
>>56763937
It's still required with prototype/pointer.

>>56763687
Java has primitive types and reference types but everything is passed by value.

>>56763328
>gif
Thank you for using an anime image but you should have posted the webm version; This is the technology board so we expect some decent use of the said technology.
>>
>>56763945
C99 and C11 use the second set of definitions.
>>
>>56764080
whats a good source for kissu animes?
>>
>>56763981
vim
>>
>>56764080
>everything is passed by value
But value of reference types is a reference.
>>
>>56764080
is it weird that this gave me ab oner
>>
>>56764080
>>>/global/rules/13
>>
>>56764080
WebM Source?
>>
>>56764111
The reference is passed by value, so you cannot assign a variable for a reference type to a new value, as in
void swap(int &x, int &y)
{
int temp = x;
x = y;
y = temp;
}
>>
File: 1471325175538.webm (857KB, 1680x1050px) Image search: [Google]
1471325175538.webm
857KB, 1680x1050px
>>56764080

>you should have posted the webm version

say no more familia
>>
>>56764130
>>>/global/rules/6
>>>/global/rules/7
>>
File: incredulous animu.png (502KB, 878x842px) Image search: [Google]
incredulous animu.png
502KB, 878x842px
>>56764199
>quality of posts
>/dpt/
>>
Been reading up on html and JS on w3schools for the past few day. Finally get up to the window BOM chapter. "Oh, so this is where the fun stuff happens". Not a fucking mention of window.AudioContext.

Fuck everything. I hate programing. It's just language constructions this and language abstractions that. No one ever fucking teaches you how to actually work with your hardware, so you don't learn do do anything useful. Every programing course is just a load of wanking.
>>
>>56763328
This has been my screen saver for over 6 years.
>>
>>56764238
First of all use MDN instead of W3Schools.
Second why the fuck do you expect low level hardware programming with JavaScript?
>>
>>56764238
I think you meant DOM. Also don't read w3schools. See: http://www.w3fools.com/
>>
>>56763641
If you learn the difference between references and objects, you'll see that Java 100% always copies all parameters.
>>
>>56764215
>>>/global/rules/2
>>
File: ki.webm (3MB, 1280x720px) Image search: [Google]
ki.webm
3MB, 1280x720px
>>56764198
Where was the code taken from ?

>>56764136
Neon genesis impacts. it's a short movie.

https://youtu.be/Iv5qc0RpBk0?t=2m33s

>>56764118
Yes

>>56764111
Passing by reference does mean you pass the reference of the variable, not it's value.

>>56764102
4chan
>>
>>56764255
>http://www.w3schools.com/js/js_window.asp
BOM

>>56764251
I want to do something similar to http://onlinetonegenerator.com/
It's only from looking at the source code that i even have an idea about looking for an audio context in the window object.
>>
File: erfdftgjkil.jpg (66KB, 1287x721px) Image search: [Google]
erfdftgjkil.jpg
66KB, 1287x721px
I want to include little dots floating across the screen like pic and link related.

Should I just create 50 or so vector2s, and render textures moving independently?

I have literally no idea regarding how many objects and calculations you can have before lag becomes a problem.

I'm using Java.

https://youtu.be/lgCs4BmKWBs?t=807
>>
>>56764347
lets just say if you can have thousands of them there's something seriously wrong with your code
>>
>>56764238
it's a relatively new api that few people use. i don't know why you would expect a basic tutorial to introduce it immediately

https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API
>>
I need to learn:

SQL
C++
Visual Basic
Java
Oracle

What are the best resources for learning these? I've fallen ass first into a systems analyst role and need to git gud.
>>
>>56764381
>lets just say if you can
is that meant to be can't?
>>
>>56764413
w3schools
>>
>>56764415
yes
>>
>>56764295
that show was gay af yo
>>
>>56764431
okay, thank you anon
>>
File: 1473626228026.png (16KB, 478x418px) Image search: [Google]
1473626228026.png
16KB, 478x418px
>>56764437
Lesbians are pretty gay.
>>
>>56763347
Derek Banas? I like his tutorials. He has tutorials on most popular languages.
>>
>>56764390
I expected it to at least be mentioned in their window object reference.
http://www.w3schools.com/jsref/obj_window.asp

A basic tutorial is useless if it doesn't help guide you onward to the actually useful stuff. Then it's just language masturbation.
I find this to be a problem with beginner programming courses in general.
>>
>>56763347
microsoft's step-by-step book
>>
>>56764419
I see it comes highly regarded. Thank you.
>>
>>56763328
A USB authentication tool.
>>
>>56764347
You want to render them in bulk and avoid allocating and deallocating them.
>>
>>56763485
Could be a cool idea
>>
Someone explain pointer aliasing to me. I don't get it.
>>
Why is opengl such a nightmare.

I just wanna make video games ;_;
>>
>>56764500
They will be rendered in the same spritebatch, all at once.
Can you explain allocating and reallocating? It doesn't have to be in depth.
>>
>>56764575
>I just wanna make video games
If you're not interested in the internal workings of a game engine, use Unity or Unreal or fucking GameMaker.
>>
>>56764572
Does anyone else pronounce aliasing as analysing when reading it in your head?
>>
>>56764624
Honestly the real problem is that I am, it's just that opengl is so unpleasant to write. I was working on a wrapper for love2d in moonscript, but got fed up w/ that project.
>>
>>56764636
no
>>
>>56764620
Don't constantly create and remove dot objects.
>>
Anyone here use nim? I've been playing around with it the past few days and I really like it
>>
>>56763328
Used vim exclusively for years in college and afterward. Last job forced us to use Eclipse because muh standard toolset. Four years later and now I have to learn vim again. Muscle memory is gone. God fucking damnit. At least I'm free of Java and eclipse.
>>
>>56764347
Rendering ~50 sprites individually wont have any noticeable performance impact. If that's the only thing you wanna do go for it anon.
But if you're interested here are some way you can create a better sprite renderer.

> 1
You count how many sprites you have and calculate the size of your vertex buffer. do the vertex transformations on the CPU and send it allover to the GPU and render it all at once.

> 2
Use instanced rendering.

> 3
Just send single points to the GPU and use the geometry shader to create the quads.

Keep in mind that if you use a lot of textures or if Z order matters you want to record the draw commands in a buffer first and then sort it before drawing.

>I'm using Java.
O-oh, I'm sorry.

>>56764689
Of course he should do object pooling. But that's a given right?


>>56764575
Use unity, unreal, godot, ect...
>>
Looking for a dev with real experience with AngularJS

Will pay
>>
>>56764850
Define "real experience"
>>
>>56764850
I have real experience with plain JS. Angular shouldn't be much different
>>
>>56764864

either currently employed as a webdev or has a decent github with projects
>>
>>56764871

Are you in the Boston area?
>>
>>56764908
Yeah, want to meet up at the Starbucks by the train station?
>>
>>56764908
No
>>
>>56764908
>>56764918
this isn't me
>>
>>56764850

>using /dpt/ as a job board
>web programming job also

Is it really that hard to stick an ad on Indeed or Craigslist? And would you seriously trust us to get anything done from all the shit we do here?

Unfortunately, I'm not a webdev and most people here I doubt are also. Have you tried /wdg/?
>>
>>56764908
Yup
>>
>>56764575
you use opengl to program a renderer then you use that renderer to program a game. if you want to program a game, not a renderer, then bypass opengl by using a already existing renderer (ogre3d, panda3d, udk, ...).
>>
>>56764908
A-anon, aren't you moving a bit to quickly. My heart isn't ready for that yet.
>>
>>56764918

oh

>>56764916

i'm down even if you're not a dev

we can meet in the commons

>>56764928

oh

this is for an MIT startup btw

>>56764929

you'll never find if you don't ask

this role isn't serious enough for a listing on those sites

>>56764931

cool, where at?
>>
File: 1441079756397.jpg (52KB, 636x544px) Image search: [Google]
1441079756397.jpg
52KB, 636x544px
>>56764946

I use a tripcode,

don't call me anon
>>
>>56764964
I use a script that replaces all trips with anon.
>>
File: estryui.png (55KB, 724x768px) Image search: [Google]
estryui.png
55KB, 724x768px
>>56764951
>>
>>56764951
Providence.
>>
College dropout here.
Is this book worth it? I can't find a torrent for it. Are there any alternatives?
https://bigmachine.io/products/the-imposters-handbook?variant=29234251143
>>
File: ccv.png (63KB, 907x627px) Image search: [Google]
ccv.png
63KB, 907x627px
>>56764985
>>
>>56765005
i can't even tell whos shitposting who anymore
>>
File: Capture.png (13KB, 395x394px) Image search: [Google]
Capture.png
13KB, 395x394px
>>56764985
Umm.
>>
>>56765027
I've seen a lot of shops in my time
I can tell from the pixels
>>
>>56764951

How can you say a role isn't serious enough for a listing? Even if it's a temp job and a one time thing, it's not those sites have some guidelines against that kind of thing.

If you want to gamble on the quality of the work you will receive, be my guess.

>>56764985
>>56765027

If you're serious about the role, please use a stupid trip and stop posting stupid screenshots of (You) replies that mean absolutely nothing when we have photo editing software and an actual designated way to tell users apart. You're just wasting brain cells and bandwidth otherwise.
>>
>>56765035
Yeah? You got proof? All I used was snipping tool.
>>
>>56765068

I'd take much more pleasure in screwing over someone from 4chan than someone from craigslist

jk

but they'd be better overall as a person, imo

i need someone i can chug 40s with and blast trap music with
>>
>>56765083
Why would you need some sucker from 4chan if you're at MIT? Do people not jump at the chance to get on random startups anymore?
>>
>>56764985
>>56765005
>>56765022
you funny guys
>>
>>56763620
I didn't really make them tho.
http://tuksons-icon-trade.tumblr.com/post/140844619165/629-akari-akaza-icons-yuru-yuri-manga
>>
>>56765098

i need them to do a buttload of work based only off of mockups for equity pay (aka nothing)
>>
>>56765124
Nice tripcode
>>
>>56765083
>>56765141
What you're telling us is that you're playing capitalist, but you don't even have the money to hire someone else. Do they really let any retard into MIT?
>>
>>56763859
The parameter x initially is a reference to the i in main(), but you assign to it a reference to a different object. This doesn't change what i refers to back in main.

Try this:

public class A {
public int a;

public A(int a) {
this.a = a;
}

static void a(A a) {
a.a = 4;
}

public static void main(String[] args) {
A a = new A(5);
a(a);

if (a.a == 5) {
System.out.println("Pass by value");
} else if (a.a == 4) {
System.out.println("Pass by reference");
}
}
}
>>
>>56765503

go read Stirner you ugly fuck
>>
>>56765618
>Stirner

Oh wow, Mr. Spookman
>>
What """features""" would JavascriptScript have?
>>
>>56765703
I don't know but they would be bad
>>
ok i just found out C# is pronounced C sharp instead of C#
and that Java isn't pronounced Jeyva
>>
>>56765715
yeah I'd like to define an INTERCAL of the modern age
>>
>>56765703
Even weaker typing
>>
>>56765734
>"I made this cool program in C-Hashtag."
kekkles
>>
>>56765759
i thought its C hash
>>
>>56765759
>hashtag
Hello twitter
>>
>>56765753
I was thinking about something like only one type: strings
>>
>>56765703
case insensitivity for keywords, variable names and strings
>>
>>56765786
How the operators work depends on the sign of the arguments
>>
i looked into bash and how you make scripts using it

it's kind of cool that functions are commands and the way they return
>>
>>56765734
And CSS is not pronounced "ksss."
>>
>>56765796
could you give an example?
>>
File: fruit1.png (624KB, 722x525px)
fruit1.png
624KB, 722x525px
>>56765618
No one will do your homework, research, or job for free.
>>
>>56765734
I always called it iava, like a nordic name
>>
>>56765833
3 + 4 = "34"
-3 + 4 = "1"
3 + -4 = "3-4"
-3 + -4 = "-7"
>>
what happens when two programmers meet

do they talk about programming and what do they talk about

ive neve rmet a programmer
>>
>>56765857
They collide and annihilate one another
>>
>>56765854
oh boy
>>
>>56765786
Even functions are strings.

var factorial = "if the input is one or zero, then the result is one, otherwise multiply the input by the factorial of the input minus one."


Lambdas are just string literals concatenated with other functions.
>>
>>56765857
They talk about their favorite color of striped socks and show off their pantsu.
>>
>>56765917
>>56765787
>>56765854
Sounds a lot like PHP.
>>
>>56765857
They annihilate each other in an explosion of gamma ray photons.
>>
>>56765958
lacking strlen as function hashing mechanism
>>
>>56765958
would PHPscript be even more awful than JavascriptScript?
>>
>>56765979
yes
javascript was designed in a few days
php wasn't designed
rasmus just "kept adding the next logical step"
>>
File: 1409055770603.png (38KB, 1680x1050px) Image search: [Google]
1409055770603.png
38KB, 1680x1050px
I'm a little messed, please help.

I tried learning C and then python, but I can't understand C, so I'll do the opposite, python first. but
what python? I remember being problems between python 2.x and python 3.
any advice here? I don't mind reading but there is an awful lot of books out there and I don't want to spend time with an useless manual.
>>
>>56765979
Hard to tell. PHP is shit because it was designed as an HTML template language, or more accurately not designed at all. JS has been shit until recently because it was designed in 10 days. If both are given several years of development from zero, we will certainly get much better languages out of both.
>>
>>56766043
learn some python 2 syntax do some simple scripts and then do 6.00 course at mit ocw
>>
>>56766043
Learn C or give up on programming.
>>
>>56766075

I don't understand it. I want to, but it does not make sense for me.
>>
>>56766050
>until recently

it still has all the shit parts, only that devs try to pretend they don't exist anymore. have you ever looked inside the window object?
>>
>>56766093
Is there a specific thing you don't get, so that we could help you with it? Is it pointers?
>>
>>56766093
Then give up.
C is the lowest barrier to programming.
>>
>>56766093
what part exactly doesn't make sense?
>>
>>56766115
The window object is part of the DOM API, not JS. Most browser APIs are still absolute garbage.
>>
>>56766139
>>56766143

I'll try more and come back with specific questions. thanks.

>>56766142
I'm following the advice of an actuall game developer.
>give up.
why should I? most of the basic stuff is always the most difficult (martial arts, music...)
>>
>>56766211
>game developer
oh ok
you wanting to "make apps" is just a passing phase
bye now
>>
>>56766245
reality is, I just want to learn. even if I learn a little, I'll know more than I do now.
If I can do useful things better, but that's not in my mind at this moment. neither hacker-stuff, games or whatever
>>
>>56765734
>ok i just found out C# is pronounced C sharp instead of C#
What the hell do you even mean? What do you think C# sounds like? Are you pronouncing # like an H? You think it's Ch?
>>
>>56766275
If you can't even learn C, you have no future in software development.

You could become a webdev if you want, they're basically retarded and get paid mad dosh to glue together other people's software because their clients don't know any better.
>>
>>56766328
>try a little.
>can't get it
>get the fuck out.

well, that was what you learned the last time you went to a gym?
>>
>>56766368
I had written up this huge reply to your initial post but then I read this and deleted it.

Sorry!
>>
>>56766310
c hash
>>
File: 1449072432854.png (86KB, 600x300px)
1449072432854.png
86KB, 600x300px
I need a method that takes a user-set weight, compares it to a set max weight and substracts a percentage from a set max speed depending on the percentage of usage of the max weight.
For example:
>100 km/h
>1 ton max weight
>0.5 ton used
>speed is decreased by 4% for every 10% of the max weight used
>20% is cut from the max speed in this case
>return new edited speed 80 km/h

How can I accomplish this? I'm on java.
>>
>>56766460
epic trolling pal
wild sex with your waifu tonight.
>>
>>56766488
>How can I accomplish this?
Translate the instructions(read homework) into java code.
>>
File: 1445725334119.jpg (48KB, 600x598px) Image search: [Google]
1445725334119.jpg
48KB, 600x598px
>>56766530
>>
>>56763328
learning C as my first language, just made a console IRC client
>>
File: 1464922441576.jpg (156KB, 1000x887px)
1464922441576.jpg
156KB, 1000x887px
suggest some vim plugins /dpt/
>>
>>56766677
not a plugin, but if you're not using hybrid line numbers you're wasting time
>>
File: 1472164841615.jpg (465KB, 1018x728px) Image search: [Google]
1472164841615.jpg
465KB, 1018x728px
How do sneaker bots work.
>>
>>56766839
they are just scrapers
>>
>>56766893
how do i go about making one
>>
>>56766677
youcompleteme
>>
>>56766839
i didn't know what this was so i looked it up
seems simple enough
>$130
holy shit
>>
>>56766639
thats a cool
>>
>>56763328
Can I use Python to automate boring stuff?
>>
>>56766677
" General
Plug 'Raimondi/delimitMate'
Plug 'chrisbra/SudoEdit.vim'
Plug 'mbbill/undotree', { 'on': 'UndotreeToggle' }
Plug 'tpope/vim-fugitive'
Plug 'tpope/vim-git'
Plug 'vim-scripts/The-NERD-tree', { 'on': 'NERDTreeToggle' }

" Development
Plug 'Valloric/YouCompleteMe', { 'do': './install.sh' }
Plug 'benekastah/neomake'
Plug 'bling/vim-airline'
Plug 'ctrlpvim/ctrlp.vim'

" Haskell
Plug 'dag/vim2hs', { 'for': 'haskell' }
Plug 'eagletmt/neco-ghc', { 'for': 'haskell' }
Plug 'raichoo/haskell-vim', { 'for': 'haskell' }
Plug 'godlygeek/tabular', {'for': 'haskell'}
Plug 'itchyny/vim-haskell-indent', {'for': 'haskell'}

" Web Development
Plug 'ElmCast/elm-vim', { 'for': ['elm'] }
Plug 'pangloss/vim-javascript', { 'for': ['javascript', 'html', 'htmldjango'] }
Plug 'posva/vim-vue', { 'for': ['vue'] }
Plug 'mxw/vim-jsx'
" Web Templates
Plug 'digitaltoad/vim-pug', { 'for': ['jade', 'pug'] }
Plug 'mustache/vim-mustache-handlebars', { 'for': ['moustache', 'html.handlebars'] }
Plug 'pbrisbin/vim-syntax-shakespeare',
\ { 'for': ['haskell', 'shakespeare', 'cassius', 'hamlet', 'julius'] }
" Web Design
Plug 'hail2u/vim-css3-syntax', { 'for': ['css', 'scss', 'less'] }
Plug 'cakebaker/scss-syntax.vim', { 'for': 'scss' }


" Other FileTypes
Plug 'chase/vim-ansible-yaml', { 'for': 'ansible' }
Plug 'plasticboy/vim-markdown', { 'for': 'mkd' }
Plug 'klen/python-mode', { 'for': 'python' }
Plug 'wlangstroth/vim-racket', { 'for': 'racket' }
Plug 'cypok/vim-sml', { 'for': 'sml' }
Plug 'rust-lang/rust.vim', { 'for': 'rust' }
Plug 'elixir-lang/vim-elixir', { 'for': 'elixir' }
Plug 'JesseKPhillips/d.vim', { 'for': 'd' }
>>
>>56766997
No.
>>
File: parker program.png (45KB, 1284x862px) Image search: [Google]
parker program.png
45KB, 1284x862px
im trying to make a program that finds what integers satisfy a^2 +b^2=c^2 in FORTRAN95

I almost have it, just have to rework the nested IF statements because for some reason the program doesnt do the loops and just ends
>>
>>56766938
yea i wanna try to make one but i have no idea where to start
>>
>>56767040

Just took a quick peek at what you're talking about, but look into Selenium, or web scraping & requests making. The network tab in browser dev tools is useful for seeing what requests are made to do stuff like adding products to carts, submitting payment info, etc.
>>
Golang?
>>
>>56767017
What can python be used for then
>>
>>56767173
Anything that doesn't need to be fast. Or safe/reliable, but shit tons of tests can hold that at bay for a bit.
>>
import Data.Ix (range)
import Data.List (nubBy)

eq2of3 (a,b,c) (x,y,z) = (c == z) && (a == x && b == y) || (a == y && b == x)
pythag (a,b,c) = (a^2 + b^2 == c^2)
onlyTriples = nubBy eq2of3 . filter pythag

sample = range ((1,1,1),(100,100,100))
trips = onlyTriples sample
>>
Is there a place I can download tons of programming books in pdf? Thanks
>>
>>56767173
Python is never worth using
>>
>>56767231
Throwing absolutes out like that is the quickest way to get people to ignore you.
>>
>>56767231
Should I just learn COBOL or C then?
>>
>>56767223
the lambda board on [spoiler]lainchan[/spoiler]
>>
>>56767259
Learn C
>>
File: Untitled.png (154KB, 803x650px) Image search: [Google]
Untitled.png
154KB, 803x650px
Just learning C#/Unity
I'm making a puzzle game, in which you solve 3D nonograms. I've spent the last half an hour trying to figure out how to to shoot a ray through multiple collides (cubes), and upon right clicking, delete one.
My problem was trying to delete the cube the ray had went through first. It seems simple now, feel a bit silly.

void Update()
{
RaycastHit[] hits;
hits = Physics.RaycastAll(Camera.main.ScreenPointToRay(Input.mousePosition), 100.0F);

for (int i = 0; i < hits.Length; i++)
{

RaycastHit hit = hits[i];
Renderer rend = hit.transform.GetComponent<Renderer>();

lastCube = hits[0].transform.gameObject;

if (lastCube.tag == "cube")
{
if (Input.GetMouseButtonDown(1))
{
Destroy(lastCube);
}
}
}
}
}
>>
>>56767223
libgen.io
>>
>>56767292
but i'm a noob
and that stuff is for operating systems and shiz
>>
>>56767388
C is for n00b neckbeards fapping to fizzbuzz all day and night. Real programmers that want to get things done use Java and C#.
>>
>>56767388
just learn python holy shit it doesn't matter
just start coding
>>
>>56767388
do automate boring stuff with python as you intended

youll have to learn c at some point, its not now

dont listen to this guy, he's just meming you right now
>>
File: generalisations.png (13KB, 1004x166px) Image search: [Google]
generalisations.png
13KB, 1004x166px
>>56767257
>>
File: streetshitters.jpg (15KB, 516x94px) Image search: [Google]
streetshitters.jpg
15KB, 516x94px
>>56767426
>>
Writing old thread cleanup for an imageboard. What would be a decent algorithm for calculating the dynamic "page" number of a board? Trying to think of something that will work for both big slow threads and lots of small ones.
>>
Learning programming with C Programming a modern approach 2nd edition, and I was wondering how long does it typically take for somebody to finish all the exercises and programming projects? There are a ton of them and I feel like some of them are just kind of tedious. I just finished the chapter 7 exercises and programming projects and it took a fairly long time, not because I had to think of how to make it work, because of all the switches and if's (i literally just laughed and skipped the question that asked me to use goto)
>>
>>56767821
number of posts/ time multiplied by some constant
>>
>>56767829
I usually just do one or two exercises per concept
>>
>>56767821
>>56767846

reminder to store the time and number of posts, not store the number of posts / time
>>
>>56763328
Can anyone give me a script that greps the only "192.168.**" part from the following output?


; <<>> DiG 9.10.3-P4-Ubuntu <<>> tertiary
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 10051
;; flags: qr ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;tertiary. IN A

;; ADDITIONAL SECTION:
tertiary. 1474796065 IN A 192.168.0.5

;; Query time: 44 msec
;; SERVER: 127.0.1.1#53(127.0.1.1)
;; WHEN: Sun Sep 25 09:34:24 AEST 2016
;; MSG SIZE rcvd: 53

>>
>>56767829
>i literally just laughed and skipped the question that asked me to use goto
The goto statement is a valid part of the language. You better learn how to use them correctly instead of being ignorant.
Albeit deprecated by some people, the equivalent of the goto statement is
used frequently by compilers in form of the unconditional jump instruction.

The goto statement comes in handy when a function exits from multiple
locations and some common work such as cleanup has to be done. If there is no
cleanup needed then just return directly.
>>
>>56763437
Holds your hand like a little baby
>>
>>56767982
no lol
>>
>>56767989
defer is a better solution for multiple return point functions and you only have to use it once.
>>
>Start to write a question to ask /dpt/
>Realise I could turn the subject of the question into a future application
>Don't want anyone to steal my idea
>Ctrl+A and Del
>Go on Google and struggle to find an answer
>>
>C++ assignment
>you spend 90% of the time guessing what the teacher meant by this

It's like, 5 hours assignment, with 4 hours of it guesswork, and 1 hour on the actual problem
>>
>>56768081
But defer is non-standard, so it's less portable.
>>
>>56768132
odds are your idea is nothing revolutionary, but even if it was some groundbreaking shit, /dpt/ is the last place you'd have to worry about someone stealing it fampai. nobody here does anything
>>
>>56766368
> went to a gym
> posting in /g/
>>
>>56768180
sometimes I wish /dpt/ was a bit more like /agdg/
I think this general would benefit from people posting and commenting about their projects,
because currently this general consists to 90% of language wars, what language should I learn, debugging requests, homework requests and other bullshit that will never end.
>>
>>56768279
4chan is shit-tier for actual discussion, who'd a thought?

If you want to actually talk about useful shit find a relevant slack or irc channel.
>>
>>56768388
/agdg/ is in 4chan too.
>>
>>56768279
>sometimes I wish /dpt/ was a bit more like /agdg/
c a n c e r
>>
>>56768279
This.

There should be some type of encouragement for people to actually post pics of "What are you working on, /g/?"
>>
what irc channels do you guys hang out in
>>
>>56768447
None. Don't go in any.
>>
File: super_metroid_crt.jpg (160KB, 1731x1155px) Image search: [Google]
super_metroid_crt.jpg
160KB, 1731x1155px
Express.js question, /wdg/ is dead at the moment.

Extremely simple, but I can't for the life of me see what is going wrong here.

I've got two routes, GET and POST for '/newnote'.

// GET newnote
router.get('/newnote', function(req, res) {
return standupCtrl.getNote(req, res);
});

// POST newnote
router.post('/newnote', function(req, res) {
return standupCtrl.create(req, res);
});


They deal with requests via a method attached to standupCtrl, which is required into the routes file. The get request for '/newnote' works fine. It's hunky dory. It serves a jade template via a standupCtrl method. The template looks like this:

extends layout

block content
form(method="POST", action="/newnote")
btn.btn.btn-info(type="submit") Submit


It couldn't be any more simple. This should hit the POST route. Something should happen, but it just isn't. The .create method within that POST method only contains the following code:

res.redirect(301, '/');



Any ideas? What is it that I'm missing?
>>
>>56768279
i hear you, though let's be honest, /agdg/ is pretty shitty overall too. i do like that people actually discuss their projects and post "progress", but it's also largely a dramatic circlejerk. i think the difference with /dpt/ is that people try really hard to sound knowledgeable and love doling out loud criticism despite frequently being painfully wrong, which probably discourages some people from sharing their work. most people here are way better at arguing pointless semantics and reading language specifications than they are at actually programming
>>
>>56768486
>javascript

Hey guys, laugh at this person
>>
>>56764473

can't listen to his faggot voice for more than 5 seconds
>>
>>56768447
Find one for whatever language/framework you're coding in atm. And maybe one for your OS/distro.
>>
>>56768486
you're sure the post is getting called? tell me you've checked this
>>
>>56768533
Can you even OO in js?
Before i knew what OO was, I wrote several thousands of lines in one mess of a class for an audio visualiser in js
>>
>>56768553
It isn't getting called, that's the issue. Console.log statements are getting triggered in the route callback or the method, res isn't being redirected.
>>
>>56768588
Fortunately that's one virus js is immune to
>>
>>56768388
can't post images on irc and slack seems to be a tool to communicate with members of your team instead of talking with people that have a fresh mindset about your project.

>>56768512
I agree, /agdg/ is not working as well as it could. But at least they have recaps, jams and other community events.

Right now the most "programing community" thing going on here is that stupid raven poster with a challenge.
Most posts that answer the "What are you working on, /g/?" are either "learning language/framework/library X" or >>56764497 which will never be followed up on.
>>
File: poo in it.jpg (46KB, 630x405px)
poo in it.jpg
46KB, 630x405px
>>56768588
OOP IN OOL
>>
>>56768628
don't you dare talk about the bird that way
>>
>>56763981
cat+sed+awk
>>
>making guis in Java

fucking end it all
this shit should not be this difficult to work with
>>
>>56768705
ed
>>
File: let's poo boys.jpg (114KB, 640x640px)
let's poo boys.jpg
114KB, 640x640px
>>56768721
>J*va
>>
>>56768721
Tried for the first time yesterday to use JFrames and JPanels.
Almost started to cry.

Went back to making games instead
>>
>>56768588
did you refactor it into 20k lines of oop
>>
anime or kpop
>>
>>56768876
anime by far
>>
>>56768876
kpop by far
>>
>>56768876
western animation or music by far
>>
>>56768876
kanime by far
>>
>>56768486
What status code does POST return?
>>
>>56768857
Nope. I left JavaScript and learnt Java.

My life is full of mistakes
>>
To those who have developed both iOS and Android apps, which one did you prefer?
>>
anyone with more experence in python know why I'm getting a syntax error on line 16?

from influxdb import InfluxDBClient

json_body = [
{
"measurement": "cpu_load_short",
"tags": {
"host": "server01",
"region": "us-west"
},
"time": "2009-11-10T23:00:00Z",
"fields": {
"value": 0.64
}
}

client = InfluxDBClient('localhost', 8086, 'root', 'root', 'example')
client.create_database('example')
client.write_points(json_body)
result = client.query('select value from cpu_load_short;')
print("Result: {0}".format(result))
>>
>>56763347
pluralsight has some decent video tutorials. Requires membership after trial tho
>>
>>56768971
lol
>>
>>56763540
Say

> I'd just like to interject for a moment. What you're referring to as Linux, is in fact, GNU/Linux, or as I've recently taken to calling it, GNU plus Linux. Linux is not an operating system unto itself, but rather another free component of a fully functioning GNU system made useful by the GNU corelibs, shell utilities and vital system components comprising a full OS as defined by POSIX.

Many computer users run a modified version of the GNU system every day, without realizing it. Through a peculiar turn of events, the version of GNU which is widely used today is often called Linux, and many of its users are not aware that it is basically the GNU system, developed by the GNU Project.

There really is a Linux, and these people are using it, but it is just a part of the system they use. Linux is the kernel: the program in the system that allocates the machine's resources to the other programs that you run. The kernel is an essential part of an operating system, but useless by itself; it can only function in the context of a complete operating system. Linux is normally used in combination with the GNU operating system: the whole system is basically GNU with Linux added, or GNU/Linux. All the so-called Linux distributions are really distributions of GNU/Linux.
>>
File: 388468at.002.gif (31KB, 600x347px) Image search: [Google]
388468at.002.gif
31KB, 600x347px
How babby tier is designing an algorithm to find if a value appears only once in an array?
>>
>>56769045
You forgot to close the json_body line.
from influxdb import InfluxDBClient

json_body = [
{
"measurement": "cpu_load_short",
"tags": {
"host": "server01",
"region": "us-west"
},
"time": "2009-11-10T23:00:00Z",
"fields": {
"value": 0.64
}
}
]

client = InfluxDBClient('localhost', 8086, 'root', 'root', 'example')
client.create_database('example')
client.write_points(json_body)
result = client.query('select value from cpu_load_short;')
print("Result: {0}".format(result))


this should work.
>>
>>56769141

Can't believe I missed that, cheers
>>
>>56768876
gooks forever
>>
File: omomo.jpg (1MB, 2134x1350px) Image search: [Google]
omomo.jpg
1MB, 2134x1350px
>>56769224
omo
>>
>>56769224
Crosseyed cunt
>>
>>56769135
Pretty babby tier.
You can just sort the array and check how many times a number is duplicated.
>>
What's the best book for learning algorithms & data structures?
>>
>>56769247
delete this
>>
>>56769288
i deleted my cookies already
>>
>>56763641
we shall not question the work of god...
>>
>>56769283
clrs intro to algorithms or algorithm design manual
>>
>>56763394
mousepad > everything else > slublime/atom
>>
>>56769282
Fuck it's seems obvious after you said that. I was thinking of shifting the values of the array whenever I can't across the "target" number until the start was empty or the counter was 1 at the end of one cycle.

My uni let me take this 2nd year data structures and algos course directly without the 1st year CS courses so I have no experience implementing basic data structures or even sorting algos. Seemed like a good idea to graduate faster but I might've fucked up.
>>
>>56769417
I meant "whenever I came across" and "until the array was empty"
>>
>>56769417
I'm not even in college, cs degrees are a literal scam.
>>
>>56769282
Not efficient, sorting would take O(n log n) time but checking duplicates only requires O(n) time and space, by recording instances as you go through the array.
>>
New thread

>>56769519
>>
>>56763394
nano > >np++ vim > atom > emacs > sublime
>>
real thread:
>>56769650
>>56769650
>>56769650
>>
#include <stdio.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <string.h>

int main(){
int welcomeSocket, newSocket;
char buffer[1024];
struct sockaddr_in serverAddr;
struct sockaddr_storage serverStorage;
socklen_t addr_size;
FILE *fp;

welcomeSocket = socket(PF_INET, SOCK_STREAM, 0);

serverAddr.sin_family = AF_INET;
serverAddr.sin_port = htons(7891);
serverAddr.sin_addr.s_addr = inet_addr("127.0.0.1");
memset(serverAddr.sin_zero, '\0', sizeof serverAddr.sin_zero);

bind(welcomeSocket, (struct sockaddr *) &serverAddr, sizeof(serverAddr));

if(listen(welcomeSocket,5)==0)
printf("Listening\n");
else
printf("Error\n");

addr_size = sizeof serverStorage;
newSocket = accept(welcomeSocket, (struct sockaddr *) &serverStorage, &addr_size);

recv(newSocket,buffer,3,0);

if(strncmp(buffer,"put",3)==0){

recv(newSocket, buffer, 1024, 0);
fp = fopen(buffer,"w");
while(1){
recv(newSocket, buffer, 1024, 0);
if(strncmp(buffer,"-!-",3) == 0)
break;
fprintf(fp,"%s",buffer);
}

fclose(fp);

}else if(strncmp(buffer,"get",3)==0){

recv(newSocket, buffer, 1024, 0);

fp = fopen(buffer, "r");
if(fp!=NULL){
while(fgets(buffer, 1024, fp) != NULL){
send(newSocket,buffer,1024,0);
}
send(newSocket,"-!-", 3, 0);

}
}
close(newSocket);
close(welcomeSocket);

return 0;
}


first try a server with put and get files, in c
>>
File: 5.png (1003KB, 1920x1080px)
5.png
1003KB, 1920x1080px
muh game

i love webgl
>>
>>56768608
>>56768588

object oriented programming has been supported by javascript for years, plus with es6's new features its even sexier
>>
>>56771052
inb4 sued by harmony gold
Thread posts: 319
Thread images: 34


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