Allegro.cc - Online Community

Allegro.cc Forums » Off-Topic Ordeals » If it's true, you don't believ in the afterlife.

This thread is locked; no one can reply to it. rss feed Print
If it's true, you don't believ in the afterlife.
Dennis
Member #1,090
July 2003
avatar

Help is needed in all parts, docs, linux, windows, osx, android, ios, etc. ALL THE THINGS.

That is a little vague. It would help if there was an official detailed TODO list and to get contributors started, a hackers guide would be a priority on that list.

Thomas Fjellstrom
Member #476
June 2000
avatar

A hackers guide would be good. Just more we need help with. The wiki could use more tutorials too.

I believe there's an unofficial todo on the wiki and one in the source?

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

Arthur Kalliokoski
Second in Command
February 2005
avatar

About all I could do is blog about my slow muddling through it, trying to get it to work.

They all watch too much MSNBC... they get ideas.

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

Grepping for todo is epic fail.

c:\mingw\LIBS\A5GIT\allegro>grep -r -E -I -n "todo" .\*.*
.\demos/speed/speed.txt:137:Still todo: more interesting enemy movememnt, you dying.

c:\mingw\LIBS\A5GIT\allegro>

Seriously, things that need to be done in the code should be marked with a TODO somewhere or be on an official list somewhere.

Arthur Kalliokoski
Second in Command
February 2005
avatar

That '-I' parameter to grep should be lowercase to specify "ignore case"

CMakeLists.txt:# TODO:
README_android.txt:TODO
addons/video/ogv.c: * TODO:
addons/video/ffmpeg.c:/* TODO: Thsi is just a quick ffmpeg video player test. Eventually this
addons/video/ffmpeg.c: * TODO: al_get_audio_stream_fragments actually might be useful for
addons/image/macosx.m:   // TODO: We should check it really is a bitmap representation.
addons/image/macosx.m:      // TODO: Read from stream until we have the whole image
addons/image/png.c:   // TODO: can this be different from rowbytes?
addons/image/iphone.m:      // TODO: Read from stream until we have the whole image
addons/audio/alsa.c:         al_rest(0.005); /* TODO: Why not use an event or condition variable? */
addons/audio/alsa.c:   // TODO: Setting this to 256 causes (extreme, about than 10 seconds)
addons/audio/pulseaudio.c:    * TODO: Maybe we should have a force flag to the audio driver
addons/audio/opensl.c:/* TODO:
addons/audio/opensl.c:    /* TODO: review the channelMasks */
addons/audio/opensl.c:    /* TODO */
addons/audio/opensl.c:    /* TODO */
addons/audio/openal.c:/* TODO: make these configurable */
addons/audio/openal.c:/* TODO: review */
addons/audio/openal.c:/* TODO: review */
addons/audio/dsound.cpp:/* TODO: review */
addons/acodec/flac.c:   /* TODO: test this array flattening process on 5.1 and higher flac files */
addons/primitives/triangulator.c:            // TODO: optimize this by removing if
addons/primitives/line_soft.c:   TODO: Need to clip them first, make a copy of the vertices first then
addons/primitives/line_soft.c:   TODO: This bit is temporary, the min max's will be guaranteed to be within the bitmap
addons/primitives/primitives.c:    * TODO: Somehow free the d3d_decl
addons/primitives/high_primitives.c:   TODO: Doing this as a triangle fan just doesn't sound all that great, perhaps shuffle the vertices somehow to at least make it a strip
android/allegro_activity/src/Key.java:   static final int ALLEGRO_KEY_SEMICOLON2  = 105;   /* MacOS X -- TODO: ask lillo what this should be */
cmake/Toolchain-android.cmake:#there may be a way to make cmake deduce these TODO deduce the rest of the tools
cmake/Toolchain-android.cmake:#for some reason this is needed? TODO figure out why...
cmake/AllegroFindFFMPEG.cmake:# TODO: Windos and OSX
demos/speed/speed.txt:Still todo: more interesting enemy movememnt, you dying.
docs/scripts/make_protos.c:      /* TODO: Should the above regexp match it? If so it doesn't here... */
docs/man/al_attach_shader_source.3:TODO: Is ALLEGRO_PROGRAMMABLE_PIPELINE set automatically in this case?
docs/html/refman/shader.html:<p>TODO: Is ALLEGRO_PROGRAMMABLE_PIPELINE set automatically in this case?</p>
docs/src/refman/latex.template:% TODO: I don't like the sans serif fonts much.
docs/src/refman/shader.txt:TODO: Is ALLEGRO_PROGRAMMABLE_PIPELINE set automatically in this case?
examples/ex_utf8.c:/* TODO: we should also be checking on inputs with surrogate characters
include/allegro5/keycodes.h:   ALLEGRO_KEY_SEMICOLON2	= 105,	/* MacOS X -- TODO: ask lillo what this should be */
include/allegro5/platform/aintunix.h:/* TODO: integrate this above */
include/allegro5/platform/albcc32.h:   /* TODO: check if BCC has inttypes.h and/or stdint.h */
include/allegro5/keyboard.h:/* TODO: use the config system */
misc/gcc-uni.sh:# TODO: use trap to cleanup
src/x/xmousenu.c:   /* TODO: is there a way to detect whether z/w axis actually exist? */
src/x/xmousenu.c:   event.mouse.pressure = 0.0; /* TODO */
src/x/xdisplay.c:    * TODO: Find out details?
src/x/xglx_config.c:         /* TODO: Right now Allegro's own OpenGL driver only works with a 3.0+
src/x/xkeyboard.c:/* TODO: is this needed?
src/win/d3d_render_state.cpp:   /* TODO: We could store the previous state and/or mark updated states to
src/win/wmouse.c:   event.mouse.pressure = 0.0; /* TODO */
src/win/wgl_disp.c:      /* TODO: we could use the context sharing feature */
src/win/d3d_display_formats.cpp:                  // TODO: Is it ok to use the quality level here?
src/android/android_mouse.c:      event.mouse.dx = 0; // TODO
src/android/android_mouse.c:      event.mouse.dy = 0; // TODO
src/android/android_mouse.c:      event.mouse.dz = 0; // TODO
src/android/android_mouse.c:      event.mouse.dw = 0; // TODO
src/android/android_mouse.c:      event.mouse.pressure = 0.0; // TODO
src/android/android_system.c:   /* TODO: add the non native activity driver */
src/opengl/ogl_bitmap.c:// TODO: To support anisotropy, we would need an API for it. Something
src/opengl/extensions.c:    /* TODO: use these somewhere */
src/opengl/extensions.c:      /* TODO: use these somewhere */
src/opengl/ogl_render_state.c:   /* TODO: We could store the previous state and/or mark updated states to
src/keybdnu.c:/* TODO: use the config system for these */
src/iphone/iphone_mouse.m:      event.mouse.dx = 0; // TODO
src/iphone/iphone_mouse.m:      event.mouse.dy = 0; // TODO
src/iphone/iphone_mouse.m:      event.mouse.dz = 0; // TODO
src/iphone/iphone_mouse.m:      event.mouse.dw = 0; // TODO
src/iphone/iphone_mouse.m:      event.mouse.pressure = 0.0; // TODO
src/iphone/iphone_joystick.m:    // TODO: What's a good frequency to use here?
src/iphone/EAGLView.m:   // TODO: handle double-clicks (send two events?)
src/iphone/iphone_display.m:      // TODO
src/tri_soft.c:   TODO: Need to clip them first, make a copy of the vertices first then
src/tri_soft.c:   TODO: This bit is temporary, the min max's will be guaranteed to be within the bitmap
src/linux/lmseev.c: *  TODO: missing handle_axis_event calls
src/linux/lmseev.c:   event.mouse.pressure = 0.0; /* TODO */
src/linux/lkeybdnu.c: *      TODO: diacriticals
src/system.c:    * TODO: Maybe we want to do the check after the "bootstrap" system
src/display.c:      /* TODO:
src/macosx/hidjoy-10.4.m: * TODO this only works for simple joysticks and

They all watch too much MSNBC... they get ideas.

bamccaig
Member #7,536
July 2006
avatar

NuGet isn't all that awesome. It's nothing like package managers as *nix users understand them. It's more or less just an "app store" for Visual Studio add-ons. I don't think it would be a good way to distribute Allegro (for one, you'd still have to build all of the dependencies and bundle them inside it, unless you want to create and maintain different packages for each dependency). MSYS2 is probably a better solution to that problem, but I haven't tried it yet.

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

Arvidsson
Member #4,603
May 2004
avatar

I have created an Xcode project template: https://github.com/arvidsson/Allegro-Xcode-Project-Template

I created this a few years ago but got no response. It seems to still work with Xcode 6 and Yosemite. I copied a lot of stuff from how SFML did their project template. I put it on my github again - feel free to test if you have a mac!

jhuuskon
Member #302
April 2000
avatar

I still haven't forgiven MS for giving up on XNA.

You don't deserve my sig.

jmasterx
Member #11,410
October 2009

I have created an Xcode project template: https://github.com/arvidsson/Allegro-Xcode-Project-Template

I created this a few years ago but got no response. It seems to still work with Xcode 6 and Yosemite. I copied a lot of stuff from how SFML did their project template. I put it on my github again - feel free to test if you have a mac!

That's really great. It would be great if 5.1.9/5.2.0 came out because then this could be modified to be both an osx and an ios template.

I installed Unity the other day to see how easy it is to port.

When you use Unity, it's so easy to take your project and have it generate an XCode project with all the libraries and frameworks all nice and linked up.

It would be great if somehow Allegro could have this too. We need more automation. I really wish I had a clue on how to do something like that because that's something I would be very interested in contributing to.

We need to automate building somehow, but after that, we really need to make it easier to deploy. I have been working on a project for over 4 years and have only ever used it on Windows because I can't figure out how I would keep my MSVC, XCode, Eclipse etc projects synchronized. That's a big edge that Unity has that I think a library like Allegro should have.

Thomas Fjellstrom
Member #476
June 2000
avatar

bamccaig said:

MSYS2 is probably a better solution to that problem, but I haven't tried it yet.

Only for those that use gnu toolchains, many on windows use VS, and probably aren't going to change just to use allegro. Like it or not, both windows and VS are something we must support.

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

StevenVI
Member #562
July 2000
avatar

jhuuskon said:

I still haven't forgiven MS for giving up on XNA.

That's kind of how MS operates. Make something today, deprecate it tomorrow.

I stopped concerning myself with learning their APIs after they deprecated Managed DirectX. The target moves too fast for me. :P

__________________________________________________
Skoobalon Software
[ Lander! v2.5 ] [ Zonic the Hog v1.1 ] [ Raid 2 v1.0 ]

Trent Gamblin
Member #261
April 2000
avatar

StevenVI said:

That's kind of how MS operates. Make something today, deprecate it tomorrow.

I wouldn't call that a pattern with Microsoft whatsoever. Windows 3.1 apps still run on Windows 10. :P

Chris Katko
Member #1,881
January 2002
avatar

I wouldn't call that a pattern with Microsoft whatsoever. Windows 3.1 apps still run on Windows 10. :P

Oh really???

-----sig:
“Programs should be written for people to read, and only incidentally for machines to execute.” - Structure and Interpretation of Computer Programs
"Political Correctness is fascism disguised as manners" --George Carlin

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

Oh, I was thinking that -I meant "ignore binary". Oops.

Okay, so I did it right, and tried to pipe grep's output to a file :

grep -r -E -i -n todo .*.* > TODO.txt

And it just kept running and running. Eventually I got a disk space is full message and I had to kill grep and delete the text file, which had grown to 50GB!!! I tried updating grep and doing it again, and I killed it when the file reached 1.8GB. :P Can anybody verify this behavior on Linux? I might file a bug report. I can verify the output without piping it to a file is correct, and looks like Arthur's.

Arvidsson said:

I have created an Xcode project template: https://github.com/arvidsson/Allegro-Xcode-Project-Template

I created this a few years ago but got no response. It seems to still work with Xcode 6 and Yosemite. I copied a lot of stuff from how SFML did their project template. I put it on my github again - feel free to test if you have a mac!

That's great! Thanks arviddson! If I was on OSX I'd probably be using it. You should submit a patch to the mailing list. That seems like the best way to get changes added to allegro.

I think it would be great if we could have pre-built projects to get people started with allegro, like a solution for MSVC, a project for CB, and whatever else people use. If it's not too hard I could make a CB project template for building allegro projects. I'm not sure what is involved or whether I could just create a generic project.

Edit
Perhaps add a project directory to allegro's source distribution? With subdirectories for each project type.

Aikei_c
Member #14,871
January 2013
avatar

I just learnt about a thing called NuGet.

Never used it before, but I've just been able to install latest boost binaries seamlessy with NuGet. Allegro should be harder to install since it has a bunch of dependencies, but it seems doable.

Trent Gamblin
Member #261
April 2000
avatar

Oh really???

Yes really. That link is irrelevant to what we're talking about (XNA, Managed DirectX, ...)

EDIT: Ok, MS does stop working on some things, but they always maintain backwards compatibility far beyond their competitors.

Dennis
Member #1,090
July 2003
avatar

grep -r -E -i -n todo .*.* > TODO.txt
And it just kept running and running. Eventually I got a disk space is full message and I had to kill grep and delete the text file, which had grown to 50GB!!! I tried updating grep and doing it again, and I killed it when the file reached 1.8GB. :P Can anybody verify this behavior on Linux? I might file a bug report. I can verify the output without piping it to a file is correct, and looks like Arthur's.

I bet the file growth is exponential and I bet it's because after it is finished writing all the TODO to TODO.txt it notices that TODO.txt was created/has changed and parses it again, adding all the TODO from TODO.txt again to TODO.txt, notices that TODO.txt has changed and parses it again, adding all the... you get the idea.

Changing the output to ../TODO.txt should prevent it if it is that.

Trent Gamblin
Member #261
April 2000
avatar

What are all those flags for? Just grep -ri todo . will work. :P

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

Ah, that was it. Thanks Dennis! :)

Although it still seems like a bug, recursively searching the file that you are creating and then adding to it and then searching it again, and then adding to it... even if it is in the search directory.

Edit for Trent
-r is for recursive search
-E is for regular expression (not used this time)
-i is for ignore case
-n is for displaying the line number.

:P

Trent Gamblin
Member #261
April 2000
avatar

I thought maybe one of the flags enabled that. That is kind of weird.

bamccaig
Member #7,536
July 2006
avatar

Although it still seems like a bug, recursively searching the file that you are creating and then adding to it and then searching it again, and then adding to it... even if it is in the search directory.

It's not a bug. You're just doing it wrong. grep(1) has no idea that you're writing TODO.txt. Your shell opens a file handle for "TODO.txt", and binds grep(1)'s stdout file handle to it. grep(1) is still just writing to stdout. There are various --exclude options to prevent that, or you can do as Dennis suggested and write that file to a path that isn't being scanned.

grep(1) never searches the file again. It never gets to stop because every time it writes something to TODO.txt the file gets larger, guaranteeing that the next read operation will succeed with more data. It isn't until the file system fills up and the write operation fails that grep(1) finally signals an error and exits.

bash(1) appears to glob the arguments to grep(1) before opening the TODO.txt file so as long as that file doesn't exist before you start that should also suffice. If you ever try again without cleaning up the original file you will again find yourself re-cursing indefinitely. The power of this is one of the many things that make stdio great.

There is no bug. There is only PEBKAC.

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

Yes, it really is a bug. You shouldn't be recursively searching the file that you are creating. It happens even when the file doesn't exist, which shows that it is actively re-reading the file. I would definitely call that a bug, as it should only read the files that were passed to it, of which TODO.txt was not passed to it because it didn't exist.

What the hell does pebkac mean? Oh, thanks urban dictionary. :P

More like Problem Exists Between Intent and Implementation. Of course you wouldn't want to search the file you are writing for occurrences of the word you are searching for as they are written to the same file. PEBKAC my ass. grep should use a list of the files that existed at the time it was created called, not files that were created during execution. :P :P :P :P :P

bamccaig
Member #7,536
July 2006
avatar

Yes, it really is a bug. You shouldn't be recursively searching the file that you are creating. It happens even when the file doesn't exist, which shows that it is actively re-reading the file. I would definitely call that a bug, as it should only read the files that were passed to it, of which TODO.txt was not passed to it because it didn't exist.

What the hell does pebkac mean? Oh, thanks urban dictionary. :P

More like Problem Exists Between Intent and Implementation. Of course you wouldn't want to search the file you are writing for occurrences of the word you are searching for as they are written to the same file. PEBKAC my ass. grep should use a list of the files that existed at the time it was created, not files that were created during execution. :P :P :P :P :P

If you want to unravel the mystery add echo before the command to expand it for you. Your shell should be globbing for you. grep(1) has no idea that you said .*.*. All it sees is . .. foo.txt bar.txt ...etc.... Again, grep(1) has absolutely no idea which file the shell told it to write to. It is exactly as I said, PEBKAC. In fact, it doesn't even have to be a file on disk. It can be anything a file handle can refer to. It could be an IP socket, a UNIX socket, a pipe, or even a device. To *nix systems the differences are transparent to the API. Though in some cases you can try to figure it out by going above and beyond and using platform specifics, but in this case I don't even think grep(1) can identify the file system path. A file handle generally refers to an inode, not a file path. *nix systems resolve names into inodes. That allows you to unlink (i.e., "delete") the named file while another program has a handle to it and is reading or writing to it. I don't think there's even a way to ask the kernel "which inode is this?" because again it isn't guaranteed to be one. And even if it could, an inode can have many names (i.e., paths in the file system) referring to it. In any case, it goes above and beyond the scope of grep(1) to be that extra curricular. It's generally up to the user to make reasonable requests (special files can read different than what was written to them).

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

And guess what .\*.* expands to when TODO.txt doesn't exist? It is reading a file that doesn't exist at the time of execution, which is a bug as far as I am concerned, especially when it searches the file it is writing for the things it is writing. F'in dumb if you ask me. In what case would that ever be desirable behaviour? It's the fault of the developers to put in a 'feature' that is not one. We've taken this too OT already, so if you wanna prove your case we can argue on IRC or something. :P

And if you don't remember, echo doesnt' work with globs on Windows. It just dumbly echos out what you typed in.

In an effort to get back on topic, about a hacker's guide for Allegro. Has anything changed since Allegro 4 in terms of hacking guidelines? Because allegro 4 has a hacker's guide.

Copy of Allegro 4 Hacker's guide



Go to: