[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: 32
old >>54121524

What are you working on /dpt/?
>>
i'm ok with this.
>>
>>54128641
go for the cool kid look with .cxx

or hell, if you're writing C++ like C just go ahead and use the extension .c
>>
third year SE student here. I don't have ANY meaningful personal projects under my belt. how the fuck do I even begin? I have plenty of small program ideas, but as I just stated, I have no idea where to begin with 98% of them. I know some design patterns. I've had courses in good programming style, algorithms, data structures. but I can't seem to bring my current knowledge together to produce even a trivial working, complete program.
>>
>>54128623
float squareRoot(int x){

}


wat do
>>
>>54128680
I would say get creative and think of cool new projects, but unfortunately you're an SE and that can't happen.
>>
>>54128682
given 16
16 / 2 = 8
16 / 8 = 2
2 * 2 = 4
sqrt(16) = 4
>>
>>54128682
just use jquery
>>
>>54128682
newtons method
>>
>>54128682
A good starting point would be the Newton-Raphson iterative method for approximating functions. If you have a calculus textbook, it's likely to cover it - or read this https://en.wikipedia.org/wiki/Newton's_method
>>
>>54128680
could start with websites since its easy and there are a lot of tutorials and videos and make your way to open source. study good open source software to get an idea of programs work.
>>
>>54128682
ayy
float squareRoot(int x){
float habeeb = 600.0;
for(int i = 0; i < 10; ++i){
habeeb = 0.5*(habeeb+(x/habeeb));
}
return habeeb;
}
>>
>>54128755
What the hell
>>
>>54128719
>> just migrating my question about porting python to C to this thread
>>
>>54128780
>using bitwise for exponent
ouchie
>>
>>54128780
nvm, fixed it anyways
>>
>>54128769
Is that an allusion to the famous "//what the fuck?" from Q3's source?
>>
>>54128682
Dumb way? What's the O(n) of this anyway?

First make a multiplication table as a 2d array and/or compute it on the fly. Then search that array to get the result with two for loops and return the result if found. How dumb is this idea anyways?

The other, smarter way is bit addition, but I googled that and don't understand the logic of it.
>>
>>54128799
can you explain what you mean?
>>
>>54128814
haha I love that
i  = *(long*) &y;  // evil floating point bit level hacking
i = 0x5f3759df - (i >> 1); // what the fuck?
>>
>>54128813
for future reference you can't just copy/paste code from python into other languages and expect it to work. I know that shocks most python users.
>>
>>54128682
float square_root(float x)
{
int int_x = *(int*)&x;

int_x -= 1 << 23;
int_x >>= 1;
int_x += 1 << 29;

float ans = x / *(float*)&int_x;
ans += x;
ans /= 2;

return ans;
}

I feel like I shouldn't have needed two variables for this
>>
>>54128832
I am aware, and didn't. Let's not pretend that C is the most obvious and explicit of all the languages out there.
>>
>>54128820
I assume in python the "^" means exponential. In C it means XOR bitwise operator. WAYYYYYYY different. I will let you google that because bit manipulation is a big but important topic.
>>
>>54128769
newton's method
>>
>>54128844
No, it means xor in python also. Just be
>>
>>54128682
i did it yay

float squareRoot(float number) {
long i;
float x2, y;
const float threehalfs = 1.5F;
x2 = number * 0.5F;
y = number;
i = *(long*) &y; // evil floating point bit level hacking
i = 0x5f3759df - (i >> 1); // what the fuck?
y = *(float*) &i;
y = y * (threehalfs - (x2 * y * y)); // 1st iteration
return 1/y;
}
>>
>>54128815
>How dumb is this idea anyways?
Pretty dumb.
>>
>>54128851
keyboard fail. Just because I use python doesn't mean I don't know how to do bit manipulation. That's a CSPRNG btw.
>>
>>54128858
Top kek.
>>
>>54128682
>>54128815
I think I said this wrong. This is how I wrote it up real quick. I think it's O(n^2)? This is python 3.4.
def squareRoot(x):
if x<0:
return "undefined"
elif x==0:
return 0
for i in range(0,x):
if(i*i)==x:
return i

[\code]
>>
>>54128886
>for i in range(0,x):
this is O(n). Also it doesnt work for non-perfect squares.
>>
>>54128682
push    rbp
mov rbp, rsp

movsd xmm1, xmm0
movq rax, xmm0
sub rax, 8388608
sar rax, 1
add rax, 536870912
movq xmm0, rax

movsd xmm2, xmm1
divsd xmm2, xmm0
addsd xmm0, xmm2
divsd xmm0, 2.0 ; might have to store 2.0 in a constant somewhere

leave
ret
>>
>>54128894
Pretty sure it's O(n^2).
>>
File: sqrt.png (82 KB, 694x801) Image search: [Google]
sqrt.png
82 KB, 694x801
>>54128886
>>
>>54128915
anon, it's O(n), trust me
>>
>>54128886
it's O(n) but it's only useful for positive integer roots.
>>
>>54128919
>>54128886
rekt
>>
>>54128920
Explain your analysis. I'm seeing that at the very least, the input n will be multiplied n times (worst case).

You could be right. I'm tired at the moment, and I'm just now finishing up my first algorithms course as an undergrad.
>>
>>54128886
So it doesn't return if it's not a perfect square ><><><><><><><<> AAAAAAAAAAAAAALKJFLKJDSLKFJ
>>
>>54128886
it might help to know the Nth root of any number is the same as X^(1/N)
>>
>>54128956
I think it's O(n) because it only goes through the function once for every loop.
>>
>>54128980
that's not how it works....
>>
>>54128886
Why the special case for x==0? Your loop will handle that case fine.
Also, you should exit the loop early if the product exceeds x.
Also, even if you don't exit the loop early, you should at least not bother with values greater than half of x, since you're just working with integers.
>>54128956
> I'm seeing that at the very least, the input n will be multiplied n times (worst case).
And n multiplied by n = n^2, so the performance is O(n^2)? Is that your reasoning?
Top kek.
>>
>>54128985
Is it not? I probably didn't understand the concept correctly, but I thought the whole O(n) stuff was how many times iterations would happen, for say, one method call.
>>
>>54128956
it literally iterates
for i in range(0,x):

from 0 to your input

it's a worst case O(n)

in reality it would only iterate from 0 to sqrt(x), so it would be O(sqrt(n))
this is assuming you only pass it square numbers, otherwise you're going to get errors (does poothon even let you write a function that doesn't always return a value?)
>>
Besides a little HTML and some shell scripts (which I have forgotten all of), I have zero programming experience. I want to learn C++, can any of you recommend a good book to get?
>>
>>54129024
>worst case O(n)
redundant, btw.
>>
Python 2.7.3 (default, Mar  9 2015, 15:56:17) 
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.56)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> def twoplustwo(x):
... return 2
Segmentation fault: 11

well done, python
>>
>>54129052
not really

try doing squareRoot(27) with that code
it'll iterate 27 times and then crash, or whatever python does when a function returns nothing
>>
>>54129027
>>54129027
Try searching: why not to learn C++ and learn Java instead, coz I will actually make some money 2nd edition
>>
>>54128987
yeah, just realized it is in fact O(n). I feel like an idiot right now...
>>
>>54129104
I'm not too concerned about making money. I'm more interested in making games as a hobby and C++ seems like a better option.
>>
What is the best tutorial on making guis in java? my teacher suks
>>
>>54129207
Learn Indian
>>
>>54129186
If you want to make real games, use C# with Unity. But that's /vg/ shit. Java has easy mode game libraries, like libGDX. C++ is good too if you want to use SFML or SDL. libGDX is a great platform, I don't know about SFML but I'm a fan of SDL, it's simple and more barebones than libGDX though. Up to you chump.
>>
>>54129214
no i hav a o whitenline teacher who records lessons and still uses windows xp
>>
>>54129207
>tutorial
lol
Try O'Reilly's "Java Swing" book
>>
>>54129232
How did he get ahold of XP? Is he using a 10 year old laptop?
>>
>>54129247
actually its vista woops, but still..
>>
>>54129223
Define "real games"
>>
>>54129293
games that make real money
>>
>>54129302
The only problem is I downloaded Unity once, and granted I didn't look up any tutorials, but it just seemed like a huge clusterfuck and I had no idea what was going on.
>>
>>54129293
Unity is used by a lot of professional game developing companies.
If you want to work for one, it would be good to learn it.
>>
>>54129319
Decent game devs roll their own engine. Indie devs use Unitard.
>>
>>54129356
https://unity3d.com/public-relations
I'm not a shill, but I know it's used by actual companies.
>>
>>54129374
>https://unity3d.com/public-relations
wow I didn't know Cities SL was made with unity. I didn't think it was that powerful. It must be modified to all hell.
>>
>>54129356
There's a reason why there is a market for middleware software such as Unity. The reason is developer time. It's normally more effective to leverage other people's work than it is to develop your own. The reason why you roll your own engine is because you know that you have certain requirements that a general purpose engine won't solve so efficiently.
>>
>>54129434
>middleware
>45% of the marketshare

Makes sense
>>
>>54129459
>Middleware is computer software that provides services to software applications beyond those available from the operating system. It can be described as "software glue".

market share is irrelevant to the definition dumdum.
>>
>>54128623
Building a tkinter app in Python but this could be a question on general GUI building.

What's the general order of initialisation of the following things?
Initial Data
Reading and Writing Saved Data
Modifying Data
Widgets
Drawing
>>
Where 2 buy cozy kneesocks?
>>
>>54129759
Initial data
Modifying data
R/W data
Drawing
Widgets
>>
>>54129773
script kiddie
>>
>>54129356
>Decent game devs roll their own engine.
Hahaha, no. Decent game devs use idtech or Unreal.
>>
>>54129874
decent game devs enjoy the the implementation details much more than making actual games

it goes to follow that most game devs are shit software developers
>>
>>54128623
Trying to implement an A* algorithm to find shortest path between two nodes on a map, shit was due two days ago
>>
>>54129916
>/dpt
This place is shit
>>
>>54129931
>/dpt/
I agree
>>
Dropped out from my IT program just out of an intense lack of any kind of interest in technology like that. I think I just mistook my enjoyment of vidya games, shitposting, and production/video making with somehow enjoying technology maintenance. I want to self-teach programming, but wondering what language to start with. I'm kind of between Java or Python but people also say Javascript is really important. Longterm it'd be really fun to do something working with games but does anyone hear work in coding? I just want to go to an office and put on headphones and make something and go home and shitpost while not having to worry about money.
>>
>>54130555
Javascript is shit, start with Java or C++ if you're one of the vidya types but I have to warn you if you're only getting into it because of vidya and aren't fascinated by programming in general you'll get bored fast
>>
>>54130598

I can understand that. I like the idea of just making things, and get a lot of satisfaction out of just being able to make something work/building stuff but that's been mostly stuff with bikes/cars/gunpla/random nicknacks working wtih my hands, but I haven't done anything with programming short of like maybe StarCraft and WarCraft maps back in the day which was incredibly fun for me.

Only way to know is to try really. I just need a direction to go. Is Lynda.com good? I was just going ot browse through their fundamentals of programming stuff and then start learning.
>>
>>54129916
>find shortest path between two nodes on a map
I code it in one afternoon in C++ despite not knowing C++. You should be ashamed anon.
>>
File: htt.webm (1 MB, 852x480) Image search: [Google]
htt.webm
1 MB, 852x480
Ask your much beloved programming literate anything (IAMA)

>>54129931
It's the best programming community on the internet (and the best subreddit of /g/)

>>54129874
Depends, they are still many studios that build their own engines, especially the japanese ones.

>>54129186
Subscribe to /r/gamedev and/or read the wiki

https://www.reddit.com/r/gamedev/wiki/index

>>54129064
>leave
>ret

Take care, leave may be implemented in microcode now and thus being slow.

>>54128682
Read sicp ?
>>
>>54131044
Why haven't you killed yourself yet?
>>
>>54131044
Parents are pushing me to do a course so I'm just going to do some little 6 month thing for a certificate since that's how it works in Australia.

I've got a choice between webdev and IT networking.

What's not going to be a waste of time and at least teach me fundamentals that I could use to get a better basic grasp of how computers work to later translate that to some software dev course?
>>
File: packofloli.webm (75 KB, 800x450) Image search: [Google]
packofloli.webm
75 KB, 800x450
>>54131086
Error killself ()
{
return ERROR_NOT_IMPLEMENTED;
}


>>54131109
Webdev is more oriented to programming than it networking but take care is not that cheap class mostly about css + html with a little javascript/php
>>
>>54131180
Fix your english, shithead
>>
>>54128910
nigga what
>>
>>54131336
what are those

hormones?
>>
>>54131344
of coursh
>>
wtf, anon. I don't know what to do and that feeling killing me. What to do? Is there any interesting projects anon can participate in?
>>
>>54131336
>keep out of reach of children
>>
>>54131344
It's a chemical castration agent.
>>
>>54131044
Suggest to me a small sized project doable in the C programming language.
>>
>>54131840
average 2 ints
>>
>>54131840
Holocaust Simulator
>>
>>54131851
double avg(int a, int b) {
return (a + b) / 2;
}


>>54131853
int holo() {
return 6000000;
}
>>
File: 1460726507869.jpg (90 KB, 1366x768) Image search: [Google]
1460726507869.jpg
90 KB, 1366x768
From where can BIOS interrupts be called? Do they have to be called from the kernel-mode, or can they be called from the usermode?
>>
>>54131853
This isn't as stupid as I think you wanted it to be.
It could be a small text-based management game. You could even do it tastefully.
>>
>>54131894
Holy shit, the resemblance is uncanny
>>
File: images (12).jpg (12 KB, 225x225) Image search: [Google]
images (12).jpg
12 KB, 225x225
>>54131943
I'd love to see some creative text based game where you select how many kikes you wanna end as well as your preferred method of execution.
You'd have a limited amount of time and resources and would have to find the best ways of getting rid of 6,000,000 of them.
>>
>>54131840
that guy again... lel. maybe should you stop programming if you are that bad ?
>>
Is python the best programming language?
>>
>>54132022
Maybe you should suggest to me a small sized project doable in the C programming language?
>>
>>54132027
No
>>
File: makeapoo.png (546 KB, 629x454) Image search: [Google]
makeapoo.png
546 KB, 629x454
>>54132031
> suggest to me
Pajeet spotted
>>
>>54132065
It's proper English retard.
>>
>>54132075
It's not idiomatic though.
>>
Java is a great language with a well defined structure and beautiful design patterns. You should all give Java a try you will enjoy programming in Java
>>
>>54132155
Sometimes I like to mix things up instead of typing with the same mannerisms. Still waiting on those suggestions.
>>
>>54132075
are you pajeet or not ?
>>
File: 1399960207051.png (50 KB, 320x442) Image search: [Google]
1399960207051.png
50 KB, 320x442
>>54132164
>beautiful design patterns
Go home, Pajeet.
>>
>>54132179
Why don't you suggest a small sized project to be written in the C programming language and find out.
>>
>>54132180
Here at Oracle we love for you to try our beautiful language. Give it a try guys and enjoy programming you will get all the women, money, and all your dreams come true programming in Java
>>
how do GUI frameworks handle coordinates at different screen resolutions?
percentages?
a "standard" resolution and then scale each coordinate accordingly?
>>
File: not_today.webm (1 MB, 720x404) Image search: [Google]
not_today.webm
1 MB, 720x404
>>54131257
Sorry. Please don't bully.

>>54131840
Programming idea generator (´・ω・`)

>>54132164
>well defined structure
I have found at least one serious flaw in the java standard.
>>
>>54132339
(´・ω・`)
>>
>>54132212
Honest question, I'm a noob trying to get into android development (both hybrid and native)
What's wrong with Java? Why is there so much hate on it?
>>
>>54132352
Forced OOP is probably the biggest flaw. OOP is awful.
>>
>>54132369
In the sense that it's too messy?
>>
>>54132352
It's a mess of a launguage, the way "Hello, world!" is written in Java is the perfect example of this.
But as an Android dev you just have to deal with it.
>>
File: 1460551913520s.jpg (5 KB, 250x143) Image search: [Google]
1460551913520s.jpg
5 KB, 250x143
Anyone need database/SQL help?

I saved this thumbnail for everyone at /dpt/.
>>
>>54132577
public class HelloWorld {
public static void main(String[] args) {
System.out.println("hello dpt");
}
}
>>
>>54132352
Java is the COBOL of the 21st century.
It's also borderline impossible to write without the IDE giving you suggestions every 10 seconds.

>inb4 hurr you can jest learn it
Really, so you remember off the top of your head exactly how to call arrayCopy? And under what circumstances you have to explicitly import its parent class?
>>
>>54132769
>It's also borderline impossible to write without the IDE giving you suggestions every 10 seconds.
I agree with your sentiment, but this sentence is just silly.

Some things you really want to know, like a type mismatch error, but other things you can easily squelch, like style issues.

It really depends on your IDE.
>>
>>54128682
float squareRoot(int x)
{
float *ret = (float*)&x;
__asm__ volatile(
"fild 0(%0)\n\t"
"fsqrt\n\t"
"fst 0(%1)"
: "=r"(ret) : "r"(&x)
);
return *ret;
}
>>
File: eDrWtKc.png (6 KB, 878x86) Image search: [Google]
eDrWtKc.png
6 KB, 878x86
>>54132769
>Really, so you remember off the top of your head exactly how to call arrayCopy?

Not Java, but any sane IDE for a language like that is going to look up the definition and tell you all of the possible overloads, with the parameters needed, and hopefully a note about input/usage.
>>
>>54132790
>>54132821
Yes, any sane IDE will fill in the blanks for you, because no single person is expected to remember the entire core Java class hierarchy.

The point is that you NEED an IDE, it's not just a helpful option, it's a fucking requirement.

Whereas plenty of people can write in almost any other language with just a simple text editor like nano or notepad, maybe looking up a man page for the odd function or two.
>>
>>54132769
>Java is the COBOL of the 21st century.
you don't even know what cobol is.

you are confusing the java programming language with the standard library of the java platform.

>Really, so you remember off the top of your head exactly how to call arrayCopy?
are you really this mediocre ? for comparison, how would you copy an array in C or rust ?
>>
>>54132909
>you are confusing the java programming language with the standard library of the java platform.
>The standard library is not part of the language.
They are deeply intertwined idiot. Criticising the standard library is a valid criticism of the language as a whole.
I don't know about you, but I don't know of anybody writing freestanding Java programs.
>>
>>54132880
How is looking up a man page or a function any different than an IDE giving you that information immediately, at-a-glance?

Say the language lets your simply use the function incorrectly, and it doesn't error out. Now you've got undefined behavior and no error/exception to help you trace an issue. Why would you prefer this? It's unsafe, and leads to longer development time in the best case, and fucked up applications in the worst case.
>>
Javafx snake game. How would I implement the tail? Somehow with array lists?
>>
>>54132791
>undefined behavior
>>
>>54133030
Are you talking about the cast ?
>>
>>54132909
COBOL is "enterpriseâ„¢: the language", Java is the sequel, everyone can't wait for the final instalment of the trilogy :^)

>for comparison, how would you copy an array in C or rust ?
Literally memcpy(). The point is, I don't need to know what library or class it falls under, you use it with just the function name.
If I were using arrayCopy() a lot without any offsets, I'd be tempted to just write a convenience method just to get around the godawful signature:
public static void arraycopy(Object src, int srcPos, Object dest, int destPos, int length)


>>54132931
Because man pages/web browsers are universal.
I don't need a specific version of firefox (or chrome etc.) to look up the differences between strcmp() and strncmp().
But if I'm using a workstation that has visual studio and not eclipse, I guess I'm shit out of luck for working on anything java related today.

Installing GB of tools just to have basic text editing ability in one particular language should not be a requirement.
>>
>>54133049
You also don't need any specific version of Firefox (or Chrome etc.) to look up the definition of arraycopy.
>>
>>54133049
Well, again, I'm not speaking from a Java perspective, but C# at least has portable lightweight tools.

If I'm on another machine for some reason and I need to hack something out, Visual Studio Code fully supports IntelliSense, debugging, and compiling on any desktop. Code is like 20MB.

As far as Java goes, I'm uncertain what decent lightweight tools there are, but I know it's trivial to load the Java plugin into Visual Studio and go from there.
>>
>>54132929
>They are deeply intertwined idiot. Criticising the standard library is a valid criticism of the language as a whole.
Nope because, contrary to c/c++, the java programming language doesn't have a standard library. it's the java platform which has a standard library, it's very different (for example, android support java but not the java platform). You are confusing everything, it's embarrassing.

>>54133049
>COBOL is "enterpriseâ„¢: the language"
Cobol was made to replace typewritters in administrations and was actually liked by the programmers of that era. It's a good language for text data processing.

>Literally memcpy(). The point is, I don't need to know what library or class it falls under, you use it with just the function name.
1. memcpy doesn't even copy an array.
2. you still you need to know in what include file memcpy is defined and what is the signature.
>>
>>54133190
Lolwut
>>
>>54133190
take it easy man
>>
>>54133228
>get bananed for putting "fuck off to >>>/g/wdg pedro" in a /dpt/ OP
>literal faggotry like >>54131336
>>
>>54133049
>If I were using arrayCopy() a lot without any offsets
array.clone()
>>
>>54120778
muh """"""""text editor""""""""
>>
>>54133273
Why do u kare bruv lol relax
>>
>>54133191
>2. you still you need to know in what include file memcpy is defined and what is the signature.
There are only a small handful of C headers you need to remember. Most are very niche or are completely trivial.
<stdio.h>, <stdlib.h>, <string.h>, <tgmath.h>/<math.h>, <inttypes.h>/<stdint.h>, and after that, shit gets too niche/trivial.
>>
>>54133318
So your argument is "Java provides too many batteries, I can't remember all of that and that is Java's fault/problem".
Apply yourself, even fucking Pajeet manages to do that.
>>
>>54133318
the same can be said for the java standard library. and the documentation is excellent, you can look up any niche shit in minutes
>>
>>54133318
you could say the same for java
>>
>>54133318
If one would want to copy an array in c, he would not find the answer in the standard. You first have to find memcpy, which is not about array, then how to use it to copy two arrays.
>>
File: laeYgMM.jpg (625 KB, 2448x3264) Image search: [Google]
laeYgMM.jpg
625 KB, 2448x3264
What is virtual mode in CPUs/programming?
>>
>>54133545
virtual memory ? wikipedia is a thing.
>>
>>54133292
How could someone possibly hate sublime text?
>>
>>54133667
Because it got popular.

Haven't you seen the trend around here?

It's some sort of 3rd reverse hipsterism that kind of circles back to just essentially be "It's popular so it must be shit."
>>
>>54133667
no free as free beer
not free as freedrom
poor quality product

who the fuck would pay for that piece of shit of software when you could have vim, emacs, atom, brackets, ... for free ?
>>
>>54133747
>not free
It's winrar free.
>poor quality
since when?
>>
>>54133729
>post-post-post-ironic
>>
I already have experience with C and Javascript
What's a good resources for learning C#?
Preferably with some exercises for practice.
>>
>>54133545
That steak is undercooked. You should sue.
>>
>>54133851
And it's not even covered in catsup! What kind of rinkydink operation are they running there?
>>
>>54133667
i hate smug linux tards that feel superior for not using IDEs when they really are using "text editors" that are practically IDEs
>>
>>54133810
>since when?
since it's an abandon ware with a new feature every six months.
>>
>>54133825
>What's a good resources for learning C#?
Murach's.

Plenty of pdfs on Google.
>>
>>54133895
>a new feature every six months
>abandon ware
i don't think that means what you think it means
>>
File: browser #113.png (2 MB, 1680x1050) Image search: [Google]
browser #113.png
2 MB, 1680x1050
how to make my 4chan viewer suck less?

also, here's a list of the currently most common words on /g/:
the a to i and you it is of that for in on with have not but my are this just if it's be or as your like can they what do use so get at don't no from all an was i'm about how one more some shit will up me because out good would want there even only know when has than any why using people their now really by need them also make still time then which you're should linux better new fucking much other something go windows that's 2 doesn't think way work too same 10 1 com fuck could pretty does got though here can't 3 into g thing actually its phone who had well see most software right used these back sure over https i've we off 5 c look being http going install those he been ubuntu www probably where intel anything best never getting things did buy years thread isn't try very everything free service run since point they're case made around amd open find server there's 0 every post old stuff already first watch am without os might nice enough before computer yes maybe mean 4 system day looks anyone take many few lot source x end hard nothing users file running down own trying power bit anon while money were after someone bad learn game yeah didn't 6 put doing laptop 7 keep reason thanks literally ever through always fine android instead less different code dont problem read say i'd looking having headphones great screen two little support web search google data java price music games works etc else kind least desktop i'll user year battery easy another pc long job his meme wrong build again microsoft play what's version cpu idea full either big 8 site makes performance please worth help give won't both debian shitty im v 100 upgrade audio arch cheap guys market card yet care once retarded making such us said quality aren't feel lol sound high yourself set basically gnu life guess single ago html tell start seems come name everyone found able files whole e next real
>>
>>54133953
make it open source
>>
>>54133953
>Most common words
Linux is the most common proper noun, lel. Do that for other boards.
>>
>>54134005
this

>>54133953
if you don't go open source your browser will be forever shit
>>
>>54134009
kek. here's links to the newest posts which mention linux:
>>54134009 >54133953 >Most common words Linux is the most common proper
>>54133990 >54126942 >Linux has holes BIG FUCKING WHOOP I wish I was
>>54133953 how to make my 4chan viewer suck less? also, here's a list of t
>>54133886 >54133667 i hate smug linux tards that feel superior for not u
>>54133843 Linux is bigger botnet than Windows. This was known for ages.
>>54133827 >54132182 >Remember when Linux used to look like shit because
>>54133770 I really want to move over to Ubuntu as my desktop OS from Window
>>54133759 Running basic-bitch Raspbian on my Raspberry Pi 3 Model B. Made m
>>54133753 >54128213 You know that these people have an on search engine
>>54133705 Hi, following situation: I'm running a W10/Ubuntu dual boot w
>>54133679 I'm thinking of switching to chromium (on GNU/Linux). Is it just
>>54133677 >54133620 >unbased claims Arch Linux *does* let 'python' poi
>>54133655 FAKE THREAD, IT'S CALLED "GNU", NOT "LINUX"! REAL THREAD >5413
>>54133600 >54132676 I need hard proof on that, not speculations. >541
>>54133595 Why there isn't a decent image editor for linux? pinta is nice
>>54133543 >54133405 I doubt that's ever going to be the case, only Arch
>>54133470 >54132998 >If you are serious about switching to Linux, use it
>>54133428 >54133035 Correct answer: Linux Easymode: OS X Rot in hell
>>54133418 Real talk niggas How many of you Linux users are virgins?
>>54133398 >54132760 It's pretty damn good. Stop being so autistic and di
>>54133235 >54129196 >be actual UNIX same as Windows 10 is actual LINUX
>>54133078 >54126603 Reprogram the entire OS live into a GNU/Linux distro
>>54133043 >54129086 Name ONE(1) thing that a GNU/Linux KVM can't do that
>>54133007 >54129706 No, you were trying to justify why it's ok for it to
>>54132999 Android 5 and Arch linux
>>54132998 previous thread >54122565 If you are serious about switching t
>>
wtf why is retarded so low on the list. We say it like every comment.
>>
>>54133572
No, it has nothing to do with virtual memory you dumb pretentious piece of shit.
>>
File: retard.png (320 KB, 1680x1050) Image search: [Google]
retard.png
320 KB, 1680x1050
>>54134071
idk, but here's all 132 instances of "retard" on /g/:
>>54134071 >>54134057 >>54134032 >>54134030 >>54134023 >>54133953 >>54133930 >>54133896 >>54133836 >>54133814 >>54133795 >>54133749 >>54133543 >>54133527 >>54133522 >>54133499 >>54133415 >>54133345 >>54133275 >>54133248 >>54133222 >>54133190 >>54133146 >>54132984 >>54132966 >>54132909 >>54132891 >>54132850 >>54132799 >>54132762 >>54132736 >>54132716 >>54132708 >>54132674 >>54132493 >>54132400 >>54132377 >>54132230 >>54132214 >>54132206 >>54132123 >>54132078 >>54132075 >>54132024 >>54132019 >>54131969 >>54131685 >>54131644 >>54131642 >>54131538 >>54131520 >>54131443 >>54131410 >>54131143 >>54131134 >>54130928 >>54130492 >>54130452 >>54130297 >>54130051 >>54130049 >>54129954 >>54129911 >>54129891 >>54129744 >>54129542 >>54129504 >>54129411 >>54129303 >>54129129 >>54129036 >>54128722 >>54128639 >>54128610 >>54128604 >>54128531 >>54128530 >>54128479 >>54128020 >>54128018 >>54127799 >>54127779 >>54127682 >>54127318 >>54127168 >>54127127 >>54126931 >>54126678 >>54125859 >>54125805 >>54125605 >>54125579 >>54125141 >>54125017 >>54124701 >>54124652 >>54124365 >>54123947 >>54123915 >>54123885 >>54123460 >>54123442 >>54122910 >>54122742 >>54120875 >>54120581 >>54120325 >>54120160 >>54120092 >>54119881 >>54119446 >>54118559 >>54118466 >>54118355 >>54117973 >>54117487 >>54116203 >>54116000 >>54115674 >>54114834 >>54114025 >>54113638 >>54113247 >>54111808 >>54111753 >>54106946 >>54101407 >>54100354 >>54098854 >>54091676 >>54089278 >>54088173 >>54085303 >>54084931
>>
>>54133729
>>54133812
y'all might want to read up on dialectical materialism - this has to do with its basic laws: the law of the unity and conflict of opposites, and the law of the negation of the negation.
https://en.wikipedia.org/wiki/Dialectical_materialism
>>
>>54134142
>Dialectic Materialism
Did you fuck up and not realize this is /g/, not /lit/ or whatever Marxist shithole you regularly post in?
>>
Have any of you done the Eudyptula challenge?
>>
>>54134261
Haven't done that but I've done your mum
>>
>>54134186
if you want to repel the enemy, you're better off understanding how they think
that's first

second, _some_ inventions/ideas work regardless of the politics of their creator
like, eschewing jet planes because Nazis invented them would be stupid

it's different with philosophy of course, yet it's a good idea to keep that in mind
>>
>>54134261
No, but who would? That pretentious faggot who wants you to send an email to him in a particular format, fuck him. Just release the challenge.
>>
>>54134009
ok, here's one other one. can you guess the board, based on these words:

i the a to and you of in it that is my for but me have with are like this be not just was on your they so no do or if as i'm all don't at get about what can he out because up it's people one would she her who even how an will shit from more some want know really good when fucking them think only now we time fuck there had never why go you're by too white then life being any his other their than here still off feel make girl has can't much were something also most though got could love women day girls him actually see that's school into going right been did every back am post years anything someone didn't i've gf probably pretty way over well doesn't anon work 10 take thing better ever these very guys say tfw its thread look after should where own male same always friends race things first anyone need nothing find bad job which sex intp guy those im live op i'd myself before year give yourself nice tell long black around watch kill lot doing money few hate else world made while yeah 5 since real i'll man men literally again 2 little s thought down isn't kids does dont talk stuff maybe best hard least date anime many care us person 3 talking sure everything our fucked last said please asian everyone makes drugs friend point they're enough two keep without robot looks play guess getting class social might he's stop try big old having high 4 come trying another oh kind hair 1 great normie depressed chad there's end times bit self com stupid face use thinking fun house until home through looking start original mean head next grade yes faggot cute once remember family qt already started wouldn't robots die hope mental different new put female name car either wanted personality reason let full rolling depression true away 7 making used https college anyway she's u living dick www feels normies desu completely roll parents fat help read each place woman god music far happy both 6 cool wrong
>>
>>54134313
r9k
>>
>>54134313
yeah, smells like robots to me
>>
>>54134285
I know the dialectic a little. It makes some sense upon first view, but the implications make very little sense. Nothing is so simple and deterministic. So I know it's flawed.

>>54134313
>she women girl
/r9k/
>>
>>54134313
> I is the first one
>KEK

r9k undoubtably
>>
>>54134283
This board is 18+
>>
>>54134432
Your mother likes 'em young, huh?
>>
>>54134295
I guess the whole kernel developer mailing list are pretentious faggots then.
>>
>>54134453
Yes. They think they're hot shit because they're so close to the metal. Kernel isn't even the lowest ring. Cucks^2
>>
>>54134354
>>54134363
>>54134369
>>54134386
gj. /r9k/ it was
>>
File: vGxtwny.png (59 KB, 721x722) Image search: [Google]
vGxtwny.png
59 KB, 721x722
>>54133953
>>54134105
Filter out common words, nerd.
>>
>>54134432
This board is not 18+ actually
>>
File: words.png (63 KB, 598x575) Image search: [Google]
words.png
63 KB, 598x575
>>54134535
but what exactly is a common word? I spy a few words on your list that I'd consider "common."

browser #113 does have the option to exclude a list of words from each thread's word list, but not the board's word list.

the|be|to|of|and|a|in|that|have|i|it|for|not|on|with|he|as|you|do|at|this|but|his|by|from|they|we|say|her|she|or|an|will|my|one|all|would|there|their|what|so|up|out|if|about|who|get|which|go|me|when|make|can|like|time|no|just|him|know|take|person|into|year|your|good|some|could|them|see|other|than|then|now|look|only|come|its|over|think|also|back|after|use|two|how|our|work|first|well|way|even|new|want|because|any|these|give|day|most|us|back|after|use|two|how|our|work|first|well|way|even|new|want|because|any|these|give|day|most|us|let|i'm|can't|don't|didn't|doesn't|isn't|is|am|are|was|why|had|has|been|does|did|too|were|else|being|really|those|thing|should|where|got|doing|going|yeah|oh|here|http|https|www|com
>>
>>54134587
you are wrong. the whole website is 18+. read the general rules.
>>
>>54134590
>but what exactly is a common word? I spy a few words on your list that I'd consider "common."
I'm still tuning.

Personally, this is a manual process as I examine the data and massage it to get meaningful output. There are still some words I'd like to filter out, but I'm on the fence.

'could' would be the first on this list I'd put on the chopping block.

Then you have interesting letter combinations that a rudimentary parser wouldn't discern, like 'C#'.

The only other choice is to use a library or API of suggested common words.

Soon, I'll be integrating into Microsoft's Linguistic Analysis APIs to help determine parts of speech to say what's significant and what isn't.

Pic related.

>>54134587
Look at the global rules, retard.

https://www.4chan.org/rules#global2

>I forgot how to link rules
>>
>>54134646
>>54134655
You got me
>>
File: Untitled.png (455 KB, 651x638) Image search: [Google]
Untitled.png
455 KB, 651x638
>>54134535
>>54134655
I was just comparing your list to mine. I'm guessing you count multiple instances within a single post. I think that's a mistake, because someone could repeat a word over and over, which throws off the stats.
>>
How do we stop the botnet?
>>
File: JfWAQLc.png (16 KB, 346x354) Image search: [Google]
JfWAQLc.png
16 KB, 346x354
>>54134704
>I'm guessing you count multiple instances within a single post. I think that's a mistake, because someone could repeat a word over and over,
Interesting, I may consider reworking to include both as options.

Currently, the thread is broken down into one huge list, and parsed from there.

This is necessary to perform the automatic post generation.

However, for the stats, I can definitely see the value in "# of posts using this word" as opposed to "occurrences of this word".
>>
>>54134587
reeeeeeeee literal underage retarded pythonbabby faggot
>>
>>54134763
https://vivaldi.com/?lang=en
>>
>>54134790
19 and use java, just thought /b/ and some others were the only 18+ boards because of the age check pop up.
>>
>>54134790
you should not make fun of python, it's childish, and python is actually a great programming language.
>>
>>54134806
i think a popup is required by the law for anything with porn.
>>
Hey /dpt/ what would be a better introduction to Programming? C++, Python, or Java? I'll admit that a driving force was being able to make video games but just being able to make anything would be fun and I want to start off on the right foot.

Also how hard is it to "make" a program? LIke even something like making Snake, or an idea generator.
>>
>>54134823
>python is actually a great programming language
no it's not
>>
>>54134850
then why i am doing great things with it ?
>>
>>54134848
java and then C++

or C++

absolutely don't start with python, especially not if you want to make games

it's not hard but it takes some weeks/months/years to learn
>>
>>54134823
It's easy but it doesn't make it a good programming language
>>
>>54134846
I think you're wrong.

Have you ever actually been to a porn site? I'm pretty sure very many (if not most) do not use popups.
>>
>>54134872
you're delusional

your website scrapers and whatever fag shit you're doing aren't that great
>>
File: sicppatt.jpg (66 KB, 800x534) Image search: [Google]
sicppatt.jpg
66 KB, 800x534
>>54134848
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/
>>
>>54134907
y-you shut your whore mouth
>>
>>54134900
not necessary a popup but a visual warning or asking the user to confirm he is adult.
>>
>>54134900
>>54134846
>>54134958
found this http://www.xxxlaw.com/articles/warning.pages..html
>>
>>54134932

Thanks friend, I just ended up downloading Lynda's "Fundamentals of Programming" and was gonna spend an hour a day on that. Then transition to an actual language. Thats probablymy biggest worry, making sure I write code properly and understand the lingo so I'm comfortable with learning syntax and shit.

>>54134877
Alrighty. Yeah I wouldn't even say I'd exclusively do it to learn games but 5-6 years down the line that'd be something fun to do. Really I just want to make stuff because it sounds way more fun then IT work.
>>
>>54134958
Right.
I no expert on the matter, but I think if you go to the top 10 or 100 porn sites, most will NOT have such a warning.

On the other hand, I do routinely block scripts and ads and such.
>>
File: 1457608123320.gif (3 MB, 355x200) Image search: [Google]
1457608123320.gif
3 MB, 355x200
spent 3 hours trying to get some terrible c library working in python to unzip a file, only to realize that .001, .002 files arent compressed just the file itself split into parts.
then 2 hours after that trying to get ffprobe to read from a pipe only to find out that it won't work on partial files.

just kill me now, time for fucking dark souls.
>>
>>54134988
> "Warning Pages are technically not required by law."

I stopped reading there. That's proof enough to me that warnings/popups are NOT required. So why does 4chan have one for the nsfw boards? I don't think it's for legal reasons.
>>
>>54134988
From that article:
>Warning Pages are technically not required by law.

Good to know.

It's basically just an extra line of defense to avoid a "Distributing Porn to Minors" charge.
>>
Guys,
Visual studio is a bloated pig that needs to get stuck. Seriously, microsoft devs are the type that relies on "it werks" instead of coding defensively.

>Templates
Endless amounts of templates which are filled in with crap. You can't even start with this shit without a template, because your appserver has no workable configuration defaults.

>Solutions
Why solutions? For the love of god, it doesn't make any fucking sense. Just set a dependency. No need to have a specific "master-project"

>Version control
HAHAHAHAHA PAY UP OR MERGE SOLUTION FILES

>IntelliSense
I actually like intellisense, but it's like sweets; they slowly rot away your teeth.

>Would you like to deploy to Azure?
>>
Java is the number one programming language deal with it
>>
>>54135057
>So why does 4chan have one for the nsfw boards?
4chan has one at the home page, actually. NOT just the pink boards.

I believe it occurs the first time an IP accesses the site.
>>
>>54135085
>IP
Actually, I think it occurs when there's not already a cookie set in the user's browser which signifies that they saw the message.
>>
>>54135067
Visual Studio has features that do what I want it to do. Some of these features are not available elsewhere all in one package.

Call me spoiled, but frankly I can't live without it anymore. It's the big comfy Cadillac of IDE's.
>>
>>54134142
>Materialist philosophy
Start over chap.
>>
File: TVwad6T.png (17 KB, 517x426) Image search: [Google]
TVwad6T.png
17 KB, 517x426
>>54135110
Aye.
>>
File: fdgdgdf.png (217 KB, 600x492) Image search: [Google]
fdgdgdf.png
217 KB, 600x492
>>54135067

>tfw I really like its debugger and how simple it is to use
>>
>>54131894
I copied your question into google and found the answer within two minutes.
>>
What's faster in most given languages on a search of some sort of data structure?

>NOT equal to 0
vs
>equal to 1

Assuming the data type is one bit.
>>
>>54135067
>HAHAHAHAHA PAY UP OR MERGE SOLUTION FILES
microsoft doesnt charge for working version control....right?
>>
>>54135333
I would assume "equal to" but that is such an insignificant performance question.
>>
>>54135333
don't worry about it
>>
>>54135333
You need to perform your own benchmarks.
>>
>>54135333
Nice 11-11 m1000
>>
>>54135333
I'd think the assembly instructions (je/jne, etc) would take the same amount of cycles either way.
>>
>>54135422
That said, it's my understanding that subtraction is faster than addition. So when looping, you should count down whenever possible.
>>
>>54129064
why are you posting this here dude you could literally use this expploit and sell it for many $$$$
>>
>>54129207
Don't even bother making GUI's in swing. It's pointless.
>>
>>54135168
is that a moth ? moths are dumb as fuck (like cats)
>>
>>54129207
>my teacher suks
is she hot?
I recall a teacher back in uni, reading some stupid course like OSHA
slutty blonde wearing tight leather skirt

aaah, memories
>>
File: out.webm (101 KB, 865x678) Image search: [Google]
out.webm
101 KB, 865x678
>>54128623
My latest shitty webgl experiment. Spotlight shader! The lighting is done in the vertex shader so it looks pixelated as hell. I stole the code off the internet but cleaned it up and worked through some bugs it had. I also created a reusable sphere class so at least I got that going for me.

Here's my shader:

attribute vec3 aVertexPosition;
uniform mat4 uMVMatrix;
uniform mat4 uPMatrix;
uniform vec4 uLightPosition; // in object coordinates
uniform vec4 uLightDirection; // in object coordinates
uniform float uSpotCutoff; // in degrees
varying lowp vec3 vColor;

void main(void)
{
vec4 lightPosition;
vec4 spotDirection;
vec4 ld;
vec4 vertex;
float angle;
vertex = vec4(aVertexPosition, 1.0);
gl_Position = uPMatrix * uMVMatrix * vertex;
spotDirection = normalize(uLightDirection);
ld = vec4(normalize(vertex.xyz - uLightPosition.xyz), 1);
angle = abs(dot(normalize(spotDirection), -normalize(ld)));
angle = max(angle, 0.0);
if (acos(angle) < radians(uSpotCutoff))
vColor = vec3(0, 0.5, 0); // lit (yellow)
else
vColor = vec3(0, 0, 0); // unlit(black)
}


It just computes the angle between the vertex and the lights current position, and if it's greater than the "cone" of the spotlight it's outside of the light. I need to add actual color processing and transfer this code to the fragment shader so I can finally work on the random asteroid code and the other objects.
>>
God damn learning android dev sucks
>>
>>54135702
cool

>>54135730
make games instead, normal apps are top bleh
>>
>>54135702
is varying replacing in/out ?
>>
>>54135702
glEnable(GL_NORMALIZE)
>>
>>54135872
deprecated as fuck

just normalize(vN) in the frag shader
>>
>>54135830
WebGL has it's own flavor of GLSL, so I believe the answer to your question is yes. A varying gets passed from the vertex to the fragment shader and interpolated along the way.
>>
>>54135872
What would this do? I wouldn't have to make any normalize calls?
>>
>>54135955
it's deprecated fixed function stuff with built in lighting
>>
>>54135702
>WebGL
disabled that shit ages ago and not going to enable it any time.
>>
File: Selection_001.png (39 KB, 731x274) Image search: [Google]
Selection_001.png
39 KB, 731x274
just installed loonix
send help
I don't understand why this wouldn't work
on windows I can compile just fine
>>
I feel like playing around with SFML, but I can't get this to work.
class Foo : public sf::Drawable
{
public:
Foo();
~Foo();
private:
sf::RectangleShape body;
virtual void draw(sf::RenderTarget& target, sf::RenderStates states) const
{
target.draw(body, states);
}
};
Foo::Foo()
{
body.setSize(sf::Vector2f(20,20));
}


g++ test.cpp -o test -O2 -std=c++11 -lsfml-graphics -lsfml-window -lsfml-system
/tmp/cc37qpfK.o: In function `Foo::Foo()':
test.cpp:(.text+0x52): undefined reference to `vtable for Foo'
collect2: error: ld returned 1 exit status

What am I doing wrong?
>>
>>54136108
How about / instead of \
>>
File: Selection_002.png (33 KB, 723x202) Image search: [Google]
Selection_002.png
33 KB, 723x202
>>54136168
thanks, that was it

now it.. uh, works-ish
>>
>>54136118
draw should not be private, that must be it. I can explain a bit the reasoning behind C++ not Doing What You Mean in this case if you want
>>
>>54136253
It's private in example shown here http://www.sfml-dev.org/documentation/2.3.2/classsf_1_1Drawable.php

And changing it to public doesn't fix that error.
>>
>>54136214
Fugg? What does this python stuff come from, given that you were doing GLFW C++ before?
Thread replies: 255
Thread images: 32

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.