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: Re: linked lists. Could you explain why the statement "you need...insertions will have problems" is false? If this is false then there is an assumption that arrays do better -- which isn't true if the insertions are not pushed at the back of the array. plus at every given time you might have a memcpy penalty if there isn't enough headroom, etc.
Asked by gio (94.66.83.x) on June 23 2013, 8:47am
Reply on June 23 2013, 10:27pm:
    I think his assertion that a doubly-linked list was necessary for random insertions was making a lot of assumptions, particularly that the random-insertion algorithm wasn't really aware of the structure of the list (basically, he's saying that you'd need the most general form of doubly-linked list to be used as-is for the algorithm, otherwise you have to actually write code that traverses the list to decide where to insert, etc).

    Regarding the performance penalties of having to shuffle the list around due to insertions, his point is that those penalties are actually relatively low (because of CPU caches etc) compared with having to traverse a list (which most of the time will thrash CPU caches and will in general touch a lot more memory due to overhead of the list structures).

    The real thing to take away from this, though, is that you should think about the data structures you are using, and think about how they will be used, before you decide which to use. Also, sometimes writing versions of algorithms that are optimized for a particular data structure (such as code that inserts at a random point in a singly-linked list, and does it with a single pass, vs a more braindead approach which would require a doubly-linked list), can have value. Having said that, though, linked lists can and do have plenty of uses where they DO perform well, even if they don't in this example.
Comment...
Question: What do you think about JUCE?
Asked by EvilDragon (88.207.58.x) on June 21 2013, 9:21am
Reply on June 21 2013, 11:48pm:
    Not much of an opinion at all, if it was BSD licensed I'd be more inclined to invest in it...
Comment...
Question: Have you found this to be true in practice, regarding linked lists? youtube.com/watch?v=YQs6IC-vgmo
Asked by will (70.173.150.x) on June 20 2013, 7:42am
Reply on June 21 2013, 11:49pm (edited at June 21 2013, 11:57pm):
    I think the benefit of linked lists depends heavily on use cases, so it really depends.

    The case for the problem being solved (random insertion/deletions), I don't disagree with, but he makes some bad arguments at times (paraphrasing): "you need to use a doubly-linked-list or the insertions will have problems" (false), "the data structures are always much larger for a list than for a vector" (true, they are always larger, but depending on the size of the underlying data they may not be *much* bigger), etc.

    Anyhoo... TBH the biggest thing is that vectors are generally less leak/error prone, which is a win (forget about performance, if you can't do it reliably then what's the point?).
Comment...
Question: re: ReaStream protocol: I reverse engineered what I needed for github.com/obijywk/footswitch so no rush :-)
Asked by matt (72.14.228.x) on June 18 2013, 3:07pm
Reply on June 18 2013, 3:13pm:
Comment...
Question: could you document the ReaStream UDP protocol (esp. midi)?
Asked by matt (108.182.51.x) on June 17 2013, 3:03pm
Reply on June 18 2013, 2:53pm:
    Yeah, I need to do that.
Comment...
Question: Is it okay, when it's in a threeway? www.youtube.com/watch?v=Pi7gwX7rjOw
Asked by Will (70.173.150.x) on June 16 2013, 6:54pm
Reply on July 3 2013, 7:27pm:
    Har.
Comment...
Question: Have you looked at StartMail (startmail.com)? Do you think privacy applications both via the internet and on your PC like TrueCrypt will be more popular now that the NSA PRISM program has been exposed?
Asked by Jason (71.196.32.x) on June 15 2013, 3:00pm
Reply on June 18 2013, 2:52pm:
    I haven't.
Comment...
Question: Best drug/high you've ever experienced?
Asked by Mick (101.165.16.x) on June 15 2013, 7:42am
Reply on June 18 2013, 2:53pm:
    Hmm I think being about 7 miles into a 10 mile run feels pretty good... but also the stuff they gave me when they removed my wisdom teeth was pretty awesome.
Comment...
Question: What do you use for regex in Win32 (if any)?
Asked by Rodrigo (177.96.51.x) on June 14 2013, 10:59pm
Reply on June 14 2013, 11:51pm:
    vim/bash/perl/etc, but if you mean in Win32 programs, errr, well, yeah nothing.
Comment...
Question: when are you going to rocks some new tools? make some new stuff...itching to use some new stuff from you!!!! please?.
Asked by poop (75.119.11.x) on June 14 2013, 9:32pm
Reply on June 14 2013, 11:51pm:
    such as? :)
Comment...
Question: Any thoughts on the new Macs?
Asked by Will (24.234.85.x) on June 14 2013, 4:43pm
Reply on June 14 2013, 5:59pm:
    Reminded of the G4 cube, hah. Some neat things in there, but will probably be overly expensive.
Comment...
Question: how did you learn the asm techniques to speed up nitrane? did you read intel manuals on the chips/mmx?
Asked by Will (70.173.150.x) on June 14 2013, 2:12am
Reply on June 14 2013, 5:58pm:
    For MMX specifically I read the Intel docs, but also I had read a bunch of other books on assembly stuff. Michael Abrash's graphics programming book was a good read too.
Comment...
Question: HI, Transactional Synchronization in new Haswell cpu's. Do you think this will be useful for daw users? Thanks
Asked by Mplay (217.122.97.x) on June 13 2013, 7:40pm
Reply on June 14 2013, 5:58pm:
    Hard to say, don't know much about them but in theory I suppose once the OS starts using them for thread synchronization it could have small benefits.
Comment...
Question: @JustinFrankel #GNU WASTE #Netention blog.automenta.com/2013/06/national-survival-agency-decentralize... � www.youtube.com/watch?v=Pvw-qGjEwLI � #SNOWDEN #P2P
Asked by @automenta (24.131.65.x) on June 13 2013, 1:26am
Reply on June 13 2013, 1:55pm:
    No question here I can read...
Comment...
Question: Re: constructor. how about std::nothrow in header -- is it beneficial or to put it better does it make sense with what we already have? On the other hand living in danger feels extremely good, manly stuff, etc.
Asked by gio (94.66.28.x) on June 8 2013, 12:31am
Reply on June 9 2013, 6:58pm:
    it looks like std::nothrow would have to be used with every call to new, unless one could override it per-class. Probably wouldn't want to do it per-class, anyway, but instead any time you call new you'd add it and check the return value...
Comment...
Question: Re: effVendorSpecific/effString2Parameter - Apparently atof() should support scientific notation, see tinyurl.com/bfa2472. But in this case "%.16f" will be just as precise. Thanks! Oh wait, I'm supposed to ask a question� Human (enter yes)?
Asked by Tale (77.170.68.x) on June 7 2013, 9:47pm
Reply on June 9 2013, 6:59pm:
    Cool I guess, %e would be advantageous for very large/small values...
Comment...
Question: What do you think about PRISM? Man, I look back to '03 and it looks like that after all it wasn't a WASTE of time... ;)
Asked by gio (94.66.28.x) on June 7 2013, 3:50pm
Reply on June 7 2013, 5:19pm:
    Haha of course SSH/HTTPS to your own servers is pretty much fine too...
Comment...
Question: with PCM_SOURCE_EXT_SETPREVIEWTEMPO I can set BPM of MIDI item but can't find a way to set time sig. Thanks for any help you're willing to provide and a lengthy 2-part question :)
Asked by Martin (93.136.52.x) on June 7 2013, 3:40pm
Reply on June 7 2013, 5:18pm:
    You can't currently (I'll take that as another request!)...
Comment...
Question: API call PCM_Source_GetSectionInfo tells you if take source is reversed. But how to set it? Been fooling around with Extend(call, *parm1, *parm2, *parm3) in PCM_Source defined in reaper_plugin.h and something tells me parm1 is the key here when calling with PCM_SOURCE_EXT_TRIMITEM. But I just can't seem to make it work. Bonus question for PCM_source/Extend:
Asked by Martin (78.0.211.x) on June 7 2013, 3:35pm
Reply on June 7 2013, 5:17pm:
    Unfortunately PCM_SOURCE_EXT_TRIMITEM isn't usable for this (it is only for MIDI items). We need to add an API for configuring section sources, but alternatively you can SaveState() the source, modify the chunks, and LoadState() it back...
Comment...
Question: What do you think of foobar2000?
Asked by awsa (31.6.45.x) on June 7 2013, 9:42am
Reply on June 7 2013, 5:15pm:
    Never was a platform that I wanted to use. The whole point of the software I end up making is to make things that work the way I want them to, and foobar missed the boat on that.
Comment...
[newer questions][unreplied] | [replied] | [recent comments] | [all]
[older questions]
Copyright 2025 Justin Frankel. | RSS