[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: 36
File: 1413834411698.jpg (459 KB, 1056x1080) Image search: [Google]
1413834411698.jpg
459 KB, 1056x1080
Previous thread at >>51704718

What are you working on, /g/?
>>
first for rust is shit
>>
PHP IS BEST LANGUAGE
>>
third for go is shit
>>
Java
>>
xth for D sucks ass
>>
nth for static typing
>>
>>51710888
seems pretty good
>>
nth for homotopy type theory and higher inductive types
>>
I figured out how to split screens and switch between them using screen, but I can't get anything to type in the second screen. Pls halp. Also if there is a better alternative in vim that would be great.

Basically I want terminal/vim to behave like the instructor's gedit does
>>
dumb people can't into old languages .pride
>>
>>51710874
Currently working on coding new firmware for a new type of delophonic verbirator that will be built at work for hydro electric power variable integration in the next six months. Because shit needs to be cross platform (major drag), it written in Racket. (Not many Racket hackers in Australia in this kind of work.)
>>
any idea why this makes two leaves, their parent node, and then segfaults?

Node* treeFromBinary(BFILE* filename)
{
if(readBit(filename)==1)
{
Node* leaf = new Node(readByte(filename));
return leaf;
}
else if(readBit(filename)==0)
{
Node *left = treeFromBinary(filename);
Node *right = treeFromBinary(filename);
Node *nonleaf = new Node(left, right);
return nonleaf;
}
else
{
printf("end of file\n");
return NULL;
}
}
>>
>>51710994
>sux and i feel you pham. I live in Guam and there isn't anyone here to help me learn C, or any programming for that matter
>>
>>51710980
:tabe in vim for tabs
:sp and :vsp to split
>>
>>51710994
>hydro electric power variable integration
shit nigger what the fuck are you talking about
>>
>>51710980
you can escape your shell functions... :! in vim and outside shell usage. If not, then consider terminal multiplexing and window switching (aka tmux)
>>
>>51710980
>>51711028
oh i guess i misread, you want a terminal below vim

i don't know what's with the pane below vim in your ss but
ctrl+b "
should open a new pane below with a command prompt
>>
>>51710980
What distro is this?
>>
>>51711051
technobabble, acronyms and buzzwords belong in the fucking garbage
>>
>>51711034
There are many variables that concern hydro power.
(After all we are dealing with nature here).
Variables, (such as rainfall etc), need to be entered into the firmware so the machinery can deal with complex changes according to whats happening with the environment. Thats all.
>>
File: ss+(2015-12-05+at+02.47.09).png (44 KB, 669x606) Image search: [Google]
ss+(2015-12-05+at+02.47.09).png
44 KB, 669x606
Why would one Ruby gem give me fail to build native extension errors on 7 ("gem install twitter" for example) but a different one install fine (nokogiri). I've been trying to fix this for like 5 hours with zero progress..
>>
File: CReYIrdU8AAJezH.jpg (115 KB, 959x711) Image search: [Google]
CReYIrdU8AAJezH.jpg
115 KB, 959x711
sub-100 IQ code monkey normie plebs won't ever know what it feels like to work on some truly next-level stuff
>>
>>51711104
ITs called the "CS50 Appliance" but I'm pretty sure its just a re-branded version of Ubuntu with Harvard's C libraries and team viewer built in. VMware recognizes it as Ubuntu.
>>
>>51711217
>programming on windows
>>51711332
but at least they'll know the joys of having friends and a life :^)
>>
>>51711336
>For research purposes, the CS50 Appliance is designed to log:
>command-line commands (e.g., ls, make hello, etc.);
>the output of programs like check50, clang, gdb, style50, etc.;
>gdb commands; and
>source code that you create and/or save inside of the appliance. Those logs are then periodically uploaded to CS50’s servers.

Yeesh
>>
>he spends his time arguing and complaining about languages instead of working on one
>>
>>51711332

Better be a code monkey than some obese NEET who codes exclusively in haskell and assembly and watches anime while fapping to men wearing dresses.
>>
>>51711351
>muh friends
yeah cancerous shallow normie "friends" that you can't trust for shit and are just annoying to be around

>muh life
yeah going to the bar and spending hundreds of dollars on overpriced alcohol and then fucking some pig ugly skank with chlamydia
>>
>>51711379
n-not all of us trap lovers are like that :c
>>
File: dip.gif (2 MB, 312x250) Image search: [Google]
dip.gif
2 MB, 312x250
>>51711390
>>
File: foam adventure.jpg (475 KB, 1024x576) Image search: [Google]
foam adventure.jpg
475 KB, 1024x576
b-b-b-bringing it over from >>51707073

>okay I got a question about something
>I'm not having crashes, so it must be right so far, but I am not able to call anything and see it happen.
>if I put a print command inside any of the functions inside the prototype table, and call them from C, I don't see anything in the console.
>is there a command to show everything on the stack?
>>
>>51711359
It makes sense. I'm taking the class and I suppose it helps troubleshoot my errors/ prosecute cheaters
>>
File: rare feel guy.jpg (31 KB, 474x360) Image search: [Google]
rare feel guy.jpg
31 KB, 474x360
>>51711003
please
>>
>>51711217
Any advice ? Devkit is installed and current with the version I am using
>>
is this the right /dpt/?
>>
>>51711617
yes
>>
>>51711390
>yeah cancerous shallow normie "friends" that you can't trust for shit and are just annoying to be around
I have a programming bf that I can fully trust and I love to be around of.

>yeah going to the bar and spending hundreds of dollars on overpriced alcohol and then fucking some pig ugly skank with chlamydia
Going to a restaurant with my bf and then have hot sex with him where he puts his seed inside me.
>>
>>51711617
no
>>51702900
hasn't hit the bump limit yet
>>
>>51711637
https://www.youtube.com/watch?v=YaG5SAw1n0c
>>
>>51711637
So now you're bragging about being a slut instead of talking about programming ,huh ?

Yeah it sure is worth it to get more people like you in STEM instead of competent men
>>
>>51711694
That's the D Programming Thread. This is the Daily Programming Thread.
>>
any of you interested in talking about CS GO CHEATS? i'm working on one right now
>shitty external trash
but it's something.
>>
Tfw just finished Day 6 of Advent of Code and made it to the leaderboard, not sure if I can keep up with waking up at 6 AM though.
>>
>>51711705
I don't understand?
>>
>>51711700
>having a bf = being a slut
What are you talking about?

>Yeah it sure is worth it to get more people like you in STEM instead of competent men
You don't even know how good of a programmer I am.

>>51711698
It's not gay if I look like a girl.
>>
>>51711740
>if I look like a girl
but you don't
>>
>>51711758
I do when I wear cute clothes.
>>
>>51711740
>>51711771
You'll look like a nigger when someone ropes you up from a tree for being a faggot
>>
>>51711217

Pretty much no ruby dev ever tests this shit on Windows.

That said, ffi gems under OSX is currently fucked.
>>
I had an idea for an actual prototypal language, allowing you to create classes that add functionality to any type of object (as long as it satisfies some parameters) but is strongly typed.
This would be used to create small component classes to build up a larger object, which is all the rage right now in gamedev.
>>
>>51711846
That would be a mean thing to do to a "girl" like me.
>>
no more faggot pictures for the /dpt/ please, OP

fucking nigger.
>>
educate you'reselfs plebs

https://www.youtube.com/watch?v=rjLJIVoQxz4&list=PLkyBCj4JhHt9G55u1vgx_DF0C7DXVsBS8
>>
File: 2015-12-05-1619-56.webm (3 MB, 894x964) Image search: [Google]
2015-12-05-1619-56.webm
3 MB, 894x964
Practicing C.
>>
>>51711911
source pls
>>
>>51711911
Looks like a bit more than just C
Your program looks great though
>>
>>51711493
this picture ruined my day
>>
Was the interrupt vector table something that was always needed to do shit like print to the screen in assembly? If not, how was it done?
>>
>>51711954

C and GLUT.
>>
>>51711911

fuck im fairly new to programmer but i just know im not talented enough to do shit like this

guess i'll go back to front end web dev fml
>>
>>51711986
I think its from a video of 2 grills doing something about buying foam
>>
>>51712026
m8, this guy didn't know basic trigonometry like a couple of weeks ago and his physics are still messed up. just learn a bit at a time and it will all come together
>>
>>51711954
Could definitely just be C. I think those are default GLUT menus.
>>
>>51712026

I began learning C a couple weeks ago. It's not hard, it's just graphics are intimidating to the new programmer.
>>
>>51711986
not sure if i'm even allowed to post this pic but this is what the foam is used for...
>>
File: 2015-12-06-0038-15.webm (3 MB, 854x912) Image search: [Google]
2015-12-06-0038-15.webm
3 MB, 854x912
>>51712047

Just C and GLUT.
>>
File: 2015-12-05-2140-38.webm (196 KB, 840x618) Image search: [Google]
2015-12-05-2140-38.webm
196 KB, 840x618
>>51712045
>>51712051

Also the physics are fucked up, yeah. I'm working on a tiny scale so I'm not using actual gravity, and there's no angles involved so things like angular momentum aren't here.

It's just gravity, friction, air resistance, inter-particle collision, particle-floor collision. Particle collision is jank, though.
>>
>>51712076
>not sure if i'm even allowed to post this pic

Why wouldn't you be? Furries are welcomed in /dpt/.
>>
>not even Google uses Go!
http://www.unofficialgoogledatascience.com/2015/12/replacing-sawzall-case-study-in-domain.html

>>51711986
autism
>>
>>51712089
>>51712121

Pretty neat, m80.
>>
>>51712076
That's actually a pretty well-made costume so far. Surprising, given how bizarre the person who made it is.

I honestly have no problem with furries. There are people with stranger interests. It's just that the video was awful. The girls in it were the most awkward and obnoxious people I've ever seen.
>>
>>51712089
>>51712121
Source?
>>
File: word.png (86 KB, 711x702) Image search: [Google]
word.png
86 KB, 711x702
Word Sudoku.

This is what it looks GUI wise, it still needs a lot of finishing up and most of it is just placeholder but this is what it is going to look like, mostly. Any general recommendations, is it pleasing on the eyes?
>>
>>51712089

what do the colors mean
>>
>>51712152
>I honestly have no problem with furries
>the most awkward and obnoxious people I've ever seen
>>
>>51712173
What are the rules? How is it different from normal Sudoku?
>>
>>51710874
Does this seem like the most efficient algorithm for finding the divisors of a number n?

1. generate all primes under n/2 with a sieve
2. use primes to factor n into a list of divisors and their respective powers
3. permute all possible powers for the divisors and take their total products to find a divisor of the number

100 = [(5 2), (2 2)] // that is 5^2 * 2^2
permutations for powers
5 2
-----
0 0 = 5^0 * 2^0 = 1
0 1 = 5^0 * 2^1 = 2
0 2 = 4
1 0 = 5
1 1 = 10
1 2 = 20
2 0 = 25
2 1 = 50
2 2 = 100

I'd think, especially for large n, this would be much faster than trial division. Yes or no?
>>
File: 2015-12-05-2119-24.webm (114 KB, 1072x844) Image search: [Google]
2015-12-05-2119-24.webm
114 KB, 1072x844
>>51712185

Cyan = unbounced
Yellow = bounced
Magenta = can no longer bounce

Magenta is for particles below the lowest floor (killplane) or ones with no speed.

>>51712168

It's not done yet.
>>
>>51712173
yellow's really bright, good for the selector but not the borders
actually make the selector a bit more noticeable
and darken the yellow so that the letters are more prominent

what are you making it with?
>>
>>51712186
I have no problem with being a furry in and of itself. 99% of furries are disgusting, but I wouldn't mind being friends with a non-disgusting furry.

My own interests (weebshit) are hardly respected, so I won't judge other people for their interests.
>>
>>51712205
>It's not done yet.
And? It will probably never be done.
>>
>>51712230

I have a list of things I want to implement. It's done when I hit them all.
>>
>>51712237
OK, good for you.
Can we see the code in the meantime?
>>
>>51712196
Exactly the same as Sudoku, but with words. In this case it's a 9 lettered word.

>>51712216
Thanks man. Java. I know very little programming so I'm teaching myself the basics with this
>>
anyone know how to cast the struct stat variables to stuff from INODEs and MINODES?


struct stat statistics

printf("gid: %u", &mip->INODE.i_uid);
statistics.st_mode = ip->i_mode;
statistics.st_mode = ip->i_mode;
printf("gid: %u", statistics.st_mode);


mip is a MINODE pointer that is in the correct directory and ip is an INODE pointer that is correct as well.

I just don't understand how the fuck to cast struct stat correctly.

I see people making it a pointer but that failed for me too. Anyone got ideas? my head is kind of in a fog right now.
>>
>>51712259

Sure, here's a code snippet:

#include <stdlib.h>
#include <stdio.h>
#include <malloc.h>
#include <freeglut.h>
#include <math.h>
#include <stdbool.h>
>>
>>51712295
It was a serious question.
>>
>>51712205
add a damp to the velocity you shitcunt
>>
Can an OS be written in Rust?
>>
>>51712273

anyone? from what I have looked up I have to convert struct stat to a pointer or some shit to get access to it's variables.
>>
>>51712533
Can an OS be written in Python?
>>
File: sanjeep.png (112 KB, 1000x1000) Image search: [Google]
sanjeep.png
112 KB, 1000x1000
Hey Sanjeep

stay out of tech

ree
>>
>>51712575
>not a specialist in Java programming
You tried
>>
>>51712575
honestly, nodejs hipsters are more dangerous
>>
File: sanjeep.png (114 KB, 1000x1000) Image search: [Google]
sanjeep.png
114 KB, 1000x1000
>>51712583
>>
>>51712575
>that pic
top kek
>>
>>51712572
How is that relevant?
>>
>>51712612
same answer

>>51712602
needs more cisco
>>
>>51712533
Yes.

>>51712572
^ Clueless
>>
>>51711911
>>51712089
>>51712121
pretty neat m8
are you planning on making a full game or something with just C and GLUT?
>>
>>51712670

No, I have zero interest in game making. I'm just practicing C.
>>
why are people obsessed with making games? aren't games really hard to make, and very difficult to monetize? why don't you retards do something useful instead?
>>
>>51712706
>>>/vg/agdg
>>
>>51712706
it only takes one meme game to go viral for you to snort coke and fuck hookers for the rest of your life
>>
>>51712706
Some people started programming just because they want to make games, and they are all faggots.
Games can be hard to make from scratch, though, depending on how scratch and how complicated the game.
>>
>>51712706
games deal with algorithms and performance constraints that most programmers never have to deal with. Plus it can be fun and challenging.

>why don't you retards do something useful instead?
like what.
>>
>>51712767
aspiring game programmers, everybody
>>
>>51712786
How is he wrong? Depending on what you're doing in games programming it can literally be harder than rocket science.

https://www.youtube.com/watch?v=VcWRc1wK3gM&t=35s
>>
>>51712688
Post source.
>>
>>51712717
?

>>51712724
and the probability of that is really low

>>51712744
>they are all faggots
agree

>Games can be hard to make from scratch
yeah, and these people could be doing something more productive

>>51712767
>like what.
there are a shitload of problems that haven't been resolved, that could be automated and cheapened. do you even real life, bro?
>>
>>51712864
post specifics

>do you even real life, bro?
no
t.neet
>>
>tfw you're literally a genius
>tfw you're basking in the glow of your most recent discovery
>tfw you've had nice ass steaks thawing since last night
plebs will never know this feel
>>
File: usa_dog.webm (771 KB, 360x360) Image search: [Google]
usa_dog.webm
771 KB, 360x360
Ask your beloved programming literate anything.
>>
>>51712864
>there are a shitload of problems that haven't been resolved, that could be automated and cheapened.
such as the ones that can be found in games
>>
In c++, how can I use erase() to remove all of the semicolons from a string?
>>
>>51712932
(some) dogs are retarded
>>
>>51712953
you probably wouldn't use string::erase. or c++.
But in all seriousness, you would find the index of the ';' and erase if if you really needed to.
>>
>>51713021
It's for an assignment and I'm not really sure how to remove a character from a string without evaluating every character. Is there a simpler way?

>>51712932
If you're programming literate, can you please answer my question?
>>
>>51713041
str.erase(std::remove(str.begin(), str.end(), 'a'), str.end());


A non-standard option is boost::erase_all
>>
File: 1435195652457.png (174 KB, 468x210) Image search: [Google]
1435195652457.png
174 KB, 468x210
>>51712953
>>51713082
>mutating a string instead of creating a new one
>>
>>51713082
I'll probably have to do it manually if I want to keep it standard then
>>
>>51713106
He said it's for an assignment, so that is probably the assignment.
>>
>>51712891
boolean isAudioPlaying
>>
I love OOP, I love C++, I'm having a great time learning it, my book has great practice problems, everything is wonderful

I normally wouldn't want to learn C++, but I said that I was familiar with it on my resume (I tried learning it a while ago) and may be getting an interview soon so I'm having another go at it.
>>
>>51712953
Soemthing like
std::string stuff = "a;b;;cde;f";
while (true) {
size_t pos = stuff.find(';');
if (pos == std::string::npos)
break;
else
stuff.erase(stuff.begin() + pos);
}
>>
Why don't we see more second amendment advocates pushing to own nuclear weapons?

If they extend their philosophy to its logical conclusion then citizens of the United States should be able to own any and all weapons, including those that can kill thousands of people in one go.

Is it so ridiculous a concept that most gun rights advocates aren't interested in touching it, or do they actually have a personal limit set(in terms of a weapon being too dangerous or deadly) on their gun liberty philosophies due to morality, feasibility, or economical reasons?

If the whole point of the second amendment is to guarantee the right to bear arms in case the higher-ups need to be forced out of office then you would imagine that it should extend to things that could actually destabilize the country in its modern form. The fact is that even a large group of men with the worst guns possible can't do squat against America's fearsome military. The only thing that poses such an existential threat that it could alter the nature of our government are WMDs that can destabilize large portions of the country. If gun advocates truly cared about protecting the second amendment, why don't they want to keep it as modern and relevant as possible? Why not claim that WMDs should be included in the right to bear arms? If they think the second amendment should extend to the insane killing machines that are modern assault weapons, which the writers of that amendment could have never imagined, then shouldn't they extend out to anything with massive killing power? It's just weird that they seem so gung-ho about their rights even though there's such an obvious disconnect between the logic of the amendment and the common sense reality of futility against the government.
>>
>>51713299
Wrong thread sorry
>>
>>51713310
post link to the actual thread, I am interested.
>>
>>51713299
>logic
>murrica
>>
I think I'm going to just make a flowchart making program for practice with C++. I really love this language.
>>
File: ALMA_EN-US9243972548_1920x1200.jpg (780 KB, 1920x1200) Image search: [Google]
ALMA_EN-US9243972548_1920x1200.jpg
780 KB, 1920x1200
import Cocoa
import CloudConvert

class ViewController: NSViewController {

override func viewDidLoad() {
super.viewDidLoad()

}

var chosenFileURL = NSURL(fileURLWithPath: "")

//MARK: Import button, pick a file
@IBAction func chooseFile(sender: AnyObject) {

let openPanel = NSOpenPanel()

openPanel.title = "Choose a file"
openPanel.beginWithCompletionHandler({(result:Int) in
if(result == NSFileHandlingPanelOKButton)
{
var fileURL = openPanel.URL!
print(fileURL)
self.chosenFileURL = fileURL
//do something with the selected file. Its url = fileURL
}
})
}


@IBAction func cloudConvert(sender: AnyObject) {
CloudConvert.apiKey = "ki"

let outputURL = NSFileManager.defaultManager().URLsForDirectory(.DocumentDirectory, inDomains: .UserDomainMask)[0] as NSURL
let inputURL = chosenFileURL

CloudConvert.convert([
"inputformat": "gif",
"outputformat" : "webm",
"input" : "upload",
"file": inputURL,
"download": outputURL
],
progressHandler: { (step, percent, message) -> Void in
print(step! + " " + percent!.description + "%: " + message!)
},
completionHandler: { (path, error) -> Void in
if(error != nil) {
print("failed: " + error!.description)
} else {
print("done! output file saved to: " + path!.description)
}
})
}

override var representedObject: AnyObject? {
didSet {

}
}


}

cont 1/2
>>
>>51710874
>What are you working on, /g/?
http://www.nask.co/
tl;dr text-to-speech to share audios, and lets you make videos with audio from tts + images/other videos.
>>
File: 2015-10-12.jpg (36 KB, 800x600) Image search: [Google]
2015-10-12.jpg
36 KB, 800x600
>>51713442
getting error
failed: Error Domain=NSCocoaErrorDomain Code=516 "“CFNetworkDownload_K6mnki.tmp” couldn’t be moved to “anon” because an item with the same name already exists." UserInfo={NSSourceFilePathErrorKey=/var/folders/wf/64srckbs1dlbs30tzd8zwjfh0000gn/T/CFNetworkDownload_K6mnki.tmp, NSUserStringVariant=(
Move
), NSDestinationFilePath=/Users/anon/Documents, NSFilePath=/var/folders/wf/64srckbs1dlbs30tzd8zwjfh0000gn/T/CFNetworkDownload_K6mnki.tmp, NSUnderlyingError=0x60000005c2f0 {Error Domain=NSPOSIXErrorDomain Code=17 "File exists"}}

the upload, conversion, and download work perfectly. but the saving of the file throws the error above.
what's going on? the file doesn't already exist.

it's a gif to webm conversion app for mac using cloudconvert as the backend
>>
>>51713463
mfw, btw
>>
>>51713442
>pic
>bing
>>
are there any /g/ approved books for learning HLSL/how to write shaders?
checked the sticky but none of the sites listed seem to mention it
>>
Should I learn Rust or D?
>>
>>51713859
C++
>>
>>51713898
Already know that
>>
>>51713859
rust or swift

D had many years to become relevant, but it didn't
>>
>>51713453
pretty cool

http://nask.co/hear/ALlgp7Q9Cn
>>
>>51713936
http://nask.co/hear/ZSlHZpx3sv

http://nask.co/hear/8KbVsJVhH3
>>
>>51713936
>>51713951
http://nask.co/hear/zE3tbeGXNu
>>
Why is Java so hard

I mean some languages are easy peasy

but Java documentation is like wha
>>
>>51713986
Don't read the documentation if you are learning and have a problem, just Google it and look at TutorialsPoint or StackOverflow
>>
>>51713970
>http://nask.co/hear/zE3tbeGXNu
omg i'm choking on mangos you bastard!
>>
How do you get into open source projects? Where do I start?
>>
what are the advantages of hard-coding many values as constants rather than reading and parsing them from a text file at runtime? what are the disadvantages?
>>
>>51713970
>http://www.nask.co/
http://nask.co/hear/ZItsRMwQ1C

found a bug though: if the length of text is above the allowed amount, the error doesn't get handled for the user
>>
>>51714049
could do with a progress indicator too

http://nask.co/hear/Rw6PSOq9vQ
>>
which is more important: the right code or the "right now" code?
>>
what's the programming language for gay boys
>>
>>51714120
python
>>
>>51711727
D is a programming language, I think. He might also be memeing you, though.
>>
>>51714142
say that to my face not online
>>
>>51713986
lol wut, java docs are the clearest and best explained docs i've ever seen. not autistic like C++, OpenGL or linux docs and not pathetic like python docs
>>
Okay, i programmed in .net framework (C#) for couple years and now i took a pill of freedom and trying to migrate to linux. Everything is fine but where the hell i can use .net knowledge?
>inb4 try mono
>>
>>51714372
You'll never be able to replicate the joy and ease of .net programming with vs in linux.
>>
>>51714372
linux is a meme you dip
>>
>>51714372
Thats why you dont use C# you dope.
>I know I'll use a language thats exclusive to one platform

inb4 ids opbensorse now :DDD
inb4 mono meme
>>
File: file.png (18 KB, 967x149) Image search: [Google]
file.png
18 KB, 967x149
>>
>>51714619
now do python
>>
>>51714576
>:DDD
i didn't chose that
>>
File: C++ books.png (205 KB, 1001x785) Image search: [Google]
C++ books.png
205 KB, 1001x785
Any reason I should spend the extra money on the 4th edition of the book?
>>
>>51714670
just learn online
>>
>>51714699
I like books
>>
>>51714713
i bet you like spending money too
>>
>>51714721
It's like 5 bucks for a used version of the 3rd edition book, my library doesn't have anything useful
>>
Are there any examples of bugs becoming features?
>>
File: file.png (23 KB, 963x179) Image search: [Google]
file.png
23 KB, 963x179
>>51714628
>>
>>51714120
Ruby, objective-c and swift.
>>
>>51714346
Cppreference is godly dunno what your beef with ccpp is.
>>
>>51714120
english
>>
seriously, which of you stupid fucks was this?
https://github.com/golang/go/issues/13510

fuck off with your dumbass bullshit
>>
>>51714670
>not buying Walter Savitch's books which gives you sufficiently challenging exercises at the end of each chapter, and explains each concept thoroughly enough that even a dumbass can learn
srsly lad
>>
File: cats.jpg (56 KB, 647x749) Image search: [Google]
cats.jpg
56 KB, 647x749
>>51714961

>projects achieve so much more when they adopt a CoC
>>
Reading SIcp now, should I go with the dialect used in the book or bother looking for another?
>>
Messing around with Aubio. Shit's pretty good yo.
>>
>>51713986
Sounds like youre struggling with architecture. If something is implemented in am extended staye, expect the thing to have it's own class and expect every other step in the parent object to have a class as well.

Like...if its a factory every operatable "machine"/"cog"/thing will have a class that you can specify action to or from where to gather info. Just like the internet has an OSI model that layers a packaging process over several steps and each one deals with the info in a manner distinct from the rest.
Another good way to see it is that your keyboard has a board, chips, gates and then ultimately a "parser" that then transfers the info from one form to another and then the packaging process happens again. Gotta make jobs for all these useless people somehow.
>>
>>51712173
Maybe make the borders a blue colour or any colour other than yellow and then maybe make the selector a bit bolder. Other than that, it actually looks quite nice.
>>
>>51714372
uh, but mono is good. So why not use it there? Also coreclr.
>>
File: python.jpg (24 KB, 960x500) Image search: [Google]
python.jpg
24 KB, 960x500
>>
What's the best language to use to create a simple Cloud™ App™ that's a very simple game (think tetris) which users can play when they go to the website? Golang, C CGI?
>>
>>51715285
javascript
>>
>>51715292
>unironically using this abomination
>>
>>51715304
It's shit but there's nothing better.
>>
/g/, what's a good algorithm for generating an array of unique random numbers?

I'm trying to test a sort program that I've made and I wanted to put that in, is there a good one out there you remember seeing?
>>
>>51715285
Javascript, the latency of trying to talk to a server-side application to make a move in games like Tetris means you need to do things client-side.

>>51715304
It's that or Flash
>>
>>51715320
>unique
>random numbers
>>
>>51715320
i++
>>
File: 1448732513646.jpg (279 KB, 770x749) Image search: [Google]
1448732513646.jpg
279 KB, 770x749
i am using c. when i run my compiled software in my terminal (i am just using the default xfce4 terminal) the output is placed before my username@hostname. getchar() isn't working. what can I do to fix this?

also what is the purpose of return 0;? the website i am using (cprogramming.com) says it is for error checking. but when i don't write return 0; nothing seems to be different at all
>>
>>51715325
>the latency of trying to talk to a server-side application to make a move in games like Tetris means you need to do things client-side.
>implying
Here's a very rough estimation:
>50ms latency
>100ms to send/receive data
>10ms for the actual computing (probably much much less)
You could easily fit 6 moves per second. That's enough not only for tetris but for a many many other games.
>>
>>51715320
Quadratic residues.

x^2 mod p (where p is prime)
will generate a unique sequence of numbers as long as 2x < p
for 32 bit numbers pick the closest prime to 2^32, it wont fit exactly so the rest of the numbers you can just identity map.
Then combine this with other bijective functions and you have a PRNG that generates a unique sequence.
>>
>>51715390
Try printing a newline character before the end of the program
printf("\n");

The return 0 means everything went well and the program terminated as expected
>>
>>51715423
Why invent your own bike if there already is godly xorshift* with evaluated and proven random distribution?
>>
>>51715459
thank you. is return 0 added automatically by gcc during compilation if it isn't present?
>>
>>51715421
>That's enough not only for tetris but for a many many other games.
That's fucking awful for tetris you retard. Try playing tetris with 100ms input lag and see how much "fun" it is.
>>
File: 1449113220497.jpg (460 KB, 1024x768) Image search: [Google]
1449113220497.jpg
460 KB, 1024x768
4chan might not be the best place to ask this, but I'm writing a scraper for a website whose admins have openly expressed their dislike of data scraping.

Yes I know this is legally risky, however they don't really have a browserwrap agreement and the data is available without registering/signing up and agreeing to any TOS, so I figure I'm okay to archive the data for personal use. It's also indexed on google.

I understand that I should rate limit and try to make my user agents look as common as possible.

What else can I do that ISN'T distributed?
>>
>>51715539
xorshift does not generate a guaranteed unique sequence (since it's generally a bad attribute for an RNG)
>>
>>51715421
you don't do server sided calculations when you don't have to
there is no point
the point of a game server is to broadcast messages to other players, store essential state and store any game state needed to validate the correctness of received data so the server doesn't just forward bullshit moves
sometimes, when the server already has to do some heavy calculation as a result of one of the reasons mentioned before, it makes sense to just notify clients from the server so they don't have to calculate it themselves
in a single player tetris, none of these reasons is fulfilled, so there is no point in doing any server sided calculations
>>
>>51711724
I wish the leaderboard had more than 100 entries. I have 12 gold stars as well, dammit.
>>
>>51715611
Use various sources if possible, don't just funnel it all through a single server. The more natural it looks the less likely it is to raise any red flags.
>>
>>51715065
Use Racket, there's actually a compatibility language within racket that you can use. If you're using the second edition, I think there's only a few small changes you have to make.

http://www.neilvandyke.org/racket-sicp/
>>
>>51715611

fuck em, just hit em from behind some proxies

you don't want to serve data, don't return 200 it's that simple
>>
>>51715544
I think so
>>
>>51715677
>you don't want to serve data, don't return 200 it's that simple
That's my thinking, but there's always stories like this http://petewarden.com/2010/04/05/how-i-got-sued-by-facebook/ that make scraping seem fairly precarious.

It's obviously a smaller website, but I still don't want to get nullrouted or worse yet, fucked in legal costs because I wanted to archive the data they made publicly available to me in my browser.
>>
What's the purpose of boost.integer?

what are some good c/C++ channels are irc?
>>
>>51715234
>coreclr
thanks, never seen that
>>
>>51711390
>mfw i have friends that enjoy playing dota and programming
did i-i make it
>>
>>51710980
>I figured out how to split screens and switch between them using screen, but I can't get anything to type in the second screen
because you have TO MOVE THERE, you only have a "screen" active at a time.
And ditch screen and use tmux
>Basically I want terminal/vim to behave like the instructor's gedit does
an embed terminal in the editor?
Well assuming you changed to tmux from screen, use https://github.com/benmills/vimux
>>
>>51711911
the pink ones should be moving
>>
File: old man wants to fuck.png (2 MB, 2000x1000) Image search: [Google]
old man wants to fuck.png
2 MB, 2000x1000
So yes anon. What do you think of jhipster?
>>
File: my_soul_when.jpg (62 KB, 900x900) Image search: [Google]
my_soul_when.jpg
62 KB, 900x900
I worked on a project for a quite a while and then I realized it's not viable the way I was doing it, so I ended up scrapping it.

Fuck, I just wanna get one project close to completion, or make something noteworthy.

What do I make?
>>
>>51712201
doesn't seem to be most efficient
>>
>>51712575
amerikeks are disgusting, really disgusting, fat people
>>
People on dpt are so gay. Praise real languages instead of girly ones
>>
>>51716040
Fuck off kike
>>
>>51716060
you'r kike, shemales dont reproduce
>>
>>51716040
Like?
Java?
Spring?
Swift?
ObjectiveC?
>>
File: 1419276460727.jpg (61 KB, 500x539) Image search: [Google]
1419276460727.jpg
61 KB, 500x539
>Go to a git project page
>No screenshots

Don't be that guy.
>>
>>51716072
Swift = Taylor Swift?
>>
>>51716069
But futas do. Checkmate faggot.
>>
Have there been any notable performance tests on Rust? I'm no nerd but don't all the guarantees it makes slow it down a bit?
>>
>>51716104
Look for yourself http://benchmarksgame.alioth.debian.org/
>>
>>51716077
Swift is a memelanguage used in the memeide Xcode and memeOS faggintosh distributes.
>>
>>51715706
have an awesome day breh thank you
>>
>>51716126
>i tack meme onto things i dont like because i am unable to articulate my opinions properly
just brain yourself m8
>>
>>51711351 actually people with iq 100-120 helps your social iq
>>
>>51712953
>c++
s1.erase (std::remove (s1.begin (), s1.end (), ';'), s1.end ());


Where `s1` is your `std::string`
>>
>>51716147
>Implying people don't code in xcode and objective/swift because they're memelords
M8....

C++ is better than both.
>>
>>51711003
readBit... readByte?

You have both?

!readBit(filename)

what is readBit? Is it a bool?
>>
>>51716073
Screenshots of what you faggot?
Not everything is a video game.
>>
>>51716364
Found one.
>>
>>51716174
>ere `s1` is your `std::string`
why put a space before ()?
>>
How would I go about writing a python script that sends an image file to iqdb to look for source?
>>
>>51716406
Doesn't iqdb have an API?
>>
>>51716406
just use google reverse image search and filter the result with site:iqdb.com
>>
>>51715642
I made it to almost the top of the leaderboard today.
>>
>>51710874
Would you consider VHDL a programming language?
>>
>>51711911
You did this in a few weeks?
Is GLUT really that easy to use? last time i tried OpenGL it was a fucking verbose mess and i didn't understand anything.
Are you doing matrix transformations yourself?
>>
>tfw used lambdas for the first time today in python which I only just picked up, for day 6 of the advent challenge
am I a functional programmer now lads?
>>
>>51716719
You fell for the meme chum
>>
>>51716517
Can't find any info on it.

>>51716518
Would prefer not to send lewd 2ds to google if possible.
>>
>>51716719
yes
>>
>>51716729
which meme is it this time?
>>
>>51716739
wait shit, python?
no

>python
>programming
>>
>>51716745
The functional programming meme
>>
>>51716685
Not him but...

>Is GLUT really that easy to use?
I'd recommend using glfw instead of freeglut.

>last time i tried OpenGL it was a fucking verbose mess and i didn't understand anything.
You must have been using shit documentation/tutorials, 2 weeks ago I started learning OpenGL and in about 8 hours I had a semi-working game base with texture and model loaders, basic player camera, simple collision check (albeit flawed) and font rendering.

>Are you doing matrix transformations yourself?
I'd recommend using glm if you can use C++. There's no need to bother yourself with that and reinvent the wheel unless you're aiming to specifically learn the inside outs of matrix ops.
>>
>>51716765
oh thank god, thought you were going to say python

and how is it a meme? It was useful for passing the procedure to change lights based on the instruction in advent challenge 6 quickly
>>
Who /made it to the leaderboard in advent of code/ here?
>>
>>51716775
>I'd recommend using glm if you can use C++.
Why the fuck are there literally no matrix libraries for plain C? the only thing i've found is linmath.h and it's too buggy.
>>
Don't fall for trap languages fellow /g/entoomen
>>
File: 1426-061215.png (750 KB, 4000x2560) Image search: [Google]
1426-061215.png
750 KB, 4000x2560
Going to finish this keygen of which has been laying around incomplete for months.

Got valid serials working (well I don't think the symbols ones will work with activation code, but they are valid initially), need to work reverse engineering the generation of valid activation codes now.
>>
http://ideone.com/sqN5Yf
>>
>>51716839
dude that's fucking awesome

are you gonna add a scene window and music?

interested in seeing what it looks like and how you make it. the screenshot says a lot already...
Thread replies: 255
Thread images: 36

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.