This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
211
Programming Help / Re: C++ short delay when using CIN
« on: July 24, 2014, 01:04:52 am »did not try compiling it, but assuming it won't compile because of the 2 returns, but again I can be wrong on that one.....Been a windows user forever and never had any problem. Done film, video, audio visual production, mutlimedia both hobby and professionally and never had issue. but again this is not a linux vs. windows debate really let's leave that for another topic
Not being an expert on C++ and since Lazarus helps you a lot with memory management, not sure of what I'm about to say but here it goes:
You can have as many returns as you like, your functions need to return a value and your procedures return an int to check if they worked correctly (at least on pascal they do), but even on C++ you can have more than one return if you need it, to check that something did x or y you can then pass the integer for error management, I think.
I don't know how to explain it, hope you can understand it, because I managed to not understand what I just wrote.

About the Windows vs Linux, just name the hour the place and I get to choose the weapons


As to what your read, yes you have to free memory yourself to avoid memory leak within your app, memory not freed could be potential memory for other process/applications running, and you avoid the risk of stability/crashing or running out of memory, that is what they probably mean by that......as some would for example allocate new memory in a function but exit function without freeing it (creating a leak) etc.
I'll be using memory allocation (more likely dynamic allocation) for some of the stuff I have planned with my resource packer / reader and some of the stuff I will add to ENIGMA soon, hopefully if I have some time,
Dynamic allocation on C++? Is that possible?
212
Programming Help / Re: C++ short delay when using CIN
« on: July 24, 2014, 12:04:52 am »Quoteand eds don't worry about it, I was wondering why my code was modified was afraid maybe I switched to a parallel universe
Memory allocation... No idea how that works... Do you eat it with a fork?
No problem Ds2, copy paste was the easiest way and I did'nt check for consistency with your code, and I should have, it is good practice to do so.
You can eat it with your hands if you wishMemory allocation is not that hard, basically they teach you that in kindergarten nowadays
so you mashed my code, I forgive you
BTW that would not compile
BTW you mean my code would not compile? but it did compile without a hitch! and it ran without a hitch!

It didn't on your end?

Then windows is a worse pile of crap than even I thought it was.

Tomorrow I will try the CIN on an XP machine.
As far as memory I'm assuming memory does get freed by the OS, and that the delete would be avoiding any memory leak/hogs within the program itself / process running, unnecessarily.
What I've read so far as to memory allocation says you need to free it yourself, except no languages with garbage recollection like Java, Python and C#, not sure if it's so though.
213
Programming Help / Re: C++ short delay when using CIN
« on: July 23, 2014, 11:50:37 pm »I am not going to open another topic, but I have a slightly O/T question
it concerns dynamic memory allocation,
what happens if you use NEW but don't use DELETE and you exit your program. Will the OS automatically free any memory allocated by your CPP, or will the memory not be freed.
Let's say for exampleCode: (cpp) [Select]char* resMem = new char[5000];
What happens if I let the program exit or forcibly exit and don't use delete ? Will 5000 bytes of RAM be lost in space unless I restart windows or use a RAM freeing tool or will the OS automatically free it upon exit ?
Again this is a question out of curiosity, as I know better than to not free RAM I allocate
2) (yes it's a 2 part question). What's the command so I find out HOW MUCH RAM was allocated ? In the example above I know that 5000 bytes were allocated as char = 1 byte, right ? for an int it would have been 4 * 5000, etc. so how do I find out, in the example above, how much RAM was allocated.
Thanks
and eds don't worry about it, I was wondering why my code was modified was afraid maybe I switched to a parallel universe
Memory allocation... No idea how that works... Do you eat it with a fork?

No problem Ds2, copy paste was the easiest way and I did'nt check for consistency with your code, and I should have, it is good practice to do so.

214
Programming Help / Re: C++ short delay when using CIN
« on: July 23, 2014, 10:43:19 pm »Why did you change my code there ?
Why 2 returns ? The example I gave is fine.
Could it have to do with the fact I am running Windows 7 64bit ?
I've made tons of console apps in my days, in QB, and the input prompt was instant. Shocked that it takes 1 second ! LOL.
BTW this was just a question out of curiosity.
Majority of my upcoming projects won't use CIN, but will take commands directly from command line. Though it's kinda odd, I also remember working with batch files back in the days and it was instant too....
I have a PC with Windows XP on it I will go try running it there, if CIN prompt is instant (no delay) then it's a windows7 or windows7 64bit thing.
Didn't changed it on purpose, just copied the output/input part over a small program I already had (a homework of my son), so that's why the two returns, I didn't notice it

And since I only copied your output and input and left everything else as it was, that's also why I wait for the return key to be pressed.

I also don't remember GWBASIC nor QBASIC being slow on windows, but I don't remember if it was XP or windows98

215
Programming Help / Re: C++ short delay when using CIN
« on: July 23, 2014, 10:21:12 pm »Write a custom terminal emulator that, upon printing a character, deletes the entire content of the terminal by filling it with spaces, then re-prints everything, including the new character. That might get it to be as slow. Probably not worth the effort, though.
Disclaimer: Not implying that's what Windows does. I can't conceive of why the Windows command prompt is that damn slow. Especially since it takes so many disgusting shortcuts.
Damn I'm glad I started using Linux before trying to relearn to program.
216
Programming Help / Re: C++ short delay when using CIN
« on: July 23, 2014, 10:02:51 pm »He's on Windows. The console is GOING to be terribly slow.
I compiled it as an exe and executed it under wine, shouldn't that be just as slow?
EDIT: Just noticed I placed the variable in a different place, changed it so it would be where Darkstar2 put it but still no delay.
217
Programming Help / Re: C++ short delay when using CIN
« on: July 23, 2014, 09:49:50 pm »
Don't know why it happens to you, I tried it and I see no delay 

Code: [Select]
#include <stdio.h>
#include <string.h>
#include <iostream>
using namespace std;
int main()
{
int x = 0;
{
cout << "-Options-" << endl;
cout << "1. Pack with encryption" << endl;
cout << "2. Pack without encryption" << endl;
cin >> x;
return 0;
}
getchar();
return 0;
}
218
Works in Progress / Re: Kimi Kini
« on: July 21, 2014, 01:10:33 pm »I've considered a hidden "cheat" to make her topless in that picture, since I already drew that version, but it's more of a joke than anything because I don't spank my monkey watching a cartoon that's just weird.
I don't spank my monkey watching cartoons either, I was just joking, man for a guy wih your signature you take some stuff way too seriously.
By the by did you check out the thread where you ask about an Ubuntu library?
219
General ENIGMA / Re: Indentation Styles
« on: July 21, 2014, 11:06:23 am »I'm not sure, what I mean is you press tab and the selected text is indented two spaces.
Now I understand, that is what I proposed when said you could imitate SPE, that is exactly what that IDE does.
220
General ENIGMA / Re: Indentation Styles
« on: July 21, 2014, 12:50:06 am »For all the reasons Josh stated is why I agree with him ceteris paribus, the very fact that it opens the same everywhere is the reason it is standard in my opinion because it makes it universal.
And ironically there is a code beautifier by this name.
http://universalindent.sourceforge.net/
Also apparently Wikipedia has this all documented.
https://en.wikipedia.org/wiki/Indent_style#GNU_style
I would just prefer we all use the same indentation style, so that everything opens properly on GNU as well. I get sick of opening up source files either I or someone else edited and the formatting being all wrong, so I asked Josh and he told me to switch to 2 space, and I prefer it because of the universality so I would prefer we just all use that.
Not sure if I understood correctly, but you mean two spaces for every level or not?
221
Works in Progress / Re: Kimi Kini
« on: July 20, 2014, 11:41:46 pm »I am working on a lot of projects now, but this one is on the top of my priority list for the time being. This game will be a anime/chibi art-styled platformer. You'll unlock quite a selection of characters. However kimi is the one you start off with. This is what she'll look like in the title screen & character selector:
Which obviously isn't Chibi, it's "regular" anime. But in the actual gameplay to make the art easier to produce, what with all the animation and stuff, she'll be in her chibi form. Google image "chibi" if you are confused. Please note the artwork above isn't finished, I have a lot to do with it still, a better, less-clunky layout and a background scene. The artwork you see right now as well as everything to come in this topic I did from scratch and is my property.
Boobs.
Will she show any?
222
General ENIGMA / Re: Indentation Styles
« on: July 20, 2014, 10:12:31 pm »My aversion to tabs is that they have not been assigned a logical width. People individually choose how big they want their tabs. While that's great for personalization, it's bad for consistency. You can't align variables easily, or use half-indentations or double-indentations without explosion (my double is 4 spaces; some are 16). The biggest offender is when people try to line up variables after "int" or "var." It's not really my style, but it happens; exactly four spaces of indent are required to pad the next line so that all the identifiers line up. You can use spaces to do exclusively the non-indentation alignment, of course, assuming your editor lets you, but I've never seen anyone pull that off.
The lack of size agreement leads to more solid problems, in my case. GNU style seems to be two-space indent, but any leading eight spaces of indent are replaced with a single tab character. This means for me to correctly view anything GNU, I have to set my tab width to eight. My preferred tab width is two. When you send me a file and every fucking line is indented eight tabs, I flip shit. I find lately that I leave my tab widths both at two and manually replace "\t" with " " in GNU sources.
So yes, in a perfect world, everyone agrees, and we all use tabs. In this world, tabs are any multiple of 1 in size (even that's not playing it safeāsome people don't use fixed-width editors, but no one cares what they think). Spaces, however, I have never noticed to be rendered as anything other than a single space of width, with or without special coloring or symbolage to denote that there's actually a character there. So I use two spaces, and my code looks the same whether it's loaded in emacs, in vim, in MS fucking Notepad, or in an actual code editor.
inb4 gr8 b8 m8
Yea I have seen code indented like the one that wrote it had a 40" monitor


If this is for Enigma's code editor then you could go the SPE (Stany's Python Editor) and force the size of the tabs to two spaces only and always, when you indent you can use either spaces or tabs, since it converts the tabs to two spaces automatically.
223
Issues Help Desk / Re: Problems Running Game Built for Ubuntu 12.10 via GMStudio on Portable Ununtu
« on: July 20, 2014, 07:22:00 pm »
Just in case you do want to install it:
https://help.ubuntu.com/community/PinningHowto
http://jaqque.sbih.org/kplug/apt-pinning.html
Those are tutorials for apt-pinning, in short it lets you install what you want from a newer version, a newer library could very well break your system so it's for people that kow what they are doing (I have never done it) I would advise you to investigate what else is afected by the library in order to be able to judge if it's worth the risk. To do so install any version you have in the repos via synaptic and take notice of what -if anything- else is installed, if the library is already installed try to uninstall it via synaptic (Just mark to uninstall completely but do not finish the operation) it will give you a list of stuff that uses it, then you can see what may be fucked by the library change.
https://help.ubuntu.com/community/PinningHowto
http://jaqque.sbih.org/kplug/apt-pinning.html
Those are tutorials for apt-pinning, in short it lets you install what you want from a newer version, a newer library could very well break your system so it's for people that kow what they are doing (I have never done it) I would advise you to investigate what else is afected by the library in order to be able to judge if it's worth the risk. To do so install any version you have in the repos via synaptic and take notice of what -if anything- else is installed, if the library is already installed try to uninstall it via synaptic (Just mark to uninstall completely but do not finish the operation) it will give you a list of stuff that uses it, then you can see what may be fucked by the library change.
224
Issues Help Desk / Re: Problems Running Game Built for Ubuntu 12.10 via GMStudio on Portable Ununtu
« on: July 20, 2014, 07:13:01 pm »
Fuck! It's worse than I thought, libssl.so.1.0.0 is part of Debian Sid
You sure you want to install it?
EDIT: Sorry it is also part of wheezy, you want to install it? even if it blows your portable installation to the hades?
Code: [Select]
http://www.debian.org/releases/sid/index.en.html
You sure you want to install it?
EDIT: Sorry it is also part of wheezy, you want to install it? even if it blows your portable installation to the hades?
225
Issues Help Desk / Re: Problems Running Game Built for Ubuntu 12.10 via GMStudio on Portable Ununtu
« on: July 20, 2014, 07:09:42 pm »Introduction - Why I Chose Portable Ubuntu
I'm using Portable Ubuntu to test my games made with GMStudio. It's basically the same thing as running Ubuntu inside a Virtual Box, but it's much easier to install and to work with when switching between Windows and Ubuntu plus it runs with literally zero lag, whereas in Virtual Box I can't test my Ubuntu games at all due to running at 1 frame per second.
Why in the name of the FSM (Blessed be his noodled apendage) would you do that?
I understand the easinnes of use and the increased speed over a virtual box, and even the convenience of not having to reboot, but still...
The Problem - Portable Ubuntu is Outdated
The only downside to it, it hasn't been updated since 2011 if I remember right, and that means it will only run Ubuntu 10.4 or older. GMStudio games in theory should work, though it is targeted for only Ubuntu 12.10 or later, there still might be hope. This is the absolute best way to run Ubuntu within and beside an existing Windows OS, I'd hate to ignore it given the possibility it might still run my games with a couple small tweaks.
In theory they should not work, different libraries man...
The Possible Solution - Installing *.SO Libraries
So I run my game by double clicking the Linux App, nothing appears. To investigate I try opening the game in the terminal. This error appearsCode: [Select]pubuntu@pubuntu:~$ /home/pubuntu/Desktop/GAMES/RMWP/RMWP
So to fix this I install ENIGMA's dependencies since that includes "libopenal.so.1"
/home/pubuntu/Desktop/GAMES/RMWP/RMWP: error while loading shared libraries: libopenal.so.1: cannot open shared object file: No such file or directoryCode: [Select]sudo apt-get install g++ zlib1g-dev libglu1-mesa-dev libalure-dev libvorbisfile3 libvorbis-dev libdumb1-dev
Which is great because that fixed the issue. But here's a new issue that now I'm stuck at:Code: [Select]pubuntu@pubuntu:~$ /home/pubuntu/Desktop/GAMES/RMWP/RMWP
/home/pubuntu/Desktop/GAMES/RMWP/RMWP: error while loading shared libraries: libssl.so.1.0.0: cannot open shared object file: No such file or directory
Very good you are in your way to become a linux jedi my little padawan

Conclusion - Need Some Assistance (Please?)
I've Google'd for 6+ hours attempting to install through the terminal or any other way possible "libssl.so.1.0.0.0" which appears to be available nowhere on the internet. I tried this in the terminalCode: [Select]sudo apt-get update
It installed "libssl.so", but I don't need that, I need "libssl.so.1.0.0". I also tried many variations of something like this
apt-cache policy libssl-dev
sudo apt-get install libssl-devCode: [Select]sudo apt-get install libssl1.0.0 libssl-dev
But everything I tried brought no expected results. Please help! I'm documenting everthing I do with this so I can make a tutorial for someone who isn't banned to post for me on the GMC on how to make your GMS games run in Portable Ubuntu with minimal setup hassle. It could be a major benefit to all Ubuntu GM users everywhere.
Everything well done but...
In the repositories you'll find only libraries that are in use in the current distribution
You could find the library on the web with a lot of hard work and some luck but...
It most likely would do you no good because...
libssl is a cryptography library it is to encript/decript stuff, if for some reason you need one version you need that version and not other, and besides...
Even if you did find it and managed to install it as a .deb it would most likely blow your portable ubuntu to smiterens

Your only hope would be to find it as source code, and then to compile it by hand for your system, and even then it might interfere with something else...
One of the reasons there's no dll hell on linux it's the management of shared libraries, if you install one instead of another you might make one application work while at the same time fucking up something else, even the whole system is at risk.
And you can't use the repos since they more than likely are no longer on line for the ubuntu version you need

Thanks.
Boobs
You're welcome, don't despair, we'll think of something.