[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 / qst / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Home]
4Archive logo
/dpt/ - Daily Programming Thread
If images are not shown try to refresh the page. If you like this website, please disable any AdBlock software!

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

Thread replies: 319
Thread images: 43
old thread: >>52577186

What are you working on, /g/?
>>
>>52581294
>299 replies
>>
>>52581294
stupid anime poster
>>
File: canyounot.png (10 KB, 666x157) Image search: [iqdb] [SauceNao] [Google]
canyounot.png
10 KB, 666x157
>>52581294
>>
>>52581315
>>52581339
>>52581367
looks like we're gonna have to post threads at 290 again
>>
figuring out the structure of my distribution architecture
its going to include support for keeping client software up to date and collecting bug reports
eventually i will extend it to host a P2P CDN client for serving images and videos to HTTP requests (so my http server doesn't have to serve it all)
my goal is to make the server transfer content from the main server to the CDN clients automatically based on parameters such as views in the latest hour or something like that, but it sounds like a pain to accomplish the actual transfering, keeping track of what files are and arent available on a client, verifying file integrity etc
>>
Why don't the Guile developers integrate Racket's wonders into their software, /dpt/?
>>
>>52581865
why not reusing bittorrent for the distribution? It has file integrity checks, unique identifiers for files, and smart transfers. Create your own private tracker and some kind of comms channel to set priority on files based on views/likes/whatever.
>>
How do I extract subtitles from a .mkv file using ffmpeg?
>>
>>52582118
open it with mpv with no X server running, and the subs will simply print to stdout.
Redirect stdout to a file.
Done.
>>
>>52582118
>How do I extract subtitles from a .mkv file using ffmpeg?
ffmpeg -i yourshittyanime.mkv -c:a n -c:v n -c:s copy subs.ass
>>
File: e.png (1 KB, 100x40) Image search: [iqdb] [SauceNao] [Google]
e.png
1 KB, 100x40
>>
>>52582044
dont have much experience with torrents except for actually downloading them
is it easy access a file/torrent and see exactly which clients are seeding/download etc?
>>
>>52582197
icle
>>
>>52582164
.ass?

Are you pulling my leg, anon?
>>
>>52582205
Seems like you have full access to everything from libtorrent: http://www.libtorrent.org/examples.html

you could also use clients such as Transmission that have HTTP APIs
>>
>>52582230
yeah why would I ever give helpful advice?
fuck off
>>
>>52582230
https://en.wikipedia.org/wiki/SubStation_Alpha
http://www.matroska.org/technical/specs/subtitles/ssa.html
>>
im making an rpg where you actually roleplay, and have no main questline.
everything is random.
everything is systems.
everything is beautiful.
coming out never, because
>i wont be able to move it past a text based python prototype without effort/others.
nothing worth sharing yet either, even.
s'funtho
>>
>>52582269
>>52582274
It was just a joke, gee wiz.
>>
>m-muh one hundred one!
>>
>>52582394

My my, you are an awfully insistent little shit, I'll give you that.
>>
Why do people say 'math' instead of 'maths'?

Mathematics has an 's' on the end, it should obviously be 'maths'.
>>
>>52582564
Are you sure it's not spelled with an extra U?
>>
>>52582564
>Mathematics has an 's' on the end, it should obviously be 'maths'.
You realize you are trying to dictate the rules of the english language right?
>>
>>52582598
only in japan :3
>>
>>52582564
Because Americans are inconsistent.

They remove letters to make things "easier" (read: ambiguous) and then add letters where they do not belong e.g. Legos.
Has anyone even read the label on a box of them before? It just says Lego. It's a Lego set. Each brick is not "uh Lego", it's a piece of Lego, like a piece of pie.
>>
Has this thread ever stayed on topic for more than 3 posts?
>>
>>52582655
related
>>
>>52582655
It's "legos" because lego has become a genericized trademark to refer to all brick toys.

"He's playing with legos" is perfectly valid english, you fucking autist.
>>
>>52582564
https://en.wikipedia.org/wiki/Mathematics#Etymology
>>
>/dpt/ - daily sperg thread
>>
>>52582717
>He's playing with legos
>implying girls can't play with legos too
>>
>>52582714
Were piggy banks invented to keep your pennies safe from Jews? You know, because Jews don't like pigs.
>>
>>52582717
Then why do the boxes say "Lego: 200 pieces" and not "200 Legos"?
It's like a pot of Play Doh. If you break it up into 10 bits, it's still just "Play Doh", not "Play Dohs".

Or maybe people have taken to saying "Play Dohs", but I wouldn't want to transform a language based on how soccer moms talk.
>>
>>52582717
full retard
>>
C-can we talk about actual programming stuff?
>>
>>52582655
>They remove letters to make things "easier" (read: ambiguous)

Bok-bok where are proofs?
>>
>>52582946
No because you fucking faggot went and made /dpt/ with trap image.
>>
>>52583041
That wasn't me, I prefer real 2D girls too.
>>
>>52583067

>real
>2d
Anon...
>>
>>52583121

Some of these people are too far gone.
>>
>>52583277
Not like you can talk, you are sexually attracted to gorillas.
>>
Rate my website, /dpt/.

http://localhost:1255/
>>
File: 1451754656606.png (17 KB, 418x359) Image search: [iqdb] [SauceNao] [Google]
1451754656606.png
17 KB, 418x359
>>52583318
>>
>>52583318
shit/shit
>>
>>52583328
Dumb frogposter.

>>52583343
At least tell me what's wrong with it, anon.
>>
>>52583301
I'm not gay but the girls he posts are pretty hot you have to admit
>>
File: 18211.png (98 KB, 400x300) Image search: [iqdb] [SauceNao] [Google]
18211.png
98 KB, 400x300
>>52583371
>localhost
>>
File: 1451779320598.png (20 KB, 418x359) Image search: [iqdb] [SauceNao] [Google]
1451779320598.png
20 KB, 418x359
>>52583371
>At least tell me what's wrong with it, anon.
>>
File: 1439672256292.jpg (114 KB, 640x1280) Image search: [iqdb] [SauceNao] [Google]
1439672256292.jpg
114 KB, 640x1280
>>52583301

At least they're female gorillas, and they're REAL.
>>
>>52583371
If you link someone a localhost url on the public interwebs and expect them to be able to see it you are 100% retarded.
>>
>>52583430
Notice how she has fake hair?

Nobody likes gorilla hair, not even gorillas.
>>
WHY DOES THE CAPTCHA KEEP ASKING ME TO SOLVE MORE CAPTCHAS?

REEEEEEEEEEEEEEEEEE
>>
>>52583430

On that note, I have learned from /pol/ that there is, indeed, a slur for white men attracted to black women that is not "coal burner". The term is "oil driller". Fancy that.

>>52583494

It's their way of saying "you solved the last one wrong, but we don't want to hurt your feelings."

>>52582946

In all seriousness, what are you working on?
>>
>>52583478

It's straightened, but it doesn't look like a weave.

>>52583715
>I have learned from /pol/ that there is, indeed, a slur for white men attracted to black women that is not "coal burner". The term is "oil driller". Fancy that.

Yes, that's true. That said, I don't think I've ever heard it outside of /pol/.
>>
File: americaBycolor.jpg (1 MB, 7129x3833) Image search: [iqdb] [SauceNao] [Google]
americaBycolor.jpg
1 MB, 7129x3833
k /g/ I am stuck

So when you are implementing r-tree in database you need 4 values for each entry

CREATE VIRTUAL TABLE demo_index USING rtree(
id, -- Integer primary key
minX, maxX, -- Minimum and maximum X coordinate
minY, maxY -- Minimum and maximum Y coordinate
);


My problem is that I have 16k gps locations (4k*4k), but the are not paired in squares.

Is there a way to automatize this?

To just get a script that will insert data and database somehow will figure out and sort 16k points into squares 2*2 gps points?
>>
>>52581367
why hasn't the admin set it up so this thread posts automatically?
>>
>>52583754
Because it takes the creativity out of the OP.

People should be coming up with new OP images instead of posting the same shit over and over, like this autist OP keeps doing.
>>
>>52582773
privilege fully checked
thank you my man :^)
>>
why python requires you to define an object as 'global' in functions to access global objects? shit is inconsistent too.

a = 0;
b = [];
c = 0;
def f1():
a = 1; #does not work, a is local
b.append(1); #magically works
global c;
c = 1; #also works

Am I missing something?
>>
I'm starting to learn Java for a data structures and algorithms class.

I'm a bit confused, though...
Nothing I've read so far seems to indicate that I can make class function definitions in a separate file from... I guess it's still called a header?

Does Java support separate header and implementation files?

>coming from a bg in C/C++
>>
How do I "patch" projects? Is it language specific or is there some general tool for it? A framework won't accept my pull request and I want an easy way to keep it up to date while adding in my code.
>>
>>52583860
There are no header files, no prototypes.
Java reads in everything to see what classes, methods, variables and objects exist, then runs through again to check if it can actually use all the intended calls.
>>
>>52583860
>Does Java support separate header and implementation files?
No
>>
>>52583860
>Nothing I've read so far seems to indicate that I can make class function definitions in a separate file from... I guess it's still called a header?

Java doesn't have headers. This is 1996, not 1976.
>>
>>52583874
>Is it language specific or is there some general tool for it?
It's called diff.
>>
>>52583912
>>52583934
>>52583944
Oh... ok then

Just needed to clear that up.

Thanks.
>>
>>52583827
google python scope
http://python-textbok.readthedocs.org/en/latest/Variables_and_Scope.html#more-about-scope-crossing-boundaries
>>
>>52583827
It's not inconsistent. You just can't assign and create variables in the global scope from within a function without declaring them as global. However, reading them is fine.

Think about this: the statement "a = 1" creates the variable 'a' in the current scope. Always. If the current scope is a function, it does not overwrite the value in outer scopes. So you have to explicitly tell Python to modify the variable in the global scope.
>>
>>52583955
Of course, thank you.
>>
>>52584006
>>52584017
oh, I see. You can access global items while reading them or calling a function of them but not while assigning something to them.

imho, still inconsistent.
>>
>>52584095
It's not inconsistent. Defaulting to local scope is the sane option. E.g., you import "import mymodule as m" and then in a function in the same file another developer writes "m = 3" inside a function. If Python wrote that value to the global scope instead of the local one, you would have that m is not a module but a number when the other developer's function executes. You would end up with weird-ass errors because of that behaviour.
>>
What are your guys opinion on QT for making windows based applications to do things for me? I want to make a simple GUI that has changeable options for users, and to write specific code to manipulate windows API windows.
>>
File: 1434541871638.png (1 MB, 500x1388) Image search: [iqdb] [SauceNao] [Google]
1434541871638.png
1 MB, 500x1388
Modding an old game, I need to write a function in it's C-based scripting language that takes a string and formats it into "flush left" text by inserting an "\n" sequence at the last available space of each line that would break a variable LineLength. How the heck do I accomplish this with very little access to premade string handling functions? Some guidelines, links or even pseudocode would be much appreciated.
>>
>>52584205
>What are your guys opinion on QT for making windows based applications to do things for me?

It works.
>>
>>52584233
Is it tribes?
>>
>>52584257
For once this tripfag is right.
>>
>>52584258
Nah, a source port of Doom.
>>
A gameboy emulator in rust.
Reading data sheets and banging bits is a refreshing change from all the FactoryInterfaceBeanClassPatternAbstractBean bullshit I do in my job.
>>
>>52584357
Tell us about your journey in Rust.
>>
>>52584357
for reference
https://github.com/mgba-emu/
>>
>>52584438
GBA emulator isn't too helpful. I've already looked at a few GB emulators before, but trying to avoid copypasta.

>>52584369
No.
>>
File: Betel_nut_beauty.jpg (53 KB, 320x480) Image search: [iqdb] [SauceNao] [Google]
Betel_nut_beauty.jpg
53 KB, 320x480
>>52584483
FUCK YOU FILTHY SHIT.
GO #1
>>
>>52584357
gb2canada
>>
>>52584483
Oh, whoops. Sorry, my bad.
I read GBA instead of GB.
>>
>>52583827
See
http://devnull.li/~jerojasro/blog/posts/python_closures_scopes/
Python follows the correct behavior for reading, but fucks up for writing. There is literally no reason you shouldn't just declare your variables first.
>local n = []
>var n = 0
Wow, much hard.
>>
>>52584233
>1. make a new char array
>2. copy chars from the old one until you hit LineLength
>3. insert '\n'
>4. if not done, goto 2
>>
>>52584855
>>
>>52584851
fail
>>
>>52584848
But ideally I want to search for spaces so no words are broken up by "\n". Which is the hard part, for me at least.
>>
>>52585041
once you hit LineLength, iterate backwards until you hit a space and then insert the '\n'
>>
>JITed VM
>Guest decides to modify code
>Native code buffer untouched
>Still executes old code
What is a JITed VM supposed to do in this situation?
>inb4 write protect code lol XD
No.
The x86 allows to modify code at runtime provided paging allows it, and QEMU and other VM's that do JIT compilation will have to deal with it, so how do they deal with it?
>>
>>52585154
Right. I'll try it, thanks.
>>
have you ever made your own 8 bit computer, /dpt/?

it looks like it would be fun.
>>
>>52585157
Does your host OS provide a function to alert when a page is modified? IIRC Windows does.
>>
>>52585157
The code still needs to flush the CPU cache after modifying instructions or else the CPU will execute old instructions in the cache.
>>
>>52585157
Watch for CPU cache flush instructions when you JIT?
>>
>>52585233
And what if caching is disabled?

>>52585219
No, but i made a 16bit and 32bit virtual computer once.
And I'm not posting them, the code is disgusting.
>>
>>52585275
see >>52585277
>And what if caching is disabled?
>>
>>52585277
There's always some sort of memory barrier after modifying executable code. If there isn't, nothing happens.
>>
>>52585219
32-bit SAYEH processor in VHDL.
It's not fun, it's not fun at all.
>>
>>52585326
16-bit, not 32. Regfile chucks out 32 but that's for 2 operands.
>>
File: life is a lie.jpg (8 KB, 203x125) Image search: [iqdb] [SauceNao] [Google]
life is a lie.jpg
8 KB, 203x125
Alright, I finally got off my lazy ass and started programming shit again. I'm fairly new at the more-than-simple stuff.

For now, I'm trying to properly learn Inheritance, composition, and all that OOP stuff. The composition of my objects are pretty simple, they only have a Coordinate class and a Sprite class set as public. The Coordinate class has methods to update the object's position and the Sprite has some methods to load and draw the object. Currently it just draws a rectangle because I didn't want to bother with loading random images.

The problem: right now my draw method takes coordinates. Is there a way to have it automatically take the object's coordinates without having to pass them as parameters?

Instead of doing:
Obj.sprite.draw(Object.coordinates.getX(),Object.coordinates.getY());

Which is a mouthful and also ugly, I'd rather just have
Obj.sprite.draw();

And let the method itself take the coordinates from the coordinate object present in Obj if it exists.
C++
>>
File: t5EQGM1rNb-8[1].png (17 KB, 300x250) Image search: [iqdb] [SauceNao] [Google]
t5EQGM1rNb-8[1].png
17 KB, 300x250
>>52584340
Fugg. You should mod Tribes to remove excessive skiing and mine-disking and animate the skybox or some shit.
>>
>>52585703
Oh and before anyone points out the Obj and Object there being different, that's my mistake. Object and Obj are the same.
>>
Is it possible to have a completely self-hosting compiler? I read that the first C compiler was written in C and don't fully understand how that's possible. Incremental compiling?
>>
>>52585768
no language is self-hosting the first time
you write the first compiler in another language and then you write a new one in it's own language
>>
>>52585768

First C compiler was written in BCPL.
>>
>>52585827
>>52585829
https://github.com/mortdeus/legacy-cc

So is this fake?
>>
>>52585722
write a draw() member of Obj that simply calls sprite.draw(coordinates.getX(),coordinates.getY()); and then just call that.
>>
>>52585704
>excessive skiing
NO
SUCH
THING

This is what I'm working on by the way. The only reason I have to do this stupid string formatting thing is to make dialogue choices clickable rather than having to use number keys.
>>
>>52585864

Copyright is 1972. First C compiler was a little before then. This may be the first self hosted one, however.
>>
>>52585970
???
>>
>>52585978
Upon further research it seems like what you said was right. The first C compiler evolved from a modified B compiler, which was originally written in BCPL.
>>
>>>/sci/ here, wanna teach myself a language for shits and giggles.
Mostly just looking at solving mathematical/programming problems such as project euler and rosalind.

I can write in pseudocode and a little bit of J/matlab/lua but never formally learnt any languages.

Which language would you recommend to a total beginner that's intuitive, extensible, and most importantly fun?
>>
>>52586003
Not consciously. I'd just looked up pics of (an)tarctic research stations as refs.
>>
>>52586070
>a little bit of J
The madman...
Mathematica or MATLAB if you mainly into math/science shit. If you want to learn something more general purpose, but has math and science functions built-in Python with numpy and scipy is good, or Julia.

I've been doing PE with Python, and it's fucking cheating.
>>
>>52586070
http://learnyouahaskell.com/

Example, find the sum of all the even-valued terms in the Fibonacci sequence which do not exceed one million.
fib a b = a : fib b (a + b)

main = print . sum . filter even . takeWhile (<1000000) $ fib 0 1


Simple, fun and intuitive.
>>
In common lisp, say I have an array.

How can I do so that if I try to aref outside of the bounds, I get a default value instead of an error ?
>>
>>52585326
This. Making it in something like mutlisim is much easier and more satisfying. Doing it in VHDL (if you want to do it right) gets monotonous quick and once you load it into a FPGA you can't do much with it.
>>
When should I bother using Boost when playing around in C++?

I'm thinking about making a program that fucks around with file directories, files and such. Should I use Boost Filesystem for that or look for other alternatives like say dirent that seem to be less heavy?
>>
>>52586288
You should use the POSIX file API. Don't fucking touch boost, it's a pile of shit.
>>
printf("hello world!\n");


You cannot get more elegant than that.
>>
Why is FILE all caps in C? It's triggering me and looks out of place with the rest of my code.
>>
>>52586332
puts("hello world!");
>>
>>52586288
>C++

Drop that bloated clusterfuck you fag. Learn C instead.
>>
>>52586332
>(
>\n
>)
>;
Disgusting.
>>
>>52585945
Is there any other ways?

I'm trying to make Obj have as little class-specific methods as possible, so I can make new objects easily and reuse code without problems.

If not or it's not easily done, I'll stop being stubborn and just make some friend functions like that.
>>
>>52586343
In the old time there was a thing called convention. And CAPS were reserved for typedef or #define (I'm old, I'm not sure). But you're too young and think that you can code with camelcase or pascalcase in C.
>>
Is anyone else doing paiza online hackathon?
Why aren't you winning your qt android gf's affection by earning clothes for her to wear?
>>
>>52586343
Probably weird legacy reasons.
>>
>>52586398
I code in lowercase and use CAPS for enums, typedef and #define is cancer.
>>
>>52581294
A way to take over the world and enslave all of humanity.
>>
>>52586439
Shut the fuck up kiddo. Conventions are not stupid.
>>
>>52586415
because ew and I'm not a lesbian
>>
>>52586459
Preprocessor macro hacks are not convention, keeping a consistent code format is. Look at K&R or the C standard and notice that all the code is in lowercase. How fucking retarded are you?
>>
>>52586360
>whitespace
>multi-letter function names
Disgusting.
>>
>>52586505
>>52586505
C ANSI is above anything in C. And C ANSI has fixed convention. Respect those conventions kiddo and shut the fuck up. It's not anarchy, it's code.
>>
>>52586524
Ifwhitespaceissodisgustingwhydon'tyouwritelikethis?:^)
>>
>>52586540
Did you even read what I just said?

>Look at [...] the C standard

Almost all typedef's are a consistent lowercase style except for FILE.
>>
>>52586524

>having a problem with multi-letter function names
Most letters are not descriptive of what a function does or what a variable represents. Single letters should never be used to name a function, and rarely be used to name a variable (in which case, convention should be followed -- w,x,y,z for coordinates; w,h,l for dimensions; i,j,k for loop counters; and n for a number of elements).

>>52586540

Are you a native French speaker? Because in English, we put adjectives and titles before nouns, not after them. C ANSI does not exist, but ANSI C does.
>>
>>52586603
It's a #define not a typedef. UPPERCASE are for preprocessor.

>>52586623
Yes I'm French.
>>
Is TC++PL 4e worth reading to learn C++ coming from java or are there better options?
>>
>>52586638
No it isn't.

glibc:
typedef struct _IO_FILE FILE;

BSD:
typedef    struct __sFILE { ... } FILE;

MSVC:
typedef struct _iobuf FILE;

musl:
TYPEDEF struct _IO_FILE FILE;
>>
i wish i wasn't a loser
>>
>>52586749
I said that I'm old. Maybe uppercase are for struct typedef.
>>
>>52586623
>Single letters should rarely be used to name a variable
I think they work pretty well for naming a variable that a function "works" on, where the type gives you all of the information you need to know.
void object_do_thing(struct object *o)
{
...
}
>>
>>52586758
It's fucking dumb that it's uppercase, though, and totally inconsistent with the rest of the standard.

size_t is a typedef, why isn't that uppercase?
>>
>>52586824
maybe because FILE used to be a preprocessor #define hack
>>
>>52586415
Are the problems interesting?
>>
>>52586875
From the standard:

>The header <stdio.h> declares three types, several macros, and many functions for performing input and output.
>The types declared are [...] FILE

It definitely wasn't intended to be a macro, it specifically mentions type.
>>
>>52586373
>any other ways
Pass the whole coordinate object (as an interface that provides getY and getX functions) to the sprite.draw. Or pass the whole Obj to the sprite, for some silliness.

That gets you down to one variable. Otherwise your options are friending/letting the sprite keep a reference to the coordinate or parent object.
>>
>>52586824
size_t is not ANSI C, size_t is shit.
>>
>>52586950
the standard only standardized what was common practice
maybe FILE predated making pretty typedef names like file_t
>>
>>52586950
The original C standard tried to standardise existing common practice. That's why there are several weird inconsistencies in the language. Stuff like SHRT_MIN instead of SHORT_MIN, functions they knew were complete shit like gets().
Perhaps FILE did used to be a preprocessor thing prior to ANSI C, but they made it into a type.

>>52586990
>size_t is not ANSI C
Yes it is, fuck face.
>size_t is shit
You're a retard. Do you think that using shit like unsigned long is portable?
>>
>>52585703
class Obj {

private Sprite sprite = new Sprite();
private Coordinate coordinates = new Coordinate();

public void draw() {
this.sprite.draw(this.coordinates);
}

}
>>
>>52587020
I just wish they would make a breaking change to fix the inconsistencies. I'm 10/10 rustled over this.
>>
>>52587020
>Yes it is, fuck face.
No it isn't. Read the standard. Size_t is modern. In the past it was int.

>>52587020
>You're a retard. Do you think that using shit like unsigned long is portable?
Shut the fuck up kiddo. We're not at the same level. I teach you what is C and you argue with me. Fuck off. I don't argue, I explain to a kid. You shut the fuck up and you learn.
>>
How do I code a program that outputs all the digits of pi?
>>
>>52587069
http://port70.net/~nsz/c/c89/c89-draft.html
>4.1.5 Common definitions <stddef.h>
It's right there.

>Shut the fuck up kiddo. We're not at the same level. I teach you what is C and you argue with me. Fuck off. I don't argue, I explain to a kid. You shut the fuck up and you learn.
So you're basically admitting that you're a retard who doesn't know anything?
>>
>>52587069
size_t itself is fine if you are iterating lists. I've noticed that compilers sometimes output shorter code when you use size_t or other unsigned types.
>>
>>52586990
>size_t is shit.

okie-silly-dilly-dokie-o.
>>
File: vfqtiv.png (341 KB, 934x688) Image search: [iqdb] [SauceNao] [Google]
vfqtiv.png
341 KB, 934x688
A C++ IRC library based on Boost with "ease of use".

What I want is whomever may be using it to just create a client object and have a simple interface to send data, get client data, and operate the client with. I'm also going to try and make sure that it's thread-safe and whatever a good async C++ library should be.

It's also part of my senior high-school degree (not sure if that is the right term), so it's programming with benefits.

Going pretty neato. It's fun.
>>
>>52587088
wget https://www.angio.net/pi/digits/pi1000000.txt
cat pi1000000.txt
>>
>>52585970
>>excessive skiing
>NO
>SUCH
>THING

Tribes 1 wasn't balanced for skiing. It was a bug/exploit. The most fun I had with the game was the first couple years after it came out, when it was the greatest game ever made.
>>
File: 1441684460338.jpg (92 KB, 1280x720) Image search: [iqdb] [SauceNao] [Google]
1441684460338.jpg
92 KB, 1280x720
>>52587115
>C++ IRC library based on Boost
>>
>>52587069
Are you an idiot? This is taken verbatim from the ANSI C standard.

>The following types and macros are defined in the standard header <stddef.h> . Some are also defined in other headers, as noted in their respective sections. The types are
> ptrdiff_t
>which is the signed integral type of the result of subtracting two pointers;
> size_t
>which is the unsigned integral type of the result of the sizeof operator; and
> wchar_t
>which is an integral type whose range of values can represent distinct codes for all members of the largest extended character set specified among the supported locales; the null character shall have the code value zero and each member of the basic character set defined in $2.2.1 shall have a code value equal to its value when used as the lone character in an integer character constant.
>>
>>52587097
That's a fake. That's not the standard.
>>
Alright let's get this started, going to write code compact code to fit the post so don't get triggered.

Let's say that I have, for the sake of simplicity, a class like that :
public class Action {
public virtual void DoIt(){
//do some basic stuff
}
}

and a bunch of children like
public class Child1 : Action {
public var SomeParameter { get ; set }//var for simplicity posting
public var SomeOtherParam { get ; set }
public override void DoIt(){
base.DoIt();
//do its stuff
}
}

public class Child2 : Action {
//this guy can have another number of params or no params at all
//override etc.
}


I know what you're going to say but I'm not using methods because the parameters are inconsistent and even I at this point don't know how many of them the next child will have.
I'm currently using that because in another class I just want to be able to, say, store all actions in a collection, have a reference to whatever should be running this frame and just fire currentAction.Run(). Changing the action is just a currentAction = collections[id].

It works and once I'm done with a class I pretty much never have to open it anymore, but I'm wondering if there's a -better- way to do it because I feel like I'm getting lots of classes that do little with that system.
>>
>>52587125
That's not all the digits of pi.
>>
>>52586459
>>52586540
>>52587069
>>52587097
>kiddo
>>
>>52586638
>>52586540
>C ANSI is above anything in C

>encore ce con

Listen: the modern C standard version isn't even compatible anymore with ANSI C, how old are you, 65 ?

>>52586415
I wish but I can't read japanese, and trying to guess what the problems are from sample input/expected output is just putting a toll on my brain.
>>
>>52587069
then why does it compile with -ansi
>>
>>52587163
It only takes 70 digits of pi to perform calculations accurate down to less than 1 planck length.
I can guarantee you you don't need more accuracy than that.
>>
>>52587130
>It was a bug/exploit.
Yes but one I had more fun with than without. Like strafe and/or rocket jumping in Quake.
>>
I have no clue why this is breaking.

It looks like sscanf is modifying the input string (prompt) when it's supposed to not touch that.
>>
>>52587181
i'm using google translate
it's not difficult to figure out what they want

>>52586887
I've only done two, but the hardest one ive done so far is locating a 2D bitmap within a larger 2D bitmap and returning it's location
>>
>>52587156
This seems reasonable.
>I'm getting lots of classes that do little with that system
What do you mean?
>>
>>52587202
But a need 233 bits in the mantissa to store that ='(
>>
>>52587088
https://en.wikipedia.org/wiki/Approximations_of_%CF%80
learn yer maths
>>
>>52587246
>What do you mean?
Well, I just have a bunch of children that just do nothing except that override, which is intended but...
I don't know, I'm well aware of the one class one responsibility war but somehow I feel like I'm just creating classes with little code and I always wonder if it's not overkill.
>>
>>52587088
it's literally impossible
>>
>figured out how to use opensl es for android (imo you should have at least intermediate programming experience to do this without huge asspains)
>now i want to synthesize my own game music
>have no idea how long it's going to take to get a great result if i can even succeed at all
the work just keeps on piling up

at least i'm learning things
>>
File: ree.png (447 KB, 567x748) Image search: [iqdb] [SauceNao] [Google]
ree.png
447 KB, 567x748
>>52587125
Just did a quick search for sequences below 100,000.

Any particular reason why 14523, 17125, 22801, 33394, 36173, 39648, 40527, 96710 can't be found?
>>
>>52587421
like maybe a frequency modulation or phase modulation synthesized bassline combined with a more advanced and "deliberately composed" version of https://www.youtube.com/watch?v=MqZgoNRERY8
>>
File: 1444708383711.png (61 KB, 1033x305) Image search: [iqdb] [SauceNao] [Google]
1444708383711.png
61 KB, 1033x305
Fleshing out my new instruction set encoding.

Should I just get rid of those set bit sin the flags?
The idea behind it was so I could avoid wasting cycles on reading memory I didn't need when decoding, but would the extra bitwise flag checks and conditionals in the decoder just slow it down even more?

I might need the first two bits so the machine doesn't retrieve and store registers when it shouldn't.
>>
>>52587450
>mantissa
pi isnt random
>>
>>52587339
Its an understandable feeling, but what you are doing is good. The one thing I would caution is that doIt() is a very general term ("its a class that does things") so there is a temptation to start using the Action class as an alias for any void function.
>>
>>52587515
>pi isnt random
But someone told me every single movie ever made is in pi.
>>
>>52587602
Yeah but I just used generic names for the sake of simplicity in the post. Most of the time I use common names like Run(), Execute() or Init() depending on the task.

After reading myself I don't understand why I feel bad for using a class somehow properly, that's kind of stupid. Feels like it's because I'm reading too much bloated classes here and there.

Anyway thanks.
>>
>>52587708
that isn't guaranteed
>>
How would I go about programming a music streaming server?

Pretty much I want to make a small app for my own use, to connect to my home PC and stream my music. Ignoring how to build the app, how do I make the actual streaming part of the server application?
>>
>>52587708
i don't think anyone really knows. pi has infinitely many digits (i don't know if even that has been proved but i guess it has) but that doesn't necessarily mean you can find all possible sequences of digits in it. like if the universe is infinitely big it doesn't necessarily mean that there's going to be a planet where communism works
>>
>>52587802
>pi has infinitely many digits (i don't know if even that has been proved but i guess it has)
>Being an irrational number, π cannot be expressed exactly as a fraction (equivalently, its decimal representation never ends and never settles into a permanent repeating pattern).
>tfw retarded
>>
>>52587791
You would do something like this on your server:
nc -lp 2345 < music.flac

And then do something like:
mpv tcp://127.0.0.1:2345

On your client.
>>
>>52587708
This is a common myth. Not every infninite nonrepeating number has all possible digit combinations. For example, consider 0.1010010001...

It is not know if pi is normal number or disjunctive (either of which which would imply every string possible is in pi). This is an unsolved topic in mathematics.
>>
>>52587886
Hmm, sounds simple enough. I'll give it a try. Thanks
>>
Why haven't you upgraded to OCaml yet, /dpt/?
>>
/dpt/, working on something with files in Java. What I'm trying to understand is how to name the filepath. Is the filepath "read" from the classpath, which is usually the directory of the project?

i.e. if I have a project called "RandomCode" which has folders application and data, application which contains the .java files and data which contains a random.txt file, can I just refer to the .txt file as "data/random.txt" or do I need to write "../data/random.txt"? Google seems to tell me it runs from the classpath, but its unclear on where the classpath is?

TL;DR: how do filepaths in java work, is there a third option outside of absolute and relative paths which starts from the root of the project, and is this what the classpath is?
>>
File: df.png (17 KB, 900x900) Image search: [iqdb] [SauceNao] [Google]
df.png
17 KB, 900x900
Do you think as technology advances people will get stupider like in that movie?
>>
>>52588191
the majority will get stupider, yes
>>
>>52588191
Globalisation will make European and American people more stupid as well due to the inevitable interracial relationships.
>>
>>52588191
I didn't watch that movie. The plot was obvious.
>>
>>52588292
it's not about the stupid people, you simpleton
>>
>>52588191

It's already happening. Who has that picture of the kid using the onscreen keyboard on a touchscreen laptop, when the real keyboard is inches away?
>>
File: out.webm (3 MB, 1440x761) Image search: [iqdb] [SauceNao] [Google]
out.webm
3 MB, 1440x761
>>52588191
Sort of like how >>52588155 is too stupid to use a search engine?
>>
>>52588155
The classpath is used for loading classes. When you import a module named "foo.bar.baz", it looks for "<dir>/foo/bar/baz.class" for each <dir> in the classpath.

It has nothing to do with data files.
>>
>>52588555
>>>/reddit/
>>
>>52588340

This was less of a question on what a classpath was, and more of how Java reads filepaths
>>
File: c.png (5 KB, 425x18) Image search: [iqdb] [SauceNao] [Google]
c.png
5 KB, 425x18
>>52581294
how does this make you feel?
>>
>>52588711
Depends, what's the point exactly?
>>
>>52588722
s -> data
>>
>>52588711
warm and fuzzy
though you should write it like
s->data = (char *) malloc(sizeof(char) * s->capacity);
>>
File: RUST SKIPS LEG DAY.jpg (108 KB, 600x901) Image search: [iqdb] [SauceNao] [Google]
RUST SKIPS LEG DAY.jpg
108 KB, 600x901
>>52584369
>Tell us about your journey in Rust.
>>
>>52587450
> Any particular reason why 14523, 17125, 22801, 33394, 36173, 39648, 40527, 96710 can't be found?
Probability.

The probability of a particular 5-digit sequence occurring at a particular offset is 10^-5. The probability of it not occurring at a particular offset is 1-10^-5. Assuming uncorrelated probabilities (which is wrong, but close enough for a ballpark estimate), the probability of it not occurring at any of the first million offsets is (1-10^-5)^(10^6), which is roughly 1 in 22,000. So you'd expect around 4.5 sequences not to occur in the first million digits. Assuming a poisson distribution with lambda=10^5*(1-10^-5)^(10^6), the probability of getting 8 sequences is ~4.8%.

FWIW, the probability of every 5-digit sequence occurring in the first million digits is around 1%.
>>
why does this infinite loop?

int t;

while(scanf("%d", &t) == 0){
printf("please input an integer");
}
>>
>>52588711

It looks like C. It makes me feel like C.
>>
>>52588830
dead inside?
>>
>>52588820
it loops when I enter a non integer
>>
>>52582277
Sounds cool, hope it goes far.
>>
>>52588711

Oh wait, you want meme responses, right?
>>
Good afternoon
>>
>>52588872
Dennis Ritchie did nothing wrong
>>
>>52588855
man scanf

Hint: If you input a string, and try to store it in a %d, what happens?
>>
How might I create a dynamically resizing array in C++? I know how to do it in C with realloc

also I know about std::vector, but I want to do it myself
>>
>>52588993
>I know how to do it in C with realloc

The same thing, except new/delete. Tada.
>>
>>52588993
>also I know about std::vector, but I want to do it myself
>I know there's things that exist to help make my life easier but I want to do things the hard way
>>
>>52589021

The only hitch is that you'll have to copy, there.
>>
>>52588918
I honestly don't know what happens when a string goes to %d. In my case it just spazzes out and assigns max int value to everything in the array I'm trying to set.

I just added the line
scanf("%*[^\n]\n");

to make it work.
>>
>>52589026
as a learning experience anon
>>
File: hh.png (2 MB, 1920x1080) Image search: [iqdb] [SauceNao] [Google]
hh.png
2 MB, 1920x1080
Has anyone else noticed the few milliseconds it takes for threads to update?

It never used to be this way.
>>
>>52589134

It's all Hiroshimoots fault.
>>
>>52588765
So it is likely those sequences would be found in a billion digits of pi?
>>
Hey guys

I want to start getting into lower level systems/network programming

I feel that I have a decent grasp of C programming, and I am currently working on Beej's socket programming tutorial.

How do you guys think it would be best to learn about the Linux driver system and get to writing my own drivers and work with existing driver code?

Is there a good, recommended book out there, or would it be best to jump right in and run with it?
>>
>>52582564
"math" refers to anything involving numbers and their interrelation
"mathematics" refers to the specific divisions of form dictated by academia to referentiate the diverse properties of numeristics to its proper delineation.
you are most welcome.
>>
>>52589240
PLEASE
RESPOND
>>
>>52589722
arduino
>>
File: 1427413770619.jpg (52 KB, 588x601) Image search: [iqdb] [SauceNao] [Google]
1427413770619.jpg
52 KB, 588x601
>>52589740
you are triggering my autism, friend
>>
>>52588711
casting malloc in c

fuck

ing

disgusting
>>
>>52589761
well that's what everyone in hardware starts with

I don't do hardware because I want zero investment. It's stupid to do it now when it's all cloud provisioning
>>
gitlab wants to use readme instead of readme.md
What should I do to fix this?
Symlink doesn't work.
>>
>>52589802
just use readme
>>
Going from programming something in C++ to a high level language makes me feel unclean.
>>
import std.stdio;
import std.getopt;
import std.conv;

int sumDigits(int num)
{
int ret;

while(num > 0)
{
ret += num % 10;
num /= 10;
}

return ret;
}

string makeCheck(string value)
{
int x, sum;

foreach(i, ch; value)
{
int num = ch - '0';
if(i % 2)
{
num *= 2;
}
if(num >= 10)
{
num = sumDigits(num);
}
sum += num;
}

x = (sum * 9) % 10;

return value ~= to!string(x);
}

bool validate(string value)
{
return value == makeCheck(value[0..$-1]);
}

void main(string[] args)
{
string luhnedNum;

void handler(string option, string value)
{
if(option == "make|m")
{
luhnedNum = makeCheck(value);
writeln(luhnedNum);
}
else if(option == "validate|v")
{
writefln("%s", validate(value) ? "Check passed" : "Check not passed");
}
}

getopt(args, "make|m", &handler, "validate|v", &handler);
}


Luhn algorithm in D
>>
>>52589786
It's required if you want to malloc in C++.
>>
>>52589134
>tfw when you refresh the page it shows the top of the page momentarily so if it's a trap image you get eye raped every time
>>
>>52589955
>not using auto mode
>>
>>52589909
nice, but you're indentation a inconsistent
>>
>>52590031
It's fine in emacs, just transferred over awkwardly
>>
>>52589999
maybe i will

but during heated debates the timer will be too slow
>>
>>52590102
then right next to auto, click update, instead of refreshing.
>>
>>52590118
o
>>
Travis CI is building my repo with gcc 4.6, that's too old and I need -std=c11, how do I fix this?
gcc 4.7 and up aren't on the package whitelist so I can't install it in .travis.yml
>>
why is c++ compiler output so much more evil than c compiler output?
>>
>>52590204
Don't use C11
>>
File: 1453087254589.gif (490 KB, 167x250) Image search: [iqdb] [SauceNao] [Google]
1453087254589.gif
490 KB, 167x250
>>52590245
I need it.
>>
>>52590242
Because you don't know enough C++
>>
>>52590261
Man up and use C++98
>>
So I'm working on some C++ stuff for my CS data and structures course. I decided to take it since I needed some extra credit hours and wanted to learn some more programming.

I'm kinda struggling with what I've written so far, as I don't really understand how C++ handles structures and arrays, and when I try to read the data from this text file, it isn't exactly working out as well. There are 100 lines, formatted like this:
item, For Sale/Wanted (one of the other, price

I'll paste the code below, but I'm struggling with getting it to separate between the commas of the text file rather than spaces. (IE making it ignore commas). I think a lot of it is just me not understanding exactly 'what' I'm programming as I type. IE, I try changing the while(getline(_) to while(getline(inFile,data,',')) thinking that should make it stop at the comma, but I get a segmentation fault instead.

I don't necessarily want to be spoonfed, but I'd really like to do this right and learn from it. Any suggestions?
>>
>>52590315
Forgot code lel
#include <iostream>
#include <fstream>
#include <sstream>
using namespace std;
struct ListingData
{
string item;
string ListingType;
string price;
};


int main()
{
ListingData lData[100];
ifstream inFile ;
string data ;
inFile.open("data.txt");
if(inFile.good())
{
cout<<"Opened Successfully!"<<endl;
int i = 0;
while(getline(inFile,data, ','))
{
stringstream ss(data);
ss >> lData[i].item;
ss >> lData[i].ListingType;
ss >> lData[i].price;
i++;
}

for(int v = 0; v < 100; v++)
{
cout<<"Item: " << lData[v].item <<" Listing Type: "
<< lData[v].ListingType <<" Price: " << lData[v].price << endl;
}
}
}
>>
>>52590315
>>52590327
>inb4 that faggot comes in here and spouts about cmen

C++'s IO handling is complete idiocy. use FILE* functions (fopen, fread etc) and strtok to split the string at commas.
>>
>>52590315
>>52590327
Took me longer to figure out your situation by reading your post than by reading the code.
>>
>>52590314
Man up and use D
>>
File: uhj.jpg (21 KB, 499x281) Image search: [iqdb] [SauceNao] [Google]
uhj.jpg
21 KB, 499x281
There are infinite numbers between 0.00001 and 0.00002.

What? Why is maths so silly?
>>
>>52590466
There are more numbers (decimals and fractions) between 0.00001 and 0.00002 than integers between 0 and infinity, not even kidding.
>>
>>52590481
wouldn't they both be the same?
>>
>>52590466
Why are you so retarded?
>>
>>52590481
That's not actually possible.
I refuse to believe you.
>>
>>52590466
Maths IRL should have overflow.

I hate infinity and irrational numbers, they make me feel uncomfy.
>>
>>52590358
>strtok
that's with pointers, right? Okay, I'll take a look although I don't quite understand them yet. I appreciate it!

>>52590368
Sorry, I'm so new to C++ that I can't even get coherent thoughts together lel
>>
>>52590523
Nope, there are two different sizes of infinity. The smaller kind is called countably infinite, because in you can count to them. The integers are countably infinite because I can start counting : 1,2,3,4... and eventually reach any number. That's not the case with real numbers. With the reals, you cant get anywhere by counting. That's why the real numbers are considered uncountably infinite. You could say there are "infinite" more real numbers than integers.

And there are even more sizes of infinity, the whole thing is a really interesting field chock full of unsolved problems.
>>
>>52590481
But they're both never ending.
>>
File: 1428618029190.gif (1 MB, 499x499) Image search: [iqdb] [SauceNao] [Google]
1428618029190.gif
1 MB, 499x499
Should I learn C or C++ (or something else?)
I already know C#, Java, and python
>>
>>52590544
https://en.wikipedia.org/wiki/Cantor's_diagonal_argument#Real_numbers

C'mon man, I've had this gone over both in computer science classes and introductory math classes.

>>52590549
Math isn't about what's comfy.
Math is about what's logical.

Turns out infinite sets got some serious logic behind them.
>>
>>52590582
mind blown
fucking wizard
>>
>>52590549
How many bits is IRL?

1024 bit?
>>
>>52590466
>>52590544
>>52590549
>>52590523
kill yourselves
>>
https://www.youtube.com/watch?v=DuiryHHTrjU

Post cool math videos
>>
>>52590619

How many cubic planck lengths is the universe?
>>
File: 1421645896063.jpg (389 KB, 1284x980) Image search: [iqdb] [SauceNao] [Google]
1421645896063.jpg
389 KB, 1284x980
>>52590583
Yeah but one of them is never-ending in two directions instead of one
so the logic follows, one is bigger.
That's also how dimensions work.
A point has no dimension because it is not infinite
Two points connected by infinite points are a line, which is 2d(infinite points on that line). Two of these infinite distances connected make a plane, which has infinite... times infinate points, or infinite^2, and two of those infinite planes makes a 3d box, which has infinite^3 points inside it. The theory is that a 4d object would be two of these 3d "boxes" of infinity, thus infinite 3d existences linearly, which would make the 4th dimension time
Fucking math, man
>>
>>52590554
>that's with pointers, right? Okay, I'll take a look although I don't quite understand them yet.

strtok is a piece of cake. You shouldn't have any trouble with it.
>>
File: yh.jpg (86 KB, 1280x720) Image search: [iqdb] [SauceNao] [Google]
yh.jpg
86 KB, 1280x720
>>52590610
What's logical about not being able to write out all the digits of n when n * n = 2 or in other words, the square root of 2?

WHY CAN'T I WRITE OUT ALL THE DIGITS? I WANT TO WRITE ALL THE DIGITS OR AT THE VERY LEAST WRITE IT AS A FRACTION, BUT I CAN'T. THAT'S NOT LOGICAL AT ALL.
>>
>>52590663
Both the 3d box and the 2d line contain the uncountably infinite points. They both contain the same number of points.

In the same vein, there are the same number of numbers between 0.00001 and 0.00002 and negative infinity and positive infinity.
>>
Where does strtok store the token? wouldn't it need to be freed somewhere?
Is it just storing it in some statically sized buffer? what if the token is bigger than the buffer?
>>
>>52590705
how is it not logical? why should you be able to write all the digits or write it as a fraction?
>>
>>52590709
Between negative infinity and positive infinity? Sure. but anon said between one and infinity.

I feel like the dimensions are easier to understand as a point, a line segment, a rectangle and a cube rather than a point, a line, a plane, and 3d XYZ space (which is actually crazy, because when you think about classical mechanics, you can explain most large-scale phenomena as TXYZ space, with time being the extra dimension and you can literally figure out how things happened in reverse.
>>
File: search.png (235 KB, 1075x841) Image search: [iqdb] [SauceNao] [Google]
search.png
235 KB, 1075x841
Added catalog search
>>
>>52590603
I figured you guys would be more opinionated about this given the constant language wars.
>>
>>52590733
Irrational numbers are stupid, I wish they were never discovered.
>>
>>52590787
you're mom is stupid
>>
File: c.png (25 KB, 326x307) Image search: [iqdb] [SauceNao] [Google]
c.png
25 KB, 326x307
( ._.)
>>
>>52588820
can someone give me an exact reason why this doesn't work? What happens with the %d that causes this to act so strangely? I know it has something to do with the input cache from the keyboard, so I can fix it by clearing it every loop, but I'm still unsure about the cause of the issue.
>>
>>52590752

if i had a dime for every shithead who posts his basic as fuck little python 4chin cumfarter
>>
>>52590925
but it's written in Vala
>>
>>52590932
>Vala

Nice. I always thought it looked great. What's it like to work in?
>>
>>52590950
it's fun! the compiler can be occasionally buggy though
>>
>>52590932

fart.cum.bubble();
>>
>>52590729
It's not storing anything.
It simply overwrites your original string with null terminators replacing every delimiter character and when you do
token = strtok(NULL, " ");
, you're just telling strtok to return a pointer pointing to the next bit of the string that isn't delimited.
>>
>>52590962

Nice. I'll have to start tinkering with it.
>>
File: c.png (30 KB, 385x339) Image search: [iqdb] [SauceNao] [Google]
c.png
30 KB, 385x339
>>52590895
How much more preprocessor assfuckery until I'm writing D?
>>
>>52590787

You sound like one of the pythagoreans who got pissed off at the guy who discovered that the square root of 2 is irrational, and killed him.

>>52590895

size and capacity should be size_t, not int.
>>
>>52590998
That's your objection to my code?
very well
>>
>>52590998
Honestly though, don't you think there's something fishy about irrational numbers?
>>
>>52591041
Not really. Why should our world be perfectly definable by some arbitrary system discovered forever ago? Why would our universe need to operate in a logical fashion? It's kind of weird to think that a stuff in the physical world isn't arbitrary.
>>
Could irrational numbers be repeating but we just don't know how they're repeating?

That has to be it.
>>
>>52590917
can no one really answer this?
>>
>>52591020

Mate, using macros to simulate templates isn't exactly a new thing. klib does it, and it's pretty fucking good. Using size_t to represent the size of a buffer, however, is pretty much standard. If nothing else, however, the value should at least be unsigned.

>>52591041

Not at all. Consider pi. It's the ratio of a circle's circumference to its diameter. Given that a circle is defined as having all points along its circumference equidistant from its center, wouldn't it be a bit strange if one could find a rational number to represent this ratio? Wouldn't that make it... just a little bit flat at one section and thus no longer fit the definition of a circle?

I mean, that's no proof (there's plenty of good enough proofs out there), but surely this should appeal to common sense, no?
>>
File: c.png (26 KB, 848x145) Image search: [iqdb] [SauceNao] [Google]
c.png
26 KB, 848x145
>>52590982
How might I get something like that on line 18 to expand without the space so I can do the functions like this as well?
>>
>>52591136
you can't
you could use a macro Vector_init(char)
>>
>>52591156
but then wouldn't I have to do
#define Vector_init(T) Vector_init##T

for every single vector function that I want?
>>
>>52591187
(as well as having to define the functions within my define_vector(T) function obviously)
>>
>>52591069

If they were repeating, they would necessarily be rational.

Consider a number with, say, 2 repeating digits. We'll say 9.52525252...

If we multiply this by 100, we'll get 952.52525252....

Subtracting the original number gives us 943 exactly, and we can easily see when subtracting that the repeating part (0.525252525252) is the part being subtracted.

We can generalize this by saying that if a number has n repeating digits, then multiplying it by (10^n - 1) will necessarily produce an integer, and therefore is rational.
>>
>>52591097
But that's assuming there are an infinite number of points on a circle's circumference.

How is that even possible?
>>
>>52591221
I mean repeating in some way we don't fully understand, I know what rational and irrational numbers are.
>>
NEW THREAD

>>52591285
>>
>>52591233

Anon, the definition of "repeating" is well understood. What do you mean by "repeating in some way we don't fully understand"?
>>
>>52591223
if you take two different points there's always something in between them
>>
>>52591223
Because a circle is not a real thing. A circle is a theoretical model of the mathematical function (x−h)^2+(y−k)^2=r^2, where X and Y are coordinates on the circle, and H and K are the location of the circle, with R being the radius.
Every single number that exists within r can be plugged in for X and Y, which is infinite given that there are infinite theoretical points between two points on a graph. Thus, there are infinite points on the circle's edge, much like there are infinite points in a line (because it really is just a bent line)
Thread replies: 319
Thread images: 43
Thread DB ID: 475364



[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 / qst / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [Search | Home]

[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 / qst / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [Search | 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.
This is a 4chan archive - all of the shown content originated from that site. This means that 4Archive shows their content, archived. If you need information for a Poster - contact them.
If a post contains personal/copyrighted/illegal content, then use the post's [Report] link! If a post is not removed within 24h contact me at wtabusse@gmail.com with the post's information.