justin = { main feed , music , code , askjf , pubkey };
Ask Justin Frankel
No reasonable question unanswered since 2009!

Suggested topics: programming, music, sleep, coffee, etc.

Note: please do not ask questions about REAPER features, bugs or scheduling, use the forums instead.


Name: Ask: Human (enter yes):
[newer questions][unreplied] | [replied] | [recent comments] | [all]
[older questions]

Question: Without cheating, see if you can program a sudoku solver :)
Asked by Will (68.104.121.x) on May 4 2014, 7:24am
Reply on May 4 2014, 1:38pm:
    I can do a trivial solver, however I can't promise it will run in a reasonable amount of time.
Comment...
Question: Do you think you'll ever take a significant break from programming? Is it core to who you are? If they took away your computers, what would you do with yourself? Would you be sad, even with your piles of cash?
Asked by John (68.104.121.x) on May 1 2014, 3:38am
Reply on May 1 2014, 7:01pm:
    I definitely spend less time programming than I did 10 years ago, but I don't think I'll ever take a real break from it.
Comment...
Question: Is this what has become of Brennan? I think I've spotted him. youtube.com/watch?v=mSnRq6iyHKg
Asked by John (68.104.121.x) on April 28 2014, 7:57am
Reply on April 29 2014, 4:19pm:
    Ha ha
Comment...
Question: Did shoutcast use a mysql backend? Any DB scaling issues come up?
Asked by Will (24.234.85.x) on April 25 2014, 11:54pm
Reply on April 29 2014, 4:19pm:
    I forget, might have been postgresql. I don't recall any scaling issues that couldn't be fixed by bigger hardware.
Comment...
Question: Do you ever use De Morgan's law?
Asked by Will (68.104.121.x) on April 25 2014, 5:12am
Reply on April 25 2014, 1:31pm:
    All the time, but I didn't realize it had a name.
Comment...
Question: Was winamp your first win32 app ever? What approach did you take to learning the API? MSDN? Petzold? Looking at other source code? Did you ever have thoughts on scrapping the project?
Asked by Will (24.234.85.x) on April 24 2014, 12:13am
Reply on April 24 2014, 11:00pm:
    First real application other than some graphics demos. Trial and error really... I did read the Petzold book at some point, but it might have been later on.
Comment...
Question: pastebin.com/01UbVZct still doesn't work. To get displayed text this seems to work: pastebin.com/GGE84sAL However, that's only one conversion less and requires separate UTF8 functions (something I try to circumvent by using only char*)
Asked by Martin (93.139.103.x) on April 23 2014, 5:43pm
Reply on April 23 2014, 8:21pm:
    Send me an email with this (and include the langpack you're using), thanks!
Comment...
Question: I see that REAPER MIDI editor now has some fancy shadows... what do you use to render them?
Asked by Rodrigo (187.112.75.x) on April 23 2014, 3:27pm
Reply on April 23 2014, 8:21pm:
    Hmm probably just LICE with an image, I think.
Comment...
Question: With Reaper localized there are some quirks when it comes to things Windows display: i.imgur.com/yMonxdi.png (notice how čć become cc) Sometimes we search for hwnds by name and this can become a pain.This is what I've come up with to deal with it: bit.ly/1poiTf7 But I don't like that things are getting reconverted 4 times! Being old Being old win32 guy, do you have any idea how to make this a bit more nicer?
Asked by Martin (93.136.59.x) on April 22 2014, 3:05pm
Reply on April 23 2014, 1:40pm (edited at April 23 2014, 1:44pm):
    You should convert the string you're searching for from UTF-8 to UTF16 (MultiByteToWideChar(CP_UTF8)), then search for the windows and call GetWindowTextW(), and compare the UTF16 strings.

    Edit: or, as Jeffos points out, making a FindWindowUTF8() which calls MultiByteToWideChar(CP_UTF8) and FindWindowW() would be the nicest way to go about this...
Comment...
Question: Couldn't you do your own memory management then rather than using the CRT malloc/free and coordinate memory allocation requests/frees among the subsystems?
Asked by Will (24.234.85.x) on April 21 2014, 9:08pm
Reply on April 22 2014, 12:47am:
    You can call the appropriate version of free(), or a function that calls it, yes... but in general best to just avoid that issue (and for objects, use virtual destructors).
Comment...
Question: Why are you concerned with download size now anyway? Our internet is fast! Static link that bitch and be happy.
Asked by Will (24.234.85.x) on April 21 2014, 5:29pm
Reply on April 21 2014, 9:04pm:
    Just try to keep the whole experience ideal at every step of the way -- not just for end-users, but for us developers too. Static linking the various plug-ins only really added about 300kB to the Windows build anyway, so no big deal. The gotcha would be if you had code which malloc()'d objects in one module and free()'d them in others, but we've been static linking on win64 for a while so it would be an issue there too.
Comment...
Question: Re libc: I tried a few times linking to DDK msvcrt.dll, things looked "good" if the .lib matched the OS version. So are you going to incorporate static linking "policy" to ffmpeg too? You can dig C99-to-C89 for more info, I think it would be better for performance too.
Asked by gio (94.66.68.x) on April 20 2014, 5:53pm
Reply on April 21 2014, 1:16pm:
    I think what it comes down to is that msvcrt.dll shouldn't really be relied on, as you might get different versions with different quirks.
Comment...
Question: Re libc: Just noticed at the latest changelog the avoidance of msvcrt.dll dependency and thought to ask what made you change your mind?
Asked by gio (79.131.47.x) on April 19 2014, 7:19pm
Reply on April 20 2014, 1:50am:
Comment...
Question: Faster load times lead to static linking the C library or something else? Bench: vc13 x86 build on K10 Deneb don't look that good in comparison with the release build, didn't do any extensive testing though. :)
Asked by gio (94.66.27.x) on April 18 2014, 9:15am
Reply on April 19 2014, 4:22pm:
    Hmm not sure what the question is here.
Comment...
Question: Do you find yourself git commit -am often or do you find value in staging changes?
Asked by Will (24.234.85.x) on April 15 2014, 8:24pm
Reply on April 16 2014, 12:51am:
    Depends, sometimes I commit everything on a temp branch then revise later, other times I add -p (when I want to add a fix but not a ton of debug messages, etc). I almost always diff at length before I push, though.
Comment...
Question: Do you use github much/at all? What are your thoughts?
Asked by Will (24.234.85.x) on April 15 2014, 6:13pm
Reply on April 16 2014, 12:52am:
    Occasionally, it's a pretty good service, I like it, but I also like hosting my own.
Comment...
Question: Regarding healthy vs. unhealthy: www.cnn.com/2010/HEALTH/11/08/twinkie.diet.professor/...
Asked by Will (68.104.121.x) on April 14 2014, 3:58am
Reply on April 16 2014, 12:52am:
    Yeah, I sort of think that a normal diet is one that hedges a lot, if something ends up being really bad, at least you get mostly good things elsewhere.
Comment...
Question: Have you ever met JeffOS in real life ?
Asked by Ubik (62.235.212.x) on April 13 2014, 3:55pm
Reply on April 13 2014, 4:56pm:
    Not yet, we've had some Skype though.
Comment...
Question: Why did the world settle on this shitty 1366x768 resolution?
Asked by Will (68.104.121.x) on April 12 2014, 10:37pm
Reply on April 13 2014, 4:55pm:
    I sure haven't! I love my Retina Macbook Pro (especially in Win7).
Comment...
Question: Can we reliably tell in-project MIDI take is opened in inline editor with PCM_source->Extended(PCM_SOURCE_EXT_INLINEEDITOR). Or will it lie when take is open in another ext. editor ? (I can't open MIDI take in ext. editor (bug?) so I can't test it...)
Asked by Martin (93.139.79.x) on April 12 2014, 7:43pm
Reply on April 13 2014, 4:55pm:
    Yes PCM_SOURCE_EXT_INLINEEDITOR(0) will return greater than 0 if and only if the inline editor is open. It will return -1 if inline editing is supported but not currently open.
Comment...
[newer questions][unreplied] | [replied] | [recent comments] | [all]
[older questions]
Copyright 2025 Justin Frankel. | RSS