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

/dpt/ - Daily Programming Thread

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

Thread replies: 319
Thread images: 32

File: AthOR0U.png (176KB, 441x421px) Image search: [Google]
AthOR0U.png
176KB, 441x421px
previous: >>57539855

What are you working on, /g/?
>>
>>57544640
I have a python/maths question I'm wondering if I can compress this code, here's the relevant code
e = (a+c)/x
f = (b+d)/x
g = 100*(f/(f+e))
>>
>>57544640
I'm fucking slacking!
>>
>>57544723
Me too :(
>>
I've always wanted to write a toy emulator but I don't know where to begin.
>>
>>57544676
g = 100*(b+d)/(a+b+c+d)
>>
is there a way to have vim do syntax highlighting? i'm finally comfy with the commands but it'd be helpful in using it to code
>>
Is it possible to train a machine learning algorithm that would recognize a character from an anime on pictures (with different drawing styles) ?
Has this been done ?
I know it can be done with normal photos but can it be done with faces in drawings ?
>>
>>57544775
that can't be right. where's X
>>
>>57544790
sounds possible to me
>>
>>57544783

:syntax on
>>
>>57544971
thanks, i assume it just goes off the extension?
>>
>>57544878
it cancels out.
>>
>>57544790
We should make a bot that gives a 10 minute ban and deletes the thread when people accidentally make a thread with /dpt/ in the title that doesn't have anime in it.
>>
Why aren't you programming on an e-ink monitor friends?
>>
>>57545223
shit did they finally come out with one? just in time for me to have completely lost interest in e-ink. how much is is this time? last time they came out with one it was like $800
>>
>>57545223
>type a word out
>whole screen flashes
no thanks
>>
>>57545248
I'm pretty sure it might be the same on. they're expensive.
https://www.youtube.com/watch?v=iDj8U_xRKyI
also they're chink shit that needs its own software so you know there'll be all kinds of issues.
but E-ink definitely is more pleasant
>>
>>57545223
>open image
>chinkshit
ehhhhhh
>>
>>57545289
see >>57545290 clearly false.
>>
Wrote a little ruby script to generate random names using markov chains. The names are of "shitty fantasy novel" quality.

A few favorites
Stefferson
Tylanarquiellai
Books
>>
Is they a more elegant way to do

public void removeEdge (V from, V to) {
if (!(this.contains(from) && this.contains(to)))
throw new IllegalArgumentException("Nonexistent vertex");
neighbors.get(from).remove(to);
this.remove();

}

public Map<V,Integer> outDegree () {
Map<V,Integer> result = new HashMap<V,Integer>();
for (V v: neighbors.keySet())
result.put(v, neighbors.get(v).size());
return result;
}

public Map<V,Integer> inDegree () {
Map<V,Integer> result = new HashMap<V,Integer>();
for (V v: neighbors.keySet())
result.put(v, 0); // All in-degrees are 0

for (V from: neighbors.keySet()) {
for (V to: neighbors.get(from)) {
result.put(to, result.get(to) + 1);// Increment in-degree
}
}
return result;
}

public void remove(){
Map<V, Integer> indegree = inDegree();
Map<V, Integer> outdegree = outDegree();
for (V i: indegree.keySet()) {
for(V o: outdegree.keySet()){
if ((indegree.get(i) == 0 && outdegree.get(o)== 0))
this.removeVertex(i);
}
}
}

public void removeVertex(V vertex){
if(!(this.contains(vertex)))
throw new IllegalArgumentException("Nonexistent vertex");

for(Entry<V, List<V>> v: neighbors.entrySet())
v.getValue().remove(vertex);
neighbors.remove(vertex);
}


So that

The current graph: 
1 -> [2]
2 -> [3, 4]
3 -> [1]
4 -> [1]


    1 -> [2]
2 -> [3, 4]
3 -> [1]
4 -> []


    1 -> [2]
2 -> [3]
3 -> [1]
4 -> [1]


    1 -> [2]
2 -> [3]
3 -> [1]


When I remove the edges?
>>
>>57545290
ah, yeah dasung. seen it. i just download redshift, step outside and rest my eyes for a bit, and call it a day.

what I'm interested in is when they can make big e ink devices for cheap. they have a few our but they're super expensive. E ink is great, just as easy as reading a book, but it has to be strictly text so usually no educational books or most PDFs because the formatting will just be unbearably bad and impossible to read.
>>
File: 20161116235908_1.jpg (107KB, 719x961px) Image search: [Google]
20161116235908_1.jpg
107KB, 719x961px
Why has gaming become so shit?
>>
File: reader.jpg (127KB, 1920x1080px) Image search: [Google]
reader.jpg
127KB, 1920x1080px
>>57545452
educational books would be alright in a big clipboard size reader like this one. It'd just be like a black-n-white copy of a page in an educational book
>>
File: code.jpg (39KB, 1174x510px) Image search: [Google]
code.jpg
39KB, 1174x510px
i'm doing the Java Course on Code academy and i can't understand this answer. Shouldn't it be "print true" since 10 != 0
>>
>>57545619
No. 110 % 100 evaluates to 10, as 10 is the remainder of 110 divided by 100.
>>
>>57545619
110%100 = 10, nigger
>>
>>57545652
>>57545648

Jesus fucking Christ... i was doing 110 % 10 loool thanks for pointing how stupid i am. better go and get some sleep cause it seems i can't think straight anymore
>>
>>57545466
what gaem
>>
code academy anon here.... btw is there any good book/other resource to learn java other the code academy?
>>
File: 1478748801757.jpg (41KB, 443x359px) Image search: [Google]
1478748801757.jpg
41KB, 443x359px
>>57545619
>Code academy
>>
>>57545697
sorry mr. trump. i voted for you
>>
>>57545696
Classes in school? I've used Java since high school sophomore year. All my college classes use it too.
>>
>>57545696
https://en.wikibooks.org/wiki/Java_Programming

if you just arbitrarily chose java as a first language to learn then read SICP instead
>>
>>57545683
>Blue revolver, least retarded game recently released
Everything else is either candyclick simulator or truckfuck saga
>>
>>57545738
lol, I think I contributed to that book >10 years ago when I was in high school and learning Java.
>>
>>57545740
looks like one of the games i played in middle school on newgrounds
>>
File: 1472790253551.jpg (9KB, 500x441px) Image search: [Google]
1472790253551.jpg
9KB, 500x441px
Lads, any MATLAB'ers here?

>>>/sci/8478899

Really need some help

t. brainlet
>>
>>57545773
haha, funny picture. I hope you find someone that can help you :)
>>
>>57545795

Really though lad, wouldn't mind my neurons being stimulated .
>>
>>57545773
i would heem you instantaneously if you asked me this in real life
>>
>>57545810

Thanks friend.
>>
>>57545618
That one's discontinued. Sony Digital Paper. Only one I know of that currently exists and is big enough to read PDFs is the Goodereader one on Indiegogo for $700+

It would probably be real nice to have, but I don't care enough to spend that much on one, my PC costs less. I hope big ones come down in price and more people make them.
>>
>>57545810
sure are talking the piss there m8

if you tried anything you'd be eating pavement in under a second
>>
Can someone explain to me how the listener workers in http://www.codeproject.com/Articles/25057/Simple-Example-of-MVC-Model-View-Controller-Design
I'm trying to learn MVC, they added the controller as the listener in the view section of the code. So when a button is pressed isn't the listener suppose to handle the action? The controller(listener) doesn't handle the events, view is the one that actually handles the button clicks events.
>>
You guys should all join codingame, it is probably the best online programming challenge site out there.
>>
File: disgusting-son.jpg (82KB, 600x567px) Image search: [Google]
disgusting-son.jpg
82KB, 600x567px
>>57545773
>MATLAB
literally worse than the worst programming languages combined

>let's completely change the standard every new release to throw off pirates but also put a huge burden on paying businesses who now have to relearn the standards
>let's also do it in a convoluted way so that nobody can do shit

It's also only Turing complete in theory. I'd honestly, HONESTLY, unironically rather you use fucking Python or C++ or Java or Fortran or assembly or fucking ANYTHING other than Matlab.
>>
Should constants be all caps, or should they follow naming convention of variables?
>>
>>57546349
ThEy ShOuLd AlTeRnAtE cAsE.
>>
>>57544640
What is the purpose of threading in Python? My understanding is that GIL prevents two threads from running simultaneously, so what's the point of calling a thread rather than just a function?
>>
File: really_makes_me_think.png (53KB, 256x256px) Image search: [Google]
really_makes_me_think.png
53KB, 256x256px
https://www.youtube.com/watch?v=65KhNiYZajg can you guys do all this?
>>
>>57546641
>>>/v/
>>
I'm trying to get better at Java. What are some projects that I can work on that I can also use to build a resume? I plan to use these experiences in order to qualify for internships.
>>
>>57546645
what, are you retarded? there aren't many programmers on /v/
>>
File: 1431432030106.jpg (13KB, 228x238px) Image search: [Google]
1431432030106.jpg
13KB, 228x238px
>>57546679
Nobody cares about your video game shit.
Go back to your containment board.
>>
Hey guys I haven't used Java in a while and I was still a semi beginner when I was using it. I'm looking for a quick refresh guide on it if anyone has a link to one.
>>
>>57546700
if you keep being mean to me I can't guarantee your safety
>>
>>57544676
The lazy way is to run it through a CAS. It will do the algebra for you.

$ maxima
(%i1) e: (a+c)/x;
c + a
(%o1) -----
x
(%i2) f: (b+d)/x;
d + b
(%o2) -----
x
(%i3) 100*(f/(f+e));
100 (d + b)
(%o3) -----------------
d + b c + a
(----- + -----) x
x x


No simplifying here, the way you wrote it is better.
>>
>>57545290
>that awful latency.
>>
>>57546735
you're writing code, so what? it's not like you even need much visual feedback
>>
>>57544640
complete beginner learning sql
>>
>>57546741
I can tell you've never typed on a kindle before, the refresh rate is utter trash.
>>
>>57546723

Neat.
>>
>>57546741
i've had to program with latency an entire year in my retarded intro to csci class. you can feel free to buy it, but i won't
>>
>>57546741
Sure I don't really need it when typing, but 1 second latency is no excuse. A daisy wheel printer is faster.
>>
>>57546764
no I've never typed on a kindle, I use it for reading.
there's also a difference in their refresh rate, a kindle could refresh much much faster if it didn't have to limit itself for its battery
>>
>>57546782
Yeah, but the other one is a monitor. It's still slow as fuck.
>>
Refinement typing is neat because you can integrate it with unification with SMT.
>>
>>57546556
Running functions in a separated thread can be useful both in organizing your code in a sane way and running "blocking" functions (e.g. waiting for network input).
>>
>>57545066
No, it uses the "&filetype" variable. This variable is deduced from the extension but you can also manually set it using ":set ft=programminglanguage".
>>
>>57546556
What's the point of running more than one program on a computer.
>>
>>57546834

Threading and multiprogramming are not the same thing.
>>
>>57545223
I'd really love to.
They made some big advances on color eink screens this year. Maybe we'll get color eink that can run at 30Hz in 2020.
>>
>>57546852
I know.
>>
>>57546723
well you can cancel the x as the fractions in the denominator have a common denominator, but It would increase the domain of the function to include x=0.
>>
File: sicp.png (2MB, 1106x1600px) Image search: [Google]
sicp.png
2MB, 1106x1600px
What are some lesser known must-read programming textbooks, /g/? I've already checked out the typical recommendations like SICP and The C Programming language.
>>
People don't use Python unironically right?
>>
>>57546968
EPIC MEME XDDD
>>
>>57546979
Why do you feel like SICP is a meme? I thought it was a good read.
>>
>>57546968
All the typical ones?
Little Schemer?
TAOCP?
Dragon book?
Intro to Algorithms?
>>
>>57544763
Check out chip8 for really basic stuff.
>>
>>57546968
Looking at my bookshelf:

The Art of Prolog
Hackers Delight
The Lisp 1.5 Programming Manual
>>
>>57546989
Never heard of Little Schemer or Intro to Algorithms. I'll definitely check them out, thanks anon.

>>57546998
Three more I've not looked at. Thanks. I might compile all these into a list and ask for them as christmas gifts.
>>
>>57546984
How is it not both?
>>
File: theOGscriptkiddies.jpg (129KB, 401x1317px) Image search: [Google]
theOGscriptkiddies.jpg
129KB, 401x1317px
Reminder that you'll never reach god-tier if you don't whine in the comments
>>
>>57546968
I forgot to mention Code Complete
>>
>>57546125

I made the mistake of using it to write a simple shitty roguelike for my final in my egr class. wasn't that bad actually, but goddamn it does everything wrong.
>>
>>57544640
  int* good,
int& good,
int *bad,
int &bad
>>
finished productionalizing my django site. feeling really confident in the django-sql-jquery stack

began writing a quick clean up script to clean up our massive log directories. my SMS robot directory takes like three minutes to refresh, shit is ridiculous. a log generated every minute
>>
>>57546978
Surprisingly some do, I once tried to explain how closures are suppose to work to a Python-cuck but he just kept mumbling "muh ducktyping".
>>
>>57544763
Check this out: http://www.boundvariable.org/task.shtml
It's a really simple virtual machine, it should be enough to get you started.
>>
>>57546928

Okay.
>>
File: ready.webm (3MB, 1366x768px) Image search: [Google]
ready.webm
3MB, 1366x768px
>>57544640

I'm working on a simple AI vehicle simulator in OpenGL - it's pretty crappy so far though, desu
>>
Why the fuck do I need to force myself to drink in order to find the strength to code. I can't work on my projects without having alcohol in my blood anymore.
>>
>>57547026
reminder: both are acceptable and trash at the same time
>>
>>57547026
int* good, gooder;

Where is your god now?
>>
>>57547140
dressing up like a girl works twice as good as drinking
>>
>>57547189
C/C++ is truly shit
>>
>>57547189
Ignore the temptations of the devil.

My god is by my side.
int* good;
int* gooder;
>>
>>57547238
Why do people think that int * is a separate type to int?
A pointer to a type is it's own special variable type.
>>
>>57546810
Ah, that makes sense. Thanks, anon.
>>57546834
To be able to do multiple tasks simultaneously, which GIL prevents from happening.
>>
>putting * on the left
I bet you also write
const char* s
.
char const *s
master race. Only time I would ever stick * to the type is if there's no name, e.g. in a function declaration.
>>
>>57546741
At that speed of typing you don't, but some of us type more than 20 words per minute.
It will be borderline unusable when you're typing at 100+ wpm, which everyone in this general should be doing anyway.
>>
>>57547279
>char const *s
>not
const char *const s


do you even const correctness?
>>
>>57547260
I don't even understand what you are trying to say. What is your complaint?
>>
>>57547310
That's
char const *const s
to you, mate.
>>
>>57547118

Nice not-boids, my dude.
>>
>>57547264
So is it like javascript where you'd have to yield execution otherwise it'll execute one thread until completion?
>>
File: golang_2016-Nov-16.jpg (132KB, 1038x1278px) Image search: [Google]
golang_2016-Nov-16.jpg
132KB, 1038x1278px
https://blog.golang.org/go-fonts

does your favorite language have its own font?
>>
File: ctci-haskell.png (53KB, 883x557px) Image search: [Google]
ctci-haskell.png
53KB, 883x557px
>>57544640
i'm going through my new copy of cracking the coding interview and doing the questions in haskell first, and then java. i've only done the first 4 problems but i'm happy to say i haven't gone pajeet on any yet, or had the inclination to. all the efficient solutions so far seem to just rely on sorting the list first, which was obvious to me
>>
Git is really confusing.

>>57547336
They don't count as boids if they're not following each other?
>>
>>57547437
Based Google
>>
>>57547461
1. git clone https://github.com/john-doe18/my-repo.git
or git pull
2. git add <filename>
or git add *
3. git commit -m "Commit message"
4. git push origin master
>>
File: ok2.jpg (21KB, 628x676px) Image search: [Google]
ok2.jpg
21KB, 628x676px
>>57547437
looks good
>>
>>57547461
>They don't count as boids if they're not following each other?

I don't really know what constitutes a 'boid'. I think the flocking behavior is the most important.
>>
>>57547437
that i%prime looks disgusting with that font
>>
>>57547437
FiraCode is like Haskell: the font.
>>
>>57547487
>doesn't use commit -am

WORKFLOWS!
>>
>>57547500
Fira Code is great for every language, though. I use it for C++ and Python, when I'm forced to use Python.
>>
>>57547500
that's the one with the ligatures? i feel like that would drive me nuts
>>
which is the most redpilled language ?
>>
>>57547437
>serif font with programming
Christ, what the fuck is wrong with them?
>>
>>57547507
idk what that is, that text was just copy and pasted from my "how-to-git.txt" file
>>
>>57547515
what language is gab.ai written in? that one

>>57547521
what is probably more out there: i think pike uses a proportional font
>>
>>57547487
I'm trying to understand submodules. I don't even understand the documentation.
>>
File: haskell.png (786KB, 1000x1300px) Image search: [Google]
haskell.png
786KB, 1000x1300px
>>57547515
>>
>>57547521
>Go proportional fonts are sans-serif, like several popular fonts for screen displays. There is some evidence that some sans-serif faces at small sizes and low resolutions on screens are slightly more legible than their seriffed counterparts, while at large sizes, there is not a significant difference in legibility between sans and seriffed faces, at least in the pair tested. [1] (The bracketed numbers refer to the references listed at the end of this article.)
eat shit, whiner
>>
File: serif-sansserif.jpg (42KB, 840x400px) Image search: [Google]
serif-sansserif.jpg
42KB, 840x400px
>>57547549
>serif, noun, a slight projection finishing off a stroke of a letter in certain typefaces.
That is a serif font, anon. Them misusing the term sans-serif doesn't mean that all of the serifs suddenly are something else.
>>
>>57547573
they're mere distinguishing marks
>>
>>57545394
Looks nice to me senpai
Fuck thinking about another way to do that though
>>57546968
>>57547010
> Code Complete
Not lesser known tho, but really good

Others from the top of my head (all very well known)
The Mythical Man Month
The Pragmatic Programmer
Effective Java
Clean Code
>>
>>57547509
>>57547500
their github says it doesn't work on gnome terminal, doesn't work with vim, doesn't work with emacs WHATS THE POINT
>>
>>57547002
>Intro to Algorithms
i want to caution that you need to go into this book with a plan. if you just try to read the whole thing in order you'll likely get bored
>>
>>57547712
Should work with anything that can render ligatures.
>>
>>57547677
Thanks for more book recommendations. Still building my list.

>>57547722
It'd be a good book to have on my bookshelf at least, right?
>>
>>57547315
int* x;

makes more sense than
int *x;

because in the former, it is clear that 'x' has type 'int*' where as in the latter is some weird abomination that attempts to emulate the conventional style for dereferencing.
The syntax rules for
int* a, b;

is an unfortunate consequence of C being a shit language that needs to go away soon.
All type theoretical literature uses the form
<var> : <type>

or something similar, for very good reason. Multiple definitions can also be made in this way, e.g. this is how C would look if designed by type theorists
let a,b : int ptr;
>>
>>57547732
it's nice to have and not stupid expensive. i even think you can use it as an introduction, you just need to have some sort of path through the book -- find a syllabus somewhere with enough detail. i know mit uses it, for example
>>
>>57547743
>designed by type theorists
>uninitialized
>>
>>57547743
>if designed by type theorists
Oh good, Just what we need. Another useless language for theorists to wank over.
>>
>>57547743
>the latter is some weird abomination that attempts to emulate the conventional style for dereferencing.


"Ids a mnebonic :DDDD" - Bennis Ridgie
>>
>>57547743
|- a : *int
-----------
|- *a : int

Really makes you think.
>>
>>57547743
You know what the syntax for
let a,b : int ptr;

reminds me of?

Swift, an absolute dogshit language that's more of an affront to the craft programming than PHP.
If Swift is better than C in your eyes then your opinion clearly needs to be discarded.
>>
>>57547845
There was one anon here a couple of days ago who thought Swift was the comfiest languages he'd ever worked with.
>>
File: 1476571113531.jpg (66KB, 1280x848px) Image search: [Google]
1476571113531.jpg
66KB, 1280x848px
So, what color theme do you use?
>>
>>57547876
I think it's pretty comfy. Until you work with strings, but I think it's a failing of the standard library. The language itself is pretty good.
>>
>>57547845
I was actually modelling it after ML syntax for parameterized types (e.g., 'a list), plus every functional language uses 'let' to denote variables. Never touched Swift in my life, but thanks for projecting :-P
>>
>>57547879
>>57547458
>>
>>57547743
>where as in the latter is some weird abomination that attempts to emulate the conventional style for dereferencing
That was the driving factor when designing the C syntax (declaration syntax follows usage)
>>
>>57547962
Is that how they came up with function pointer type syntax?
Or the backwards typedef syntax, one of the few places C++ actually got it right (using <newtype> = <oldtype>)
>>
File: main.png (277KB, 966x1694px) Image search: [Google]
main.png
277KB, 966x1694px
>>57547879
Paramount.vim.
It's nice.
>>
>>57547988
>Is that how they came up with function pointer type syntax?
Yep.
It gets a bad rep but it's actually not that difficult when you realize that fact.
So when you want an array of function pointers? Think of where you put the [] if you were to dereference it (i.e call it), and that"s where they go in the declaration as well.
Returning a function pointer from a function? Again, think of how you would invoke it directly like: returns_fp()(); and it becomes clear how the declaration must look.
>>
>>57548052
I suppose we will have to say that it is a matter of taste.
>>
looking for a guide for desktop applications using java.
>>
File: 1479184728710.gif (1MB, 320x240px) Image search: [Google]
1479184728710.gif
1MB, 320x240px
Hey guys, anyone good with PHP?

>The thumbnail model and all it's data.
<div class='modal-body' align='center'>
<img src=../../$ImagePath width='300' height='300' style='padding: 10px 5px;' />
<h1>£$Price</h1> <h4>_____</h4> <h4>$Sport</h4> <h4>$Balance mm</h4> <h4>$Weight g</h4>
</div>

>The current code for trying to send more than the ID.
<form action='addtoCart.php?'>
<button type='submit' value='$Id' name='Id' class='btn btn-primary'>
<input type='hidden' value='$Description' name='Description'>
<input type='hidden' value='$Brand' name='Brand'>
<input type='hidden' value='$ImagePath' name='ImagePath'>
<input type='hidden' value='$Price' name='Price'>
Add to basket</button>
<form>

Hey guys, I've got an issue here. My friend created this thumbnail situation where if you press a button, the ID will go to the cart, but no other detail will either. How do I transfer the rest of the data?.
>>
>>57548113
Read sticky
>>
this absolute runt (too old to be in college, overweight, and has video game/tribal tattoos) LOVES php. he fanboys so hard about it every software engineering class for some reason, as if people care about how much he loves php. i had to write code in it this semester and it just seemed like asscancer to me
>>
>>57548158
>not your personal army
c'mon now, ribbit.
>>
>>57548179
42k salary though mate
>>
>>57548185
he also constantly demeans our very intelligent csci theory teacher. always belligerent because he can't conceive of nondeterminism in that little runt head of his. then, the next class, he sucks the software engineering professor's dick and yaps about how much he loves so and so design pattern and how so and so about java is so great
>>
>>57548179
>too old to be in college
Now i'm sad.
>>
>>57548179
>>57548219

Just shoot him, m8.
>>
>>57548273
i really, really want to
>>
>>57548312

It's your right as an American citizen.
>>
How does the "this" variable work in javascript?
What is it referring to?
>>
>>57545223
I want to see my porn in colour
>>
>>57548395
It refers to the current execution context, I believe.
>>
>>57546705
Try the 'learn java' app on android. Got a nice interface and quick quizzes
>>
One thing I don't understand about C is the preprocessor

Why is it so inconsistent with the main language?
>>
I registered an IRC nickname for the first time about five minutes ago and apparently I'm already banned from ##c++.
>>
>>57548521
The C preprocessor is very well defined, just like the language it complements.

It's just extremely limited because it doesn't allow recursive expansion, leading to stupid shit like writing 3+ intermediate text expansion macros.
>>
>>57548521
Because it's technically an entirely different language.
Also I think you can use it for assembly as well as C?
>>
>>57548395
It refers to the current instance of the current class you're in. If you're in a static method, there is no this, since there is no instance.
>>
>>57546641
why is his phone shooting webs at shit dude
>>
>>57548619
Whoops, misread. I don't know javascript that well, though i've used this.
>>
>>57547026
You probably shouldn't be bragging about being a retard around here.
>>
>>57547026
int const *good;
int const &good;
int const * const good;
int * const good;

const int* bad;
const int& bad;
const int *acceptable;
const int &acceptable;
const int* const bad;
int* const bad;
>>
How do I write a resume for a junior dev position if I have zero paid experience?
I only have a github portfolio.

I really just want to stop wasting my time with this shit CS program so I can finally move out, neither of my parents think I'm doing anything of value with my time.
>>
>>57547712
Even without the ligatures, it's still a nice looking typeface.
>>
>>57548805
Do you have unpaid internships? Then right it like any other.

It you have not graduated yet, then suck it up. Go do some co-ops and internships.
>>
>>57547879
http://color-themes.com/?view=theme&id=563a1a6c80b4acf11273ae6f
>>
>>57548833
*Write it. Time for bed.
>>
>>57548774
const int* Foo;
const int& Bar;


Is proper.
Variables in C/C++ are meant to be read inside-out.

>const int* Foo;
>Foo, is a pointer, to an integer, that's constant.

>const int Foo[5];
>There are 5 foos, which are integers, that are constant
>>
>>57548395
When you call a function with A.f(), then in the context of the 'f' function, 'this = A'
e.g.
var o1 = { name: "o1" };
var o2 = { name: "o2" };
function f () {
console.log(this.name);
}
o1.f = f;
o1.f(); // "o1"
o2.f = f;
o2.f(); // "o2"

In a global context, or when a function is called without being a member of an object, 'this' is the object where globals are stored; e.g. in a browser, it is the 'window' object.
glob = "glub"; // global variable
function g () {
console.log(this.glob);
}
var o = { glob: "blub" };
o.g = g;
g(); // glub
o.g(); // blub


You can explicitly control the value of 'this' using the .apply() method of all functions:
function h () {
console.log(this);
}
h(); // <Window ...>
h.apply("THIS", []); // THIS
>>
>>57548858
You couldn't be more wrong.
const on left is inconsistent with how const is read in all other situations:
>const int* const foo;
>foo is a constant pointer to an integer which is constant
vs
>int const * const foo;
>foo is a constant pointer to a constant integer
you can't write
>const int const * foo;
this is an error.

Writing in your mongoloid style introduces exceptions to standard rules and should be avoided.
>>
What language do I learn to stop being a faggot? I know C, Java, and have used assembly.
>>
File: hereyougo.gif (88KB, 10000x10000px) Image search: [Google]
hereyougo.gif
88KB, 10000x10000px
python, then you will be unfaggoted
>>
>>57548895
>this is an error
before I get a 'nuh uh' from you or somebody else, it will compile but it won't have the type signature you think it should have.
const int const * foo; boils down to a non-const pointer to a constant int rather than a constant pointer to a constant int.
>>
>>57548896
I'd recommend a functional language as you seem to already know every other paradigm. I'd recommend Erlang but Haskell is good too. There's also Ocaml but I don't like it (don't really have an argument against it though). You could try Clojure too but I don't know what it's worth.
>>
this >>57548907
is meant for>>57548896
>>
Every decent programmer should be able to write a Forth meta interpreter
>>
File: math.jpg (45KB, 712x863px) Image search: [Google]
math.jpg
45KB, 712x863px
So anons, someone help me here.

I solved the other problems using a method but it didn't work for this one.

I move a^-2 to the right side and then make the exponent positive, and move the m^-3 and n^-4 to the left side and make them positive.

I did the same thing for the bottom sum, moving r^-2 to the left and collecting the terms to make r^4.

What am I getting wrong in the middle sum? I move b^-2 to the right and make it positive, collect it with b^-3 to make simply b, and then move p^-1 over and collect it with p to make p^2.

I noticed in the pic I wrote the wrong answer in but I worked it out to be 1/ 4bp^2
>>
>>57548941
I think clojure is great for java people--they can use the libraries they used in java in a functional paradigm. Also, a lot of shops are starting to use clojure. I think it will really make you stand out.
>>
If you cant write a web crawler in your language efficiently, then you are using an obsolete language.
>>
>>57549006
I have no idea what you're babbling about, but this is the solution

b^(-2)*p^(-1)/(4*b^(-3)*p) = b^(-2)*p^(-1)*(4*b^(-3)*p)^(-1) = b^(-2)*p^(-1)*4^(-1)*(b^(-3))^(-1)*p^(-1) = b^(-2)*p^(-1)*4^(-1)*b^(-3*-1)*p^(-1) = b^(-2)*p^(-1)*4^(-1)*b^3*p^(-1) = b^(-2)*b^3*p^(-1)*p^(-1)*4^(-1) = b^(-2+3)*p^(-1+(-1))*4^(-1) = b*p^(-2)*4^(-1) = b*(p^2*4)^(-1) = b/(p^2*4)
>>
>>57549006
This isn't really programming, but I'll help anyway.
I don't really understand your method, so I'll explain how it is supposed to work, rather than how to fix your method.
x^-2 = 1/(x^2). Basically, just flip the numerator/denominator when the exponent is negative then simplify. With 15 the steps would be:
 ((b^-2)(p^-1))/((4b^-3)(p)) 

After flipping them it is:
 (4b^3)/((b^2)(p)(p)) 

Which then simplifies down to:
 (4b)/(p^2) 
>>
>>57549206
I fucked up, shouldn't have transferred the 4 with the b^3. Other than that, it's correct though.
>>
>>57549006
>I move b^-2 to the right and make it positive, collect it with b^-3 to make simply b
That's not how numbers work, anon. 2-3 ≠ 1.
>>
>>57549006
you need to understand what it actually means instead of just doing it "mechanically"

y^(-x) = 1/y^x

b^(-2)/b^(-3) = (1/b^2)/(1/b^3) = b^3/b^2 = b^1 = b
>>
>>57549238
(-2) - (-3) = 1
>>
>>57549423

Oh, well that's starting to make sense. Why did you flip the numerator/denominator in the third step so its b^3/b^2 rather than the other way round?
>>
>>57549580
because you're dividing a fraction by a fraction.
>>
>>57549580
you have 1/b^2, and then you divide by (1/b^3) which is the same as multiplying by b^3, so it's b^3 * 1/b^2 = b^3/b^2
>>
>>57544640
I'm learning python. I am grasping the basics right now.
>>
Have you ever gone on a day long programming streak where you write but not finish this massive program and you open it a week later and you don't want to finish it because it's so large?
>>
>>57549773
This is what happens with all my projects.
>>
File: 1441479353494.png (293KB, 633x758px) Image search: [Google]
1441479353494.png
293KB, 633x758px
>too retarded to figure out how to align a JFrame element to the top right of the window over a GridLayout panel

time to change major to gender studies
>>
>>57549713
and in case this helps activate your almonds:

dividing by a = a / 1 is the same as multiplying by 1 / a

dividing by a / b is the same as multiplying by b / a

multiplying by b / a is the same as dividing by a / b

multiplying by b = b / 1 is the same as dividing by 1 / b
>>
>>57549773
Yep. I find it helps to force myself to stop and not do it for the rest of the day. Using version control for this is great, work on a feature and get it to compile each day, try to aim for a commit every time you work. Then stop immediately and come back the next day when you're at a stage where you can commit a feature, even if it's in a testing branch and not working yet. Helps me to delay my motivation out over the course of time and turn it into an actual project.
>>
>>57549809
>GUI in Java

you'll get there anon, but not like that.
>>
>>57549884
I have to do it for class unfortunately.
>>
>>57549809
Not really, the whole thing is a mess.
>>
enum test {THING};
int THING;


what is the point of enums in C if these two things collide?
>>
File: Capture.png (22KB, 555x268px) Image search: [Google]
Capture.png
22KB, 555x268px
What should i take?
>>
>>57549918
Is changing your major an option?
>>
/dpt/, newbie here.

Suppose that I'd want to make a file made of the first 60 trillion digits of pi.

How much memory would that take in a computer?
>>
I'm a NEET and an alright programmer. Should I go into CS?
>>
>>57549933
60 terabytes
>>
>>57549933
as an uncompressed string of text, 60 trillion bytes = 60 terabytes, but by dicking around with the file format and compression you can lower the size by a lot (1 byte can have 256 different values but you only need 10 values to repesent digits 0-9)
>>
>>57549508
But it's not -2. You are switching it to the opposite side, so it becomes (b^2)(b^-3)
>>
>>57549974
this

you could store all digits in 4 bits
>>
is the secret to coding not learning the fucking language, but hte logic behind it

because i feel PRETTY FUCKING RETARDED NOW that i get the logic behind me having to list out addition and "if this, list this"

I had to work backwards to find out why the numbers were printing in python. I feel fucking retarded and happy.
>>
>>57549979
add those together, get -1, then switch the -1 to the numerator, get 1
>>
>>57550002
Which is exactly what you didn't do, anon.
>>
>>57549974
That isn't compression.

>>57549933
You can store a function that calculates pi to 60 trillion digits in a few bytes, (or more depending on the language)
>>
>>57550003
i'm not him
>>
>>57550004
>That isn't compression.
yes it is
>>
File: 1476251993200.jpg (52KB, 350x496px) Image search: [Google]
1476251993200.jpg
52KB, 350x496px
>>57544640
https://en.wikipedia.org/wiki/Recursive_descent_parser#C_implementation
Can somebody give me an explanation for this code?
>>
>>57550017
define compression.
>>
>>57550011
Then why are you defending his bad algebra that gave him the wrong answer?
>>
>>57550026
reduce the file size (usually by doing extra computations to mangle the data) vs the naive way to store the data
>>
>>57550004
>How much memory would that take in a computer?
>You can store a function that calculates pi to 60 trillion digits in a few bytes, (or more depending on the language)
You're just pretending to be retarded, right?
>>
>>57550042
The naive way to store a number on a binary computing platform is in binary.
You aren't compressing anything if you just chose the false representation in the beginning.
Furthermore, he wasn't necessarily even talking about base-10 digits.
>>
How do i get started on working freelance/at home programming? Im running out of cash.
>>
>>57550060
i wasn't even saying how you would compress it, i was talking about the file format
>Furthermore, he wasn't necessarily even talking about base-10 digits.
kill yourself you insufferable sperg
>>
>>57550053
No,
he can store the function in memory (taking up a few bytes to kilobytes), and stream the number to his disk, where it apparently is supposed to be saved.
This can be done in constant space, so it won't take up too much of his memory.
Note, we are talking about memory, which means primary storage.
It will take up a lot more space on his secondary storage, namely his hdd or ssd.


>>57550064
I am sorry that you are too close minded and uncreative to properly think about such a simple question
>>
File: 1455217692734.jpg (121KB, 2032x820px) Image search: [Google]
1455217692734.jpg
121KB, 2032x820px
>>57550087
>>
numbers = [
951, 402, 984, 651, 360, 69, 408, 319, 601, 485, 980, 507, 725, 547, 544,
615, 83, 165, 141, 501, 263, 617, 865, 575, 219, 390, 984, 592, 236, 105, 942, 941,
386, 462, 47, 418, 907, 344, 236, 375, 823, 566, 597, 978, 328, 615, 953, 345,
399, 162, 758, 219, 918, 237, 412, 566, 826, 248, 866, 950, 626, 949, 687, 217,
815, 67, 104, 58, 512, 24, 892, 894, 767, 553, 81, 379, 843, 831, 445, 742, 717,
958, 609, 842, 451, 688, 753, 854, 685, 93, 857, 440, 380, 126, 721, 328, 753, 470,
743, 527
]

# your code goes here

how does this make sense in terms of breaking at 236 and not listing anything past that ?


I know I can use break but I don't get the logic of adding "Continue" if
if number % 2 == 1

Am I fucking retarded?
>>
>>57550064
if it's meant to be displayed as a string then encoding it differently to reduce the file size is a form of compression
>>
>>57549997
Yes, literally. Syntactical sugar and language specifics are trivial and learned with time and practise. The difficulty behind programming is 99.99% thinking logically and mapping out the conceptual design of your program.
>>
>>57550107
meant for >>57550060
>>
>>57550025
Basically it's
expect a symbol -> go to specific function that will read characters until either an unexpected character is found or a character that properly terminates the symbol has been read -> you are now in a state where only specific symbols are accepted, do everything again (so go to the specific function, read characters) until there aren't any characters are left.

It may look intimidating but it's pretty simple, try to follow in your head the different paths that the code can take.
>>
>>57550107
Yes, if it is.
>>
>>57550102
What exactly are you trying to do?
Do you just want to iterate over the numbers and skip over 236? Or stop when you rich 236?
>>
>>57548895
>const int * const p;
>constant int pointer to a constant

>int const * const foo;
>int constant pointer to a constant

Only one of these is grammatically correct and the other is not.
>>
>>57547026
literally the opposite
>>
>>57550141

It's trying to teach me "Write this to only do evens, and stop printing before 237. Since you're only listing even numbers, it will stop naturally with the break command. The only line I don't get is the last part of the code which boggles my mind. Is the thing it's telling the list to do only list numbers divisible by 2?
>>
>>57548895
const on the left is more readable
>>
>>57550159
Since you don't know that const is read right-to-left in C++ you probably shouldn't be offering your opinion on it.
>>
>>57550175
const on the left is an exceptional case that does not follow the rules of const in any other location in a signature. As such, it obstructs readability and comprehension of the type signature and should be avoided.
>>
>>57548895
You can read it as "const int" * "const foo";
>>
>>57550187
it's much easier to distinguish "const unsigned int foo" from "unsigned int foo" than "unsigned int const foo"
>>
>>57550197
this is really good, it all makes sense now
>>
>>57550168
I'm assuming you're talking about the % (called modulo operator). The modulo is the remainder of an euclidean division (an euclidean division is a division where the result has to be an integer. You can't get 0.5 or 3.66 or whatever number that isn't an integer).
If you're doing 3 % 2, you're doing the euclidean division of 3 by 2, the remainder of which is two. If you're doing 4 % 2, the remainder is 0. 5 % 2, remainder is 1 and so on.
So yeah, number % 2 tells you whether a number is divisible by two or not.
>>
>>57550197
And you would be reading it wrong.
The pointer is const, not foo.
Const is read right-to-left. This is a basic C++ 101 fact and it's worrying that so many people java it all up.

>>57550204
Only if you're new and don't understand that const is read right-to-left.
>>
>>57550222

Oh my god thank you.
>>
>>57550223
code is generally read from left to right

it's much easier to see the const at the start of the line than somewhere in the middle
>>
>>57550223
>The pointer is const, not foo.
foo is the pointer you insufferable sperglord
>Const is read right-to-left.
only as a teaching aid to help newfags understand pointers, you can read it left to right just fine
>>
>>57550229
Code is, but not const. I didn't design C++ but that's the rule.
You could just as easily argue that indexing should start at 1 and not 0 because people count starting from 1. But that would be stupid (lua)

>>57550238
* is the pointer. You can cry about being wrong all you want but it doesn't change the facts mate.
>teaching aid
It's literally the rule.
>const int const *foo;
If you read that left to right you would be reading it wrong. If we listened to you we would be thinking that this is a constant pointer to a constant int. It isn't.

Feel free to try again.
>>
>>57550252
i'm so done

enjoy your one-person circlejerk
>>
>>57550257
>btfo
>>
>>57550263
(You)

>If we listened to you we would be thinking that this is a constant pointer to a constant int. It isn't.
yes it is now fuck off this is your last (You)
>>
What the fuck is a parody generator? I've never heard of it.
>>
>>57550269
No, it's not. The fact that you think it is shows you don't understand const-correctness in C++.
It's equivalent to a non-constant pointer to a constant int.
This is an incredibly basic thing to know and if you ever want a job working with C++ you should know this at bare minimum.
>>
>>57550281
fine, i misread your greentext, but parsing const int *const foo from left to right is not a problem at all
>>
>>57550321
You wouldn't have misread it if const was on the right and not the left.
They call it consistent-const for a reason.
>>
The logic behind python is genius. I can see the stringing together of sentences for simple text displays. It's like sheet music.
>>
>>57550336
>>57550321
>>57550281
...
The fact that this argument is happening at all is proof C++ is trash
>>
>>57550187
You practically never have const pointers, so it's a moot point.
>>
>>57550346
C++ is shitty but so are programmers that put const on the left.
>>
>>57550346
I don't think anybody is debating that C++ isn't trash.
I don't know why any compiler would accept const-on-the-left-sometimes-but-not-always

>>57550350
That really depends on what kind of software you're developing. We use const pointers a lot at my work.
>>
>>57550401
>That really depends on what kind of software you're developing.
They are completetly useless.
The only possible situation they might be useful for is a global pointer to a static address (like vram), but even then I probably wouldn't bother.
>>
>>57550436
Const pointers are just as useful as const anything else, the fuck are you talking about.
>>
File: 1435068987104.png (349KB, 878x900px) Image search: [Google]
1435068987104.png
349KB, 878x900px
>>57550436
>even then I probably wouldn't bother
>he doesn't use const correctness
>>
>>57550446
The usefulness of const for non-pointers are marginal at best, but at least they it can be nice for marking 'src type' parameters.
But when do you ever need to make pointers const?
Just useless extra typing.
>>
>>57550275
Anybody?
>>
>>57550472
When do you ever need to make anything const? Just useless extra typing.
>>
>>57550472
kill yourself
>>
>>57550480
>>57550481
I had grown tired of actually making an argument when responding to people like >>57550472
but you two can at least try instead of being shitposters.
>>
>>57550490
Well apparently anon thinks const is only useful beneath a layer of indirection which is just bizarre and illogical.
>>
>>57550480
Yes indeed, but I did mention a use case.
And when do you ever pass pointers to pointers as a 'src parameter'?
>>
File: IMG_20161115_130452.jpg (957KB, 3264x2448px) Image search: [Google]
IMG_20161115_130452.jpg
957KB, 3264x2448px
So I ended up buying sicp, did I get memed?
>>
>>57550499
I consider const completetly useless actually, I only ever use it for a kind of self documenting code for function which reads from one address and writes to another.
Although even that could arguable be a form of obfuscation since it doesn't guarantee that the pointer to const wont have it's pointee modified.
>>
>>57550541
>since it doesn't guarantee that the pointer to const wont have it's pointee modified
Guess what making the pointer const itself does, dumbass.
>>
>>57550549
Still does nothing for that guarantee.
>>
>>57550519
it's fine
>>
>>57550576
Oh, I read wrong. In any case, the only way const data behind a pointer can be modified is if you're doing something wrong. Const helps you to not do things wrong (and can help the compiler optimize) but it's not really that powerful.
>>
File: IMG_2341.jpg (2MB, 3000x2000px) Image search: [Google]
IMG_2341.jpg
2MB, 3000x2000px
>he has no arduino sitting outside and collecting temperature data
what's you're excuse?
>>
[CODE]
public class MediaURLParser {
public static URL findURL(String text, String[] extensions) {
if (text == null || extensions == null) {
return null;
}
for (String extension : extensions) {
for (int i = 0; i < text.length(); i++) {
if (i + extension.length() <= text.length() && text.substring(i, i + extension.length()).equals(extension)) {
for (int j = 0; j < text.length(); j++) {
try {
return new URL(text.substring(j, i + extension.length()));
} catch (MalformedURLException e) {
;
}
}
}
}
}
return null;
}
}

[/CODE]

Rate my Media URL Parser. It finds URLs with specific extensions

Example: [CODE]MediaURLParser.findURL("xfdwdäääähttps://hello.com/nice_image.jpgäää sdsdddddd dsf", new String[]{".webm", ".jpg"});[/CODE]
>>
>>57550672
>Using baby's first electronic devices for anything
Why are you even collecting temperature data?
>>
>>57550678
aaahhh fuck me

public class MediaURLParser {
public static URL findURL(String text, String[] extensions) {
if (text == null || extensions == null) {
return null;
}
for (String extension : extensions) {
for (int i = 0; i < text.length(); i++) {
if (i + extension.length() <= text.length() && text.substring(i, i + extension.length()).equals(extension)) {
for (int j = 0; j < text.length(); j++) {
try {
return new URL(text.substring(j, i + extension.length()));
} catch (MalformedURLException e) {
;
}
}
}
}
}
return null;
}
}
>>
var elements = document.getElementsByClassName('postContainer');
var com = document.getElementsByName('com');
var str = com[0].value;


for(var i=0; i < elements.length; i++) {
if(elements[i].getAttribute('id')[elements[i].getAttribute('id').length-1] == elements[i].getAttribute('id')[elements[i].getAttribute('id').length-2])
str += '>>' + elements[i].getAttribute('id').substring(2) + '\n';

}
str += 'checked :^)';
console.log(str);
com[0].value = str;


>>57545066
>>57545466
>>57546700
>>57546766
>>57547499
>>57547500
>>57547533
>>57547677
>>57547722
>>57547844
>>57547922
>>57547988
>>57548588
>>57548833
>>57549022
>>57549655
>>57549722
>>57549922
>>57549933
>>57550011
>>57550111
>>57550222
>>57550499
>>57550599
checked :^)
>>
>>57550684
>Why are you even collecting temperature data?
because I was bored yesterday and didn't know what to do :^)
>>
>>57550690
>it doesn't check for trips, quads, etc.

you are a failure at life
>>
>>57550696
Not a bad idea, actually. Thanks, m9
>>
>>57550696
it still catches those
>>>57550111
>>>57550222
>>
>>57550690
>Javascript shit
curl -s https://a.4cdn.org/g/thread/57544640.json | jq ".posts[].no" | awk '{if (match($0, substr($0, length())"{2,}$")) print ">>"$0} END {print "checked :^)"}'
>>
>>57547297
you think 20wpm is a lot? I don't need to look to see what I write, I don't fuck up. I think a few words forward in my sentence anyways.
visual feedback is only useful for the overview.
>>
So I've made a facebook chat client in python, I've added affine cipher to messages so it's encrypted. As of right now you have to input your email and password everytime you launch the script which is fine but I want to improve it, I'm thinking of making it so you set your credentials as vaules inside the script but I'm thinking of making it so the creds are encrypted with ROT then affine and you just enter your decryption keys at launch, obviously you shouldn't share your encrypted credentials but this would add a bit of security - what do you lads think?
>>
>>57545619
% is modulus,which executes remainder division. take 110 away from 100 and you're left with 10.
10 != 10 is false.
>>
File: 1448077571292.jpg (59KB, 408x439px) Image search: [Google]
1448077571292.jpg
59KB, 408x439px
>book's latest edition is 4th
>look up on libgen
>only has up to the 3rd edition
o shit what now
>>
I'm a little depressed about work. The hipsters are taking over. Right now, we're primarily a Java shop. We're a little bit divided in that some stuff is Spring and other stuff is Java EE. But overall it works well for us. We have great tools on a solid platform. We have applications that are 10-15 years old and upgrading them to work with the latest versions is usually very straight forward.

A couple years ago, everyone start hopping on the rewrite bandwagon. Rewrite ALL the things! A few applications did need to be rewritten because they were a mess, but most were okay. Not surprisingly, the applications that did need rewriting the most were ignored. It was the good applications that everyone knew fairly well that they wanted to rewrite. The rewrites have been a disaster because they made decisions that just shifted the technical debt around; trading one set of problems for another. Several of the rewrites look like perfect case studies of the Second System Effect that Fred Brooks wrote about.

So now that things aren't going so well, the hipsters have moved in. Now the push is to redo everything in the latest Javascript framework. Every week they keep fighting over which new hipster bullshit we should start using. We're not getting jack shit done because these assholes want to masturbate over their technology stack.

Spring may not be cool. It may not be sexy. It may not be the thing that all the bloggers are writing about and showing at conferences. But damn it, Spring lets me get shit done.
>>
>>57551205
right now every tech company is hiring bloggers hipster and anyone to add to diversity don't worry within the next 5 years all the shit ones will be weeded out and move onto other fields, you just have to put up with it for now
>>
>>57551205
>We have great tools on a solid platform.
Pajeet, pls
>>
>>57551317
Spring actually is good. Java EE kind of sucks because Pajeet and his buddy Sanjay Patel want to write "Enterprise" code. Although Java has a reputation for being verbose, I find it nicer to program in because it trades conciseness for simplicity. Java has very simple and consistent constructs. You're not going to find a lot of Java code that does something which totally surprises you. I can't say that for a lot of other languages. Java's poor reputation mainly comes from design pattern junkies who think they need a WidgetBuilderProxyFactoryAdapter for every damn thing they create.
>>
>>57550613
>In any case, the only way const data behind a pointer can be modified is if you're doing something wrong.
constness can be cast away.
It's only undefined behavior of the pointed to object was defined const in the first place.

void f(const int *const);
int x = 1;
f(&x); // f is allowed to modify x


And it's for this reason const has no effect on performance.
>>
>>57546125

>"me or my son"
>not: "me or my wife's son"

You messed it up, dude..
>>
are there any good coding environments for programming on a smartphone(android)?
IE, a good ide and a tutorial to go with it. The language is not important, just something I can approach as a beginner. I only really have the time during transport and I can't afford a laptop
>>
>>57546741
Typing in an editor with high latency is shit.
>>
>>57551556

Programming on a smartphone is a pain in the ass because typing out anything complicated on a touch screen is fucking balls. Even Hacker Keyboard is a piece of shit. That said, you can get an okay Unix shell environment with Termux and proot. Normally, I'd recommend Vim or Emacs, but since Hacker Keyboard is legitimately shit and using a bunch of control keys on a regular basis will make you less productive on a smartphone, I recommend any ordinary text editor out of F-Droid or the Play Store. I think what I've used in the past was called 920 Text Editor or something like that.

With regards to languages, you can comfortably work with C if you want to make terminal applications. If you want to make graphical applications, get a fucking laptop, because programming Android applications sucks already.
>>
>>57547437
Disgusting.
>>
>be grad student
>come up with novel algorithm to solve a problem
>it's asymptotically superior to existing solutions
>implemented it
>still several times slower than the most commonly used tool because that one's asymptotically worse algorithm is able to take advantage of dirty bit level hack optimization

JUST X MY COMPSCI DEGREE UP
>>
>>57551645
(gonna publish anyway)
>>
>>57551645
>thinks because his idea utterly failed it's a bad thing
Having your plan fuck up in the real world is a bad thing. In academia you can just write a 2000 page paper on why you fucked up.

>Real world: Find a problem. Make it simpler. Create a solution.
>Academia: FInd a problem. Make it more complex. Write a paper on it.
>>
>>57551653

Probably a good idea to publish anyways. Your implementation of your algorithm may be shit, and have worse constant time slowdowns, but it likely should be easy to improve.
>>
>>57546741
yes you do need visual feedback, and the latency in the video is ridiculous
>>
New thread: >>57551716
>>
>>57546968
Coding In The Ghetto: C++ for Real Gangstas
>>
>>57551645
if you think that your algo is actually superior then just write out a spec/draft and have some nerd implement it
then realize that even with all of the performance hacks it's probably gonna be shit
>>
>>57548395
It's completely fucky. Look up the rules because im pretty sure no anon actually got it right.
Thread posts: 319
Thread images: 32


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