[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
/dpt/ - Daily Programming Thread
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

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

Thread replies: 255
Thread images: 47
File: prog2.jpg (117 KB, 850x602) Image search: [Google]
prog2.jpg
117 KB, 850x602
This is the [Daily Programming] Thread, the best subreddit of /g/.

Pair Programming Hardcore Edition.

What are you working on, Anonymous ?
>>
A new compression algo, and on the IPFS project
>>
>>51627659
Currently deciding whether to write a testing framework in Python or Go.

Post more pics like OP
>>
>>51627659
Just to make sure, that's a legitimate woman in that drawing and not a tranny, right?
>>
File: husky hat.jpg (59 KB, 446x446) Image search: [Google]
husky hat.jpg
59 KB, 446x446
Attempting to make a character creation for HoL (Human Occupied Landfill). I'm using BUTTery wHOLesomeness rules and attempting to decode the madness therein. Wish me luck.

Also trying to do this in TWINE because FML.
Suggestions for non-crap engines that export in a web-launchable state welcome. For now this will have to do.
>>
Hey /dpt/
http://www.gbresearch.com/gbl/
Judging by the design, is this lib a joke? (no, I'm not going to /wdg/, thank you)
>>
Ruby
on Rails,
Pearl,
Python
sound gay
>>
Any good examples of HSM in c11?
>>
File: 8hBa69Q.webm (1 MB, 712x496) Image search: [Google]
8hBa69Q.webm
1 MB, 712x496
Ask your beloved programming literate anything.
>>
>>51627782
Where did you get the impression that anybody like you, attention whore?
>>
>>51627734
Looks legit even if the site is crap. Do you need a physics modeler? This looks to be one if I'm reading correctly (site is sort of hard to understand)
>>
File: 1439086940258.png (378 KB, 1450x1080) Image search: [Google]
1439086940258.png
378 KB, 1450x1080
what microcontroller/chip to use to get started with embedded c/asm programming
>>
>>51627782
can you please give me some advice. This is my thread. >>51627820
>>
>>51627782
yyyooooooOOOOOoooooooooOOOOOOooOO i love this shit
>>
>>51627782
nigga dats kawaii
>>
>>51627769
Hardware Security Module?
>>
>>51627858
To get into microcontrollers th 8-bit ones are probably the best, so Atmega or Pic. Stay away from Arduino if the point is to learn about microcontrollers.
>>
>>51627659
building models with scikit-learn for chess player analysis
>>
tfw mentally inferior
>>
File: 1374782163623.jpg (111 KB, 500x500) Image search: [Google]
1374782163623.jpg
111 KB, 500x500
>>51627814
>attention whore
>anonymous

>>51627876
go first with android.

there also GWT: Java to javascript Google's transpiler
https://en.wikipedia.org/wiki/Google_Web_Toolkit
http://www.gwtproject.org/
>>
File: pepe-5877.jpg (5 KB, 192x182) Image search: [Google]
pepe-5877.jpg
5 KB, 192x182
>>51627942
>tfw mentally superior.
>>
>>51627962
>frogposter

doubt it
>>
How can I get started in programming a bot for a game ? I'm very instersted in making a bot for hearthstone for educational reasons that will have the ability to complete the tutorial of the game. The thing is I really don't know how to get started.
>>
File: smmugn.jpg (60 KB, 736x682) Image search: [Google]
smmugn.jpg
60 KB, 736x682
>>51627973
>>
>>51627689
Naw man, more trannies!
>>
File: 1444700676915.jpg (823 KB, 1920x1080) Image search: [Google]
1444700676915.jpg
823 KB, 1920x1080
>>51627975
Start by programming a program that will read/send input events to the operating system (simulation of mouse clicks, keyboard presses, ...).
>>
>>51628015
Degenerate.
>>
File: 1360710217382.jpg (159 KB, 462x465) Image search: [Google]
1360710217382.jpg
159 KB, 462x465
who real nigga progamming here
>>
>>51627659

RESTful service using Java. Using spring boot and Postgres. Scalable using containers. Also uses JMS.
>>
File: sotd.png (294 KB, 639x594) Image search: [Google]
sotd.png
294 KB, 639x594
>>51627942
Well, you had to resolve the captcha to post that so you must be intelligent enough to at least learn html and some php.
>>
>>51628052
needs more buzzwords
>>
>>51628049
SICP helped a lot to git gud in D.
>>
File: mindre.jpg (257 KB, 850x1275) Image search: [Google]
mindre.jpg
257 KB, 850x1275
Studying for my first comp sci exam ;_;
>tfw we didnt just do Scheme for the whole course
>tfw the other language was python
>>
>>51627975
Reverse the protocol, hook into the socket, unpack the incoming packets to get the game data, manually send the reversed packets for actions you want to take.
>>
>>51628059

Fucking tell me about it.

Proof of concept for corporate, because no training provided.

Seriously, why do companies grudge training for their developer staff?
>>
>>51628040
Damn right, got to get that D
>>
How do I give a default value for a javascript variable?

I have it so there's a box where you can put in your name. If you don't put in a name I want it to default to "Nameless Wonder".

Here's what I have so far.

<head>
<script>
document.getElementById('nameContinue').style.display = 'none';

function nameMe()
{
var nameElement = document.getElementById("nameInput");
var theName = myName.value;
document.getElementById("nameDiv").innerHTML += "Ok, " + theName + " it is, then.";
}

nameButton.onclick = function() {
document.getElementById('nameContinue').style.display = 'block';
}
</script>
</head>
<html>
<div id="nameDiv">
I'm sure you do. So, what name is it...?

<div id="nameContinue">
Shall we continue?
</div>
<input id="nameInput" type="text">
<input type="button" value="My name is" onClick="nameMe()" button id='nameButton'>
</html>
>>
>>51628130

>onClick
>>
>codeeval solution works for all the provided test cases, but only gets 15%
Literally why. Fuck you codeeval.
>>
>>51628139
Yes, this is embedded Javascript in a HTML page. There is a button involved. I'm not using popups.
>>
>>51628146
That's what you get for using slow meme languages
>>
>>51628130

Long way....

if( typeof variable === 'undefined' || variable === null ){
// Do stuff
}
>>
>>51627858
rolling
>>
>>51628130
var theName = myName.value || "Nameless Wonder";
>>
>>51628130
>>51628150
>>51628159
>>51628175

https://stackoverflow.com/questions/894860/set-a-default-parameter-value-for-a-javascript-function
>>
>>51628154
I'm writing in C. I literally just submitted THE EXACT SAME FUCKING FILE again and now I got 100. I guess maybe I have some undefined behavior that caused it to crash last time...
>>
File: images-9.jpg (4 KB, 212x213) Image search: [Google]
images-9.jpg
4 KB, 212x213
>>51628208

Sounds like you could use some tests for that
>>
File: 1447789120441.png (151 KB, 480x360) Image search: [Google]
1447789120441.png
151 KB, 480x360
>>51628208
Thats why you read something quick about C then move to JAVA.
C is already legacy ,in 5 years C programmers will be out of work.
>>
File: 1465959791.jpg (14 KB, 294x294) Image search: [Google]
1465959791.jpg
14 KB, 294x294
>>51628222

>programmers will be out of work.
>>
>>51628222
although C is a piece of shit, it won't go away any time soon.
>>
>>51628222
>C is legacy
Stupid frogposters. You clearly don't know anything.
>>
>>51628087
lel, that's overkill.
>>
>>51628234
>>51628244
Kek.
Right at this very moment ALL C apps are rewritten in the superior Java,getting rid of the shitty legacy C code that is slow to compile and old ,literally putting all C programmers out of job.
>>
>>51628217
lol people will unironically tell you that tests solve everything. writing programs properly, what's that? nah just do the bare minimum to pass these possibly flawed tests
>>
>>51628248

Screen OCR and readers are overkill. Packet interception is the right way.
>>
>>51628244
he's right. there are lesser and lesser of paid c programmers.
>>
>>51628248
How would?
>>
>>51628258
>apps
>Implying that Java isn't dying, and isn't only hanging on because of Android
>Implying that Java is a viable replacement for C in any possible way
>>
>>51628260
are you retarded ? you just retrieve the game's state by reading its process memory. no need to make a mess with sockets and wasting time at reversing the protocol/encryption.
>>
>>51628192
>>51628175
>>51628159
Thanks!
>>
>>51628277
No problem, in future google that shit.
>>
File: laughing-5832.jpg (9 KB, 200x200) Image search: [Google]
laughing-5832.jpg
9 KB, 200x200
>>51628271
Sure men,thats why 95%+ of enterprise apps are written in Java and the rest of 5% are not even enterprise apps.
C programmers are too dumb to learn a new language.
>>
>>51628274

Easy for the devs to change to fuck your bot tho.
>>
>>51628271
>because of Android

Just why in the fuck did Android choose Java? Literally any other language for Android would probably have rendered Java dead by now.
>>
>>51628286
Not everyone is writing "Enterprise apps", code monkey.
Why don't you try to poo in loo before trying to do any real programming?
>>
>>51628271
you have no idea of how minor is the place of C in today's software development. for one application written in C, you have 1000 android apps written in java. for one server backend written in C, you have 100 written in java... C is a dead language: no evolution, no articles written about it, no academic papers,... there simply nothing new at all for this language. you guys are the Amish of computer science and software development.
>>
>>51628304
Because java is the most used programming language, especially at google ?
>>
File: eeNacEU.jpg (37 KB, 613x600) Image search: [Google]
eeNacEU.jpg
37 KB, 613x600
>>51628286
> Actually using Java
> Believing "Enterprise" actually means anything
> Enjoy your stacktraces
>>
File: java.png (131 KB, 748x1562) Image search: [Google]
java.png
131 KB, 748x1562
wew
>>
File: rare.jpg (9 KB, 276x183) Image search: [Google]
rare.jpg
9 KB, 276x183
>>51628306
Haha,you got triggered.
also,
>enterprise apps
>poo in loo
Its the exact opposite.
Never saw a poo in loo do long enterprise projects,guess thats why they prefer the C.
>>
>>51628322
>1000 android apps
Nobody cares about your countless fart apps.
>for one server backend written in C, you have 100 written in java
Proof? Also, why are all high-profile HTTP servers written in C?
>no evolution
The last C standard came out only 4 years ago.
>you guys are the Amish of computer science and software development
You clearly know nothing about C's niche and what it's good for.
>>
File: pepewtf.jpg (12 KB, 241x209) Image search: [Google]
pepewtf.jpg
12 KB, 241x209
>>51628337
> Enjoy your stacktraces
>>
>>51628338
>Popular search engines such as Google, Bing, Yahoo!, Wikipedia, Amazon, YouTube and Baidu are used to calculate the ratings.
lel
>>
>>51628338
I can guarantee you that 95%+ of c/c++ searches are for baby first programmers.
If you take all the articles/forums about c/c++ and java and give it a few months i can guarantee you that c wont even make it in top 50.
>>
>>51628347

Stacktraces are hilarious
>>
Anyone seriously arguing for Java over C is deluded. Java offers literally nothing. It's the slowest compiled language out there.
>>
File: 1448304848051.png (92 KB, 444x440) Image search: [Google]
1448304848051.png
92 KB, 444x440
>>51628372
But what if you want to actually use all your RAM?
>>
File: peoples eyebrow6.jpg (18 KB, 320x400) Image search: [Google]
peoples eyebrow6.jpg
18 KB, 320x400
>>51628372
>Java
>compiled
>>
>itt: java curry code monkies not capable of writing anything that requires brain power
Also, C is not going anywhere, there are more and more embedded devices every day that require software written in C to run efficiently.
>>
File: pepeyy.jpg (11 KB, 229x221) Image search: [Google]
pepeyy.jpg
11 KB, 229x221
>>51628372
Yes,but you spend 10x my compiling time writing in C.
>>
can someone explain to me why
B
^
BB

Isnt a red black tree
>>
I love how easy it is to tell when the Indians are coming home from their code monkey shops and shitposting on 4chan. We go from 0 posts mentioning Java to every other post being about Java.

I wish all Indian IPs were banned desu.
>>
Why is java being praised so much in here, its already been made obsolete by glorious C#
>>
File: 1448432895518.gif (3 MB, 359x202) Image search: [Google]
1448432895518.gif
3 MB, 359x202
>>51628388
*You* might spend that time writing it in C, not everyone.

I for one have seen some fucking horrifying compile times for Java.
>>
>>51628388
Maybe on your Pentium III, Sanjay.

Java code takes longer to compile than unity-build C code.
>>
>>51628403
epic
>>
>>51628384
it is compiled, next time prefer reading to posting if you don't even know the basics.
>>
>>51628403
This, can we have curryniggers blacklisted please?
>>
>>51628412
>see statististics
nope.
Why people even compare shitty c# to java?
C# is like Java but you can only do projects up to medium level.
>>
>>51628432
Is this currynigger serious?
>>
I have an algorithm question.
If I have to sort k sorted lists into one list, the best method would be to use merge sort.
Could I merge 2 of them, then keep appending another? I guess what I'm asking is what would be the best approach to this?
>>
>>51628432
Are you... What?
>>
I'm actually surprised the curryniggers like Java so much. Aren't they usually owned by Microsoft? You'd expect them to have flocked over to C# right away.

I guess it's too hard for them or something?
>>
>>51628432
I'm extremely disoriented by your lack of knowledge.
>>
>>51628420

It's compiled to bytecode. If you are comparing it to C then it's not compiled.
>>
File: pajeet.png (19 KB, 251x173) Image search: [Google]
pajeet.png
19 KB, 251x173
Java is a good langage yu son of bustard bich
>>
>>51628432
this
>>
>>51628454
C is compiled to bytecode, retard. Only this bytecode can be ran by cpus directly, but that makes no difference to whether the language is considered compiled or not.
>>
>>51628464
>C is compiled to bytecode
Machine code, idiot. "Bytecode" refers to object code that isn't run on real machines.
>>
>>51628306
Idiot, enterprise apps should be written well enough to survive and be understandable for other programmers. C niggers like you will never understand, as you don't read it again after writing.
>>
it's usually C# weenies that hate java the most. it's really sad since C# is so similar to java. i guess they're so shilled into using a clone that they can't stand the original
>>
>>51628464
Bytecode cannot be run on CPU you retard. It requires VM.
>>
>>51628464
>C is compiled to bytecode
actually nvm, as far I'm aware gcc at least compiles into assembler and passes it to gas. So I guess it gcc less of a compiler than Java
>>
>>51628470
>>51628482

Jesus christ thank you. Had me checking myself...
>>
>>51628488
what the fuck am i reading
>>
File: fedora423.jpg (8 KB, 259x194) Image search: [Google]
fedora423.jpg
8 KB, 259x194
>c masterrace reporting in.
>i compile 5% faster but i write 1000% slower.
>>
>>51628488

wtf is this?
>>
File: coerce.jpg (84 KB, 890x717) Image search: [Google]
coerce.jpg
84 KB, 890x717
>>51628454
>>51628464
>>51628470
>>51628482

https://docs.oracle.com/javase/7/docs/technotes/tools/windows/javac.html

>javac - Java programming language compiler
>compiler
>>
>>51628497
>1000% slower
Not everyone is as retarded as you. C doesn't take that long to write.
Maybe because there is less boilerplate crap than Java, you feel like you're writing code more slowly.

>>51628488
You're a complete retard.
>>
>>51628482
>>51628470
Fuck off, it makes no difference whether language is compiled or not anyways

>>51628492
Idk, but you should be reading the definition of what a compiler is
>>
>>51628514
>Idk, but you should be reading the definition of what a compiler is
It takes one form of data and transforms it into another. C is source code -> assembly code, while Java is source code -> bytecode. BOTH are compilers and trying to argue otherwise is fucking stupid.
>>
>>51628470
>>51628482
nope, bytecode simply does mean that the instructions are byte sized (maximum of 256 instructions).

>Bytecode cannot be run on CPU you retard. It requires VM.
https://en.wikipedia.org/wiki/Jazelle
>>
Do you guys dream in code?
>>
>>51628511
>You're a complete retard.
Which part of what I wrote is incorrect? Does gcc not use gas to compile the code? Note that I was responding to someone who said that java was less a compiler than c compilers because of a level of indirection between bytecode <-> cpu, I just responded that then I guess gcc is less of a compiler too, no?

>>51628531
>BOTH are compilers and trying to argue otherwise is fucking stupid.
yes
>>
>>51628399
anyone know the answer to this. I assume its because you couldnt insert into this manner but this tree maintains the properties youd need.
>>
>>51628532
>>51628464
(Not them but)Try harder to look intelligent. You know what bytecode is, good job. But you are off topic here, so shut up.
>>
>>51628532
The definition of this shit always has some grey area. Also, Java was designed to be run on the JVM. Just because some people made some hardware that accepts it directly (and probably just translates it into actual microinstructions, not actually running it), it doesn't change what it was designed for.
>>
File: jom.jpg (42 KB, 612x528) Image search: [Google]
jom.jpg
42 KB, 612x528
>>51628514
>it makes no difference whether language is compiled or not anyways
>>51628464
>Only this bytecode can be ran by cpus directly, but that makes no difference to whether the language is considered compiled or not.
>>51628488
>actually nvm, as far I'm aware gcc at least compiles into assembler and passes it to gas. So I guess it gcc less of a compiler than Java
>>
>>51627973
It's a meme you dip
>>
>>51628565
Oh a discussion on what a compiler is and what is bytecode is off-topic here? Sorry, "indians shit on street". Am I doing better now? Fuck off.

>>51628577
Were you dropped on your head often? It doesn't take iq over 70 to realize that in the last one I was mocking a retard that said that java is "less of a compiler" than c compilers.
>>
>>51628574
>and probably just translates it into actual microinstructions
Your Intel CPU translates machine code too.
>>
I have to add some unit tests to some java function that takes a string in a certain format.
What do i do?I put it to throw some FormatException if the user puts the string in a different format?
>>
>>51628598
Yes, I know.
>>
Hi /g/, I hope you can help me with this database

i want to join the 3 table only getting one of each column and using a username as a parameter.

thanks.
>>
File: Stallmansays.png (11 KB, 471x102) Image search: [Google]
Stallmansays.png
11 KB, 471x102
>>51628652
I think, you need to install gentoo.
>>
File: average-c-programmer.jpg (47 KB, 1280x720) Image search: [Google]
average-c-programmer.jpg
47 KB, 1280x720
>i write in C because i hope Microsoft will notice me.
>>
>>51628652

Try something like:

SELECT user_.id, user_.username, user_.password, tag.tag_id, role.position, role.title
FROM user_, tag, role WHERE user_.id = tag.id
>>
>>51628774

>forgot parameter

SELECT user_.id, user_.username, user_.password, tag.tag_id, role.position, role.title
FROM user_, tag, role WHERE user_.id = tag.id and user_.username = 'Learn2Google'
>>
File: hkvtg.jpg (146 KB, 859x1009) Image search: [Google]
hkvtg.jpg
146 KB, 859x1009
How do I get my younger sister into real programming? She's really into watching The Ben Heck show and has changed her own broken iPhone screen. I started her off with https://scratch.mit.edu/ but she wants more.
>>
File: pepei.png (12 KB, 225x224) Image search: [Google]
pepei.png
12 KB, 225x224
>>51628798
>but she wants more
hot
>>
>>51628798
Think about a bigger thingy and ask her to write in scratch. You don't want to teach her any programming language for now.
>>
File: 1439065064127.png (305 KB, 640x974) Image search: [Google]
1439065064127.png
305 KB, 640x974
>>51628798
>>51628798
Make her into a wizard
>>
>>51628798
make her install gentoo
>>
>>51628798
You probably know your sister better than /g/ knows her, so just take something she enjoys and think how programming can enhance it and google tutorials.
Otherwise just make her go through SICP
>>
>>51628798
sauce of pic? are the floppies shooped in? she's hot as hell
>tfwnogf;_;
>>
>>51628798
buy her a raspberry pi or something
the most important shit is to make it fun, and (IMO) programming is fun when you can see cool results with minimal work, which raspberry pi does pretty well
>>
>>51628798
https://docs.oracle.com/javase/tutorial/
http://docs.oracle.com/javase/7/docs/api/
>>
>>51627858
rollin'
>>
>>51628850
go away radjesh
>>
File: pair_programming2.jpg (298 KB, 800x650) Image search: [Google]
pair_programming2.jpg
298 KB, 800x650
>>51628798
learn her some lisp

https://www.edx.org/xseries/systematic-program-design-0
>>
>>51627858

rollin
>>
Anyone mind explaining the difference between active and passive FTP?
>>
File: ipji.jpg (201 KB, 872x1292) Image search: [Google]
ipji.jpg
201 KB, 872x1292
>>51628838
>>
>>51628593
Can we just call it Intermediate Language (IL) to stop all the nitpicking?
>>
>>51628901

>L2G

http://www.jscape.com/blog/bid/80512/Active-v-s-Passive-FTP-Simplified
>>
>>51628798
make a web app :^)

girls love pictures, make it like an instagram thing, except you can modify the images

go waayyy down the stack and teach her how to manipulate the images to add steganographic watermarks

then add a native client for consuming the web app

cover EVERYTHING
>>
>>51628908
thanks mang

is it from this year? what company? is it from a magazine or something?
>>
Working on arduino program that receives data from a Bluetooth module, problem is that the data is a number starting with either zero or multiple zeros and when it assigns the data to a variable it detects it as an octal number and converts it to decimal, which messes up the data. How do I keep it intact?
>>
>>51628865
>tfw you do pair programming all the time
>got she friend since college, we always worked together on projects.
>Started work in the same company at the same time.
>First time working alone since before college
>start working together again because we work on the same project
>move our hardware next to each other
>seems like college again
>fast forward boss sees that we work way faster and write better code together
>now we work like that every day

That's actually pretty cool.
>>
>>51629152
Nevermind, found an answer.
>>
is it pair programming if balls don't touch?
>>
>>51629240
When the balls touch, it's gay sex, anon.
>>
>>51628295
Just use signatures and you should be alright.
>>
>>51629152
would you recommend arduino
>>
>>51629436
>Just use signatures and you should be alright.
skid detected
>>
>>51628244

He's right.
>>
Making a meal planner that can generate a weekly shopping list based on ingredients in each meal.
Just trying to get all the functions working before refining the gui.
>>
who here /dog petting thread/
>>
>>51630086
>there are people who think cats are better than dogs
>>
>>51630212
I know, it's ridiculous. Good luck achieving a ruff victory with a shitpaw.
>>
From last thread:
void g_ENT_remove ( int entity ) 
{
g_ENT[entity].used = false;

if ( entity == highest_used_entity )
{
int i;
for( i=highest_used_entity; i>0; --i )
{
if( g_ENT[entity].used == false )
continue;
highest_used_entity = i;
break;
}
}
}


From >>51626157
void g_ENT_remove(int entity) { 
g_ENT[entity] = g_ENT[highest_used_entity];
// you could even be super 1337 and use a postdecrement to make it a one-liner
--highest_used_entity;
}

>This will only work if you're not expecting the entities to be in any particular order, and indices/pointers will get invalidated.

Well, my entity array is g_ENT[MAX_ENTITIES], with MAX_ENTITIES being 768, when one is added, it is added to the next available spot (whichever one that has used as false) and if that next available spot is a greater number than the highest_used_entity it resets that number.

Does this code still work? I've been doing work related things so I haven't had a chance to test it yet. Thought I would like to thank you.
>>
>Pair programming
So triggered
>>
>>51630461
forever aloner
>>
>>51626982
why don't you just do it instead of asking /dpt/
https://tour.golang.org

NEVER ask /dpt/, this subreddit is shit, just like 4chan as a whole
>>
>>51627782
proof that cats are superior

look at how that kitten took ownership of that dumb dog
>>
Oh god you guys, I hate Computer Science so much. All I wanted to be is a programmer but they've taught the least amount of programming possible, like I've had to learn what encapsulation means every year for 5 fucking years whereas actual coding never went further than "Draw a square, move it to the left 5 pixels, there done you can program".

I know I'm supposed to learn more on my own but I can't when they've got me writing essays about how to be politically correct in my future professions or doing Web Design in XHTML, XHTML! Not HTML 5.

The few senior lectures I know of all used to do the programming modules but apparently refused to teach it after the uni dumbed down the module at some point before I started.

Wish I never started uni, wish I just got on with my own projects..
>>
File: a ruff victory.jpg (65 KB, 500x368) Image search: [Google]
a ruff victory.jpg
65 KB, 500x368
>>51630748
fake and gay
>>
If I want to get into android app development do I have to learn java? Is there any other alternative?
>>
File: solve_1.webm (534 KB, 1582x849) Image search: [Google]
solve_1.webm
534 KB, 1582x849
Exploring a simple map
>>
>>51630779
>he fell for the edumacation meme
lel
>>
>>51630835
C# via Xamarin, it's pretty noice because you can use Visual Studio rather than Google's hacked together piece of shit.
>>
>>51630835
you can use the NDK with C/C++ and probably some other languages but it's not worth it and you'll probably need to do some interfacing with java objects anyway. java is easy you just read the android API docs and use those things
>>
>>51630881
kinda pointless if you don't have autistic nerdrage toward java because it's the exact same shit just GetView instead of getView etc
>>
>>51630901
Do you think it is possible to learn java in the span of three weeks if I devote a lot of my time in winter break to it?

I do have prior experience in Basic and C#.
>>
>>51627782
That kitten's going to actually grow up thinking it is a dog
>>
>>51630947
absolutely.

just run through these and then do some little exercises and projects
https://docs.oracle.com/javase/tutorial/
>>
>>51630929
Well it does have the benefit of one language for all three platforms, which isn't what higher level languages are for anyway?

Having one different language on each platform is horrifically archaic and hadn't been the case since C (or BASIC, BCPL or Fortran I don't remember what was first) was conceived.
>>
>>51630977
java also works on all platforms
>>
>>51630991
Neigh on iOS or Windows Phone lad.
>>
>>51630998
>iOS
https://robovm.com/>>51630998
>Windows Phone
shiggly diggly
>>
>>51630947
Give it a week and you're already good. It's basically C# without all the good stuff.
>>
>>51631011
I stand corrected.
>>
Still working on the network stack.
Each interface runs in its own thread and they pass messages through queues.
Currently the only scheduler is FIFO, without priorities.
Planning to add link-layer addresses to the interfaces tonight, maybe add stat counters.
Packet dissection is also high on my list, and I have almost finished the design of that part.
Can't wait to get to the filtering/routing/forwarding part though.

INFO        Stack               Initializing the network stack
DEBUG InterfaceManager Found physical interface eth0, added as Ethernet0
DEBUG InterfaceManager Created loopback interface Loopback0
INFO Stack Initialized
>>> show interfaces
Ethernet0
Loopback0
>>
>>51628031
Those anime girls are cute.
>>
>>51630476
Nothing ruins a dish more than two chefs working on it at once
>>
File: hw.png (36 KB, 589x369) Image search: [Google]
hw.png
36 KB, 589x369
I have C# homework, I can't do it since I'm stupid

If anyone could please help, I can offer money.

Skype: mtqqzz
>>
>>51631083
foxebook net is where I usually look.
>>
>>51631088
Baitman!
>>
>>51631088
kill yourself
>>
>>51631088
I thought about lending aid, then I noted that your HW task is pretty much already written for you in English terms.

If you can't do that you don't belong in a CS class.
>>
>'programming wizard' spends a week and a half optimizing his c++ code for a problem
>i-it's super fast, guys!
>meanwhile i spend 3 days on a python solution
>runs faster because i used a better algorithm
>looks better
Enterprise code pls go
>>
>>51631127

if it's that easy for you, please accept some money for helping me out
>>
>>51630447
Nope, you always add the new entity at highest_used_entity and then increment it. It vastly reduces complexity.
>>
>>51631140
I imagine the worst part of Enterprise code is
>1993 Windows 3.1 programmer: Had to work with a few bugs but I got this code working fast, if a little hacked together
>2015 unfortunate sod who has to update it to Windows 10 with the new system: OH GOD WHYYYY!?
>>
>>51631152
It literally takes like 5 minutes of reading to figure it out.
>>
>>51631073
you should give pair programming a try sometime
it's pretty good
>>
Tell your teacher that its impossible in C# as C# is not good for that large projects.
And if you decide to do that in Java i can help you.
>>
File: 1436829985623.jpg (73 KB, 640x426) Image search: [Google]
1436829985623.jpg
73 KB, 640x426
"We sat down one morning," recalls Steele. "I was at the keyboard, and he was at my elbow," says Steele. "He was perfectly willing to let me type, but he was also telling me what to type.

The programming session lasted 10 hours. Throughout that entire time, Steele says, neither he nor Stallman took a break or made any small talk. By the end of the session, they had managed to hack the pretty print source code to just under 100 lines. "My fingers were on the keyboard the whole time," Steele recalls, "but it felt like both of our ideas were flowing onto the screen. He told me what to type, and I typed it."

The length of the session revealed itself when Steele finally left the AI Lab. Standing outside the building at 545 Tech Square, he was surprised to find himself surrounded by nighttime darkness. As a programmer, Steele was used to marathon coding sessions. Still, something about this session was different. Working with Stallman had forced Steele to block out all external stimuli and focus his entire mental energies on the task at hand. Looking back, Steele says he found the Stallman mind-meld both exhilarating and scary at the same time. "My first thought afterward was: it was a great experience, very intense, and that I never wanted to do it again in my life."
>>
>>51631402
>that little bit of skin showing at the belly
hot af desu senpai
>>
>>51631402
reads like some bad porn fanfic
>>
File: GjDIwHBC3Csj.gif (574 KB, 700x1304) Image search: [Google]
GjDIwHBC3Csj.gif
574 KB, 700x1304
>>51628838
turns out she wasn't as hot as i had hoped ;_;
>tfw no pure aryan masterrace gf
>>
>>51628130
Check out my html file of this example. I added notes too in case you wondered why I did what :)
http://codepen.io/anon/pen/xZKbZm?editors=101
>>
>>51631402
If only he had continued to code. He's a legit turbogenius.
>>
>>51629500
Depends what for.
It's limited to only running C/C++ and you have to recompile and upload it to a microcontroller for every change you make to the program, but the controllers come in lots of shapes, sizes and some are tiny as fuck not to mention crazy cheap for the clones.

Getting networking capabilities, video and sound aren't as easy though, so for some projects you'd be better off with a microcomputer like an RPi.
>>
Hey,i need some algorithm help.
Lets say you have a calculator that takes a string expression and does 5+3 , 5++ and ((5+3)+)2.
Obviously the last 2 are not possible as + and - are binary operators.
What is an algorithm to throw an exception(Format or whatever its name was).
I obviously thought of checking if the size of the input is larger than 3 and check each binary operator in the expression for its neighbours but that is too long.
>>
>>51628798
Give her the D
>>
>>51628338
What the hell happened to Objective C here?

Did all the macfags switch to Swift already?
>>
>>51631736
Are you asking how to solve the equations or how to check if it's correctly formatted?
>>
>>51631871
i know how to solve 5+3 lol.
But i want my function to throw an exception if its 5++ or ((5+3)+)5 without having to look through the entire string if it has a lenght equal to 3 or more and check the neighbours of all + and - signs,as that is more like 10 rows with many && and if's..
>>
Making an authentication system for a class project. In php.

I now understand the hate people hold for this piece of shit language
>>
>>51631850
Nah it'll be a good while yet before Objective-C dies out, but I reckon it will. With all these courses coming out toting "Make the apps of your dreams, become a programmer quick!" 10 years from now you'll probably be lucky if they program in Swift and not just dragging and dropping controls onto a UI for people who still presume app development was above them.
>>
File: 13246456450645.png (9 KB, 377x326) Image search: [Google]
13246456450645.png
9 KB, 377x326
>>51627659
>What are you working on, Anonymous ?
I'm learning C.
>>
>>51631913
Shunting yard algorithm
Just parse it entirely
always go balls deep, anything else would be overengineering
>>
>>51631976
Why? Writing a Kernel?
>>
>>51631988
i am doing that but thats not the problem.
Anyway i fixed it.
For example:((5+3)+) ,i checked for all the + and - operators and if their right side neighbour is ) i throw exception.
Can you think of any problem that might occur?
>>
>>51631989
/g/ told me it is a good first language.
Did I get memed on?
>>
>>51631989
No, just for writing silly half-done school projects which leak every type of resource you can think of
>>
>>51632017
Could also check the left side neighbour.
I'd also check that the number of left and right parentheses are the same at the end of the string.
>>
>>51632017
spaces. At least lex your input before checking if it is coherent. If you only have binary operators, checking for `(op` and `op)` and parenthesis balance should be ok. although 3(4+1)7 is problematic right? or do you assume it's a multiplication?
>>
>>51632024
In user space of course
We are sissies over here
>>
>>51632020
/g/ is an arse. The vast majority of the things you'll be writing won't require you to worry about memory hierarchy and CPU quirks, but they will require you to know how Object Orientated Programming works.

Therefore C is not at all a good first language. Oh they'll be like "B-but anon, it's like latin! you learn it so you understand other languages better!", well they can pull the other one because modern programming is so abstracted from what the computer is actually doing that it no longer matters. People have worked decades to accommodate that and even if they didn't, PCs have the horsepower to power through redundant programming.
>>
>>51632030
the left side i think that its pointless whatever is in the brackets at ()+ ,it will sum it with the right side as long as its not a ) or another operator(i checked for double + or -)
>>51632052
got rid of spaces and tested for it.
for 3(4+1)7 i assume its problematic as do most calculators.
>>
>>51632078
This.

>>51632020
C is not a good first language.

You'd be better off learning Python, C#, or Java, maybe even Swift.
>>
>>51632020
Read C Primer or whatever C book,then learn data structures,databases.. and CS lectures like that and move to an OOP language like Java to learn the concept and do stuff like networking there then if you wanna get your hands dirty go for C..
>>
>>51632090
3 * 5 * 7
>>
What do you guys think is the best resource for Learning LUA?

It seems the appropriate thread where to ask.
>>
>>51632020
It's a good first language. It's fun.
>>
>>51627659
>>51630736
>subreddit
pls go
>>
>>51632151
3 5 * 7 *
cant see the problem.
>>
>>51632182
Don't talk bollocks m8, it's fun when you already know how to program. Pisses me off when people who already know how to program ignore that fact when recommending languages.

Wouldn't be at all surprised to hear if one person ended up with Brainfuck as his first language because a veteran programmer thought it was a "laugh".
>>
>>51627858
loll
>>
File: fuck your shit up.png (252 KB, 455x633) Image search: [Google]
fuck your shit up.png
252 KB, 455x633
>>51632152
Programming in Lua 2nd Edition book.
>>
>>51632252
>reading right to left
That is some third world bullshit right there.
>>
>>51632252
thanks
>>
>>51632136
>C is not a good first language
get a load of this fucker.
C might not be a good language for your first big project but it is a good language for learning how the computer works and getting into the mindset of programming.
>>
>>51632350
Ahem, dipshit. I believe the points have been made here >>51632078
>>
Anyone here who programs in LUA? I have to merge 2 scripts but the thing is, one is a written mess,1 long straight line, is there a way to automatically format it ?
Here said script.
http://pastebin.com/raw.php?i=0hiL9znr
>>
>>51631179
hmmm

don't fully understand it but okay. I won't know if that will work if, say, entities 1 and 768 are used, but 2 through 767 are available.
>>
>>51632462
The thing is, that won't happen. If you add and remove entities using those methods, you will never have "holes" in the first place.
>>
>>51632350
>getting into the mindset of programming
Something like Python or C# is objectively better for this.
>>
I want to make a Gameboy emulator for fun. What language should I use? I know C++, C, and Python.
>>
>>51632692
assembly of course
>>
File: errorstuff.png (47 KB, 1589x553) Image search: [Google]
errorstuff.png
47 KB, 1589x553
C++

I have this class I want to put in a std vector, hence it must be copyable. It holds a handle to some resource so to avoid releasing that on copy(old copy gets destroyed), the copy constructor takes a non-const ref(inside it sets some flag in the source object telling it not to release the resource).
msvc seems to complain about that, or so I think
I would very much like to use std vector for this instead of a static array or rolling my own resizable container
halp
>>
>>51632717
shared_ptr?
>>
>>51632350
Fuck off autist, nobody cares about your autistic opinion, you sperglord.
>>
>>51632717
>C++
Into the trash it goes. Your program is trash. You're trash. Enjoy your shit performance.
>>
>>51632717
This >>51632744, or at least something like it.
>>
>>51632717
A "copy" constructor must take a normal constant reference by definition, there's no way around that. However, if you are using C++11 (which you should), you can define a "move" constructor which takes a special kind of reference written
ShaderStage&& xyz
which means "deactivate xyz and move whatever its contents are over to your place". See http://en.cppreference.com/w/cpp/language/move_constructor
>>
>>51632717
Also this >>51632841.
>>
>>51627929
Cheater detection?
>>
>>51628031
y they has no nose?
>>
>>51632841
but std vector doesn't seem to work with classes with deleted copy constrs, but which implement move constrs(had that in the first place)
>>
Let's say I wanted to make a program that can be executed anywhere from the command line using environment variables. Something where you just say the program's name and what you want it to do.

Something like
$ program dosomething


Which language should I do this in? I want to be able to use it in Windows, Linux, and possibly OS X.
>>
>>51632717
>>51632900
What method are you calling on the vector that gives you the error?
>>
>>51632930
Doesn't matter as long as the program is in the PATH. Typically on Linux that involves installing it to /usr/bin, and on Windows you will need to add it to the PATH directly.
>>
File: derp.png (15 KB, 685x503) Image search: [Google]
derp.png
15 KB, 685x503
How do I pass a value to a new thread using threading in python? I'm kind of confused on and new to threading.
Pic related, The last thing I need to do is pass the values.
I think I'll just make a new thread ever time a or b is created.
What do you think, /dpt/?
Thread replies: 255
Thread images: 47

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

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.