1. 6

    Awesome. It’s really frustrating to have distros package outdated versions of software, because then people use it. For example, note that they’re removing Rails 3.0, which the rails team has effectively not supported for a long time now, and officially not supported for a few weeks. Also, I’m looking at you, Mac OSX: still bundling Ruby 1.8.7. Ugh.

    1. 1

      With bundler, I’m not sure it makes sense for anyone to ever package themselves.

      1. 3

        We still package a bunch of Gems on OpenBSD that require compilation because it lets us properly add package dependencies, like installing a mysql gem (via package) installs the mysql-client libraries, or RMagick installs ImageMagick and its millions of image library dependencies. We can also make sure that the Gem compilation has the proper CFLAGS and LDFLAGS to link to the proper libraries.

        Try searching for instructions on installing RMagick and Mysql gems on Mac OS X to see how difficult and annoying this is otherwise.

    1. 1

      Why are these macros rather than functions?

      1. 1

        I think the rationale is, basically, for speed? That seems like a poor reason.

        I think a macro can support “more” than functions. My memory is slightly fuzzy about C, so I can’t think of a great example.

        1. 1

          Macros can do lots of things that functions can’t, but RARRAY_LEN and RARRAY_PTR don’t seem to be doing any of those things.

          Speed is my guess too, but I’m not sure why – couldn’t they be inlined for exactly the same effect?

      1. 1

        From my extremely limited perspective, this seems actually common. The Emacs source is full of the same kinds of things. I don’t know what that means, precisely, but it is interesting that they both reached for these tools to simplify data access.

        1. 1

          Comparing the Emacs source and MRI is very instructive, down to Qnil. :)

        1. 1

          I love this. Partial application Is one of those things that are really powerful and useful when you get used to thinking in those terms. Especially when combined with high order functions, as shown.

          1. 3

            Why is it not “DCI” when one simply uses composition to access the data objects?

            1. 3

              Agree. I don’t “get” DCI. It seems like overkill crazytown.

              1. 1

                Especially because you can use them to achieve the entire effect without these crazy negatives.

              1. 1

                Dylan is a programming language originally designed at Apple (and elsewhere) in the early 1990s. It incorporates some aspects of Lisp and Scheme. http://en.wikipedia.org/wiki/Dylan_(programming_language)

                1. 1

                  Most notably, macros.

                  (I say notably because basically all modern programming languages incorporate some aspects of lisp and scheme)

                  1. 1

                    The condition system (as opposed to normal exception handling) is nice as well.

                1. 2

                  I really agree with this.

                  There is a downside to chat, though: it has lower bandwidth than face-to-face communication. Sometimes you know what you need to say, but you don’t know how much the other person understands. Thus, you must figure out what they know, and how to communicate what they need to know most effectively.

                  In person, it is much easier to gauge how the conversation is going for the other person — you can see their face, hear their voice, etc.

                  My guess is that there will be an eventual place for a product like google hangouts that has a few features:

                  1) IDE connection, which makes it easier to share code than in real life.

                  2) quick/trivial video chatting, with altered social expectations.

                  2.5) an effective search for content of audio/video recordings

                  3) very easily searchable logs for all communications.

                  At some point, I would guess that all communication will take place with the aid of computers, just because of its benefits.

                  1. 1

                    Chat isn’t always better than face-to-face time. In-person conversations should be the exception, not the rule. Also, right after a conversation, I always like to jot down the results, so that the outcome of that conversation is clear and agreed upon.

                  1. 5

                    Dynamic libraries strike again!

                    With the increased amount of RAM machines have, I always wonder if it’s not just best to statically link everything all the time nowadays.

                    1. 3

                      You risk me agreeing with you and having the prophecies of the end of the world come true with comments such as these. The era of space over time is long done. There are just so many benefits of static linking such as utilizing runtime analysis across library code, not just, as you rightly imply, to reduce attack area.

                      1. 1

                        I am a huge proponent of this, even if I get a lot of grief for it. A good read on the subject is the cat-v dynamic linking page.

                        1. 1

                          Agreed. I would at least reach for static linking over dynamic linking as a first solution, and then only think about supporting dynamic linking if it was proved worthwhile.

                          1. 1

                            But then you lose out on PIE/ASLR, and the next time there’s an OpenSSL or zlib bug, you’ll have to recompile everything on your system that uses those.

                            Though these days with advanced package management, I’m not sure the latter is such a big deal. The package manager (on OpenBSD at least) knows what binaries are linked to which system and package libraries and which versions of them, so getting those select packages rebuilt and reinstalled wouldn’t be a big deal.

                            1. 1
                              1. Nothing stopping you from making the executable position independent (PIE) and relocate on load in any predicatively odd way you wish to increase entropy.
                              2. Address space layout randomization (ASLR) is possible when code is position independent (see 1); it is still done for the stack and dynamic memory regardless. If the argument is that relocating libraries randomly helps, then do it to every function of a static executable. That’s still possible.
                              3. Don’t think of it as recompiling, think of it as a one-time cost per version update that reanalyzes the best way to execute your code. You can do it lazily upon first load on a case-per-case basis.
                          1. 4

                            I really hate this, and want to get it back.

                            1. 1

                              So, I completely agree with this, though I think it misses a few points. I don’t want to go into it here, though.

                              Lets say I totally agree. Then what?

                              I can’t just pick up a random calculus book, because that would not let me use my programming skills. Or, at least, I feel that “tension”.

                              Project Euler is great, I guess, but it feels more “fun” than useful.

                              So, where to next?

                              1. 1

                                What’s wrong with not being able to use your programming skills?
                                What points do you think it misses?

                                1. 1

                                  Well, I’m not sure that wrong is the correct word. “Less optimal” might me more on target.

                                  When I took math classes, the ability to “visualize” problems really helped in my understanding. I really liked working with Maple, even though it was painful (because we had no good resources on program manipulation). I would love to do the same, today. I think a curriculum that is “designed” around the use of a computer to understand and math would be really interesting.

                                2. 1

                                  I have that problem a lot, and it’s one of the reasons I’m ill-suited to school. I usually learn better by actually doing useful things. However, I see mathematics as a language, and time has to be spent learning the “primitives.” Whenever I start learning languages, it can be difficult to get started because of some of the initial time it takes to get enough of the basics to do anything really useful. It takes on average at least a month before I can even hold a modest exchange with someone in whatever language assuming a solid effort. I can do “toy problems” (“hi”, “my name is”, etc…) in the meantime, but I find there’s a lot of precursor knowledge that has to be learned first.

                                1. 1

                                  So the December entries are due at the end of December?

                                  1. 1

                                    Yes. Entries will be voted on during January.

                                    1. 1

                                      Cool, thanks!