Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Modern Pragmatist
Aug 20, 2008

pokeyman posted:

I got a new MacBook Air and thought I could find a better use for the eject key. If you don't have a USB DVD drive connected (and I never do), the eject key does exactly nothing and cannot be easily remapped.

So I made this little app that, when you press Eject, lists ejectable volumes. You can arrow up and down and eject a volume by hitting Return. It also groups volumes by device, and you can eject all volumes on one device too. (Anyone who's been bitched out by Finder for daring to unmount one of multiple partitions on an external hard drive will understand the value here.) Works with disk images and network shares as well as external drives.

edit: Let's try Waffle.





How did you go about remapping eject?

Adbot
ADBOT LOVES YOU

Bodhi Tea
Oct 2, 2006

seconds are secular, moments are mine, self is illusion, music's divine.

danishcake posted:

Just to give some follow up to this comment, I doubled the price and noticed no appreciable drop in sales, insofar that there were any. At £1.49 I seem to get a sale every couple of days. What I've found interesting is that it's been downloaded ~4000 times since my last post in this thread, at a greater rate than other projects of mine I think are better. I suspect this is because it gets twice the exposure - people might see the paid for version and seek out the 'Lite' version.

To contribute a screenshot



I added a few variants on the maze building algorithm. Just providing a bias towards turning left makes it very reminiscent of climbing plants. It makes me want to build some sort of tropism simulator, I imagine it could produce some rather cool effects.

Just out of curiosity, what did you use to make these?

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.

Modern Pragmatist posted:

How did you go about remapping eject?

tl;dr: CGEventTap with voodoo.

ntl:dr: Eject is one of the so-called media keys. Along with volume up/down/mute, brightness up/down, and so on, keyDown events for these keys are never sent to your application. The next-lower level to get events has a name: CGEventTap. These are pretty easy to use (minor annoyance notwithstanding).

An event tap sends the events we need to a callback function. Using some voodoo that I found on various blogs, websites, CocoaDev posts, and napkin scribbles, I learned that the media keys are of type NX_SYSDEFINED with subtype 8 (whatever that means).

Using that, I can tell when an eject keyDown event comes through. If it's unmodified (no command/option/etc. key) I trap it and do my thing. All other events are passed along unharmed.

The minor annoyance: for whatever reason, OS X gives your event taps timeouts and simply disables them if they aren't used. The timeout is really short too, in the area of five minutes. Fortunately the OS Is nice enough to tell you that you timed out, and it's easy enough to just reenable the event tap once you realize that this is what's going on.

I'll throw the code on github when I think it works OK. I want to make sure it can run for awhile without falling down.

Opinion Haver
Apr 9, 2007

Roflex posted:

After some IRC discussion this morning I went and made a quick-n'-dirty keypress mapper.


After ~12 hours of normal PC use


After ~12 hours of normal PC use and 30 minutes of FPS playing



Right now it just does a linear scale from 0 to whatever key was pressed most (also it tracks keys by time held instead of strokes). So if you hold one key down a lot everything else will all but disappear.

Hey this was my idea :mad:


Mine doesn't normalize, but it has exponential decay; I'm playing with the half-life, but 20 minutes seems reasonable. I'm also considering using a logarithmic scale so that stuff like numeric keys will actually show up, but I'm going to let it be user-customizeable as well.

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

yaoi prophet posted:

Hey this was my idea :mad:


Mine doesn't normalize, but it has exponential decay; I'm playing with the half-life, but 20 minutes seems reasonable. I'm also considering using a logarithmic scale so that stuff like numeric keys will actually show up, but I'm going to let it be user-customizeable as well.

What would be cool to add to that type of thing are "tails" towards the next key that was hit. With my typing skills, Backspace would be the most frequently hit key. :(

Opinion Haver
Apr 9, 2007

Lumpy posted:

What would be cool to add to that type of thing are "tails" towards the next key that was hit. With my typing skills, Backspace would be the most frequently hit key. :(

This is actually one of the things that I plan on adding, as well as modifier keys, maybe even tracking specific modifier/key combinations (so if you use emacs a lot, there would be a yellow dot in the lower-left of your x key to represent meta-x).

Modern Pragmatist
Aug 20, 2008

pokeyman posted:

tl;dr: CGEventTap with voodoo.

Very interesting, I've been trying to mess with those keys forever, but there just isn't a great deal of documentation out there. Now I need to go back and remember why I needed to modify their functionality and mess around with this a bit.

Scarboy
Jan 31, 2001

Good Luck!
Tracking the buses in my city with about 100 lines of node.js.



I found an API call that gives lat/lon/heading through the bus service's iPhone application. Unfortunately, it only lets you query the information for one bus route at a time so I have to send them 86 requests/sec.

The results are sent over to long polling clients every 1 second. I've never used the Google Maps API before, so I haven't done anything interesting on the client side yet. I plan on adding a bunch of client side features like viewing schedules, routes, etc... and putting it up until the service complains about it.

Jonnty
Aug 2, 2007

The enemy has become a flaming star!

yaoi prophet posted:

This is actually one of the things that I plan on adding, as well as modifier keys, maybe even tracking specific modifier/key combinations (so if you use emacs a lot, there would be a yellow dot in the lower-left of your x key to represent meta-x).

I'm not getting at you, because I absolutely love both your projects, but do you see any use for them beyond curiosity and just doing it for fun?

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.

Modern Pragmatist posted:

Very interesting, I've been trying to mess with those keys forever, but there just isn't a great deal of documentation out there. Now I need to go back and remember why I needed to modify their functionality and mess around with this a bit.

When the inspiration strikes you, I threw the code up on GitHub.

Opinion Haver
Apr 9, 2007

Jonnty posted:

I'm not getting at you, because I absolutely love both your projects, but do you see any use for them beyond curiosity and just doing it for fun?

Well, I'm doing it to learn Cocoa/Objective C, and because I was inspired by a similar program that I forgot the name of that tracked the position of your cursor. Plus it's something to help me get back in the coding groove.


edit: I've also thought about taking the raw data and making it pretty, like doing inter-key color interpolations. But as it is it's just interesting to look at.

Opinion Haver fucked around with this message at 05:50 on Dec 5, 2010

clockwork automaton
May 2, 2007

You've probably never heard of them.

Fun Shoe


This motherfucker. An attempt to visualize entromics data, which is basically crazy bullshit with energy levels across a sequence of DNA and looking at which parts affect other parts. So the mountainous looking thing is a map of energy levels against each other (thus the crack in the middle), and the mizbee looking thing is an attempt to show which things probably are related to one another.

Qt and OpenGL and boy how do I hate Qt.

Basically, a cooperation of a cooperation. I'm working with an IS guy who is working with some bio-med people and this is the end result. He's working on a 2D web-based version of the same data.

clockwork automaton fucked around with this message at 09:02 on Dec 5, 2010

danishcake
Aug 15, 2004

Bodhi Tea posted:

Just out of curiosity, what did you use to make these?

I modified the application to save the backbuffer to the SD card every frame, then stitched them together with the GIMP. The interface timing feature of the gimp is the only really annoying missing feature - changing frame timings means renaming layers, so it's hard to get the final frame to last longer than all the rest, though I've figured it out while writing this post - save as gif, forcing all frame times to 20ms, then reopen the gif and change the final layer.

Wheeeeeee


I suspect you're asking as you want to take advantage of the new youtube video feature of the Android market. Unfortunately I have no idea how to make videos of Android apps more elegantly than this.

shodanjr_gr
Nov 20, 2007

clockwork automaton posted:

Qt and OpenGL and boy how do I hate Qt.

Why so? I've grown to really like QT over the last year of using it.

Bodhi Tea
Oct 2, 2006

seconds are secular, moments are mine, self is illusion, music's divine.

danishcake posted:

I suspect you're asking as you want to take advantage of the new youtube video feature of the Android market. Unfortunately I have no idea how to make videos of Android apps more elegantly than this.

No, no I just thought they looked really cool and was wondering how I could make my own :)

Modern Pragmatist
Aug 20, 2008

pokeyman posted:

When the inspiration strikes you, I threw the code up on GitHub.

Awesome! I appreciate it.

clockwork automaton
May 2, 2007

You've probably never heard of them.

Fun Shoe

shodanjr_gr posted:

Why so? I've grown to really like QT over the last year of using it.

I started using Qt because initially I was told "okay, this is going to be cross platform" -- but then later I was told "okay, actually this is going to just be windows" and Qt runs slow as hell on windows machines (esp. if you have an embedded OpenGL window like I do). Also, I gently caress around with colors in the HSV colorspace and I was irritated that I can't just create a color that way. I have to create a color and then use setHsv. That's not the only thing I ran into that pissed me off.

From Earth
Oct 21, 2005

clockwork automaton posted:

I started using Qt because initially I was told "okay, this is going to be cross platform" -- but then later I was told "okay, actually this is going to just be windows" and Qt runs slow as hell on windows machines (esp. if you have an embedded OpenGL window like I do). Also, I gently caress around with colors in the HSV colorspace and I was irritated that I can't just create a color that way. I have to create a color and then use setHsv. That's not the only thing I ran into that pissed me off.

I'm running a Qt application within Windows, and with an embedded OpenGL window, and it's in no way slow as hell.

Also, I just checked, and it is possible to directly create a QColor object using HSV parameters, so that's not a valid argument either.

Then again, maybe I'm biased, because the other big library I have to work with is VTK, which makes Qt seem like a haven of sense and simplicity by comparison.

Foiltha
Jun 12, 2008

clockwork automaton posted:

I started using Qt because initially I was told "okay, this is going to be cross platform" -- but then later I was told "okay, actually this is going to just be windows" and Qt runs slow as hell on windows machines (esp. if you have an embedded OpenGL window like I do).

Care to provide any benchmarks? I've never heard about Qt being slow on Windows. Even massive industry applications like Maya are using Qt these days and I really doubt they'd do that if it was slow as hell.

wlievens
Nov 26, 2006

Your Google-fu is commendable, good sir.

shodanjr_gr
Nov 20, 2007

clockwork automaton posted:

I started using Qt because initially I was told "okay, this is going to be cross platform" -- but then later I was told "okay, actually this is going to just be windows" and Qt runs slow as hell on windows machines (esp. if you have an embedded OpenGL window like I do). Also, I gently caress around with colors in the HSV colorspace and I was irritated that I can't just create a color that way. I have to create a color and then use setHsv. That's not the only thing I ran into that pissed me off.

That sounds very weird. Are you sure you are implementing the embedded OpenGL context properly? I've been using QT and embedding an OGRE rendering context and then doing distributed rendering over a cluster and it's certainly not slow (even when using huge framebuffer sizes over Eyefinity).

clockwork automaton
May 2, 2007

You've probably never heard of them.

Fun Shoe

shodanjr_gr posted:

That sounds very weird. Are you sure you are implementing the embedded OpenGL context properly? I've been using QT and embedding an OGRE rendering context and then doing distributed rendering over a cluster and it's certainly not slow (even when using huge framebuffer sizes over Eyefinity).

Sure? No, because I didn't actually write that portion nor do I actually have the time to check that everything is actually written properly. However, when it is ran on my Mac or Linux machines it's generally much quicker.

POKEMAN SAM
Jul 8, 2004

Scarboy posted:

Tracking the buses in my city with about 100 lines of node.js.



I found an API call that gives lat/lon/heading through the bus service's iPhone application. Unfortunately, it only lets you query the information for one bus route at a time so I have to send them 86 requests/sec.

The results are sent over to long polling clients every 1 second. I've never used the Google Maps API before, so I haven't done anything interesting on the client side yet. I plan on adding a bunch of client side features like viewing schedules, routes, etc... and putting it up until the service complains about it.

This isn't getting enough love: it's awesome. You should totally hook that up to a heatmap to see the bus coverage of the city :D

Pretty Cool Name
Jan 8, 2010

wat

weldon posted:

I've been working on a Windows 7 Phone app for SabNZBd to learn C#/Silverlight. It's my first real application to make, but I figure I should get some sort of practical experience before I leave school.
I've attached an old picture, but you can see an up-to-date video here:

http://www.youtube.com/watch?v=VYJpHDeQCyo



This looks pretty damned awesome, I'm quite sure I'd get it if I had a windows phone. :)

e: Content. Ray-tracing on ze GPU.

Pretty Cool Name fucked around with this message at 23:22 on Dec 7, 2010

clockwork automaton
May 2, 2007

You've probably never heard of them.

Fun Shoe

shodanjr_gr posted:

That sounds very weird. Are you sure you are implementing the embedded OpenGL context properly? I've been using QT and embedding an OGRE rendering context and then doing distributed rendering over a cluster and it's certainly not slow (even when using huge framebuffer sizes over Eyefinity).

I feel like a real rear end in a top hat here bitching about Qt. So what you said made me go re-examine how all the drawing code was being implemented.

code:
// Fill the background with white         
painter.setBrush(Qt::white);         
QRectF bg_rect(-w/2,-h/2,w, h);         
painter.drawRect(bg_rect);
This poo poo is now commented out and it runs beautifully.


Click here for the full 1216x638 image.


Progress has been made and I hope I never have to work with this code ever again. :)

shodanjr_gr
Nov 20, 2007

clockwork automaton posted:


code:
// Fill the background with white         
painter.setBrush(Qt::white);         
QRectF bg_rect(-w/2,-h/2,w, h);         
painter.drawRect(bg_rect);

:smithicide:


Glad to hear it's working much smoother now!.

That Turkey Story
Mar 30, 2003

Mustach posted:

I was expecting a hideous macro mess, but this is very readable. Awesome work!

Alright, I got "for", "for typedef", and the assert working and I'm really proud of it so check it out! The macro temporarily has a long name because I can't think of a more concise one -- what it does is it checks all of the superficial requirements of the concept, in other words, it will only produce error if the conditions in the concept fail, even if a concept map hasn't been written for the type. This ends up being useful in practice because things like iterators should not be auto concepts, however, since iterators up until now have been written without C++ concept support, you likely just want to check requirements rather than whether or not a programmer explicitly wrote a concept map using my library. There, of course, are asserts that check the latter as well.

Here's an example with a basic but contrived binary concept, just to show things off. Note that with the following code the first error, which states that the assertion failed, points to the line where the user invoked the macro. This is where they would most-likely expect to see it. The errors that follow point to the concept definition and tell the user exactly which conditions failed and doesn't mention any that passed. This makes it simple for the programmer to see exactly what went wrong in the context of the concept itself.



The simplicity of the definition and errors hides just how complicated this library actually is.

...just don't ever try to read the code that the concept macro generates :)

Edit: Now an even more concise error message

That Turkey Story fucked around with this message at 17:13 on Dec 13, 2010

Inverse Icarus
Dec 4, 2003

I run SyncRPG, and produce original, digital content for the Pathfinder RPG, designed from the ground up to be played online.

ultra-inquisitor posted:

I wrote a 2D esoteric language over the last couple evenings. It has the clever property that loops actually are loops! A "Hello World!" looks like this:



There's an online interpreter you can play about with here. It's quite fun trying to devise the most efficient control structures.

Having a ball loving with this.

Otto Skorzeny posted:

Grats on being able to keep your 'house' in RHAPs after the sophomore housing clusterfuck kicked all the upperclassmen out. I think Delta Phi was able to keep their little string in Colvin 14-16, too.

Colvin 41, '05 here.

fankey
Aug 31, 2001



The screen shot isn't impressive but what it represents is pretty cool. We make configurable DSP products. Our largest system has a butt load of horsepower and we didn't imagine that anyone would use all the resources. Of course our customers weren't told this and decided to use everything they paid for. The above system contains the following-
  • 11,663 mixer cross points
  • 3,086 total bands of parametric eq
  • 84 48dB high pass filters
  • 84 48dB low pass filters
  • 622 channels of peak limiting
  • 47.9 minutes of delay
  • 795 channels of metering
  • 384 cross point routers
  • 19 pink noise generators
  • a bunch of other stuff

HappyHippo
Nov 19, 2003
Do you have an Air Miles Card?


Started working on this again. It's a Civilization clone, but on an actual globe. So far I've mostly just been working on making the globe, but there are some units that move and cities. No combat yet.

tripwire
Nov 19, 2004

        ghost flow

Inverse Icarus posted:

Having a ball loving with this.

How are you using it? It doesn't seem like the ! commands actually output anything to anywhere, and theres no "p" (presumably print?) command like there is in ultra-inquisitors hello-world example.

Malloc Voidstar
May 7, 2007

Fuck the cowboys. Unf. Fuck em hard.
My VPS's netblock is on YouTube's shitlist so I have to fill out captchas to validate myself as not evil and download videos. youtube-dl, the usual cli downloading program, just fails on them. So I wrote a hacky version of it in Java and added captchas.


Click here for the full 787x562 image.


And learned that Google's captchas are a hundred times worse inside a terminal.

peepsalot
Apr 24, 2007

        PEEP THIS...
           BITCH!

pretty sure that "atorseato"

Sagacity
May 2, 2003
Hopefully my epitaph will be funnier than my custom title.

fankey posted:

Our largest system has a butt load of horsepower
It would appear so, yes :) What kind of system is it?

fankey
Aug 31, 2001

Sagacity posted:

It would appear so, yes :) What kind of system is it?
Q-Sys

For some somewhat artificial benchmarks it can do the following
  • 16,384 bands of parametric eq
or
  • a 512x232 mixer ( 118,784 cross points )
or
  • 276 6-way crossovers
All at 48kHz floating point, 2.5ms analog in to out latency.

tripwire
Nov 19, 2004

        ghost flow

Aleksei Vasiliev posted:

My VPS's netblock is on YouTube's shitlist so I have to fill out captchas to validate myself as not evil and download videos. youtube-dl, the usual cli downloading program, just fails on them. So I wrote a hacky version of it in Java and added captchas.


Click here for the full 787x562 image.


And learned that Google's captchas are a hundred times worse inside a terminal.
Thats awesome

Opinion Haver
Apr 9, 2007

Aleksei Vasiliev posted:

My VPS's netblock is on YouTube's shitlist so I have to fill out captchas to validate myself as not evil and download videos. youtube-dl, the usual cli downloading program, just fails on them. So I wrote a hacky version of it in Java and added captchas.


Click here for the full 787x562 image.


And learned that Google's captchas are a hundred times worse inside a terminal.

Am I the only one that thought the thumbnail here was easier to read?

POKEMAN SAM
Jul 8, 2004

yaoi prophet posted:

Am I the only one that thought the thumbnail here was easier to read?

Nope. I was disappointed the real version didn't have all the fancy colors!

Potassium Problems
Sep 28, 2001
I've been keeping a personal database of scores for a game called beatmaniaIIDX since about 2004, and I wrote a windows mobile client that would sync up with it. I've been doing android development for a few months & decided to port it over, and it easily kicks the poo poo out of anything I wrote for WinMo


Click here for the full 641x961 image.

Adbot
ADBOT LOVES YOU

That Turkey Story
Mar 30, 2003

Lone_Strider posted:

I've been keeping a personal database of scores for a game called beatmaniaIIDX since about 2004, and I wrote a windows mobile client that would sync up with it.

Looks great. I haven't played a lot of iidx, but I used to play way too much Pop'n Music. It's been a while but I remember Pop'n Navy, which was for keeping track of Pop'n Music scores and, after searching, there apparently was one for iidx as well (both of which closed down but were resurrected as "Solid State Squad"). Is this related at all to that?

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply