1. 4

    I’ve heard that CMake makes complicated builds more easy to manage, but this particular tutorial doesn’t really show that. In fact, it’s actually much less “work” to write a simple Makefile in this case. As such, I left the tutorial with no reason to care about CMake, and instead of a “woah! you knocked my socks off!”, my reaction was, “so what?” But! I’ve been using make for years. For someone new to everything, I think this shows that CMake is easier to reason about. It just wasn’t enough to sway me from my more familiar make.

    Criticism aside, I really liked the style of the tutorial, and how the repo is all inclusive. I hope to see more tutorials in the future adopt this style (instead of the typical blog post that isn’t all encompassing without linking out to somewhere else, etc).

    1. 3

      As someone who’s used cmake professionally, I agree! It’s a bit simplistic for the basic use-case, with the exception of showing the link capabilities. It also doesn’t mention the other main advantage: once you’ve written the CMakeLists file, you can take it to other systems and (usually)get a clean make system: linux, *BSD, OSX, even Windows(by generating Visual Studio solution files, or Cygwin).

      This is also timely: I’ve been keeping a tool/library evaluation repo for a personal project, using cmake to make sure they all work. Would people be interested in this repo if I added docs similar to this tutorial?

      1. 1

        This is also timely: I’ve been keeping a tool/library evaluation repo for a personal project, using cmake to make sure they all work. Would people be interested in this repo if I added docs similar to this tutorial?

        Yes, absolutely!

        1. 1

          Ok, I’ll clean it out and see if I can get it up in the next few days.

          (Also, I’d like to echo apg’s compliments on the style of the tutorial: it is a good introduction for people totally unfamiliar with CMake)

      2. 1

        As such, I left the tutorial with no reason to care about CMake, and instead of a “woah! you knocked my socks off!”, my reaction was, “so what?” But! I’ve been using make for years. For someone new to everything, I think this shows that CMake is easier to reason about. It just wasn’t enough to sway me from my more familiar make.

        Yup you are right. My intention was not to convince anyone to use a CMake instead of plain Makefile (or any other tool x), but to helps them to quickly get up and running with CMake if they want to use CMake.

        Criticism aside, I really liked the style of the tutorial, and how the repo is all inclusive.

        Thanks!

      1. 4

        work: Continue my work to port HRAN theano to tensorflow.

        personal: Re-reading the Rust book. I’m on chapter 4, and it’s been awesome experience.

        1. 2

          Useful tool, I would like to replace my ls(1) even without git support. Why I use exa git support when I can simply running a git status :)

          1. 1

            The https is broken on the chrome mobile (iOS 10)

            1. 4

              @soc Sorry to hear that. What’s your plan for the next? are you considering to contribute to other prog-lang’s community? such as Go/Rust etc.

              1. 1

                I wouldn’t have wanted it to ask that myself, but we already have people coming from scala contributing and the previous exposure to traits helps a lot.

                All the topics that are lamented in the post are seen as first class issues in the Rust ecosystem (which doesn’t mean that are always solved greatly!), we’d be tremendously honored if someone of that skill level would consider contributing.

                1. 2

                  One major limitation of malloc (and even the best implementations like jemalloc and dlmalloc) is that they try to use a single allocator for each data structure. This is a mistake: A huge performance gain can be had by using a separate allocator for each of your data structures — or rather, for each of your data usage patterns.

                  I’m interested to read more about this, any link suggestion?

                  1. 10

                    http://paperswelove.org/2015/video/ryan-zezeski-memory-by-the-slab/

                    Long story short - if you know how large the type is, you can make a lot of assumptions that reduce fragmentation.

                    1. 6

                      Besides tighter packing, you have better control over object lifetime. If you have a foo and a bar type of equal size, and you alternately allocate a bajillion of each, then free all the foo, that doesn’t really free up any memory for objects of a different size.

                      1. 4

                        I’m interested to read more about this, any link suggestion?

                        You might also find the memory allocation discussions in Jason Gregory’s Game Engine Architecture interesting. Even if you’re not interested in making games per se, there’s a lot of useful information about memory allocation performance and techniques for doing it very efficiently that apply well beyond the games field.

                      1. 1

                        I think it would be better to also plot the benchmark results. It will make easier to read & compare the results

                        1. 3

                          Actually, I’ve heard there are an infinity of them.

                          Can you prove that?

                          Don’t have to. Axiom of infinity. :)

                          This thread made my day :))

                          1. 1
                            • Job: Fixing bugs for our search infra, add new features, especially an implicit filter for category

                            • Hobby: This week I’m creating a Python interface for Facebook fastText

                            1. 1

                              wondering how xmake handle third-party libraries and internal module for c project. I think the combination of xmake and clib is a double win :)

                              1. 3

                                xmake can integrate local packages automatically now.

                                .e.g

                                add_packagedirs("pkg") 
                                target("demo")
                                    add_package("sqlite3", "openssl")
                                

                                You can refer to https://github.com/waruqi/tbox/blob/master/src/tbox/xmake.lua and the packges https://github.com/waruqi/tbox/tree/master/pkg

                                xmake will suport manage package and dependencies in the next version. and it will be able to patch and compile third-party libraries for the cross-platform automatically. : )

                              1. 3

                                wow! happy birthday lobster.rs!

                                1. 11

                                  Learning and reading about new technology and futurism. Reading science fiction and non-fiction. Hiking. Guitar and other music. Figuring how to increase my value as a human.

                                  1. 2

                                    Read any good sci-fi novels recently?

                                    1. 8

                                      Not the OP but wanted to mention Seveneves - I really enjoyed it.

                                      1. 2

                                        Added to my “to-read” pile.Thanks.

                                        1. 2

                                          Yes!!! I just finished this - I liked it a lot but not as much as Snow Crash, still a fantastic novel.

                                          1. 2

                                            I started this a week ago! Really enjoying it :)

                                            1. 1

                                              Ian M. Banks Consider Phlebas and even better The Player of Games. Both part of the Culture series. This is the ONLY science fiction future society that leaves me saying “Sign me up! I’m there!” :)

                                            2. 4

                                              The Metamorphosis of Prime Intellect
                                              The Martian

                                              1. 5

                                                +1 for The Martian

                                                1. 2

                                                  +1 for The Metamorphosis of Prime Intellect

                                                2. 3

                                                  Diaspora by Greg Egan always tops my list.

                                                  1. 1

                                                    Just finished Cat’s Cradle (not obscure but a classic), and now starting on the Foundation trilogy (finally). As stated below, Neil Stephenson’s Seveneves was a veritable page-turner. Also anything by William Gibson.

                                                    1. 3

                                                      Reading up on Stanislaw Lem. Foundation was awesome, but Lem… Summa Technologiae should be taught in schools!

                                                      1. 1

                                                        I tried reading Lem’s Futurological Congress book, but it was just too silly. On the other hand, the Cyberiad somehow hits a sweet spot, it’s one of my favorite books - I made my dad read it to me a lot of times when I was little, and I still really enjoy it.

                                                1. 1

                                                  Github: network effect is a real, I create github account to share my package/library. For private project I prefer to use gitlab.

                                                  Gmail: State-of-the-art spam filtering for free. I use gmail because of the simplicity and easy to use.

                                                  Slack: Team communication done right. I can use slack on iphone or macbook which help me keep up to date on my team while on mobile.

                                                  1. 2

                                                    At work:

                                                    • Working on some requested feature for the search infrastructure
                                                    • Word embedding with word2vec, trying to cluster a words from customer’s chat, reviews, etc. We will use this for another Machine Learning task.

                                                    Personal:

                                                    • Balancing work, school and life. (It’s hard but it’s possible)
                                                    • Have fun with TensorFlow
                                                    • Preparing exam
                                                    1. 10

                                                      have my last interview this week then i am done with the job hunt!!

                                                      Got my first mac, and will be setting up XCode and stuff and figuring out how it works!

                                                      1. 4

                                                        Wow, congratulations on both: getting a new job and getting your first mac.

                                                        Especially if you’re coming from Linux, take some time to savour your new Mac’s features. First impressions never have second chances, and I remember my own feelings when I got my first Mac: both a feeling of discovery, something new, and a bit of wow because of the polished interface and integration.

                                                        Do you have an iPhone too? iCloud is the target of many memes but the truth is that mac-phone integration is great this days.

                                                        1. 1

                                                          I use an android phone (Moto X2) as my daily driver eventhough i have an old iphone4s but it is giving me issues with wifi (have to literally freeze it to make the wifi start working for an hour or so).

                                                          The biggest problem i had was that update download stops when i close the lid, weird. since the updates are usually huge i don’t want to leave my mac active using caffeine, This issue was quickly solved using insomniaX.

                                                          It’s a macbook air so i’ve been using nomachine to access my old linux laptop and write code for the linux distro i contribute too, no other solution worked as good as nomachine.

                                                          also getting used to brew, after many years of jumping between apt, yum & pacman. brew is fine, brew cask is very helpful.

                                                          finally App discovery is still a problem for me, trying to find places where i can get good app recommendations.

                                                          1. 3

                                                            There are many threads and FAQs on reddit’s /r/apple regarding “software for switchers”. In general, the builtins work well (safari, mail.app, photos, etc), and for specific tasks you can try OSX counterparts for Linux software.

                                                            brew is crucial if you come from a linux environment, I see that you already discovered it.

                                                            Anyway, if you want any specific recommendation, just ask here and I’m sure we’ll give you more than enough options :)

                                                            1. 2

                                                              thanks a lot! i bought airmail2 as soon as a friend recommended it, amazing app and much better than the mail app in yosemite.

                                                              1. 1

                                                                Dude, yosemity? El Capitan and much more stable, and not updating after it has been out for almost a year… Why not?

                                                                1. 1

                                                                  updated last week.

                                                                  1. 1

                                                                    Ah great ;)

                                                            2. 3

                                                              Especially if you’re coming from Linux, take some time to savour your new Mac’s features.

                                                              Ah, those wonderful OS X features:

                                                              • no official package manager with which you can control all your installed software
                                                              • incredibly old package versions
                                                              • a fsync() that will not flush the disk’s cache; they have a F_FULLFSYNC fcntl for that that almost no software uses, so enjoy losing PostgreSQL data in the case of a crash ;-)
                                                              1. 1

                                                                :/

                                                                I know, but it gives you a good UI with excellent battery life and i don’t plan on install PostgreSQL on this machine anyway, it’s a tiny air. I will use a linux box using ssh or using remote desktop (i do desktop app development for linux too).

                                                                Kinda like some people did with their iPads early on.

                                                                1. 2

                                                                  On an old Macbook Air right now and I have no issues with running a PostgreSQL server 24/7. It’s not like you’re going to be running PostgreSQL for non-development purposes and have a fatal crash that will cause you to lose the last few seconds of data.

                                                          2. 2

                                                            Congrats man! Oh ya, you can setup vagrant too to run linux distro seamlessly

                                                            1. 1

                                                              Cool! will running linux desktop applications be possible with vagrant?

                                                            2. 2

                                                              Do remember to head into System Settings -> Security and turn on the local firewall and FileVault (full disk encryption) as one of the first things you do. FileVault doesn’t, in my experience, make your Mac run any slower, but it’s super cool to know that you at least have some security for your sensitive data on you Mac.

                                                              Other than that, give Safari a chance. I used Chrome for many years when I ran Linux as my main operating system, but Safari is so much more smooth and consumes less battery if you’re on a laptop. I’ve been using Safari for 3 years now and every time I use Chrome, which I do everyday to separate work and personal logins, I loathe it.

                                                              Oh, and the built-in terminal is great, but I think iTerm2 is way better! Try it out!

                                                              1. 1

                                                                is safari really that good? i am a firefox user the few things i’ll miss are uBlock origin & sync with my phone (android user)

                                                                1. 2

                                                                  It is in my experience.

                                                                  The thing about Safari is that the team focuses more on the experience, thus the smoothness, as low power usage as possible and such as opposed to Chrome which focuses on having “all the features”. That, Safari don’t have, but instead they have a browser where scrolling is smooth, it doesn’t eat my ram even with 30 tabs (my max number of tabs ever) and 3 windows, and the whole thing just “feels” better to use. It’s hard to describe, but “feel” is what sets it apart. Chrome on the other hand just feels powerful with no regard to the soul sucking jhankyness that those powers require. Safari also has a better UI in my opinion, which doesn’t hurt either.

                                                                  There is uBlock (not origin) for Safari, which is what I use, btw.

                                                                  1. 1

                                                                    sold, closing firefox and starting to experiment with safari!

                                                                    can the battery life BE any better

                                                            1. 2

                                                              I’m curious about how pony manage a runtime. The documents still empty: Memory Allocation & Garbage collection.

                                                              1. 2

                                                                What in particular are you interested in? I could probably fill you in some. Probably as in, I’m still digging through all the code.

                                                              1. 3

                                                                inetd is pretty unused these days, isn’t it? I can’t even recall the last time I used it.
                                                                Maybe it should be removed from a few base installs, and put into ports or something?

                                                                Aside: That is one thing I really like about the OpenBSD project. They actually remove crufty old things sometimes!

                                                                1. 2

                                                                  OpenBSD has inetd(8) in base. It is just disabled by default.

                                                                  1. 2

                                                                    One handy trick I’ve used it for recently in production is wiring-up port redirections using nc as the server spawned by inetd.

                                                                    1. 1

                                                                      indeed

                                                                      1. 1

                                                                        OpenBSD still includes a CGI daemon too.

                                                                        Like CGI, you just wish that fork, exec, and reap were faster. :-)

                                                                      1. 10

                                                                        Happy new year all! Thanks to user pushcx for inviting me near the end of last year. I hope to be a part of this community, contribute a little, and not be in the way in 2016. Besides getting back in the swing of things work-wise after almost a week off, this week I will…

                                                                        • Have a bare-bones version of a personal site up for the first time in a long time
                                                                        • Write a reflection on 2015, the things I enjoyed, the things that went well, and the things that could have gone better.
                                                                        • Write the how and why for my 2016 plans. The year-long goals as well as the daily and weekly practices I’m committing to.
                                                                        1. 2

                                                                          Welcome! :)

                                                                        1. 6

                                                                          Though it is certainly the case that C++ will usually outperform the pants off of Python, and save costs hardware wise, one has to factor in other costs as well. Will time to market be slower? Will prototyping new features take longer? Will hiring developers be more difficult, or more costly? Are there pieces of the software that don’t require the same performance characteristics (and which scripting is appropriate)? Etc, etc. This post was extremely light on questions like that, and justified performance based on a potentially sketchy microbenchmark.

                                                                          1. 1

                                                                            Will time to market be slower? Will prototyping new features take longer? Will hiring developers be more difficult, or more costly? Are there pieces of the software that don’t require the same performance characteristics (and which scripting is appropriate)? Etc, etc.

                                                                            IMHO, thinking all of those factors while starting startup is very time-consuming since we don’t know if the idea is work. Though I agree if the context is a running a startup, all those factors should be highly considered.

                                                                            1. 1

                                                                              For the kind of task they are doing, I wonder if Python wrappers round C++ libraries at time critical points would serve well.

                                                                              1. 2

                                                                                Yup. That’s kind of what I’m getting at. Or, maybe even the opposite. Python can be embedded, so maybe there are parts which could be scripted–the web stuff seems likely. But, I’m not a domain expert, and all that jazz…