(Not really) f***ing allegro!
(Not really) f***ing allegro!
Allegro doesn't have support for clipboard operations ... this isn't that much of a problem on windows, but on linux it makes using the clipboard almost impossible.
That makes me sad.
</whining>
That makes me sad.
</whining>
I have no idea what I'm talking about.
- AlexPhoenix
- Fast Inserter
- Posts: 149
- Joined: Tue Feb 18, 2014 7:48 am
- Contact:
Re: f***ing allegro!
so, clipboard now works only on windows?
(i mean console copy/paste) or what?
(i mean console copy/paste) or what?
Re: f***ing allegro!
Yeah, clipoard support for windows is written in Agui (the gui widget layer we use on top of Allegro), but only for Windows. There is a OSx version that is commented out for some reason.
It didn't matter too much yet, but now I'm working on the map exchange strings and without copying them ... it's almost useless. I will be at least writing them to console until we sort the clipboard thing out.
It didn't matter too much yet, but now I'm working on the map exchange strings and without copying them ... it's almost useless. I will be at least writing them to console until we sort the clipboard thing out.
I have no idea what I'm talking about.
-
- Filter Inserter
- Posts: 251
- Joined: Wed Feb 20, 2013 9:35 pm
- Contact:
Re: f***ing allegro!
Use words for your random string out of a big dictionary.
Can be language specific.
There is a lot of entropy in a four word phrase
horseflytotree
Easy to insert without copy paste, easy to share.
Can be language specific.
There is a lot of entropy in a four word phrase
horseflytotree
Easy to insert without copy paste, easy to share.
Re: f***ing allegro!
I really like that idea, but when I tried to roughly calculate number of characters it came out about twice as long as the current base64 solution.
numbers
Now the code is about 4 lines of a reasonably small text box, 8 lines would be too much in any coding. Imho even 4 lines as understandable words would be too much.I have no idea what I'm talking about.
Re: f***ing allegro!
reduce the entropy. how many bits of random seed do you really need in there?
Re: f***ing allegro!
It's not just a seed . It has a lis of all mods and their versions and map settings from the map generator dialog window. I will probably compress the code using zlib, though.
I have no idea what I'm talking about.
-
- Filter Inserter
- Posts: 251
- Joined: Wed Feb 20, 2013 9:35 pm
- Contact:
Re: f***ing allegro!
I don't get your math.
If you get four words over a combination of 10000, you should be able to generate
10!/(10-4)!
different scenarios (using it as seed for the other variables)
Which according to wolfram alpha is about 9.9 X 10^15 unique permutations. Or 53 bit of entropy if you prefer.
Suggestion is to hash the sting after it's entered in the box to obtain 256bit of random stuff to seed the entropy of he repeatable rng of choice (i have one laying around if you want)
If you get four words over a combination of 10000, you should be able to generate
10!/(10-4)!
different scenarios (using it as seed for the other variables)
Which according to wolfram alpha is about 9.9 X 10^15 unique permutations. Or 53 bit of entropy if you prefer.
Suggestion is to hash the sting after it's entered in the box to obtain 256bit of random stuff to seed the entropy of he repeatable rng of choice (i have one laying around if you want)
Last edited by LoSboccacc on Mon Mar 24, 2014 5:42 pm, edited 1 time in total.
- AlexPhoenix
- Fast Inserter
- Posts: 149
- Joined: Tue Feb 18, 2014 7:48 am
- Contact:
Re: f***ing allegro!
try to use compressing with base64, sometimes it works.
i'will look at clipboard on Linux on holydays, but my main platform is windows.
i'will look at clipboard on Linux on holydays, but my main platform is windows.
-
- Filter Inserter
- Posts: 251
- Joined: Wed Feb 20, 2013 9:35 pm
- Contact:
Re: f***ing allegro!
cube wrote:It's not just a seed . It has a lis of all mods and their versions and map settings from the map generator dialog window. I will probably compress the code using zlib, though.
Oh I see. Then it would be easier just to keep a save at game start and share around that
Usually it's the ither way around. You generate map parameters from seed, and at most you attach a crc of the mod data to check it's compatible. (You'd lose detailed informations of that)
-
- Filter Inserter
- Posts: 559
- Joined: Mon Mar 04, 2013 9:23 am
- Contact:
Re: f***ing allegro!
Why are you searching for basic OS based functionality in Game library? To be honest I'm surprised that Allegro even has any clipboard handling capabilities built into it in the first place.cube wrote:Allegro doesn't have support for clipboard operations ...
Re: f***ing allegro!
It doesn't Problem is that on linux you need to modify the event loop to add them, not just use a few api calls like on windows or osx.SilverWarior wrote:Why are you searching for basic OS based functionality in Game library? To be honest I'm surprised that Allegro even has any clipboard handling capabilities built into it in the first place.cube wrote:Allegro doesn't have support for clipboard operations ...
I have no idea what I'm talking about.
- AlexPhoenix
- Fast Inserter
- Posts: 149
- Joined: Tue Feb 18, 2014 7:48 am
- Contact:
Re: f***ing allegro!
mainly what i saw that recomments to use xsel(or base on its sources)cube wrote:It doesn't Problem is that on linux you need to modify the event loop to add them, not just use a few api calls like on windows or osx.SilverWarior wrote:Why are you searching for basic OS based functionality in Game library? To be honest I'm surprised that Allegro even has any clipboard handling capabilities built into it in the first place.cube wrote:Allegro doesn't have support for clipboard operations ...
Re: f***ing allegro!
That is probably what we'll end up doing. I just don't like the fact that it is a dependency for such a basic functionality. I wouldn't expect clipboard to function only when I install some extra program
I have no idea what I'm talking about.
- AlexPhoenix
- Fast Inserter
- Posts: 149
- Joined: Tue Feb 18, 2014 7:48 am
- Contact:
Re: f***ing allegro!
yes, but it's possible to use it's sources.cube wrote:That is probably what we'll end up doing. I just don't like the fact that it is a dependency for such a basic functionality. I wouldn't expect clipboard to function only when I install some extra program
Re: (Not really) f***ing allegro!
I remember Spacechem (yeah:)) required an external utility "xclip" for clipboard operations
- AlexPhoenix
- Fast Inserter
- Posts: 149
- Joined: Tue Feb 18, 2014 7:48 am
- Contact:
Re: (Not really) f***ing allegro!
we already talk about this program itself:) and it sources.MF- wrote:I remember Spacechem (yeah:)) required an external utility "xclip" for clipboard operations
Re: (Not really) f***ing allegro!
Yeah, requiring xclip ... that would work. If we included its sources, we would have to still run it as a separate binary ... not fun. What I've come up now is opening another X11 display connection, creating an invisible window and having a separate event loop running in a thread. Basically the same thing that xclip does, but without other binaries, licence problems and whatever. It almost works now
I have no idea what I'm talking about.
Re: (Not really) f***ing allegro!
If anyone ever needs this, it's possible we will be merging this back into agui, but meanwhile... https://gist.github.com/bluecube/9835979
I have no idea what I'm talking about.
Re: (Not really) f***ing allegro!
Copy/Paste may not be compatible, but, what about just exporting relevant data to a plain text file, instruct the user with a link in the UI to open the text file, similar to how MC and other apps do?
I sometimes dislike when a program automatically launches programs, but if I actively click the link, I'm the moron for letting the action happen.
I sometimes dislike when a program automatically launches programs, but if I actively click the link, I'm the moron for letting the action happen.