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

/dpt/ - Daily Programming Thread

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 324
Thread images: 25

File: NSA.jpg (89KB, 1366x768px) Image search: [Google]
NSA.jpg
89KB, 1366x768px
old thread: >>56295464

What are you working on, /g/?
>>
KYS
>>
File: it's a trap.png (873KB, 1275x677px) Image search: [Google]
it's a trap.png
873KB, 1275x677px
Too early edition

Are you even the real trap poster?
>>
wtf i hate anime now
>>
does anyone here actually use typedef's? seems like it would make shit more confusing.
>>
>>56301627
every time when using a struct
and sometimes (which I will be bashed for since it's not portable, but idgaf) I typedef unsigned char to u8, signed char to i8, short to u16 and i16 and so on
>>
File: akari!.jpg (2MB, 1300x1560px) Image search: [Google]
akari!.jpg
2MB, 1300x1560px
I'm writing a messageboard system in C!
http://45.32.80.36/board.cgi

I'll be working on adding some formatting tomorrow, goodnight!
>>
Currently buying some programming books

Are "The C Programming Language" and "The Go Programming Language" good or are there better books on both languages?
>>
>>56301660
>I typedef unsigned char to u8, signed char to i8, short to u16 and i16 and so on
Why the hell don't you use stdint.h?

>>56301627
They make using function pointers a lot neater.
>>
>>56301627
in C++ i'd use using
>>
What's the market like for assembly programmers?
>>
>>56301674
I don't really care about their size, I just wanted shorter names...
>>
>>56301702
nonexistent
>>
File: B0Fj-hZIMAAdCkt.png (356KB, 506x662px) Image search: [Google]
B0Fj-hZIMAAdCkt.png
356KB, 506x662px
>>56301702

its so hot right now, dont miss out
>>
>>56301707
if you actually care about the length of your type names, you're either doing something horribly wrong, or you're bikeshedding.

You're not one of those retards who creates functions that ask for 20 separate variables, right?
>>
>>56301709
>>56301721

Welp, there goes my intimate connection wit the machine
>>
>>56301707
>I just wanted shorter names
You're saving like 2 letters at most.
And as the other anon said, it's a pointless goal.
>>
>be chemist
>4 years at uni
>Perfect GPA of 4.0

>younger brother dropped out of uni after one semester
>dicked around doing part-time casual jobs for a couple years
>recently got a job doing web dev with no previous experience or structured learning
>earns just under $70k a year

>I get $50k a year and work more than he does

Why is this allowed /dpt/?
>>
>>56301833
He didn't fall for the college meme like you did.
Also, I'd like a McPick 2 mcdouble and a McChicken to go.
>>
>>56301833
should've taken maths
>any job I want
>$150k starting
>>
>>56301833

wheres he located? and what is he actually doing to make 70k a year doing fucking web dev
>>
>>56301880
>>56301891
Nah, I didn't fall for any college meme. I studied chemistry because I find it interesting as fuck. I only started studying as a mature aged student after spending a couple years working in totally different industries (finance).

I work in a pharma lab, so I can't legally give you anything I make.

>>56301902
Sydney, mobile ads.
>>
>>56301880
more like the the STEM meme
>>
>>56301917

didnt know programming mobile ads market was hot

interdasting
>>
>Compile ARM-flavored elf ball on laptop with static linking
>scp it to Raspberry PI
>works
>scp it to phone
>works without recompilation.

This is satisfying and I am not sure why it is satisfying.
>>
>>56301833
>>56301917
i've got a mechanical engineering degree with a 3.9 gpa and now i'm a phd student earning ~25k/year because i couldn't find a job after graduating. in all likelihood, i won't be able to find a job if i finish the phd either.

some people are lucky, some aren't.
>>
>>56302018

jesus

i know someone who has her masters in physics and cant find a job

seriously im voting trump
>>
>>56301955
embrace static linking
>>
>learning c# programming
>doesn't understand a single shit about oop
I am going to kill myself. nice knowing you guys. It's hurt to be this retarded
>>
>>56302168
ask and we shall answer
What don't you get?
>>
>>56302168
do you know procedural programming?
>>
>>56302168

fuck c# and do c/c++. I started with javascript and wish i would have started with c/c++
>>
I have a stupid question.

Why do I need to download a compiler to get a language working, when there are hundreds of applications on my computer written in various languages already working without one?
>>
>>56302218
Why did you wish that?

Started with PHP, moved to JS and now I'm trying to learn C and Go.
>>
>>56302232

web dev wont teach you real programming thats why
>>
>>56302232
>now I'm trying to learn C and Go
>trying to learn
Answer is embedded in the wording of your response.

PHP's syntax is somewhat similar to C, but that's about it. People are much better off starting with either of two extremes:
-A scripting language like python, or batch
-A low level language like C, C++, and a bit of assembly.

Often people starting by learning java(script) etc begin to pick up bad ways of thinking about their interaction with the machine, and accumulate these maladaptive tendencies. It also doesn't spur them to understand what the machine is doing, why, and how.

I learned more trying to make things work in batch than I imagine someone would learn dicking around with java.
>>
>>56302277
What are your thoughts on learning two languages at once, one scripting and the other low level? Is it a pointless exercise - would the person better spend their time focusing on one entirely?
>>
>>56302220
there are three kinds of languages: interpreted, compiled, and virtual machine ones

compiled ones change the code (text) into a binary file (exe) and you don't need the compiler for it to work on your machine (C, C++)

virtual machine - those are compiled but work on something like an emulator, you have to download the virtual machine for it to work (check your programs for the .NET framework and Java runtime environment, those have a virtual machine)

interpreted - "scripting languages" you don't need to compile it, you just run it straight from the text file, you need the language installed. windows batch files and unix shell scripts are interpreted, so is the javascript inside your browser.
>>
>>56302277
I said trying to learn because I started yesterday. Just ordered a few books for both languages.

There's some shit I don't get yet but I wouldn't say starting with Javascript is inherently bad. It led me to check out other languages because I wasn't satisfied with the performance of JS for my web applications.
>>
>>56302220

those applications are already compiled, they just are getting executed

you need a compiler to get a language working because that language and all the syntax need to somehow be "converted" into machine code so the computer can execute it
>>
>>56302298
That makes a lot of sense actually.

So what does a compiler like MinGW do for C and C++? If you don't need it, why get it really?
>>
>>56302312
you don't need it to run compiled programs
you need it to compile programs, to make them
>>
how normie is it to have this playing in the background?

https://www.youtube.com/watch?v=imtPF2b2Q4M
>>
>>56302218
I already learned c and java.
>>
>>56302294
Not that guy - but I think it makes more sense to learn a high level language while learning how low level stuff works.
Learning C doesn't teach you everything, and there will still be huge holes in your knowledge if you just learn what's necessary for C.
Basically, start with basic EE (or physics if you're into that), move on to shit like TTL, then simple processors and how they work, learn a simple assembly, understand how computers as a whole work, maybe learn a bunch about more modern systems to learn about stuff like the L1 cache, understand how a simple OS and its components work (Minix is a good example) and then do a bunch of stuff related to networking and the different OSI layers.
That's at least how I did it, and the learning courve wasn't too steep for me because I could always build up on the things I learned before.
At the side I learned a high level language and moved towards more low level languages from there. Once you get to the point in my list where you understand how a simple OS works, learning C is a breeze.
That being said, resources on the internet for learning low level things are often abysmal compared to what you can find for getting into programming.
>>
>>56302352
>I think it makes more sense to learn a high level language while learning how low level stuff works.
I definitely want to learn as much as possible, but my concern is having something functional to play around with. My main focus is already on C, but I wondered if it was feasible to pick up something like Python on the side, for simple projects. The added bonus would be learning about different types of languages, at once.

>start with basic EE (or physics if you're into that)
Isn't this step alone pretty difficult? I've really wanted to try and learn physics by myself for a while now, but surmounting calculus has always been daunting and hard.
>>
>>56302400
python is for little shit. Learn some manly language like c# and c++.
>>
>>56302413
Well I'm already doing C, isn't the transition from that to C++ pretty smooth?

I've thought about C#, but seeing how I'm going into C++ sooner or later, is it worth knowing both? I've heard people say how C# improves on the flaws of C++, so it sounds like there's a lot of overlap there.
>>
Writing my own forum software since everything else fuckin sucks. Unless anyone can show me ine thats nit made in some shitass bloated manner with a decent ui and doesnt look like it came from 1990. Oh and one without so many security flaws woukd be nice.
>>
>>56302455
simplemachines is pretty nice

What language are you using?
>>
>>56302479
Rust. These dynamic languages are too slow.
>>
>>56302294
It really depends on the person. At such a point where you're asking this question, the point of its answer is already nullified. It's already apparent you have the drive, and probably the means, to iterate and do what needs to be done. As for how to engineer that process, it's up to your own metacognitive tendencies and how your brain tends to work.

Ultimately though I'd only advise learning one thing at a time. Bounce and contrast it against something else without getting too heavily into it, to avoid compartmentalization and to better understand the whole. ie, if you're learning a scripting language, learn a bit about the low level and think about how the interpreter, JIT, virtual machine, whatever, works. Learning something low level like C, focus equally on how memory works, basics of assembly, why eg an XOR operation takes at most one cycle, how something like an interpreter would be written and how it's parsing the text, how the compiler works, etc. This is why I say starting with C/C++ is much better, it affords more. It lets you better understand the underlying logic.

But it depends on a lot.
Read this regardless:
https://people.freebsd.org/~lstewart/articles/cpumemory.pdf

>>56302400
>calculus
EE and physics, in a functional (mathematical) sense, aren't useful for programming. You only need to understand the universe in an abstract way. You're influencing a machine, not designing a circuit board or calculating the probability a given photon will be transmitted through a material.
>>
>>56302489
Never heard someone building something like this in rust. How does that work? Do you still work with databases and if so, which one?
>>
>>56302494
Ultimately I think you're right, it's probably better to focus more heavily on one language and worry about picking up other stuff later. And thanks for the link, I'll try and work my way through it even with limited knowledge.

As for the part about physics, my interest in it is separate from programming, but it's nice to see them overlap in this way.
>>
>>56302494
>You only need to understand the universe in an abstract way.
Actually, abstract isn't really the right word for it. You only need to understand and think about the universe's logic in a hard mechanical way. Something which has unfortunately become supplemental to the mathematical approach.
>>
>>56302512
It works same as any other language. Write html generators, output to fastcgi or scgi. The web server forwards requests/gets responses from one of those protocols to your binary.

Probably not going to do the traditional db route. Setting up a database server is annoying, trouble to admin, etc. Plus latency. I dont have a clear plan yet, but I'm thinking a hybrid of git style content addressable tree, maildirs, and nntp spools.
>>
>>56302545
>I'll try and work my way through it even with limited knowledge.
It starts with the base elements and builds very logically and intuitively. Should be fine if read in serial order.
>>
>>56302448
C++ is still a compiled language.
It has all the advantages and disadvantages as C.
It provides a lot of extra tools you can use.
A good example is strings.
String is a class which have operator overloads, extra variables such as size of the string.
It can be dynamically resized and is therefore optimized for strings of text.
Where in C (without libraries) you have q pointer to a char and it ends when you write 0.
This means passing strings to functions is harder and you have to be more careful when you use strings in your application.

When you apply this way of thinking to all classes you make, programming becomes a lot different.
So don't say you know C/C++ as they are the same thing.

C# is different, but I don't have any experience with it. I just blindly think C++ is better without any reason behind it.
>>
>>56302581

the best game engines are written in c++ so theres good reason behind it
>>
>>56302581
c# is different than c++ because it use virtual machine(Common Language Runtime) like java.

It's just somehow less a pain to code in if you just want to make simple shit or a website. Because you mostly do not want to worry about allocating memories of every little shit you want to implement.
>>
Having trouble with a programming assignment.
What's the best place to go for help? I now /dpt/ isn't willing too but maybe you know somewhere.
>>
>>56302722
what is it?
>>
>>56302722
If you are actually willing to learn and you are actually able to search for solutions yourself, stackoverflow.

It being an assignment and you not finding help means that that second thing is the issue 99% of the time.
>>
>>56302744
Thanks. Yeah I'm an engineer that got put into a b level computer class so I'm way out of my depth. Never programmed before.

>>56302740
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include "node.h"


struct node_int {
void *data;
node next;
} node_int;

/*
* 'Constructor' for node
*/
void init_node(node *n, void *o)
{
*n = (node)malloc(sizeof(struct node_int));
(*n)->data;
(*n)->next = NULL;
}
/*
* Getter for data
* Return data field
*/
void *get_data(node n)
{
return (n->data);
}

/*
* Getter for next
* Return next field
*/
node get_next(node n)
{
return (n->next);
}

/*
* Setter for data
* Param o value to be placed into the node's data field
*/
void set_data(node n,void *o)
{
n->data = o;
}

/*
* Setter for next
* Param x value to be placed into the node's next field
*/
void set_next(node n, node x)
{
n->next = n;
}


I posted this here before - the function bodies had COMPLETE ME and I have to fill them in - there's more to this assignment but this seems easiest part but even here I don't have confidence that I've done it right.
>>
What should I know to make a small OS like MINIX and where can I learn it? I'm pretty good with C and I know a little assembly, but I have no idea where to start. I also don't know a lot about OS internals...
>>
>>56302837
in init_node:
node* is the datatype (pointer to node), n is the variable, not *n
if you use the * you will get the value at address n
with that malloc, you want to store the new node at address n
it should be
n = (node *) malloc(sizeof(struct node));
(the typecast is optional, but you should know that it returns an address, not a value)
I don't know the difference between node and node_int in your code

n->data
is the same as
(*n).data
just don't use the *

n->data = o
I probably what you meant
last line is correct if you remove the *
>>
>>56302944
the reason why I did that because without the (*n) instead of n
I get the error expression must have pointer-to-struct-or-union type
n = (node)malloc(sizeof(struct node_int));
compiles fine but not
n->next = 0
>>
>>56302988
ohh yeah I get it

malloc returns a void* though, if you cast a void* to node you will get nonsense
>>
>>56302448
C/C++ and C# are two completely different things. Just like Java and JavaScript are two different things.

Knowing both is highly recommended. Whatever "knowing C++" means. Because C++ is massive kitchen-sink of features, meaning no person can know C++ in it's entirety.
>>
>>56303006
so
 void init_node(node *n, void *o)
{
n = (node *)malloc(sizeof(struct node_int));
(*n)->data = 0;
(*n)->next = NULL;
}


this compiles
>>
>>56302988
is there a difference between node and node_int?

in init_node, what are n and o?
is n the pointer to where you should store the node and o it's value?
that would make sense since you aren't returning anything

malloc is needed when you need to find an address to store the variable, but that's n right?
>>
>>56303058
there's no point in casting malloc in C
>>
Is it worth it?
https://www.humblebundle.com/books/joy-of-coding-book-bundle
>>
>>56303107
paying for ebooks?
>>
>>56303138
Sure, why not? There is also a part going to charity
>>
>>56303151
hmm... Eloquent JS, LYAH, and Write Great Code are good, most books are beginner tier
>>
>>56303197
>Write Great Code
top tier advice
>>
What's the best book for getting a solid foundation in C if you have experience in C++ already but want to understand more of what's happening closer to the machine?
>>
>>56303434
>C
>closer to the machine

You fell for the meme
>>
>>56303485
Wrong terminology? I feel like learning C would give me a better lower level understanding. Is this wrong?
>>
>>56303434
get an actual com arch textbook
>>
>>56303510
>Is this wrong?
Yes, it won't.
If you want lower level, try ASM
>>
>>56302036
>there ain't no jobs!
>muh thanks Obama!
There is a labor shortage, it's just not among stuff anyone wants to do. We need electricians, truck drivers, and other shitty jobs that you only need trade school for. When 50% of Americans get a college education in some bs field of course they won't be able to find jobs. Fuck!
>>
ok, how the fuck do I suppress this stupid warning bullshit in Atom?
>>
>>56303597
either add a compiler option to supress warnings or edit the settings so that warnings are invisible
>>
>>56303597
By using that method.
>>
>>56302340
>already learned C
You're never finished learning C...
>>
>>56303576
Too many fucktards flooding into CS nowadays...many of them would be better suited to driving a forklift or plumbing or tech support or some shit
>>
>>56303597
#![allow(dead_code)] on top of the file
>>
>>56303621
ikr. Half the people I know at college 1, don't even understand what they're doing but just buy their way through to a degree, or 2, can barely afford it and complain about having college debt into their thirties instead of going to a community college in the first place. (For undergrad at least)
>>
File: IMG_20160828_141043.jpg (797KB, 2592x1944px) Image search: [Google]
IMG_20160828_141043.jpg
797KB, 2592x1944px
who /kodingwithkarlie/ here?
>>
In C: Is there a better way to get a pointer to the second memory position of a pointer than

P* second = &aLotOfPs[1];


?

Seems like an unnecessary indirection to me...
>>
Where do I start in learning how to program?
>>
>>56303965

P* second = aLotOfPs + 1;
>>
>>56303908
more like /kodingwithautism/
>>
Thoughts on my Euler 35 solution?

https://projecteuler.net/problem=35


from eulerlib import prime_numbers as pm

pl = pm.primes(1000000)

def primes_under_million(prime_list):
um_primes = [False]*1000000
for i in [v for i,v in enumerate(pl)]:
um_primes[i] = True
return um_primes

def circlePrimes(prime_list):
result = sum(1 for i in prime_list if isCircular(i))
return result

def isCircular(n):
r = str(n)
return all(primes[int(r[j:] + r[:j])] for j in range(len(r)))

primes = primes_under_million(pl)
print (circlePrimes(pl))

>>
>>56303908

Curious, has anyone been able to confirm whether or not her retard moment involving the fast inverse square root function was actually a thing (that she later deleted) or if the entire image was shopped?
>>
>>56304138
Probably an hoax made by misogynists.
>>
File: 2016-08-28-144032_732x410_scrot.png (25KB, 732x410px) Image search: [Google]
2016-08-28-144032_732x410_scrot.png
25KB, 732x410px
>>56304111
Probably faster than mine
>>
>>56304021
SICP, unless you really mean coding
>>
File: triggered aids skrillex.jpg (19KB, 193x269px) Image search: [Google]
triggered aids skrillex.jpg
19KB, 193x269px
>>56304162
>muh soggy knee
>>
>>56304168

Mine is about 0.5s, but that could be due to my processor (i7 2600k)
>>
>>56304059
Thanks. Is this platform independent or does that make assumptions about pointer size and width or anything?
>>
why did I get the zero /g/?
int *n;
malloc(sizeof(n));
cout << n << endl;
>>
>>56304262
It's undefined behavior. You never set n. It shouldn't compile.
>>
>>56304250

No and no. That's basic syntax of pointer arithmetic. What you've been using is actually syntactic sugar. The ptr[idx] syntax is the same as *(ptr + idx).

>>56304262

You did not set n to any value.
>>
>>56304168
Lol, you're using a compiled language but you're still slower than Python?
>>
>>56304273
Thanks again.
>>
>>56304273
>is that platform independent
>no
>>
>>56304287

What language is that? C? pretty bad if it's compiled and still runs slower than mine
>>
>>56304287
Lol, the interpreted language that was optimized by big development teams over multiple iterations with literally tens of thousands of man-hours work poured into it's every faced is better than the 80SLOC project one dude made in an hour on a rainy afternoon.
Geez i wonder fucking how.
>>
>>56304314

Woops. Read that as platform dependent.

Yeah, it is independent.

>>56304287

Difference between Python and C is a constant factor, assuming the same algorithm. If anon was a retard and didn't use a sieve to find primes, the algorithmic complexity would be worse, and as the number of primes increases, the effect of constant factors would fade away, until the C solution was slower.
>>
>>56302052
i never understood why so many of the linux people fell for le ebin dynamic linking meem
>>
>>56304370
i never understood why so many of the skripting people fell for le ebin dynamic typing meem
>>
File: 1271781623056.gif (328KB, 267x229px) Image search: [Google]
1271781623056.gif
328KB, 267x229px
I have a question for people familiar with audio programming.

I need a way to read the music being played by a computer and generate effects (this is for a live show) on the fly. Now I already have a basic idea how I'm going to generate the effects in question, the problem is reading the file in the first place.

The person using the computer will be DJing so I can't expect him to input the file in the program as that would be inconvenient. Basically what I need is a way to read music being played by the computer.

Can any anons please help?
>>
>>56304339
Are you really comparing Anon's solution to the CPython interpreter? Shouldn't you compare GCC/Clang/whatever and CPython?

>>56304356
How many Rubies are there? There used to be one that wasn't as retarded as the last two.
>>
>>56302455
asmbb

jk, of course.

But for the love of god, please go the traditional db route. As a former semi-admin, I beg you.

>>56304370
People lying to themself about saving memory.
In the end, static linking saves memory by not including the whole library and in any real world scenario that isn't a bistro with small feggit software you are gonna need your own version of your dynamic lib anyway.
>>
>>56304412
It is easier to implement and interface the interpreter to other static typed languages that have their types ripped away at compile time.
>>
If you can solve this you're a true genius:

https://projecteuler.net/problem=499

Good luck.
>>
>>56304423
I don't think you can. Once it reaches the audio sink, it's too late.
What about a proxy? Let the program output the audio to your application, mutate the audio stream, and pass it to the real audio sink.
>>
>>56304432

There really is only one. I'm on my third secure tripcode and second insecure tripcode due to accidentally forgetting a # when typing the damn thing into Clover... multiple times. That fucking application likes to not fucking remember my tripcode nine times out of ten, so I have to keep typing it manually all the goddamn time.
>>
>>56304483
Isn't that basic probability with just some computation? Pretty sure we did something like that in a statistics class.
>>
>>56304432
I'm just saying that python interpreters and libraries are highly optimized.
More than I can achieve in an hour using only stdio and math in C, writing everything else from scratch.
>>
>>56304484
I was hoping there was some low-level magic I could do in order to catch the audio data just before it gets to the output. Looks like I'll have to find some other way around it then. Thanks anyways anon.

>>56304432
There can only be one man as awesome as Ruby anon.
>>
Does anyone know a good JavaFX book or tutorial, or some "let's do a project in JavaFX together" lesson?

Also, some blogshit, since I do not want to overburden this board with irrelevant shit:
http://pastebin.com/RxkibNkz
if anyone could be so kind and give me some additional advice, that'd be great
>>
>>56303095
yes there is, it reminds the programmer of the type you are going to use the variable as, which prevents bugs

it's also compatible with better languages
>>
>>56304519
I'm not sure if this helps, but read this: https://www.khronos.org/openmax/.
>>
>>56304506

ok bigshot solve it then
>>
File: gourmet.webm (1MB, 720x404px) Image search: [Google]
gourmet.webm
1MB, 720x404px
/dpt/-chan, daisuki~

Ask your much beloved programming literate anything (IAMA)

>>56304271
>It shouldn't compile.
Why

>>56302489
>These dynamic languages are too slow.

Scheme Gambit:                  1.932229635 seconds time elapsed
Dart: 2.585097637 seconds time elapsed
Common Lisp SBCL: 3.015000773 seconds time elapsed
Racket: 3.618877176 seconds time elapsed
Rust rustc: 6.583698221 seconds time elapsed
>>
>>56304553
>>It shouldn't compile.
Because undefined behavior.
>>
>>56304423
Don't most audio systems have a "stereo mix" that you can just read from?
>>
>>56301833
>he fell for the higher education meme
>>
>>56304553
fuck off
>>
>>56304559
>Because undefined behavior
The compiler doesn't have any obligations for undefined behaviour.
It can keep compiling if it wants to.
>>
>>56304553
Either you have used Rust's debug build, or your Rust code is very unoptimized. Benchmarks without revealing code aren't something a "programming literate" should spread.
>>
>>56304553
>sbcl third
Was it interpreted or compiled?
>>
>>56304509

A number of Python's libraries are written in C, so you're really just scripting C code.

>>56304529

some_type *foo = malloc(sizeof(some_type) * count);


Already tells you twice exactly what type the variable is going to be used as. If you don't know that it's a pointer of some_type, you're retarded.

Also, you shouldn't be compiling C with a C++ compiler, nor should you be allocating memory in header files which might be shared between the two languages.
>>
>>56304542
I'm just saying it doesn't take a genius, just an intro class to probability.
>>
>>56304579
Filthy pig.
>>
File: bat.webm (2MB, 640x360px) Image search: [Google]
bat.webm
2MB, 640x360px
>>56304559
undefined behaviors have nothing to do with the static environment.
>>
>>56304580
>programming """""""literate"""""""
>>
>>56304630
>ywn havae a bat as a pet who munches on your fruits and you will never pet its head and receive mental healing as you code :(
>>
Anyone have an idea how to compute the parameters of a splice operation that would transform any string A to any string B. That is the first differing char (got that one, of course), the length of the deleted string from A after the first differing char and the text that has to be inserted into into that position?
>>
>>56304111
>>56304168
>>56304235
I made one in Rust, and it runs in 0.0504129 seconds.
>>
File: 1465047197053.png (51KB, 321x322px) Image search: [Google]
1465047197053.png
51KB, 321x322px
There are so many languages to pick. Which one do you guys think is better for a newbie to learn the foundations of programming?
>>
>>56304763

fundamentals*
>>
>>56304763
C or OCaml
>>
>>56304763
C
>>
>>56304553
Post Rust source.
>>
>>56304783
>>56304786

t.hanks
>>
>>56304763
Take one of the six and just start:
Python
Haskell
Java
C
C++
Javascript.

I prefer tolearn a language, that gives me either:
A profound ´lesson on programming that i can apply to other languages.
Or good pay as an entry coder in a job, so I do not starve or have some skill I can use as a back up plan.
Right now Java fulfills 1/2th of the first and 6/7th the second requirement.
>>
>>56304763
C if you want to learn the foundation of all programming languages.
>>
>>56304111
Seems like you are doing more data manipulation than necessary on your prime list.

Also there is a superior prime generation function available for languages with coroutines or other state full iterators. You can write a seive of eratothenese in generator form. Guy who developed the idea calls it the croft spiral seive.
>>
>>56304461
Dynamic typing isn't type erasure. Actually, you can't do type erasure with dynamic types because you need to keep them around for runtime type checking.
>>
>>56304705
I made one in Haskell and it runs in 230 μs
>>
File: zBb23so.jpg (172KB, 800x1195px) Image search: [Google]
zBb23so.jpg
172KB, 800x1195px
>>56304763
A good tutorial is more important. Avoid C at any cost.

:: 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

:: 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
>>
>>56304859
>Avoid C at any cost
(You)
>>
>>56304813
But BCPL is the foundation of C. And lambda calculus is the foundation of Haskell, Coq, etc.
>>
File: ayy.png (7KB, 385x218px) Image search: [Google]
ayy.png
7KB, 385x218px
I was just about to download visuals but.. my fios took a dump 2 days ago.

Look at this shit. Lmao. 70 bucks a month right here.
>>
Avoid all of this advice
>>56304859
>>
Don't listen to what this poster said
>>56304886
>>
>>56304859
>Avoid C at any cost.

Why?

>>56304886
Why?

>>56304890
For fuck's sake
>>
>>56304895
already in the 70's C was considered to be a huge step back PLT wise.
>>
>>56304867
No, B is the foundation of C. BCPL is the foundation of B. CPL is the foundation of BCPL.
To sum up, C got crippled three times into something else.
>>
>>56304847
Maybe you should have read what I wrote.
>>
>>56304689
Can you write in English please?
>>
>>56304609
What if you change one but forget to change the other? Meanwhile, if you use a macro to avoid repetition on the RHS, you get an error in all relevant cases.

The macroes if I remember correctly:
#define MEME_ALLOC(type) (type*)malloc(sizeof(type))
#define MEME_ALLOC_ARRAY(type, len) (type*)malloc(sizeof(type) * (len))


There's also
 struct something *x = malloc(sizeof *x); 

but it doesn't feel as expression-based.
>>
What's the best way to capitalize all first letters in a string in JS?

I'm thinking

1) .split(' ');
2) iterate through words with a for loop
3) .toUpperCase() each letter at [0] position
4) return result

this sounds kind of gay though, I'm sure there's a more elegant way?

(Beginner here obviously)
>>
>>56304852
Mind to share the code?
>>
>>56305315
Do a simple for loop.
>>
>>56305315
That's how I would do it. I'm not a JS dev though, but I would do it in a functional way. Pseudocode:
"hello world".split(" ").map(| x | x[0].toUpperCase() + x[1..]).join(" ")
>>
>>56305315
Sounds pretty good to me.

str
.split(' ')
.map(function(str) {return str.substring(0, 1).toUpperCase() + str.substring(1);}
.join();


Is what I'd do. But I'm a bit of a faggot.
>>
>>56305399
i mean
.join(" ");


>>56305370
Functional master race. Didn't see that when i posted mine.
>>
>>56305315
I'm no javascript fag, but
"this is a test string".replace(/(^| )\w/g, (c) => c.toUpperCase())
>>
>>56305370
Wow, this is beautiful. I need to start thinking functionally

Which would be faster ? doing it this functional way or with a simple for loop ?

not that it matters now just out of curiosity
>>56305399
Thanks
>>
>>56305320
Give me a few minutes. I got lost in a fucking forest and my GPS module is fried.
>>

import Data.Char (toUpper)
fun = unwords . map f . words
where f [] = []
f (c:cs) = toUpper c : cs
>>
>>56305465
>Which would be faster ? doing it this functional way or with a simple for loop ?
There's not a big difference. In JS, functional might well be faster because the compiler can optimise it much better. It's also a lot less likely to break in some way down the road, once you get it working at all it's far less likely to have any bugs than if you did a for loop.
>>
>>56305455
Perfect.
>>
>>56305465
They should be the same performance. Using Haskell for a while really improved my code quality. I wouldn't use Haskell for big projects though, sometimes it's really nice to have access to other paradigms. It's more of an academic language.
>>
>>56305523
I use Rust now btw. I can use high level things (like functional programming and futures) and low level things (pointers) at the same time while it all compiles down to assembly that's the same speed as C++.
>>
>>56302494
>https://people.freebsd.org/~lstewart/articles/cpumemory.pdf
>her
>>
>>56305569
Hows rust these days? Is it still shit like everyone says? I remember people complaining about retarded compile times and the library system being retarded somehow.
>>
>>56301575
Please refrain from using an anime image next time.
>>
>>56305569
What do you use Rust for? What kind of stuff are you working on ?
>>
>>56301702
Some embedded systems require assembly programming. Optimized math libraries are usually done with assembly. Other than that it's nonexistent.
>>
>tfw the ctf you were participating is over and your life feels empty
>>
>>56305581
4chan is historically a mango/animu board , the oldest topic board is /a/
if you don't like contemporary Japanese culture you are welcome to join Rebbit they prefer American superheroes there
>>
>>56302917
C'mon guys. Please help me
>>
>>56305618
There is a whole wiki about that:
http://wiki.osdev.org/Main_Page

You'll get much better information there than you will here.
>>
>>56305618
start with your bootloader.

https://en.wikipedia.org/wiki/BIOS_interrupt_call
>>
>>56305629
>>56305635
Thanks guys!
>>
>>56305486
You know that just
fun = map toUpper
does the same thing?
>>
>>56305650
No.
>>
>>56305650
it doesn't tho
>>
Here's a basic notetaking syntax in sublime
You just name this [name].tmLanguage and place it in appdata/sublime/packages/user and change your language in sublime

Haven't worked out how to customize the colors yet so I've just mapped them to random things

II'll try and develop a tree for finding all the various names and their colors in each skin
also some of the comments are incorrect so ignore those

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>fileTypes</key>
<array>
<string>nm</string>
</array>
<key>name</key>
<string>Note Management Syntax</string>
<key>patterns</key>
<array>
<dict>
<key>comment</key>
<string>Tab stops like $1, $2...</string>
<key>match</key>
<string>^[0-9]{1,99}\.</string>
<key>name</key>
<string>punctuation.definition.string.end.nm</string>
</dict>
<dict>
<key>comment</key>
<string>Variables like</string>
<key>match</key>
<string>\#.+</string>
<key>name</key>
<string>comment.line.double-dash.nm</string>
</dict>
<dict>
<key>comment</key>
<string>Anything that comes before a : ...</string>
<key>match</key>
<string>.+:</string>
<key>name</key>
<string>string.quoted.double.nm</string>
</dict>
<dict>
<key>comment</key>
<string>Actual comments ...</string>
<key>match</key>
<string>~.+</string>
<key>name</key>
<string>constant.character.escape.apostrophe.two</string>
</dict>
<dict>
<key>comment</key>
<string>Strings ...</string>
<key>match</key>
<string>.</string>
<key>name</key>
<string>keyword.other.string-constant.nm</string>
</dict>
</array>
<key>scopeName</key>
<string>text.nm</string>
<key>uuid</key>
<string>700cc4e9-7848-4ddd-a40d-302c6b5b374f</string>
</dict>
</plist>
>>
>>56305650
>>56305668
>>56305707
never mind, i see now
>>
>>56305747
also sublime recommends you write out everything in YAML and convert it which I've been doing but YAML doesn't accept : chars even literally so you have to edit the XML yourself for that
>>
i-is it possible to make a 4chan crawler that notifies me when someone from a certain country posts?
>>
>regex for syntax highlighting
why is this the norm
>>
>>56305786
yes rather easily

>>56305829
I use it because its easy
>>
>>56305842
could I learn python while doing it? i know java and c but I never tried anything like this, how would I find where the post comes from?
>>
>>56305863
Well, you can't in general, it has to be on a board with flags.
>>
File: Capture.png (35KB, 485x272px) Image search: [Google]
Capture.png
35KB, 485x272px
>>56305863
It's in the header of each post on /int/ /pol/ /sp/ and whatever other boards have flags
>>
>>56305786
https://github.com/4chan/4chan-API
>>
>>56305599
Looks at the top of this page. What does it say? Does it say "/g/ - Anime" on your end?
>>
>>56305937
>Look at the top of this page. Does it say /g/ - English?
>>
File: 1451206925244.jpg (132KB, 500x1200px) Image search: [Google]
1451206925244.jpg
132KB, 500x1200px
>>56305599
>>56305960
>>
>>56305580
There has been made effort to incremental compilation. The foundation for incremental compilation has been made in the nightly version IIRC.
>>
File: 1470657968824.png (611KB, 780x720px) Image search: [Google]
1470657968824.png
611KB, 780x720px
>>56305976
>being this new
not even gonna bother this time
>>
>>56305583
I made a small kernel for my C.H.I.P. (9$ computer with Wi-Fi&BT) using some assembly and mostly Rust.
>>
>>56305906
>>56305934
thanks i'll check it out
>>
>>56301594
Please refrain from using a video game screenshot next time.
Looks at the top of this page. What does it say? Does it say "/g/ - Video Games" on your end?

>>56301721
Please refrain from using a book cover next time.
Looks at the top of this page. What does it say? Does it say "/g/ - Literature" on your end?

>>56304193
Please refrain from using a triggered meme next time.
Looks at the top of this page. What does it say? Does it say "/g/ - Politically Incorrect" on your end?

>>56304423
Please refrain from using a Mythbusters image next time.
Looks at the top of this page. What does it say? Does it say "/g/ - Television & Film" on your end?

>>56304553
>>56304630
>>56304859
Please refrain from using an animal image/WebM next time.
Looks at the top of this page. What does it say? Does it say "/g/ - Animals & Nature" on your end?
>>
>>56304138
I hate her as much as anyone else but that entire image was shopped.
>>
>>56306039
haha your so funny xd
>>
>>56303908
>>56304138
>>56306061

>Haskell

I do not believe
>>
>>56305569
I wish someone made a rust clone without all the static memory safety bullshit.

Or just a C that's a bit more type safe and has some modern features.

I have more fun debugging my C code than writting Rust code.
>>
>>56303908
>Haskell
>Algebraic Geometry
>Topology
B for effort.
>>
File: 1448507073853.png (36KB, 453x263px) Image search: [Google]
1448507073853.png
36KB, 453x263px
>>56306002
I've probably been here longer than you, autist
>>
>>56306086
>I wish someone made a rust clone without all the static memory safety bullshit.
So C with polymorphism? I've actually been considering that lately. The static memory safety "bullshit" does really give the compiler a lot of room to optimize, though, in the vein of "restrict".
>>
>>56306097
the code is for a parser for some language too
nothing to do with the books


>>56306104
yet you've failed to learn the fundamental premise of the website

must suck to be as dumb as you
>>
>>56306086
I've become pretty good at using Rust now.
>>
>>56306153
rust general embedded when
>>
>>56306141
>yet you've failed to learn the fundamental premise of the website
No, you're just delusional because of your unhealthy cartoon obsession. Go to any other non-weeb board besides /g/: no anime. Try it out. This is the only other place besides the anime boards where socially crippled pedophiles post their cartoons.
>>
>>56306113
Not sure how much the compiler can optimize with unsafe code blocks in the game. Same reason the compiler ignores const in C++

It's a shame that pretty much evey new language runs either on a VM or is a 'big idea' language. C and C++ certainly have enough flaws to warrant a new language, right?
>>
>>56306177
> Go to any other non-weeb board besides /g/: no anime.
lmao what the fuck
>>
>>56306199
Give it a shot: I dare you
>>>/biz/
>>>/sci/
>>>/diy/
>>>/o/
>>>/out/
>>>/fit/
>>
>>56306197
>the compiler ignores const in C++
¿?
>>
>>56306197
Actually, Rust has a lot of rules for what is allowed even in unsafe code. Using "unsafe" only allows a few more things, really. You can use static variables, you can dereference pointers, and you can call foreign functions.
>>
>>56306232
Ofc it checks whether you write to a const, but when it comes to optimizing it ignores it.
>>
File: 4chans.png (17KB, 573x295px) Image search: [Google]
4chans.png
17KB, 573x295px
>>56306256
What's the point of a "safe language" with unsafe?

>>56306177
>>
>>56306267
To reduce the areas where programmers need to look to fix a memory error. All safe code is off the hook, assuming a bug-free compiler.

You can statically verify even things that Rust deems unsafe, but it makes the type system far more complex. Splitting into "safe" and "unsafe" means the type system can be simpler while still making the code much safer as a whole.
>>
>>56306267
Does that make this the anime board? Fuck no

Try posting your weebshit on of these >>56306226 and see what happens.
>>
>>56306305
but unsafe code means the "safe" blocks aren't actually safe because of how they can interact with the unsafe code
>>
>>56306226
saw anime on /fit/, /out/, /o/ and /sci/
i know /diy/ also gets anime pictures posted from time to time without anyone getting their panties in a fucking twits because it's one of my main boards to go to because I'm not some super autistic fuck who gets mad at a taiwanese childrens cartoon image being posted

I hope that fucking programming anime is released soon so you can have an aneurism and die you autistic twat.
>>
>>56306333
You cannot introduce a memory error by writing safe code. All memory errors are caused by something written in unsafe code. Safe code can call incorrect unsafe code, yes, but the problem is always in the unsafe code.
>>
File: 1471060320464.jpg (42KB, 396x338px) Image search: [Google]
1471060320464.jpg
42KB, 396x338px
Just started programming, I'm trying to make a rainmeter skin that displays my foobar music queue.
Any advice?
>>
>>56306349
don't reply to him, he's just baiting for more anime reaction images for his anime reaction folders
>>
>>56306308
>Getting triggered by weeb images
You're just as pathetic as the weebs you're bitching about.

Now stop shitting up this thread.
>>
File: 1468128359064.png (999KB, 1200x1200px) Image search: [Google]
1468128359064.png
999KB, 1200x1200px
>>56306349
>saw anime on /fit/, /out/, /o/ and /sci/
That is a lie

>>56306378
No, this is not a safe space for autistic pedophiles and their cartoons :^)
>>
>>56304529
What bugs does it prevent exactly? Because to my knowledge, if you use malloc correctly, it prevents nothing.

>it's also compatible with better languages
I fear that I know no such language.
>>
>>56306372
>Rainmeter
I've got some advise, kys
>>
>>56304559
It's not UB.

>>56304763
Scheme
>>
>>56306333
>>56306360
Basically, saying that Rust's safety is a waste of time because it doesn't encompass everything is like saying that seatbelts are a waste of time because they only prevent 50% of front-seat fatalities.
>>
>>56306426
seatbelts don't say "anyone wearing them will not die"
>>
>>56305126
>What if you change one but forget to change the other?
Which will never happen to good programmers because they will use
int *penis = malloc (sizeof *penis);
>>
>>56306441
Rust doesn't say that all Rust code is safe. Safe Rust code is safe.
https://doc.rust-lang.org/nomicon/meet-safe-and-unsafe.html
>>
>>56305126
Also, you create a possible overflow with your shitty tricks, enjoy your bugs.
>>
>>56306457
But safe rust code isn't safe when there are unsafe code blocks
>>
>>56306465
If 90% of your code is safe Rust, and 10% is unsafe, you only need to look in at most that 10% to fix a memory error.

Most Rust projects won't have nearly that ratio, if they have any unsafe code at all.
>>
>>56306479
Not true, the unsafe code might be fine by itself but its interaction with the safe code causes errors
>>
>>56306424
>It's not UB.
It is.
>>
>>56306519
For example?
>>
I made a 8chip emulator a while ago.
How do i into dynarec? How does it even work.
>>
>>56306526
It isn't.
>>
>able to actually know what I'm talking about with people in real life after reading some of the arguments on here
t-thanks /g/
>>
>>56306529
If the safe code and unsafe code use the same resource simultaneously or interleaved with one freeing it or something
>>
>>56306545
Ignorant.
>>
>>56306569
Well, you are absolutely wrong and make yourself look like a retard.
>>
>>56306549
Well, clearly the unsafe code is not "fine", then. The change could be in the safe code, but the problem originates with the unsafe code.
>>
>>56306582
Because accessible an unset variable is not UB? That feel when you'll realize you're stupid.
>>
>>56306584
No, that's not true at all. Both pieces of code are perfectly safe and fine, seperately, on their own. Only using them together produces errors.
>>
>>56306592
>Because accessible an unset variable is not UB
I far that I do not understand what you are trying to say here, "Because accessible"? What?

Anyhow, no, accessing an unset variable is not UB, this is all.
>>
>>56306612
Reading an unset var is UB. Do we agree?
>>
>>56306582
>>56306592
>>56306569
>>56306545
>>56306526
>>56306424
>>56304559
good chat, guys
>>
>>56306612
Is UB allowed to fail to compile?
>>
>>56306620
No, are you retarded? I thought that it was clear from the start that we do not agree on that.
>>
>>56306628
I can't see why not.
>>
>>56306635
>No, are you retarded? I thought that it was clear from the start that we do not agree on that.
So you're totally ignorant. Because it is UB. I didn't know you where that stupid and ignorant.
>>
Should I use GitHub or GitLab?
>>
>>56306628
Yes

http://feross.org/gcc-ownage/
>>
>>56306652
>I didn't know you where
Me where? What? This does not make any sense.

>Because it is UB
Except it is totally not.
>>
Can someone explain to me the right way of forward declaring in c++?

<code>
//A.h
class A{

public:
B* getB();
private:
B* b;

};
</code>

If I understand it correctly, class B should be forward declared in A.h since A only uses pointers to B, however what if A wants to use B's members in the actual implementation file through the pointer (e.g. b->doSomething())? Should I just include "B.h" in A.cpp? Is this the correct way of doing things? Or will some twisted dependencies and such develop?
>>
>>56306717

//A.h
class A{

public:
B* getB();
private:
B* b;

};


Fuck.
>>
>>56306717
hmm but why embed c in html in the first place?
>>
>>56306717
>>56306723
http://stackoverflow.com/questions/4757565/c-forward-declaration
>>
>>56306595
Maybe not the code itself, but its usage is definitely wrong.

A similar example would be an unsafe array access. The implementation of the array access is well and good, and the index could be generated by safe code, but the ~usage~ of the unsafe function is what might cause a segmentation fault or worse. By marking the function as "unsafe", the responsibility of choosing a correct index is on the programmer, at the peril of a memory error (i.e. vulnerability, system damage, etc.), and it can only be called where the programmer has accepted this responsibility through an unsafe block or by writing an unsafe function. So the problem still originates from unsafe code.

Note that Rust considers panics and infinite loops safe, albeit still programmer error. The safe array access panics if the index is OOB. Option, Result, etc. are supposed to be for things that are not necessarily the fault of the programmer, such as a requested file not existing.
>>
>>56306717
You can forward declare if it only needs a pointer value. If it needs to know any of the details inside the class you'll need to include it.
>>
>>56306595
>>56306740
Basically, mark your function as unsafe if it depends on assumptions that are uncheckable by Rust.
>>
>>56306744
Is there any difference between straight up including in the header file as opposed to forward declaring in the header and including in the implementation file?

Wouldn't including the desired class in the implementation file make the header file less polluted or does the implementation file get linked with the header file and both come as one when including from elsewhere so it doesn't really matter?
>>
is
#if !defined(FLAG)

the same as
#ifndef FLAG

???
>>
>>56306859
is "defined" standard C or C++?
>>
>>56306825
If you can fprward declare, forward declare.

It gives faster compile times.
>>
>>56306859
Yes

>>56306864
Yes
>>
>>56305399
you missed a closing parenthesis, motherfucking faggot moron pre-school level ignoramus bitch-ass pleb.
>>
>>56306887
Even if I still have to include but in the implementation file?
>>
>>56306954
Yes.
>>
>>56306954
You're also not 'polluting' any files you include that header file where you forward declare in.
>>
The self type ι is seriously awesome.
Empty : Type
Empty = ιx : {P : Empty → Type} → P x

Unit : Type
tt : Unit
Unit = ιx : {P : Unit → Type} → P tt → P x
tt if-true = if-true

Bool : Type
false : Bool
true : Bool
Bool = ιx : {P : Bool → Type} → P false → P true → P x
false if-false _ = if-false
true _ if-true = if-true

Nat : Type
zero : Nat
succ : Nat → Nat
Nat = ιx : {P : Nat → Type} → P zero → ((m : Nat) → P m → P (succ m)) → P x
zero if-zero _ = if-zero
succ m if-zero if-succ = if-succ m (m if-zero if-succ)
>>
>>56307029
maybe if you don't care about proof correctness
>>
>>56307073
Why, what's wrong with it?
>>
>>56306924
I wish my compiler messages read like this...
>>
>>56307091
>Empty : Type
>>
>>56307118
The empty type is a type, yes. I challenge you to find an inhabitant of that type, by the way.
>>
>>56307122
recursion lets you defer errors to infinity as well as fail to terminate
>>
>>56307142
There is no general recursion. You can't write:
absurd : Empty
absurd = absurd
>>
>>56307152
absurd isn't Empty it's
a:type -> Empty -> x:a
>>
>>56306665
Shut up idiot.
>>
>>56307164
Whatever, call it "bad" then.
// bad : Empty
// bad = bad

absurd : {A : Type} → Empty → A
absurd {A} x = x {λ_ ⇒ A}
>>
>>56307223
recursion is a side effect and should be kept that way
>>
>>56307249
I thought this was a proof-theoretic argument? Effects affect the type, i.e. the proposition being proved.
>>
File: hLeD7PV.png (75KB, 1920x1080px) Image search: [Google]
hLeD7PV.png
75KB, 1920x1080px
Anyone know a legit way to get Amazon reviews? I just need text/rating per product.

Those nerds at Amazon stopped giving it out via their API. It's an iframe with a bunch of bullshit and I don't want to write a crawler.
>>
>>56302545
Learning Math & Physics can definitely be useful if you are designing software products that rely on it, like say control systems in aircraft or the software side of a Radar. But for that kind of task, companies are more likely to look for formally educated engineers.
>>
I know you guys make fun of this sort of thing a lot, but I'm a retard who doesn't know the simple way to do this. Using Python 3 btw.

thing1 = my_array[-1]
thing2 = my_array[-2]
thing3 = my_array[-3]
...
thing63 = my_array[-63]
thing64 = my_array[-64]


Because that is verbatim what I have to do right now and I don't want to copy/paste 64 times and change the two values on each line.
>>
>>56307542
me oops. forgot to actually ask, how do I simplify that without looking like the college diploma programming guy?
>>
>>56307324

scrape those fools I guess

get the webpage you want with python, read it, then shit out the data
>>
bored
>>
>>56307574
spiderbro planning out his new web layouts

I hope you catch twice as many flies with that kind of web.
>>
File: 1451744468455.jpg (3MB, 3634x2569px) Image search: [Google]
1451744468455.jpg
3MB, 3634x2569px
>>56307560
It's against their TOS and it'd be a business, so it has to be legit. If my API access gets banned when I have paying customers, I'm fucked :(
>>
File: 1446512724802.jpg (973KB, 1920x1080px) Image search: [Google]
1446512724802.jpg
973KB, 1920x1080px
What's your dream job, /dpt/?
>>
>>56307617

Can't you view amazon pages without agreeing to a TOS
>>
>>56307649
NEET
>>
>>56307201
>get proven wrong
>start using insults
sure
>>
>>56307704
You have proved nothing anon. And you can't prove what you're saying because it's wrong.
Using a not set variable is C is undefined behavior. Read the standard please.
>>
>>56307652
I guess, but then I have to put effort into making the crawler not get me IP b& and always having enough IPs available to never stop scraping

I may just forgo this part. The customer can just pay some intern $10/hr to copy/paste reviews/ratings all day. Or I can just outsource that to mechanical turk
>>
>>56307745
I have read the standard, have you however? If you had done that you would know that using an uninitialised variable in C is NOT undefined behaviour.
>>
NEW THREAD!!

>>56307754
>>
>>56307757
Using it is an undefined behavior.
>>
>>56307775
Replied to you in the new thread.
>>
>>56308446
Point it please.
>>
>>56308474
>>56307814
You could find it yourself easily without asking to be spoonfed however.
>>
>>56305581
/thread
>>
>>56306005
details plz
>>
>>56306141
>the code is for a parser for some language too
>nothing to do with the books

>what is homotopy type theory
Stop talking about thing you have no idea about, you retard.
Thread posts: 324
Thread images: 25


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

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.