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

File: 1467783268965.jpg (268KB, 850x1133px) Image search: [Google]
1467783268965.jpg
268KB, 850x1133px
Old thread: >>55866493

What are you working on, /g/?
>>
First for Haskell
>>
>>55871316
Nothing. I'm bored and I can't think of anything I want to make.
>>
>>55871316
Bash and zenity
>>
>>55871316
working with some nodejs and mongodb shit, i need to random one record from mongo and i dont get it.
im new to mongo, started few hours ago
>>
>>55871373
>nodejs
>working
No, it's more akin to feeling around for things in raw sewage.

Don't ever use nodejs again.
>>
in lua there is the table function with tablename{} and table.insert etc. What is the alternative in python?
>>
i'm creating an app that is basically a web browser with no internet connections.
>>
>>55871363

Same here, lad. I've been wasting time reading and playing vidja gayems. It's just not the same.
>>
>>55871316
Is that a boy or a girl?
>>
>>55871430
Oi ye chav fack off n get thee to bed
>>
>>55871316
How is that image related to programming?
>>
>>55871454

I'm not actually a chav. I'm not even British.
>>
File: Untitled-2.jpg (2MB, 6000x3000px)
Untitled-2.jpg
2MB, 6000x3000px
still wokring on matching game - almsot done tho, just some timing/locking stuff then i can start making cute catgirl cards and thieving soundse tc.
>>
When will the language wars and shitposting end?
>>
>>55871427
You mean a wrapper for a web view instance?
>>
File: 10-10.jpg (24KB, 512x372px)
10-10.jpg
24KB, 512x372px
Noob programmer here, I'm working on a text based exploring game. Nothing fancy.
>>
>>55871507
I don't believe you.
>>
>>55871522
When people stop churning out and using crappy languages like Python and variations on JS
>>
>>55871524
yep, i have an idea for something very interesting with it
>>
>>55871552

God's honest truth, mate.
>>
>>55871582
tell us more.
>>
Is there an easy/ efficient way to work with neighborhoods in python?

I have an NXMXP matrix where each mxn is a slice of temperature data. I have to replace each pixel with the mean of its neighborhood as well as filter out neighborhoods that contain over a certain percentage of nans.

I know scipy has a median filter but I want the mean.
>>
File: e9d.jpg (16KB, 600x600px) Image search: [Google]
e9d.jpg
16KB, 600x600px
>>55871613
>python
>>
>>55871599
I can't state the technology i will be using for obvious reasons

but if you want an idea, think johnny mnemonic
>>
File: huggg.webm (3MB, 896x504px) Image search: [Google]
huggg.webm
3MB, 896x504px
Ask your favorite programming literate anything (IAMA).

>>55871522
Convincing people to become lispers is a never-ending battle.

>>55871433
It's a schrodinger waifu. it's both a boy and a girl at the same time till you check the package.
>>
File: Screenshot_1.png (90KB, 820x663px) Image search: [Google]
Screenshot_1.png
90KB, 820x663px
Pong, working on the AI
>>
>>55871672
>lispers
Begone, foul trickster. Haskell is the true path.
>>
File: question_black_guy.jpg (162KB, 1600x900px) Image search: [Google]
question_black_guy.jpg
162KB, 1600x900px
>>55871316
>daily programming thread
>using a completely irrelevant image
>>
>>55871711
>daily programming thread
>new thread appears multiple times a day

[question_black_guy.jpg]
>>
>>55871672
Use Schroedinger if you can't type umlauts you uncultured swine
>>
>>55871733
it's [daily programming] thread, not programming daily thread
>>
>>55871757
actually it's ( [daily] [programming] [thread] )
>>
Today at worked I continued working on my wiki table editor. You can actually edit the text in cells now.
>>
>>55871316
Pretty sure this op is a new kind of bait, after the SJW ops...
>>
>>55871402
had to look what a lua table is but seems like dictionaries in python
>>
File: 1468869671984.png (191KB, 419x398px) Image search: [Google]
1468869671984.png
191KB, 419x398px
>>55871903
>a new kind
>>
Network programming is black magic to me. I don't understand physically what a socket or port is, how 1s and 0s become electromagnetic waves that travel through the wi-fi and down copper wires thousands of miles through data centers, get routed to the correct places, fly through more wi-fi, and turn back into meaningful 1s and 0s on someone else's computer.

I guess I'm trying to understand what things like
socket()
,
connect()
, and
listen()
do, physically, on the silicon.

Thanks for reading my blog.
>>
>>55871373
>mongodb
/dev/null is faster and more consistent as a datastore.
>>
why is WPF so comfy
>>
File: 1463633644290.png (954KB, 781x1267px) Image search: [Google]
1463633644290.png
954KB, 781x1267px
What would Maki program?
>>
>>55872251
>2016
>not suring data in Pi

>>55872276
a bf
not you
>>
>>55872240

>AYYYYYO NIC LISTEN TRU DIS PORT AIGHT
>HOL UP SEND A PACKET RITE DER
>>
>>55872276
Probably a dildo since she's such a slut
>>
>>55872240
these are all software concepts, physically it works the same as any other IO
>>
>>55872240
how? learn calculus and basic linear algebra then it basically explains itself
>>
File: 1446950588795.jpg (18KB, 419x249px) Image search: [Google]
1446950588795.jpg
18KB, 419x249px
Hey guys

Object oriented programming

>>55872240
fourier transformations
>>
>>55872448
Pajeet pls go nobody needs OOP it's only taught to people who can't handle real programming paradigms why you think the good schools teach Scheme or Haskell or an ML and the crap schools teach Java or C# just stop stealing our jobs k.
>>
>>55872240
https://en.wikipedia.org/wiki/OSI_model

If you're writing programs with TCP and UDP sockets you're at the transport layer. Your TCP and UDP stuff gets wrapped in a packet most likely with IP. So learn how IP works. Mostly you strap a header with origin and destination ips, ports, mac address etc to your data so the rest of the network knows what to do with it. To learn more read about IP.

This goes to the data link which is going to strap some headers and stuff so any device listening to the same physical medium knows if it should ignore it, repeat it, or send it up the stack network stack to get parsed.

The physical layer is where this software stuff gets turned in to analog voltages. To learn about these layers read about which ever layer you're interested in. Ethernet and 802.11 stuff for example.

As socket it creates a file and registers it with the OS. Listen tells the OS's network stack hey if you receive any messages on this port send them to me. Connect on a TCP connection initiates a TCP handshake. That actually results in packets being sent to another computer.

Physically a socket is some memory in your OS that keeps track of that file. A port is a 16 bit number that is stuck in the IP header. It's a way to allow more than one program to use the same IP. So say you call listen(). Well any IP packet the OS receives it is going to look in that header and pull out that 16 bit number. If it matches it puts it in queue for your socket.
>>
>>55872240

There's several layers at play here. Calls like socket() are actually a bit abstracted from the hardware. I would suggest reading some Linux kernel sources to get an idea is how your system calls are talking to the hardware. If you want to go deeper than that, you'll need to study electronics.
>>
I'm going through SICP which uses Scheme.

I understand that lists are made of pairs but is there any conceptual knowledge benefit to the pain in the ass that some questions require when the car / cdr commands are used with cons and lists and append? I always have to perform checks to see whether:

- appending two items causes them to form one list or two lists in a list
- appending pairs (or stuff like that) causes the dot to appear
- whether or not the empty list causes problems
>>
globalvar = False
def mainloop():
localvar = globalvar
while 1:
if globalvar != localvar:
print "update" # never prints

app = Flask(__name__)

@app.route('/')
def update():
global globalvar
globalvar = True
return 0

@app.route('/start')
def start():
mainloop()
app.run(port=8000, host='0.0.0.0', threaded=True)


what is the correct way to update globalvar so that "update" will print in this situation?
>>
>>55872897
Don't use globals
>>
>>55872937
what should I use so that update will print?
>>
File: 1469923172142.jpg (24KB, 360x270px)
1469923172142.jpg
24KB, 360x270px
reminder that every line of code slows down your program. so if you are coding nihilist you should keep it to a minimum.
>>
>>55872266
It's fucking extense, sometimes I wonder when I'm going to git gud at this. fucking datatemplates and those magical bindings.
>>
>>55873130
>every line
That's not true though, unless you're using interpreted shit.
>>
>>55872897
You're correct in using the global keyword, so it looks right to me. I don't know how Flask works, though. Does update actually get called?
>>
Post things that make you go "Hmm..."!

https://msdn.microsoft.com/en-us/library/dd402872(v=vs.110).aspx

Hmm...
>>
>>55873130
that's why I use perl, the fastest language
>>
>>55872897
is this asynchronous?
>>
cant stop coding and Im afraid I will start to dream in code. what do?
>>
>>55873130
>c++ template metaprogramming
>>
>>55873130
but that's wrong. I can minify a program so that each source file has only 1 line.
>>
>>55873405
>coding
>>
yo I just realized
what the shit happened to johnson trip? Did he delete himself from here?
>>
>>55873834
hopefully he moved on from this place
it's sad to see 30+ people being stuck on this board for life
>>
>>55873855
did you remember his exact trip?
>>
>>55873834
Look at my massive !Johnson left many years ago. His trip has been leaked at some point and got used for the DPT for quite some time.
>>
>>55873834
ikr, johnson and kenny were my 2 favorites ;_; . Ruby is not even on their level
>>
>>55873885
>>55873888
I remember he had a github, you know of it?
>>
>>55873888
i used to trip, it just stops being fun because everyone ends up hating you, you can't have proper arguments because people will resort to ad hominems of you and post screencaps of your embarrassing old posts to shut you up.

And for what? nobody will remember you anyway unless you're loud and obnoxious.
>>
>>55873902
found it
https://github.com/JohnAnthony
>>
>>55873300
yeah update gets called
>>55873390
yup
>>
>>55873834
He died from heart attack during anal homosexual sex with Marisa and Lucy. His old heart could not take it.
>>
File: 1446251225462.jpg (509KB, 2540x1353px)
1446251225462.jpg
509KB, 2540x1353px
>>55873907
>And for what? nobody will remember you anyway unless you're loud and obnoxious.

I'm just the worst kind of person.
>>
>>55873907
Fuuzetsu?!
>>
>>55873902
https://github.com/JohnAnthony
https://github.com/kennyledet
>>
>>55873855
>>55873888
I want Johnson to make another gentoomen library ;_;
>>
>>55873960
and yet still nobody is going to remember you
>>
>>55874007

That's probably for the best, being that I'm an idiot.
>>
>>55873996
Sexy motherfuckers.
>>
>>55873929
The thread for update has the possibility of being ran before the mainloop, and then localvar and globalvar always will have the same value. That's my guess, I don't even know what language you're writing in lol (looks like python).

>>55873907
There's no reason to trip on this website unless you're playing risk or you have to be verified for some reason (like contributing to a project). Otherwise, identity has no meaning to discussions.

>>55873960
You get a pass cause you're not extreme cancer.
>>
>>55874031
>You get a pass cause you're not extreme cancer.

Well, that's new.
>>
What do you lads think of the different flavors of markdown, and markdown in general?
>>
I wrote a program that will send multiple unique requests asynchronously to a REST api for account registration. The problem I am coming into now is wanting at least some kind of anonymity through (ideally) each request, though I could settle for less. Different IP addresses on each account would be the end goal, but a balance of speed, anonymity, and amount of registrations is important.

The idea I have in my head right now is utilizing TOR, having multiple instances running on different ports, and switching exit nodes on X amount of successful registrations for each running connection.

My question: Is this how others would do this or is there a better way that I'm not aware of?
>>
So, I understand what's happening with masking operations, but why would one do/use it?
>>
>>55874018
I'll remember. I, too, want to make pixel sorter one day.
>>
File: Untitled.webm (2MB, 720x480px) Image search: [Google]
Untitled.webm
2MB, 720x480px
>>55874257

Go fer it, then.
>>
>>55874215

It's used in hash tables, networking, image/video processing operations, etc. because of the low cost to do those operations where speed and latency are important and the need to quickly filter data.
>>
>>55874215
It's useful if you want to manipulate the individual bits in a chunk of data. This is common, for example, with compression or cryptographic software.

Another typical application is when preparing data to store it on disk, or send it over a network. For example, if you want to store a 32-bit number as a sequence of 4 bytes, you can use bitwise operations to convert it into bytes, and later use more bitwise operations to recover the integer again.
>>
>>55874289
Covering up a picture of a black woman, as it should be. I like it.
>>
>>55874379
>covering up
it's sorting the pixels ya goof, don't you notice the gradient at the end.
>>
>>55871711
this, and the samefagging trap poster will whine super hard and derail the thread if it's not a trap pic in the OP
>>
Im currently working on a 2d spatial data structure. I use sort of a voxel grid of a certain size which builds a cell. if you go out of the first cell it creates a new one and so on. it's pretty good for queries out of the perspective of an entry but not so good top down for obvious reasons.

the question Im pondering right now is radius of the query (it's always as a circle for quick gathering and then you can utilise it further in a custom query to like simulate view angle and the sort). should I implement an "unlimited" range or should I clamp it at 1 cell width?
this is less a question of usability or performance but kinda design philosophy, I guess. what would you do?
>>
>>55874379

black women are best, though.
>>
>>55874556
best at being the worst
>>
Hey guys. So I've been following these threads for a while now and I've got the impression that C is the superior language to write apps in. Is that correct?
>>
>>55874594
>apps
>>
>>55874594
sounds like you got memed son
>>
File: 1384558624753.jpg (6KB, 183x200px) Image search: [Google]
1384558624753.jpg
6KB, 183x200px
>>55874604
Hook, line and sinker.
>>
>>55874585

Very rude, tbqhwy.
>>
>>55874626
The truth sometimes hurts, but it's still the truth. Black women are gross. Where dem white girls at?
>>
>>55874594
C a shit, C++ a best
>>
File: 1466634860211.png (392KB, 832x832px)
1466634860211.png
392KB, 832x832px
>>55874620
>implying you didn't fall for my b8 of me falling for your b8
>>
>>55874691
Come on now. Face it, you lost this one.
>>
How do I git gud at translating pseudocode algorithms into real code?

It took me two hours to implement Djikstra's algorithm from wikipedia into C. This is what I did: http://pastebin.com/bQATsr3A

I feel like if I was a good programmer I should be able to go straight from psuedocode to real code in 10 minutes, tops.
>>
>>55874655
>Black women are gross.

Just objectively wrong.
>>
>>55874775
*Just objectively wrong to think otherwise
>>
>>55874775
What's your opinion on black men?
>>
>>55874802

They're pretty awful. That's why so many black women date outside their race.
>>
>>55871510
You're a girl, aren't you?
I can tell because you post a screenshot of all your fucking workspaces instead of only what's relevant.
Kill yourself you insufferable faggot.
>>
>>55874892
No he's definitely a trap/tranny. Girls can't program.
>>
>>55874902
>he's
Check your privilege cis-scum.
>>
>>55874902
>Unity3D
But she's not programming.
>>
>>55874814
>blacks race mixing
Gross.
>>
>make simple 2D engine
>fixed timestep (or so I assume) to 60 ticks per second
>decide to test lower timesteps for interpolation
>game runs slower, interpolation works, however

I didn't think the physics would decrease as I decreased the updateRate.

For example, the entity has a y-velocity (float) that increased by the value of gravity (float) times the timestep (float)

ent->vel[1] += value_gravity * timestep; 


timestep returns 0.016667 (with an updateRate of 60) and 0.033333 (with an updateRate of 30) and 0.066667 (with an updateRate of 15)

value_gravity is set to 6.0f

So what math am I doing wrong here?
>>
File: out.webm (789KB, 940x546px) Image search: [Google]
out.webm
789KB, 940x546px
Working on a Mahjong game as a school assignment. Here's what I have so far. Would you hire me /dpt/?
>>
>>55871510
Bailey you're cute be my gf.
>>
>>55871510
sure is summer >>>/vg/agdg
>>
>>55875064
>>>/vg/agdg
>>
>>55875133
that's a game design thread, i'm asking a code question
>>
>>55875064
if you need an answer dont ask dpt or g. go to so. everything harder than a fizzbutt is impossible for idiots like this >>55875086 >>55875133
sadly a fact that repeats it over and over again
>>
>>55875185
that game design thread has done more engines than you
>>
>>55875068
That looks pretty good. Is it made in Unity or something?
>>
>>55875064
By "lowering the timestep" are you updating more times (sleeping less) or just calling with different values?
What language/libraries? C and SDL?
>>
>>55875241
SDL2, I use this logic that I found on a thread here on /g/ years ago

// game state (for example)
const double v = 10; // units per second
double x = 0;
double previousX = x;

// timing
double period = 1 / (double)SDL_GetPerformanceFrequency();
Uint32 start = SDL_GetPerformanceCounter();
Uint32 previous = start;

// update timing
const double updateInterval = 1 / 50.0; // updates at 50Hz
double accumulator = 0;

// main loop
while(!SDL_QuitRequested()) {
// calculate t and dt in seconds
Uint32 current = SDL_GetPerformanceCounter();
double t = (current-start) * period;
double dt = (current-previous) * period;
previous = current;

// You can't fix the freezing because SDL doesn't use a multithreaded Windows
// message loop (default message loop on Windows enters a modal loop when
// moving/resizing which halts all other processing). You can clamp the dt value
// if you wanna drop frames instead of the super-speed 'catch-up'
if (dt >= 1/5.)
dt = 1/5.;

// update every updateInterval seconds
accumulator += dt;
while(accumulator >= updateInterval) {
accumulator -= updateInterval;

// update based on updateInterval (which is fixed)
x += v * updateInterval;
}

// interpolate
double interpolation = accumulator / updateInterval;
double interpolatedX = lerp(previousX, x, interpolation);

// render
drawThing(interpolatedX);
}
>>
>>55875204
Yeah I needed to get something up and running in a few weeks. If I pursue it as a real project after this semester I'm going to port it to C with a custom engine. I pretty much just use Unity as a renderer and don't use it for any engine stuff so porting shouldn't be too difficult.
>>
Wew lad, a day's hard work.
>I went from this,
import sys
from random import randint
for joespass in range(1,4):
name = raw_input('Whats your name?')
if name != 'Joe':
continue
passw = raw_input('What is your password?')
if passw != 'swordfish':
print 'Access Denied'
else:
print 'Access Granted. Welcome Joe.'
break
if name != 'Joe':
print 'You are not Joe. Goodbye.'
exit()
else:
print "Let's play a game, Joe."
print "I'm thinking of a number inbetween 1 and 20."

answer = randint(1,20)
for guessestaken in range (1,7):
print answer
guess = int(input('Take guess'))
if guess == answer:
print 'Good Job, the number was indeed ' + str(answer) + '!'
print 'Goodbye'
break
exit()
else:
print'Try Again'
for wronganswers in range (1,7):
guess
if guess != answer:
if wronganswers == 7:
exit('Bye')
else:
print 'Congratulations'
if wronganswers == 7:
exit('Goodbye')
continue
exit()


>To this
from random import randint
from sys import exit
def guessinggame():
global answer
global guess
answer = str(randint(1,20))
print (answer)
for begins in range (0,7):
guess = str(input())
if guess == answer:
print('You Win!')
break
elif guess < answer:
print('Too Low! Try Again!')
elif guess > answer:
print('Too High! Try Again!')
guessinggame()
print ("Thanks For Playing!")
exit()


The def function is really useful!
>>
>want to read this programming book on my couch because it would be comfy af, but then I wouldn't have my computer to try things out
>could read it at my desk, but it would be super uncomfortable
What a dilemma
>>
What are some of the books, or any sources, that complements ones study and understanding on programming / computers etc?

In other words, besides learning a programming language and how to use it, what other sources make one a better programmer / knowledgeable overall?

I am currently learning C but I would like to know more.
>>
>>55871510
>windows (10 none the less)
>sublime
>C#
>steam (not to mention the amount of games that you wasted your parent's money on)
>/v/ bookmark
>unity
>photoshop
>abp (instead of ublock Origin)
>noscript (instead of ublock Origin/umatrix)
>no 4chanx and oneechan
>all these trash icons on firefox
>screenshot as jpg
Yeah, you need to fuck off out of here normalfag/summerfag. Go back to agdg.
>>
File: 1469992320079.jpg (365KB, 1200x800px)
1469992320079.jpg
365KB, 1200x800px
This is more a path problem than a programming one. Here it goes:
I have a file in the root project, called "File.xaml". I want to access that file from three levels of nesting folders.
(root)
File.xaml
[/FirstNestOfFolder/] // Here I can access File.xml using the string "..\File.xaml"

[/FirstNest/SecondNest/ThirdNest/] // How I can access File.xaml from here?

Have a Sabina in return.
>>
>>55875299
This so much. I need like a stand to hold books cause trying to do K&R I have no where to put it that's comfortable to look at or hold and not have the pages automatically flipping back at the same time.
>>
>>55875310
There's a book of Jon Stokes about proccesors, read that.
The practice of programming is nice, Pragmatic programmer, and for C: 21st Century C, and Understanding and Using C pointers.
>>55875310
>mfw iPad 1(tm)(r)(c) plus the keyboard stand(tm).
>>
>>55875285
This guy here, how would I go about implementing
if begins >= 7:
print('Sorry, You Lose!")
exit()


into
from random import randint
from sys import exit
def guessinggame():
global answer
global guess
answer = str(randint(1,20))
print (answer)
for begins in range (0,7):
if begins == 6:
print('One Last Try!')
guess = str(input())
if guess == answer:
print('You Win!')
break
elif guess < answer:
print('Too Low! Try Again!')
elif guess > answer:
print('Too High! Try Again!')
guessinggame()
print ("Thanks For Playing!")
exit()


I've tried placing it in a few different places but the for begins just loops straight to one of the elifs at the bottom and exits with the Thanks For Playing message.
>>
>>55875402
Just put the whole block right before the
if begins == 6:
line. It worked fine here.
Also, change the if from this same line I said to an elif
>>
>>55875064

Your physics is tied to your framerate right now via your timestep and updateRate. If you decrease your updateRate, your timestep compensates and goes up because those values are both in a proportional relationship where timestep * updateRate = 1.

Read https://gamedev.stackexchange.com/questions/1589/when-should-i-use-a-fixed-or-variable-time-step and especially, http://gafferongames.com/game-physics/fix-your-timestep/
>>
>>55872240
I/O is fairly simple, and API functions like socket etc are also fairly simple.
The hard part is understanding operating system internals.
Somewhere along the line actual physical networked I/O is mapped to an internal identifier and then the OS polls it for updates.
But really in networking it's all about doing what the standards tell you to, because computer networking relies so much on the fact that everybody is conforming to protocols and stuff.
So there's not really a need to dig into it too much unless you are writing your own OS.
Usually you achieve polling with things like epoll, but perhaps the OS uses a more intricate method.
>>
>>55875509
Welp, this works but it still shits out "Too Low! Try Again" just before the "You Lost, Sorry!" message. I reckon that I might have to create an entire new block dedicated to the last input/guess. Thanks Anon.
>>
>>55875354

What language are you using? C++? C#? VB.NET?

The simplest way is to provide an absolute path which pretty much only works for the simplest of cases. But in most languages, you can simply use
"..\"

as the path to go up one level. To go up 3, you can chain them together, and in your case, to reach File.xaml, the path will be
"..\..\..\File.xaml"
>>
>>55873405

Write a program that generates code for you.
>>
>>55875563
>it still shits out "Too Low! Try Again" just before the "You Lost, Sorry!" message
Isn't this the message from the sixth time you guess the number wrong.
It prints "Too high" or "Too low" at most 6 times and breaks the loop on the seventh time.
>>
>>55873405
>i dont want to dream in code
it's easy dont be autistic
>>
File: 1469994894855.jpg (64KB, 600x450px) Image search: [Google]
1469994894855.jpg
64KB, 600x450px
>>55875583
I'm using C#, the three level of dots (who's that thing called) worked
"..\..\..\ApplicationResources.xaml"

Thanks m8.
>>
if anyone wants to try out Haskell in windows with sublime (has autocomplete, repl, etc), just download haskell platform (64bit) on official website, follow instructions there

then follow this
https://github.com/SublimeHaskell/SublimeHaskell
>>
>>55875588
It was supposed to do that, yeah, but it was pooping out,
>5 (Guessed Number)
>Too Low, Try Again!
>Thanks For Playing! (The Exit message)
I managed to fix it by make use of the continue function on the 6th loop to start it from the beginning on the 7th term in which I then introduced the general guessing game code.

I also got an idea while coding this. For the seventh loop I could just create a unique function for it.

Final Result
from random import randint
from sys import exit
def guessinggame():
global answer
global guess
answer = str(randint(1,20))
print (answer)
for begins in range (0,8):
if begins ==7: #7th iteration begins here instead of the block below the sixth iteration check
guess = str(input())
if guess == answer:
print('You Got It!')
else:
print('You Lost It!')
exit()
elif begins == 6:
print('One Last Try!')
continue #Ends loop prematurely on the sixth iteration
guess = str(input())
if guess == answer:
print('You Win!')
break
elif guess < answer:
print('Too Low! Try Again!')
elif guess > answer:
print('Too High! Try Again!')
guessinggame()
print ("Thanks For Playing!")
exit()

Thanks for all your help man.
>>
>>55875188
nice dunning kruger
>>
i32 or i64 for voxel positions in my Minecraft clone?
Does anybody actually go to the "farlands?"
>>
>>55875188
stay mad faggot
agdg actually does programming
>>
>>55875628

There's no official name for it. The shortcut comes from UNIX conventions. ".." is technically the shortcut but you have to chain them with a forward or backwards slash. To be cross-platform, you should use forward slashes instead of backslashes which I think C# shouldn't care about. I only used backslashes because of Windows directory conventions using them.
>>
>>55875717
I browsed agdg for three weeks, it's full of your typical /vg/ namefags and nodevs who shit on whodevs and praise namefagdevs.
It's still better than r/gamedev though.
>>
>>55875708
i32. if you get too far off, add an offset to everything to get closer to zero
>>
>>55872240
>Network programming is black magic to me. I don't understand physically what a socket or port is, how 1s and 0s become electromagnetic waves that travel through the wi-fi and down copper wires thousands of miles through data centers, get routed to the correct places, fly through more wi-fi, and turn back into meaningful 1s and 0s on someone else's computer.

As it should be. BSD sockets are abstracted away from the hardware in such a way that you can ignore whether it's WiFi, Ethernet, Microwave, whatever along the way.

The postal service is actually a good analogy. You just put data in an envelope and write an address on the outside. You really don't care whether the letter goes on a plane, on a boat, in a car, etc. you just care about the contents getting there.
>>
File: cat-considering-life.jpg (42KB, 480x477px) Image search: [Google]
cat-considering-life.jpg
42KB, 480x477px
>>55871353
I'm studying Haskell senpai I hope u do good
>>
>>55875723
To be *pedantically* cross platform you'd avoid using forward or back slashes at all. Opting to store paths as lists instead of strings and relying on some path.join library call to do the right thing.

But that's being excessively pedantic and nobody actually does this.

#!/usr/bin/python

import os

path = ('/etc', 'systemd', 'system', 'sshd.service')
with open(os.path.join(*path)) as f:
print f.read()
>>
>>55875967

That's only really needed if you are developing for a OS that is neither POSIX or Windows. Windows accepts both backslashes and forwardslashes. And Linux/macOS uses forwardslashes.
>>
>>55875723

Windows doesn't care if you use forward slashes or backslashes. You should use forward slashes for everything when on Windows.

>>55875967

>/etc/systemd
Given that systemd is only a thing on Linux (doesn't work on BSD), you shouldn't bother with being cross platform here. Just use an absolute path.
>>
>>55876030
Just the first example I could think of. The actual path isn't what really matters here.
>>
>>55876042

As a general rule of thumb, there's an almost 100% chance that any software you write is either going to be used on Windows or a Unix-like OS. You can reasonably just do everything with relative paths where . is the current directory, .. is the parent directory, and / is always used as a path separator. If you're writing for other platforms, you've got bigger problems than file paths, and you might as well just rewrite everything from scratch.
>>
File: 325372856382981.png (730KB, 1067x800px) Image search: [Google]
325372856382981.png
730KB, 1067x800px
>tree based file system
>>
>>55876189

Why wouldn't a filesystem use a tree-like hierarchy?
>>
>>55876272
If it wants to represent files in a non-hierarchical form, duh.
>>
File: 5.jpg (39KB, 500x285px)
5.jpg
39KB, 500x285px
>system based tree file
>>
Why is there so little information on higher order trees / higher dimensional trees?
>>
>>55876352
what are you even looking for? They're not that complicated of a subject.
>>
>>55876360
give an ADT of a higher dimensional tree
>>
>>55876352
because no one owns a supercomputer
>>
>>55876368
What?
>>
I'm trying to compare the current windows username to a string, and it isn;t working, what the fuck is going on? anyone done this before?

    char username[UNLEN];
DWORD username_len = UNLEN;
GetUserName(username, &username_len);

if(username =="Someone") {
printf("Something");
}
>>
>>55876444
C strings are [const char*] valuies, so it's like you're comparing references
Use strcmp
>>
>>55875354
>>55875628
> relative fie paths
don't

use
"~\blabla\myfile.xaml"
>>
>>55876456
just tried this and it isn't working. Can you provide an example ? I tried altering what I saw on google.

    char str1[25];
char str2[25];
strcpy(str1, username);
strcpy(str2, "Someone");

printf("%s", username);
int result = strcmp(str1, str2);
if(result) {
printf("Something");
}
>>
>>55876515
const char*, not char[]
if (strcmp(username, "Someone"))
>>
>>55876540
Yeah that still doesn't work ^^
>>
>>55876559
they should both be C strings, i.e. a null (\0) terminated char*
>>
>>55876559
#include <stdio.h>
#include <string.h>

int main (void) {
char username[25] = "Blah\0";
char other[25] = {0};

strncpy(other, "Blah", 24);

if (strcmp(username, other) != 0)
puts("no");
else
puts("yes");

return 0;
}
>>
What should I delve into next in Java?
>>
>>55876515
maybe you should learn C before trying to do stupid things with C-style strings.

By the way strcmp returns zero if both strings are identical, so you want
if (!strcmp(str1, str2))
>>
>>55871691
Hasklelfags can't do this
(defparameter *jew-first-names* 
'((schlomo . 3) (herschel . 2) (itzhak . 3) (moshe . 2) (ezra . 1)))

(defparameter *jew-last-names*
'((shekelberg . 3) (goldberg . 3) (shmulevitz . 2) (silverstein . 3) (lieberman . 2)))

(defparameter *jew-names*
(append *jew-first-names* *jew-last-names*))

(defmacro defnames (&optional (jew-names *jew-names*))
(cons 'progn
(mapcar
(lambda (c)
`(defmacro ,(car c) (&whole whole &rest args &aux (judaism-level ,(cdr c)))
(dolist (name args)
(when (assoc name *jew-names*)
(incf judaism-level (cdr (assoc name *jew-names*)))))
(dotimes (i (1- judaism-level) (list 'quote whole))
(setf whole (list whole)))))
jew-names)))

(defnames)

(schlomo moshe shekelberg) ; => ((((((((SCHLOMO MOSHE SHEKELBERG))))))))
>>
>>55876717
(**(()()()()()))(**(()()()()()))(**(****))(((**))(((()(()((()))(()((**)(((**)))
))((()())(())))))))()
Meme: 100
Total: 761
Total meme percent: 197.109%
>>
>>55876717
What happens if it doesn't begin with a first-name but a last-name?
>>
>>55876717
import Data.Maybe (fromMaybe)
import Data.Char (toUpper)
firstn = [ ("schlomo", 3), ("herschel", 2), ("moshe", 2), ("ezra", 1) ]
lastn = [ ("shekelberg", 3), ("goldberg", 3), ("shmulevitz", 2), ("silverstein", 3), ("lieberman", 2) ]

rankG map n = fromMaybe 0 $ lookup n map

rank' [] b = 0
rank' (x:xs) b = (rankG (if b then firstn else lastn) x) + (rank' xs False)

annotate x =
let n = (rank' (words x) True) in
concat [ replicate n '(', map toUpper x, replicate n ')' ]


main = putStrLn $ annotate "schlomo moshe shekelberg"
>>
So /dpt/

I'm having trouble approaching a problem I've run into while coding a 2D RPG game.

Usually when I calculate collisions, I do it tile-based. But this time, I decided to do it different. I'm wondering if there's any way of restricting movement to certain rendered images.

For example, if I rendered a blue square on top of a red square, and I only wanted my chacter to be able to move over the blue square, how would I do this?
>>
>>55877037
What do you actually mean?
>>
>>55877058
When you're coding a game you have to calculate collisions.
>>
>>55877068
I know
>>
>>55877074
I'm wondering if you can use images to calculate collisions, like having a sprite being unable to move across a certain tile, based on the tile itself and not the location of it.
>>
What are your naming conventions? I'm not sure whether what I do is reasonable.

I usually name classes like
>NameOfTheClass
Methods like
>nameOfTheClass
Objects and variables like
>name_of_the_object
Instance objects and variables like
>_name_of_the_object
and constants like
>NAME_OF_THE_CONSTANT

Is this alright? What are you doing?
>>
>>55877097
I don't actually know what you're trying to say
Can you draw a diagram? Do you want tiles or not?

Obviously you can give a sprite a collision polygon and collide them
>>
>>55877099
It depends on the language
>>
Guys what should I program in Java!
>>
>>55877161
a C++ compiler
>>
in graphics programming, let's say I am rendering some object that is positioned in some arbitrary world coordinates; this position would be represented as a translation of the model matrix (which is an opengl uniform variable) for the current draw call, right?
>>
>>55877187
Scary. I can't do that. Something a little easier!!
>>
>>55877189
effectively

>>55877205
Hello World
>>
>>55877224
That's too easy... what the heck dude. How about something in between those two?
>>
>>55877229
Write a program that highlights /dpt/ shitposts
>>
>>55877229
Write a C compiler
>>
File: disgusting.png (216KB, 504x529px) Image search: [Google]
disgusting.png
216KB, 504x529px
>>55877099

>NameOfTheClass
That's right.
>nameOfTheMethod
That's right.
>name_of_the_object
Oh god, what are you doing?
>_name_of_the_object
please stop
>NAME_OF_THE_CONSTANT
KILL YOURSELF
>>
File: output.webm (2MB, 250x444px) Image search: [Google]
output.webm
2MB, 250x444px
r8 muh gaem /g/

I'm working on the background right now, I will draw stars and planets, it won't be this stretched picture for long.

I'm also working on a boss for this level, it will have AÍ (it will try to hit the player and avoid missiles)
>>
>>55877317
0/10 i couldn't make soemthing so unoriginal if i tried
>>
File: 1460753297204.jpg (222KB, 1600x1920px) Image search: [Google]
1460753297204.jpg
222KB, 1600x1920px
>>55877337
> 2016
> coming out with something original
wew lad, I lemme tell you, I invented shooting space ships.
>>
File: 3av3v5zoomedin.jpg (8KB, 140x80px)
3av3v5zoomedin.jpg
8KB, 140x80px
>go on /g/
>see Yu-Gi-Oh thread for some reason

Okay.
>>
>>55877777
Kill yourself faggot
>>
>>55877777
WITNESSED
>>
>>55877777
lol nice
>>
>>55877777
You motherfucker
>>
>>55877777
gj kog!
>>
>>55877777
nice 5
>>
>>55877777
wew lad
>>
programming
>>
down?
>>
>>55878435
up?
>>
>>55878447
No, down.
>>
>>55878464
upside down?
>>
>>55878477
Turn it all around.
>>
>>55878483
upside down
upside down
>>
File: jQuery.png (40KB, 912x874px) Image search: [Google]
jQuery.png
40KB, 912x874px
Is jQuery really the greatest thing on the planet?

Is there seriously no way to get the content of a file and send it in an XMLHttpRequest object in plain JS?
>>
>>55878496
Now invert the data structure.
>>
>>55878510
Are you calling me gay?
>>
>>55878503
Of course you can. Implemented it yesterday. Mind, pasting as is without changes.
// Read the file from $uploadInput and send as a POST request to the server.
// Assigns the file data to the passed request object.
async uploadFile(req: FileData): Promise<boolean> {
const formData = new FormData(),
file = this.$uploadInput.files[0]
formData.append("image", file)

// Not using fetch, because no ProgressEvent support
const xhr = new XMLHttpRequest()
xhr.open("POST", "/upload")
xhr.onprogress = e =>
this.renderProgress(e)
xhr.send(formData)
await load(xhr)

if (xhr.status !== 200) {
write(() =>
this.$uploadStatus.textContent = xhr.response)
return false
}
req.imageName = file.name
req.imageToken = xhr.response
return true
}
>>
>>55878503
https://developer.mozilla.org/en-US/docs/Web/API/FileReader

Don't worry I'm a fucking idiot
>>
>>55871510

>for loops
>>
>>55871510
>iterators
>>
File: 1465836926975.gif (897KB, 500x506px)
1465836926975.gif
897KB, 500x506px
www.beatfinder.net

Today I'm going to make it look sexy, it is stable n shit now it must look really sexy bois.

Tips?
>>
>>55878540

>if statements
>>
>>55878576
Improve the design, shill it on HN, try to monetize.
>>
>>55876936

>if statements
>IN HASKELL

ffs people how can you even show your faces here
>>
>>55878611
Far more concise, not gonna right a helper utility for that shit
>>
>>55878598
Name a better alternative.
>>
>>55876444
>>55876515
Why are you doing something like that in C?
>>
File: le lol over lisp.png (162KB, 571x307px)
le lol over lisp.png
162KB, 571x307px
>>55876936
>Hasklelfags can't into s-expressions and macros
>have to mess around with strings and concatenation to print what only requires #'list in Lisp
>>
>>55878775
lel fag, I don't know either language but the Haskell solution to this problem looks much better
>>
>>55871711
Welcome to /g/.
>>
/g/ how to get random file from folder in javascript?
Folder has about 1700 files, and i want 1 random file
>>
>>55878775
>have to use strings to print out a string
God damn those Haskell cunts!
>>
>>55878640
>>55878616

Well, first of all, that solution is just totally fucking nakedly wrong. Only calculating for schlomo and shekelberg, in the example, totally losing Moshe. 6 echoes instead of 8.

Second of all... you know what, fuck you.

import Data.Maybe (fromMaybe)
import Data.Char (toUpper)

jewFirstNames = [ ("schlomo", 3), ("herschel", 2), ("moshe", 2), ("ezra", 1) ]
jewLastNames = [ ("shekelberg", 3), ("goldberg", 3), ("shmulevitz", 2), ("silverstein", 3), ("lieberman", 2) ]
jewNames = jewFirstNames ++ jewLastNames

findWithDefault :: Eq a => b -> [(a,b)] -> a -> b
findWithDefault def assoc = fromMaybe def . (`lookup` assoc)

jewLevel :: String -> Int
jewLevel = sum . map (findWithDefault 0 jewNames) . words

echo :: String -> String
echo s = "(" ++ s ++ ")"

annotate :: String -> String
annotate name = (iterate echo $ map toUpper name) !! jewLevel name

main :: IO ()
main = putStrLn $ annotate "schlomo moshe shekelberg"


If if statements are ever the most concise solution, you fucked up somewhere previously.
>>
>>55879019
1) nice 7 fucking bindings
2) I didn't feel like fucking around too much with your retarded fucking /pol/ memes, I'm not 12
3) Doesn't treat first & last names differently, the entire reason I used a fucking if statement
>>
>>55879054

> 1) nice 7 fucking bindings
Yes, let me just squeeze 12 identifiers into a single line like you. That will make better code.

> 3) Doesn't treat first & last names differently, the entire reason I used a fucking if statement

Neither does the original, why the fuck would you? Also, again, your code was just plain fucking wrong. As in, not just morally wrong, but actually wrong, returning the wrong thing.

That unspeakable fucking True/False state fuckery didn't even do anything.
>>
>pytard arguing with js tard
>>
>>55879054
>>55879019
In fact I'm right, "moshe" is a first name and not a last name

>>55879115
>>>averageAandB(a,b) { return 0; }
>>>haskell fags can't even into this
>>averageAandB a b = (a + b) / 2
>wtf retard

You don't think there was a fucking reason he put first names and last names seperately?
He fucked up
I don't program in Lisp
>>
damn nigga haskellfags are truly autistic
>>
>>55879210
Care to explain how you messed your bait up so badly?
>>
so can we get a proper list of what is banned from these threds?

winodws
any kind of IDE
any kind to gui based editor
anything related to games
any language that isn't C

what else?
>>
What should I implement in my graphics engine? I've already got performance particle systems, fast approximation blur, per-object motion blur, custom hacked together quake 2 lighting techniques, lots of good stuff.

What would be kind of an impressive thing to showcase to get hired? 90fps 100000 particles seems overdone.
>>
>>55879248
SSAO
>>
data JFName = Schlomo | Herschel | Moshe | Ezra deriving (Eq, Show, Read)
data JLName = Shekelberg | Goldberg | Shlumevitz | Silverstein | Lieberman deriving (Eq, Show, Read)

class Scoutable a where
scout :: a -> Integer

instance Scoutable JFName where
scout Schlomo = 3
scout Herschel = 2
...

instance Scoutable JLName where
...

data JName = J { first :: JFName, middle :: [JLName], last :: JLName }


j = J Schlomo [Moshe] Shekelberg
-- error, Moshe is not a JLName


>lispfags can't do this
>>
How to make this work anons?
while read line;  do echo '{"name": $line}'; done < list.txt
>>
>>55879328
got it
while read line;  do echo '{"name": "' $line'"}'; done < list.txt
>>
>>55879149

> first names and last names seperately

For fucking organization and readablity. Obviously because we are inferior plebs who are incapable of using space-age 1986 hobbyist naming, like `rankG`, `rank'` without a `rank`, and using `n` to mean "name" and "number" in lexically adjacent functions.

But dude, do you not even realize? Here is exactly what your code is doing:

rank' xs = (rankG firstn (first xs)) + (rankG lastn (last xs))


Again, your disgusting True/False fuckery DOESN'T EVEN DO ANYTHING. Just fucking uninstall you fucking kindergarten hobbyist.
>>
>>55879328
Variables inside ' ' quotes won't be interpreted.
while read line;  do echo "{\"name\": $line}"; done < list.txt
>>
>>55879346
it works this way anon >>55879339
>>
>>55879275
That's pretty easy. Not making it from scratch but like every graphics programmer I have some old project that has it implemented so I can copy it.

I dislike deferred shading sort of stuff like SSAO unless it's a high poly environment. Rendering to multiple 16bit color attachments feels so bulky, I remember some sort of performance "plane based deferred shading" technique but can't find it on google.
>>
>>55879341
You sure were triggered, guess it really is easy to take a solution made in a minute in response to some lisp shitposter, then reply 5 hours later with an ""improved"" solution
It is obvious that the lisp idiot did not intend to mix the two together
>>
>>55879398

(defparameter *jew-names* 
(append *jew-first-names* *jew-last-names*))


Yup clearly no intention there.

Just fucking uninstall.
>>
>>55871316
Learning Golang instead of working.
>>
>>55879409
I don't know Lisp
I assumed defparameter was some Lisp macro that defined a kind of parameter, like bnf or something

Guess defparameter is just a let binding?
>>
>>55879409
So why did you have them in different tables anyway?
What was the fucking point?

Hell, I can fix my original solution right now.
Just add all the first names into the last name table
>>
>>55879428

You don't even need to understand what that means. All you need to do is observe that nowhere else in the code does it say "first" or "last".

Just. Uninstall.

You are a fucking hobbyist. And if you're not a hobbyist, you're a fraud.
>>
>>55879439
>nowhere does it say first or last
Except, you know, at the start, and in defparameter. And the fact that your code here

(defmacro defnames (&optional (jew-names *jew-names*))
// long block
to someone that doesn't use lisp, resembles a function taking a parameter that's a "jew-name"
>>
>>55879459

Jesus christ you're thick.
>>
>>55879525
How many times have I told you I don't use lisp?


(defmacro defnames (&optional (jew-names *jew-names*))
looks to me like
(pseudocode)
macro defnames (optional jew-names jewNames)
(second JN would be a named parameter)

Yet I'm supposed
>>
>>55879547

Just stop. Please tell me you're not using in charge of anything more complicated than an Excel spreadsheet professionally.
>>
>>55879585
>>(defmacro defnames (&optional (jew-names *jew-names*))
>>macro defnames (optional jew-names jewNames)
>you fucking retard

Just stop.
Please tell me you're not in charge of talking to anyone other than whoever taught you Lisp.
>>
>>55879394
>Rendering to multiple 16bit color attachments feels so bulky
you're supposed to optimize it, render to a smaller attachment and deal with the artifacts etc
>>
>the haskell autists are still going
>>
>>55879658
There will be autists shilling any and every language.

Do not assume these are the people that write the bulk of the code in those languages.
>>
File: 1457274399165.jpg (44KB, 544x529px) Image search: [Google]
1457274399165.jpg
44KB, 544x529px
>Haskshills complaining about unreadable lisp code
>Lispergers complaining about number of parentheses
>>
>>55879680
I'm not even talking about shilling the language but rather how they're still in the pointless idiotic argument.
>>
>>55879737
Then maybe you should both stop
>>
>>55879620
Cannot render to two attachments of different texture sizes without sacrificing backwards compatibility with earlier GL versions.
>>
>>55879764
Although resizing the textures to a smaller texture and applying the deferred shading on the smaller textures would yield massive performance upgrades, though I haven't tested this, might have horrible artefacts.
>>
This might be a bit of a stretch, but do any of you know of any good resources for working with Visual Basic for Applications? Every google search brings back people panicking on forums and begging for VBA snippets for their excel spreadsheets and I'm just looking to see how far I can push my limited programming knowledge in terms of interacting with other programs.
>>
>>55879873
retVal = Shell("C:\Temp\gc.exe 1", vbNormalFocus)

t. stackoverflow
>>
>>55879680
so what? no once cars what the fuck the people who write the code think, they're just monkeys

the only people that matter are the ones that actually voice thier opinions, regardless of thier experience.

cowardly little cubicale fags that say nothing are worthless.
>>
>>55879892
Well yeah, every book and online resource goes over how to open another program from within VBA, I was hoping more for some keywords to search for or places that go into the language a bit more in-depth than what MSDN covers.

If not, no big deal.
>>
File: 1444834474758.webm (175KB, 1920x1080px) Image search: [Google]
1444834474758.webm
175KB, 1920x1080px
>>55871510
this is you and you need to get teh fuck out fo /h/ and kill yourself you fat pedo anime watching faggopt
>>
>>55879922
VBA really isn't meant for interacting with other programs
>>
>>55879873
Why not use C#?

You can read/write memory from other processes fairly easily with it, as well as network packet sniffing and whatnot.
>>
>>55879873
>>55879941
Oh, I was thinking VB.NET, didn't realize you meant specifically VBA-only.
>>
>>55879941
>>55879951
>>55879937
>VB
>C#

who let teh retards in?

this shit has to stop

wtf /g/
>>
>>55879933
Why would being SysAdmin be a bad thing?
Aside from his creepy dolls, it's a pretty sweet set-up.
>>
File: 1461592347388.png (154KB, 320x308px) Image search: [Google]
1461592347388.png
154KB, 320x308px
>>55879937
Unfortunate. It's been handy for making things easier at work and I hoped it could go a bit further.

>>55879941
Currently learning C#, actually. I'm just another """self-learner""" but I hope to make something out of it.

>didn't realize you meant specifically VBA-only.
Yeah, VB isn't brought up a whole lot these days outside of VB.NET but like I said, VBA has been pretty damn helpful despite the constraints of the language and the flaws that those more knowledgeable have identified.

>>55879966
>teh
>wtf
>>
>>55879966
Did you come from the year 2005?

C# is actually a fantastic language now.
>>
>>55879973
>being a fat pedo weeaboo waste of space
>not bad

it's not just bad, it's disgusting

people like shouldn't be aloowed to live, let along be on /g/
>>
>>55879982
>C# is actually a fantastic language now.

10schilling have been depositied to your account mr pajeet
>>
>>55879982
Better than fucking JAVA?
>>
>>55879999
>Look, Mom, I posted it again!
>>
>>55879988
I don't get why you'd be so jealous of him either, anon. His setup is sweet, but it doesn't warrant that much, you know?
>>
>>55879988
Where do you think you are?
Why the fuck are you even here?
>>
>>55880001
In pretty much every way, yes.

I worked with Java for a few years, started using C# about a year ago. I'm never going back to Java.

>>55880017
>>55880019
>responding to the obvious bait
>>
>>55879982
no

>>55880001
C# is far worse than java
>>
use C++ if you need the "features" that C# provides. C# is the useless bastard child, basically the worst of C++ and the worst of java combined
>>
>>55880173
I'd say it's a love child, the best of both languages.

What do you think the strengths and weaknesses of C++ and Java are?
>>
>>55880173
>using a language that silently destroys data

C++ is a great language to know, but fuck using it for personal projects.
>>
>>55880200
>silently destroys data
I think you've got it the wrong way round, C++ does not use a GC
>>
>>55880217
C++ implicitly casts to smaller numeric data types by truncating what doesn't fit.
>>
>>55880227
Most compilers throw errors for this
>>
>>55871363
>Nothing. I'm bored and I can't think of anything I want to make.
This to be honest.
I don't care for programming challenges. Apart from the fact that I've already done most of them, I immediately lose interest when I can't see any real-world use for whatever I'm making. It's all essentially disposable.
Then again, not doing anything feelsbadman.
>>
>>55880255
GCC only warns.
Visual C++ only warns.

Those two are easily over 90% of the C++ compiler market share.
>>
>>55880328
-Werror
>>
>>55880328
what makes you think that ignoring warnings is acceptable? you're fucking up either by writing bad code or by having the wrong compiler flags for your purposes. the compilers are only required to give a diagnostic which could be a warning or an error, but they give warnings by default so that you can compile legacy code.
>>
>>55880328
>only warns
I'm pretty sure by default warnings stop compilation on both
>>
>>55880405
depends on the version
>>
File: 1470096707923.jpg (471KB, 869x1262px)
1470096707923.jpg
471KB, 869x1262px
Thoughts on C# with Unity?
>>
>>55880342
>>55880385
Fair points.
>>
>>55880432
better than whatever the fuck Unity Script is or whatever the fuck Boo is
>>
>>55880432
fucking trash >>>/vg/agdg
>>
>>55880432
Pretty much the easiest way to make a decent-looking game.

Would recommend for first-time gamedev that isn't autistic enough to do it in C++.
>>
New thread: >>55880459
>>
>>55880467
Not having this fucking conversation again.
Fuck off.
>>
>>55880432
>Draw a girl
>Call it a boy
How is this shit acceptable?
>>
>>55880524
Actually, it's a girl who identifies as a boy, and thus being dressed like a girl is cross-dressing.

Your favorite language is shit.
>>
>>55880432
is this you?
>>55871510

kill yourself

Unityfags need to fucking die in a chemical fire.
>>
>>55880609
sleep for maybe 2-4 hours, not a full night of sleep, when you get really tired and your productivity drops too much
>>
>>55880609
No, you should be using Monster Rehab or Zero or Low Carb.

Almost no sugar, so less chance of your crashing off of a sugar high.

Eat multiple small meals, follow them with short walk and leg stretch.

Don't masturbate.

Sugar is fine less than 2 hours from the due date or if you're almost done.

t. Recent grad
>>
>>55880661
Ok I'll do that.
>>
>>55880432
Both shit, see >>55875351
Thread posts: 319
Thread images: 40


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