Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 406 407 [408] 409 410 ... 795

Author Topic: if self.isCoder(): post() #Programming Thread  (Read 818421 times)

Reelya

  • Bay Watcher
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #6105 on: July 20, 2014, 04:10:58 pm »

Spoiler (click to show/hide)

the program is looking for a file that's not there. Line 196 of src/console.cpp is the location in the code that triggered the problem, not the file that is missing. Compiling and linking went error-free. cpp files are only used in the compiling stage, they're never accessed by a running program.

It's pretty easy to narrow down what the problem probably is. What type of file is accessed during runtime by low-level library functions? DLLs are! Most likely you forgot to put the DLLs in the location you're running tuto.exe from.
« Last Edit: July 20, 2014, 04:52:18 pm by Reelya »
Logged

Skyrunner

  • Bay Watcher
  • ?!?!
    • View Profile
    • Portfolio
Re: if self.isCoder(): post() #Programming Thread
« Reply #6106 on: July 20, 2014, 05:57:18 pm »

So ... does anyone here know if the University of Illinois at Urbana-Champaign's CS major offered by the College of Engineering is a strong course? :D

Also, is it extremely competitive?

It's become college app season now, and I'm all worried, heh.
Logged

bay12 lower boards IRC:irc.darkmyst.org @ #bay12lb
"Oh, they never lie. They dissemble, evade, prevaricate, confoud, confuse, distract, obscure, subtly misrepresent and willfully misunderstand with what often appears to be a positively gleeful relish ... but they never lie" -- Look To Windward

Kirbypowered

  • Bay Watcher
  • Proficient Dabbler
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #6107 on: July 20, 2014, 09:14:53 pm »

the program is looking for a file that's not there. Line 196 of src/console.cpp is the location in the code that triggered the problem, not the file that is missing. Compiling and linking went error-free. cpp files are only used in the compiling stage, they're never accessed by a running program.

It's pretty easy to narrow down what the problem probably is. What type of file is accessed during runtime by low-level library functions? DLLs are! Most likely you forgot to put the DLLs in the location you're running tuto.exe from.
Ah, good things to remember. However, I have all the .dll files I can find in the directory containing tuto.exe...I even threw in the gui related ones just in case, to no avail. Have any other ideas?
Logged
THE WINTER MEN COME DOWN THE VALLEY AND KILL KILL KILL.
I'm voting for the Plaid Acre up next on COLORS AND MEASUREMENTS weekly.

Valid_Dark

  • Bay Watcher
  • If you wont let me Dream, I wont let you sleep.
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #6108 on: July 21, 2014, 03:23:44 pm »

Since starting my new job I haven't had time to program,  I work 8 hours a day, and when I get home I'm so exhausted I just want to sleep.
Working in a warehouse, moving heavy shit all day.

I really need to get back into programming. 
Logged
There are 10 types of people in this world. Those that understand binary and those that don't


Quote
My milkshake brings all the criminals to justice.

Skyrunner

  • Bay Watcher
  • ?!?!
    • View Profile
    • Portfolio
Re: if self.isCoder(): post() #Programming Thread
« Reply #6109 on: July 21, 2014, 09:40:07 pm »

So . Any of you guys heard of the following technologies? If yes, anyone brief me on why they're good, please? :D

Angularjs
Node.js
Mongodb
Grunt
Jade
Stylus


Also, how are logins handled? O.o stored as cookie or web storage woth some sort of authentication hash?
Logged

bay12 lower boards IRC:irc.darkmyst.org @ #bay12lb
"Oh, they never lie. They dissemble, evade, prevaricate, confoud, confuse, distract, obscure, subtly misrepresent and willfully misunderstand with what often appears to be a positively gleeful relish ... but they never lie" -- Look To Windward

Angle

  • Bay Watcher
  • 39 Indigo Spear Questions the Poor
    • View Profile
    • Agora Forum Demo!
Re: if self.isCoder(): post() #Programming Thread
« Reply #6110 on: July 21, 2014, 11:13:11 pm »

Odd, I happen to be engaged in trying to figure out how to use one of those, specifically the JavaScript Mongodb. I haven't figure it out yet though, so ~~... I did use the java version of Mongodb, or rather expanded upon code that used it, and it seemed to work just fine.
Logged

Agora: open-source platform to facilitate complicated discussions between large numbers of people. Now with test site!

The Temple of the Elements: Quirky Dungeon Crawler

Mephisto

  • Bay Watcher
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #6111 on: July 22, 2014, 07:15:14 am »

RE MongoDB: It's web scale.
Logged

Skyrunner

  • Bay Watcher
  • ?!?!
    • View Profile
    • Portfolio
Re: if self.isCoder(): post() #Programming Thread
« Reply #6112 on: July 22, 2014, 07:46:18 am »

Logged

bay12 lower boards IRC:irc.darkmyst.org @ #bay12lb
"Oh, they never lie. They dissemble, evade, prevaricate, confoud, confuse, distract, obscure, subtly misrepresent and willfully misunderstand with what often appears to be a positively gleeful relish ... but they never lie" -- Look To Windward

Telgin

  • Bay Watcher
  • Professional Programmer
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #6113 on: July 22, 2014, 11:08:33 am »

Mongo is neat, but I don't have a whole lot of experience with it myself.  Node.js I can expand on a bit though.

It's a pretty different feel from developing traditional web applications, like say Perl or PHP on Apache.  The server keeps connections open and can keep persistent state, which leads to different and possibly more efficient design philosophies.  For example, our company's backend API used for many internal applications uses a MySQL database server.  Whenever requests are made against the API it has to load column definitions for the database so it can determine whether to perform adds or updates as required.  Right now it's coded in PHP and uses Apache, so it has to reload this data every time a request comes in.  Node.js can store that globally somewhere and never need to reload it again unless the database schema changes.  It also only needs one copy for all running connections, where the PHP version has to waste memory loading copies per connection.

Node.js is also nice because it lets you use web technologies like web sockets, where that's hard and clunky with something like PHP.  That might make it useful for computer games or similar applications that do lots of communication between clients.  Integration with stuff like Mongo might also be simpler with Node.js since it uses JavaScript as its native language.  JavaScript has its ups and downs, but coding server side software with it is kind of cool when you're used to PHP.  You'll want to get comfortable with callbacks and asynchronous function calls.

Node.js does have some downsides though.  First off, Apache and similar servers gives you a lot functionality that you have to either import as a library or code yourself.  A router is an example  So, with Apache it's trivial to get a document root set up and have it serving index.html, page2.html, some_directory/page3.html without any coding.  With Node.js you have to manually decipher incoming requests to determine what page the client's asking for, load it and process it, then return it with any needed headers.  Stuff like that, or access control, or redirections, or other stuff is going to need code from you or a library.  Another huge downside is that if any incoming request causes a fatal exception it kills the process.  There's only one process, so all of your client connections get dropped until you restart the server.  Oh, and since there's only one process, trying to do anything truly in parallel is going to hard.  I think there's some way to do that now, but I don't know how it works.

In short, Node.js is pretty cool, but I don't see it replacing traditional web servers for a while.
Logged
Through pain, I find wisdom.

MorleyDev

  • Bay Watcher
  • "It is not enough for it to just work."
    • View Profile
    • MorleyDev
Re: if self.isCoder(): post() #Programming Thread
« Reply #6114 on: July 22, 2014, 04:54:44 pm »

I'd say node.js is more suited for small and focused web services. So it's a good choice for a ReST API that sits around a database or an OAuth server, small things that 'simply' process a request, make some db calls and give a response and for which a 'large' server like Apache+PHP or C#/Java are arguably overkill.
« Last Edit: July 22, 2014, 04:56:53 pm by MorleyDev »
Logged

Telgin

  • Bay Watcher
  • Professional Programmer
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #6115 on: July 22, 2014, 08:19:57 pm »

Amusingly a REST API is precisely what we were and are considering using Node.js for.  We do a ton of business logic in that API though, and our current PHP implementation is over 50K lines if I recall.  So in our case at least, Apache and PHP isn't really overkill, since we do have the odd thing here or there that does some heavy lifting on the server side.  Forking processes, filesystem stuff and so on.  Node.js can still do everything we need, as far as I know, but it would take some effort to really get it to do what we need.

There's really just two things I'm still concerned about.  The first is the exceptions killing the server, which I know solutions exist for but I need to look into more.  The second is the fact that PHP's (arguably pointlessly) gigantic standard library goes away with Node.js's JavaScript implementation.  Off the top of my head I can't think of too terribly many things that we'd have to recode or find libraries for, but PHP's date and strtotime functions are things we use a lot...
Logged
Through pain, I find wisdom.

Kirbypowered

  • Bay Watcher
  • Proficient Dabbler
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #6116 on: July 22, 2014, 10:51:24 pm »

Okay, aftering farting around and harassing the people over at the Temple of the Rogue forums for a little while, I've come to the conclusion that libtcod is just rude and I've decided not to bother with it any longer for the time being. I'm currently fiddling around with a little library someone over there recently released, called BearLibTerminal. It seems pretty nice and I've already got it working, so my impressions of it are good already.

Anyhow, thanks for putting up with my constant stream of dumb questions for the most part, and also sorry about that. I just recently noticed that there's a thread in the Creative Projects sub-forum specifically for "newb programming help"...so yeah. Sorry about that. XP
Logged
THE WINTER MEN COME DOWN THE VALLEY AND KILL KILL KILL.
I'm voting for the Plaid Acre up next on COLORS AND MEASUREMENTS weekly.

MorleyDev

  • Bay Watcher
  • "It is not enough for it to just work."
    • View Profile
    • MorleyDev
Re: if self.isCoder(): post() #Programming Thread
« Reply #6117 on: July 23, 2014, 05:41:22 am »

Yeah. node.js is more suited towards a more distributed model than a 50K monolith.  It's more geared towards dropping pieces of work onto queues for other processes to pick up and work with, forming clusters of small processes working together. Which I'd think of as a cleaner design nowadays for that kind of work, but difficult to retrofit in.

As for exceptions, it's pretty easy inside a REST api to turn all exceptions into 500s. And if an exception does bring the program down, pm2 or forever are tools made to bring it back up (pm2 is newer but the recommended solution). It still does encourage one to write more unit tests for the code at least, but it's a valid concern that the libraries often don't handle this for you I guess. At least I know Restify doesn't, not used Express as extensively. PHP handles it because it's built with the notion of a web-page-as-a-process, node.js isn't built with that notion. Neither are C# and Java, obviously, but there the libraries typically handle all that for you.

Date functionality? Hmm, maybe some of the libraries recommended here could be of use?
« Last Edit: July 23, 2014, 05:45:21 am by MorleyDev »
Logged

Gentlefish

  • Bay Watcher
  • [PREFSTRING: balloon-like qualities]
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #6118 on: July 23, 2014, 02:53:37 pm »

So uh. Quick question for y'all.

Where would be a good place to start if I want to develop a little program to make a sprite walk around? 2D or Overhead doesn't matter because I want to try both.

I know SDL is common but I can't seem to find a good tutorial on it. Any other recommendations? I'd be doing this on a Win 8 with code::blocks installed and set up.

gigaraptor487

  • Bay Watcher
  • Escaped Lunatic now civilised
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #6119 on: July 23, 2014, 03:38:37 pm »

Lazy Foo has an excellent tutorial for SDL
Logged
Hehe, you thought there would be an interesting sig here

I now run a program which brings old multiplayer games back to life : click
Pages: 1 ... 406 407 [408] 409 410 ... 795