Follow TV Tropes

Following

Coding/Programming

Go To

SheWhoMustNotBeNamed from 221B Baker Street Since: Jul, 2013
#1151: Jul 9th 2014 at 6:42:04 PM

[up]Huh, really?

I'll keep that in mind for future reference, then.

i just want to sell out my funeral
Ch00beh ??? from Who Knows Where Since: Jul, 2010
???
#1152: Jul 9th 2014 at 10:40:24 PM

Well, V Mware is responsible for a bunch of the big companies' clouds. My point is that there were millions/billions of dollars riding on Flash at some point.

The entire industry is basically built out of duct tape and paper clips. Sometimes there's actual, solid foundation in place, but there's still an alarming amount of duct tape that gets applied on top.

"Never let the truth get in the way of a good story." Twitter
Zennistrad from The Multiverse Since: Jul, 2011 Relationship Status: I don't mind being locked in this eternal maze!
#1153: Jul 10th 2014 at 12:31:53 AM

Decided to take some time to learn C++ over the summer before I start the next semester, did a few coding exercises on this website. So far it seems to be mostly the same as C, but with a more Java-like object-oriented design (minus the excessively wordy syntax).

I think I like it. The pointers are still as frustrating as they were in C, though. Either way, It's an interesting experience and I hope to grow more familiar with it before I start getting into learning how to build larger programs next semester.

(Also, I am desperately hoping we'll be learning how to use Github next year, because the UI is pretty damned obtuse for a beginner.)

edited 10th Jul '14 12:36:08 AM by Zennistrad

Frishman Sinful Saint from Baton Rouge, LA Since: Sep, 2013 Relationship Status: We finish each other's sandwiches
Sinful Saint
#1154: Jul 10th 2014 at 5:17:44 AM

[up][up]This is why I prefer Google Drive and Dropbox for all my "Cloud" needs. Dropbox has been around since before the Cloud and Google more or less has this whole "internet" thing in their hat.

I have no idea how VB and excel works. I usually end up exporting spreadsheets as a csv then use python to process.

God I wish I could do that, but as this is on a work computer I have to work with the applications I'm given. Also I'd need to learn python (which is not hard, from what I'm told?). I can make a VB 6 GUI that imports data from Excel, but that's not really helping me with the VBA inside Excel, since I couldn't use said GUI to check for broken hyperlinks, either.

I've at least got all the framework necessary to cycle through each cell that needs to be checked, I just need the checking framework.

If you meet me have some courtesy, have some sympathy, have some taste. Use all your well-learned politesse or I'll lay your soul to waste.
Ch00beh ??? from Who Knows Where Since: Jul, 2010
???
#1155: Jul 10th 2014 at 8:47:12 AM

Python is pretty easy to pick up, and despite that surprisingly powerful, but there a bunch of gotchas in the language that keep me from being friends with it.

Google came to our office once to do a presentation on their new language Dart. One feature is that it let's you inject arbitrary code through the browser to be executed on the server on purpose for debugging. They are also an empire of duct tape built on top of a solid foundation.

"Never let the truth get in the way of a good story." Twitter
ArsThaumaturgis Since: Nov, 2011 Relationship Status: I've been dreaming of True Love's Kiss
#1156: Jul 10th 2014 at 3:47:56 PM

I picked up Python for use with a game engine that I use, and while I initially found it a little iffy—in particular a little uncomfortably protean, having just come from C++—I've actually come to very much enjoy it. Indeed, I now value that protean nature, as well as some of the little sorceries that Python provides (such as list comprehensions).

(My apologies that I'm not much help with the Visual Basic question: I've barely touched the language, I fear.)

My Games & Writing
Ch00beh ??? from Who Knows Where Since: Jul, 2010
???
#1157: Jul 10th 2014 at 9:31:16 PM

List comprehensions are amazing. Mutable default function params are literally Hitler.

"Never let the truth get in the way of a good story." Twitter
KylerThatch literary masochist Since: Jan, 2001
literary masochist
#1158: Jul 11th 2014 at 5:05:41 AM

Anyone here familiar with Javascript? I'm studying a sample Unity project, but the code is in Javascript (which I'm unfamiliar with) rather than C# (which I understand thanks to C++).

Specifically, I'd like to know what the purpose of the colon is in

var playerBullet : Bullet;
or
static var score : int = 0;

This "faculty lot" you speak of sounds like a place of great power...
foxmccloud4387 intrepid sword from the pizza category Since: Mar, 2011
intrepid sword
#1159: Jul 11th 2014 at 7:01:39 AM

So. I think I turned a minor inconvienince into a giant problem.

In Eclipse I accidentally closed the window that allows me to write code. I looked for a way to repoen it but couldn't find one. Being the sleep-addled idiot I was last night, I came up with the bright idea of deleting Eclipse and re-downloading it. But then I backpedaled and recovered my old Eclipse from the trash, and now it won't open. What should I do?

I stopped listening after you said "We need a plan."
Ch00beh ??? from Who Knows Where Since: Jul, 2010
???
#1160: Jul 11th 2014 at 7:36:15 AM

The colon denotes variable type.

"Never let the truth get in the way of a good story." Twitter
StrikerX3 Having a hell of a time! Since: Jan, 2011 Relationship Status: Above such petty unnecessities
Having a hell of a time!
#1161: Jul 11th 2014 at 3:49:59 PM

[up][up] Your best bet is to just reinstall Eclipse and reload your old workspace. Most of your settings are actually stored in the workspace folder, so hopefully you won't have lost too much work. You will lose any plugins you had installed on Eclipse though.

By the way, you cannot close the editor pane (unless there is a pretty serious bug). You might have maximized another pane or simply closed the file you were editing.

ArsThaumaturgis Since: Nov, 2011 Relationship Status: I've been dreaming of True Love's Kiss
#1162: Jul 16th 2014 at 8:16:42 AM

Does anyone know of a (hopefully reasonably simple) function that produces pseudorandom numbers for a given input value "x", but without requiring the result of the previous use of the function?

Put another way, if I'm not much mistaken the usual sort of psuedorandom function F might be defined like this:

F(Xn) = F'(Xn-1) Where F'(X) is the pseudorandom algorithm, such as F'(X) = (X*A + C) % D, where A, C and D are constants.

Note that this requires the result of the previous call to the function, or a given X0.

What I'm looking for is something like this:

F(X) = <some number within a known (reasonable) range>, where X is a positive integer.

Importantly, I'm looking for a function that does not produce a clear pattern if fed sequential inputs (X, X+1, X+2, etc.). Aditionally, I don't mind—indeed, I want—that the result of F(X) is always the same value for a given value of X. I don't mind if the algorithm doesn't produce very good pseudorandomness.

The aim is to be able to produce consistent pseudorandom values while iterating over a sequence of integers.

(I could do this with a pre-generated 1D noise texture, but I'd rather not.)

This isn't for anything terribly important, but seemed worth asking on the off-chance that someone here had knowledge of such a thing.

My Games & Writing
KylerThatch literary masochist Since: Jan, 2001
literary masochist
#1163: Jul 16th 2014 at 8:18:51 AM

If I'm not mistaken, what you're looking for is called a "hash". It should be in one of the standard libraries of whatever language you're working in. It's a pretty common function, especially where passwords are concerned.

edited 16th Jul '14 8:20:29 AM by KylerThatch

This "faculty lot" you speak of sounds like a place of great power...
Ch00beh ??? from Who Knows Where Since: Jul, 2010
???
#1164: Jul 16th 2014 at 9:21:44 AM

Yeah, pretty much a hash.

"Never let the truth get in the way of a good story." Twitter
ArsThaumaturgis Since: Nov, 2011 Relationship Status: I've been dreaming of True Love's Kiss
StrikerX3 Having a hell of a time! Since: Jan, 2011 Relationship Status: Above such petty unnecessities
Having a hell of a time!
#1166: Jul 16th 2014 at 4:03:50 PM

Sounds more like a linear congruential generator to me (which is a form of pseudorandom number generator).

Oh, nevermind. You're looking for a hash function.

edited 16th Jul '14 4:06:29 PM by StrikerX3

ArsThaumaturgis Since: Nov, 2011 Relationship Status: I've been dreaming of True Love's Kiss
#1167: Jul 16th 2014 at 6:21:56 PM

Indeed. ^_^

Alas, in the end I did fall back on a 1D texture: I'm attempting to do this in a CG shader, and between my own inexperience with shaders (this is, I think, my first shader) and some limitations that I ended up bumping into (issues with the "pow" method, a lack of a shift operator that I found), implementing a hash just seemed like too much bother, and I ended up giving in and using a randomised 1D texture. It's... not perfect (at the moment it seems that I can get either decent results or good performance, but not both), but it's enough for the nonce, I think.

(To explain what I'm doing, I'm attempting to muck about with perlin-based clouds. I have something pretty much working, but I'm not as happy with the results as I'd like.)

edited 16th Jul '14 6:22:51 PM by ArsThaumaturgis

My Games & Writing
StrikerX3 Having a hell of a time! Since: Jan, 2011 Relationship Status: Above such petty unnecessities
Having a hell of a time!
#1168: Jul 17th 2014 at 4:37:05 PM

I suppose you're using the 1D texture as a lookup table for the Perlin noise algorithm. Most implementations that I know of provide a hard-coded table in the shader code itself, which is more efficient than transferring from the video memory. For example, these.

ArsThaumaturgis Since: Nov, 2011 Relationship Status: I've been dreaming of True Love's Kiss
#1169: Jul 18th 2014 at 9:41:14 AM

I think that I tried something like that at one stage, but had trouble with it for some reason (a likely reason being inexperience with shaders :P).

For now, however, I think that I'm going to put this experiment aside—it's been diverting my attention from my current main project.

Nevertheless, thank you—I appreciate the help. ^_^

My Games & Writing
Tangent128 from Virginia Since: Jan, 2001 Relationship Status: Gonna take a lot to drag me away from you
#1170: Jul 18th 2014 at 11:07:52 PM

Speaking of Open GL, been relearning it lately, to try and learn the proper shader-based non-fixed-function way of doing things.

Playing around with shading curves: http://imgur.com/rGCTDEw

Do you highlight everything looking for secret messages?
resetlocksley Shut up! from Alone in the dark Since: May, 2012 Relationship Status: Only knew I loved her when I let her go
Shut up!
#1171: Jul 23rd 2014 at 8:40:29 PM

So I'm going to start learning how to use PHP and My SQL.

Any pointers?

Fear is a superpower.
Ch00beh ??? from Who Knows Where Since: Jul, 2010
???
#1172: Jul 24th 2014 at 3:06:41 AM

The only thing I know abou PHP is that one of my coworkers goes on and on about how he learned to program PHP on the streets because he didn't have no fancy CS degree.

SQL on the other hand, the only thing I know about that is how I go on and on to my coworkers about how I learned SQL on the streets because I don't have no fancy CS degree.

"Never let the truth get in the way of a good story." Twitter
Tangent128 from Virginia Since: Jan, 2001 Relationship Status: Gonna take a lot to drag me away from you
#1173: Jul 24th 2014 at 7:03:29 AM

For SQL, might help to brush up on the relational algebra. ie, sets, joins, and selects.

Do you highlight everything looking for secret messages?
Krieger22 Causing freakouts over sourcing since 2018 from Malaysia Since: Mar, 2014 Relationship Status: I'm in love with my car
Causing freakouts over sourcing since 2018
#1174: Aug 12th 2014 at 2:11:34 AM

Does anyone here know anything about creating a Choose Your Own Adventure-type story in Flash? I have some ideas about what to do, but how to make it work properly is turning out to be another kettle of fish.

I have disagreed with her a lot, but comparing her to republicans and propagandists of dictatorships is really low. - An idiot
Ch00beh ??? from Who Knows Where Since: Jul, 2010
???
#1175: Aug 12th 2014 at 7:35:35 AM

If you are okay with taking it a level higher, you can make a text adventure using Inform 7. It's an interesting language because it's structured to look like English. Also there are utilities to export it to web format—I had a java applet on my site once about steampunk airship dudes

"Never let the truth get in the way of a good story." Twitter

Total posts: 1,462
Top