1. 9

    What works

    • Front page stories, comments, the article itself.

    What doesn’t

    • Anything that uses your account (@talklittle is/was making OAuth Support at some point)
    • The recent page
    • User profiles

    I think I implemented everything the API has support for, and the interface is a bit lacking. WIP. Signed Android Binary Here: https://gitlab.com/nikhiljha/lobsters-app/tags

    For those new to flutter, the entire codebase is inside the lib folder (~300LOC) - everything else is autogenerated. The app is also compiled to native ARM code, so although the binary is somewhat large (due to flutter needing to have its entire library in there), the application is fast and uses very little battery.

    1. 8

      OAuth 2.0 support was stalled waiting for a bugfix/feature to be put into an official release of the Doorkeeper gem, which incidentally looks like it came out 9 days ago as version 5.0.0. Doorkeeper v5.0.0.rc1 changelog mentions the merged PR.

      However now the OAuth 2.0 branch is pretty far behind master, so work needs to be put in to bring it up to date, and also fix numerous style issues to satisfy Rubocop. Not sure if/when I’ll be able to do that; if anyone’s up to the task please feel free to fork and continue the work, or redo from scratch if you can do a better OAuth implementation.

      1. 6

        I got most of the OAuth work merged into the ActivityPub branch.

        1. 3

          Where is the ActivityPub branch? I don’t see it mentioned in the issue for ActivityPub.

          1. 3

            Currently living on my github account / laptop.

      2. 3

        I downloaded the signed APK and unpacked it so I could look at file sizes: Here are the highlights:

        • lib/armeabi-v7a/libflutter.so (6.2M)
        • assets/isolate_snapshot_instr (4.2M)
        • assets/isolate_snapshot_data (3.1M)
        • classes.dex (2.2M)
        • assets/flutter_shared/icudtl.dat (1.2M)

        When an Android app is written entirely in a JVM language, the whole thing can be optimized through ProGuard. But whole-program optimization is much harder, if it’s even possible, when there are three runtimes in the mix (Dalvik/ART, Dart, and C++), as there are here.

        For complex line-of-business apps, it’s probably worth it. But it saddens me to think that every little consumer app (e.g. the app for the musical Hamilton, one of Flutter’s showcase apps), that should probably be a website in the first place, could carry around its own copy of a heavy runtime like this.

        1. 2

          the binary is somewhat large (due to flutter needing to have its entire library in there)

          I briefly looked into using Scala for Android apps a while back and I remember there were a number of people who talked about tree shaking plugins in their build process (build tools that would check to see what functions are actually used and remove all the other unhandled paths). I never actually went down this path, so I’m not sure if/how well they worked, but maybe there’s something similar for flutter/dart to get file sizes under control?

          1. 2

            I personally don’t think it matters that much. The Android app is about 8MB, whereas an equivalent app in Java is about 1-2MB. I have another app I wrote in flutter that is significantly more complex, and it’s also 8MB.

            iOS is another story. The ipa I just built is 40MB for seemingly no reason, and I have no idea why.

            1. 1

              Oh that’s not bad at all. That’s actually pretty good considering all the 30~60MB Android apps I’ve seen for the simplest services.

              Hope you can figure out what’s up with that iOS build.

              1. 1

                Are you sure you were in release mode? I’ve made that mistake before.

                1. 1

                  I did a flutter build ios - which I would assume is the same as flutter build apk, but for ios. I think it’s release mode, because it doesn’t show the DEBUG banner in the top right. The large file sizes aren’t just me though, it’s a problem with iOS as a whole, exacerbated by the fact that I also have to load the Flutter library.

            2. 1

              I’m a big flutter fan, how did you find it?

              1. 1

                I wrote an article about this. It’s hands-down the easiest framework I’ve ever used, even moreso than the native development frameworks (Kotlin + Android SDK/Swift + iOS SDK).

              1. 8

                I saw SAT solvers as academically interesting but didn’t think that they have many practical uses outside of other academic applications. … I have to say that modern SAT solvers are fast, neat and criminally underused by the industry.

                Echoing a good comment on reddit: The author didn’t list any practical applications!!! How can you then say they are criminally underused?

                The only one I know of is writing versioned dependency solver for a package manager (in the style of Debian’s apt). However, very few people need to write such code.

                What are some other practical applications? I think they are all quite specialized and don’t come up in day-to-day programming. Happy to be proven wrong.


                EDIT: I googled and I found some interesting use cases, but they’re indeed specialized. Not something I’ve done or seen my coworkers do:

                https://www.quora.com/What-are-the-industrial-applications-of-all-SAT-solvers

                http://www.carstensinz.de/talks/RISC-2005.pdf

                I can think of a certain scheduling algorithm that might have used a SAT solver, but without details I can’t be sure.

                1. 5

                  They see some use in formal methods for model checking. The Alloy Analyzer converts Alloy specs to SAT problems, which is one of the reasons its such a fast solver.

                  There’s also this talk on analyzing floor plans.

                  1. 4

                    A previous submission on SAT/SMT might help you answer that.

                    1. 4

                      I’ve used Z3 to verify that a certain optimized bitvector operation is equivalent to the obvious implementation of the intended calculation.

                      Just typed up the two variants as functions in the SMT language with the bitvector primitives and asked Z3 for the satisfiability of f(x) != g(x) and rejoiced when it said “unsatisfiable.”

                      1. 1

                        Hm this is interesting. Does this code happen to be open source?

                        1. 7

                          I’ll just post it here. :)

                          (define-sort Word () (_ BitVec 64))
                          (define-fun zero () Word  (_ bv0 64))
                          
                          ;; Signed addition can wrap if the signs of x and y are the same.
                          ;; If both are positive and x + y < x, then overflow happened.
                          ;; If both are negative and x + y > x, then underflow happened.
                          (define-fun
                              add-overflow-basic
                              ((x Word) (y Word)) Bool
                              (or (and (bvslt x zero)
                                       (bvslt y zero)
                                       (bvsgt (bvadd x y) x))
                                  (and (bvsgt x zero)
                                       (bvsgt y zero)
                                       (bvslt (bvadd x y) x))))
                          
                          ;; Here is a clever way to calculate the same truth value,
                          ;; from _Hacker's Delight_, section 2.13.
                          (define-fun
                              add-overflow-clever
                              ((x Word) (y Word)) Bool
                              (bvslt (bvand (bvxor (bvadd x y) x)
                                            (bvxor (bvadd x y) y))
                                     zero))
                          
                          (set-option :pp.bv-literals false)
                          
                          (declare-const x Word)
                          (declare-const y Word)
                          
                          (assert (not (= (add-overflow-basic x y)
                                          (add-overflow-clever x y))))
                          
                          (check-sat)
                          
                          1. 2

                            Here’s you an example of SMT solvers used for stuff like that. I added some more stuff in comments. You might also like some examples of Why3 code which is translated for use with multiple solvers. Why3 is main way people in verification community use solvers that I’m aware. WhyML is a nice, intermediate language.

                        2. 3

                          Keiran King and @raph compiled a SAT solver to WebAssembly to use for the “auto-complete” feature of Phil, a tool for making crossword puzzles (source).

                          1. 2

                            I found this library (and its docs) interesting. They go over some practical examples.

                            https://developers.google.com/optimization/cp/

                            1. 1

                              This looks like it’s about linear programming, not SAT solving. They’re related for sure but one reason it would be nice to see some specific examples is to understand where each one is applicable!

                            2. 2

                              I have personally used them when writing code to plan purchases from suppliers for industrial processes and to deal with shipping finished products out using the “best” carrier.

                            1. 2

                              This appears to just emit elixir code which means that any Erlang application wanting to interface with it still needs to have the Elixir application booted.

                              1. 1

                                Yes & no - elixir is “just” another application that is included in the Erlang release (a collection of applications and optionally the runtime), so t’s all BEAM bytecode at the end, and there’s nothing special (at least from my perspective) about that.

                              1. -1

                                Yes.

                                1. 1

                                  Do you think people who don’t enjoy coding have a place in the industry?

                                  1. 5

                                    Yes, assuming you don’t outright loathe it. How long have you been a professional software engineer?

                                    1. 1

                                      Going on five years. My ability to tolerate it varies on the work environment tbh.

                                  1. 1

                                    It appears they have a C version too? Is this going to get added to Core Foundation?

                                    1. 23

                                      This is a bit disappointing. It feels a bit like we are walking into the situation OpenGL was built to avoid.

                                      1. 7

                                        To be honest we are already in that situation.

                                        You can’t really use GL on mac, it’s been stuck at D3D10 feature level for years and runs 2-3x slower than the same code under Linux on the same hardware.

                                        It always seemed like a weird decision from Apple to have terrible GL support, like if I was going to write a second render backend I’d probably pick DX over Metal.

                                        1. 6

                                          I remain convinced that nobody really uses a Mac on macOS for anything serious.

                                          And why pick DX over Metal when you can pick Vulkan over Metal?

                                          1. 3

                                            Virtually no gaming or VR is done on a mac. I assume the only devs to use Metal would be making video editors.

                                            1. 1

                                              This is a bit pedantic, but I play a lot of games on mac (mainly indie stuff built in Unity, since the “porting” is relatively easy), and several coworkers are also mac-only (or mac + console).

                                              Granted, none of us are very interested in the AAA stuff, except a couple of games. But there’s definitely a (granted, small) market for this stuff. Luckily stuff like Unity means that even if the game only sells like 1k copies it’ll still be a good amount of money for “provide one extra binary from the engine exporter.”

                                              The biggest issue is that Mac hardware isn’t shipping with anything powerful enough to run most games properly, even when you’re willing to spend a huge amount of money. So games like Hitman got ported but you can only run it on the most expensive MBPs or iMac Pros. Meanwhile you have sub-$1k windows laptops which can run the game (albeit not super well)

                                            2. 2

                                              I think Vulkan might have not been ready when Metal was first skecthed out – and Apple does not usually like to compromise on technology ;)

                                              1. 2

                                                My recollection is that Metal appeared first (about June 2014), Mantle shipped shortly after (by a coupe months?), DX12 shows up mid-2015 and then Vulkan shows up in February 2016.

                                                I get a vague impression that Mantle never made tremendous headway (because who wants to rewrite their renderer for a super fast graphics API that only works on the less popular GPU?) and DX12 seems to have made surprisingly little (because targeting an API that doesn’t work on Win7 probably doesn’t seem like a great investment right now, I guess? Current Steam survey shows Win10 at ~56% and Win7+8 at about 40% market share among people playing videogames.)

                                                1. 2

                                                  Mantle got heavily retooled into Vulkan, IIRC.

                                                  1. 1

                                                    And there was much rejoicing. ♥

                                        1. 4

                                          This was discussed a few times on IRC. I’ve started on the pieces of this locally to try and replicate what we do with the mailing list mode.

                                          1. 3

                                            I’m going to end up spending a large amount of my time this week dealing with the aftermath of trying to switch phone carriers. My old device doesn’t work on their network so I need to go buy a new one and return the rose gold loaner phone. Once all of that is taken care of, I’m going to work on getting my mastadoon integration branch rebased on top of the rubocop work that pushcx merged in.

                                            1. 10

                                              I’m a heavy user of the Slack IRC gateway. I have been expecting this news but am gravely disappointed by it. I use Slack to stay in touch with largely non-technical folk that don’t find the IRC experience worth their time. I would like to stay in touch with these folk. Just as they’re not willing or able to use IRC, I can’t and won’t use the Slack interface. I need chat to work like IRC or it doesn’t work for me.

                                              What are my options? I’d be happy to sign a contract and fix whatever technical issue Slack thinks it has with it’s IRC gateway. I’d be happy to discover or fix any plugin for ZNC or bitlbee that would let me continue to chat. What would it take to make my IRC client participate on Slack servers?

                                              oops: I submitted the same story without realizing it had just been posted.

                                              1. 5

                                                Do any of you using IRCCloud have experience with the Slack integration in that product? I work with one group that picked Slack as their communication platform, with IRCCloud being the second choice.

                                                1. 5

                                                  IRCCloud’s slack integration is great. While there are some issues they are working out the developers have been nothing but responsive and helpful.

                                                  1. 5
                                                  2. 4

                                                    The bitlbee dev team cited the existence of the official IRC gateway as rationale for refusing to support Slack. Perhaps they will change their mind now?

                                                    1. 3

                                                      #bitlbee on OFTC is chittering about it just this moment. I wouldn’t describe it as particularly focused, as discussions go, but there is apparently a Slack module for libpurple.

                                                    2. 2

                                                      What are my options?

                                                      Would moving away from Slack work for you?

                                                      1. 2

                                                        I’m on a number of Slack instances, and the answer is particular to each one. Two of them were formerly Facebook Messenger groups. I helped with the technology selection for one (where we eventually picked Slack) and on the success of that migration shared my experience with the other group (where we eventually picked Slack).

                                                        These two groups don’t particularly need Slack, the product, but are served using a communication tool like Slack. Slack was and is a plausible replacement for Facebook Messenger. Another tool would also have to be.

                                                        1. 2

                                                          What about irccloud? https://www.irccloud.com/

                                                          1. 1

                                                            Have you used IRCCloud? It’s a potential option for me for Slack servers I connect to, but not an option for some IRC servers–I’m not willing for some of my traffic to leave my network without e2e.

                                                    1. 4

                                                      This reads like an ad for an Ably service.

                                                      1. 14

                                                        So who wants to adopt the lobster for lobste.rs?

                                                        1. 6

                                                          why not zoidberg?

                                                          1. 5

                                                            I’m up for donating to a pool for this.

                                                            1. 4

                                                              Agreed with /u/gerikson, I’m up for a donation pool! Who wants to spearhead it?

                                                              1. 15

                                                                I could put together a pool to try to hit the Silver or Gold level. The link would point back to a note on the about page. There would be no reward for donating besides the warm glow of knowing you’ve helped support an organization that is the source of so much error handling in our code.

                                                                Please take this ad-hoc poll by upvoting the single highest amount you’d donate towards this. Enough support and I’ll put something together. (If you made judicious use of your GPU a few years ago and have cryptocurrency to donate, please select the amount of USD you’d convert it into before sending it because I’m game for a fun lark, not a major project.) (Edit: tweeted)

                                                                1. 59

                                                                  10 USD

                                                                  1. 17

                                                                    1 USD

                                                                    1. 9

                                                                      50 USD

                                                                      1. 4

                                                                        100 USD

                                                                        1. 1

                                                                          This is in progress.

                                                                          1. 1

                                                                            500 USD

                                                                      1. 10

                                                                        Whoo!

                                                                        To clarify a interaction: If you visit a story page with unread comments, the unread comments get marked as read and removed from the unread page. You will see the time get highlighted in red.

                                                                        1. 5

                                                                          I find it really depressing, but not surprising, that Erlang isn’t getting support but Elixir is. While it is more work to write a library which works for both languages, its upsetting that a company as large as Google chooses not to take the time and effort to. I really hope this doesn’t set a precedent going forward for the Elixir community. Every new Elixir library only provides a library for Elixir where as every new Erlang library provides a library for every language which targets the BEAM vm.

                                                                          1. 1

                                                                            I am just glad that BEAM is getting its day out in the sun, so to speak whether it’s via Elixir or Erlang, but honestly, I find Elixir much more approachable as a beginner. Somehow I feel José Valim figured out how to port “Joy of Programming” from Ruby to Elixir

                                                                          1. 2

                                                                            I have been waiting for this for a while. With a solid FFI system, this has (hopefully) has a chance of replacing a lot of reporting systems floating out there in the world.

                                                                              1. 1

                                                                                Zoidberg is the best :) “By the way, I took the liberty of fertilizing your caviar.”

                                                                              1. 17

                                                                                I would love to see something like this for “Serverless” and lambda-style architecture. I believe these are hyped but have some serious downsides.

                                                                                1. 3

                                                                                  I’ve found the criticisms levied at the Actor Model model apply to the serverless architecture. AWS / Google’s offerings link their existing services together to feed a mailbox that your function gets invoked by.

                                                                                  1. 1

                                                                                    ….why does that website not display without javascript enabled? it makes no sense to me…

                                                                                    1. 1

                                                                                      Its been converted to a single page app.

                                                                                  2. 1

                                                                                    I was curious myself since I haven’t looked at it in a while. It was kind of hard to get results since searching for its issues actually brought up more pro-serverless articles than anti-serverless. My brief Googling found a Not Ready for Primetime article in February 2016, these issues in June 2016, a Challenges of Serverless article in March 2017, a few drawbacks in May 2017, and a Quora answer with a few more gripes.

                                                                                  1. 3

                                                                                    Thanks for running this u/elbrujohalcon. It was a super fun two days!

                                                                                    1. 1

                                                                                      Thank you for participating :)

                                                                                      1. 2

                                                                                        Thanks again for throwing it. :)

                                                                                    1. 4

                                                                                      If you just want to connect to a running instance, I have one hosted at minecraft.burnwillows.net.