1. 6

    The fact that Guix is written in Scheme is a big appeal for me as opposed to Nix’s custom language. I preferred Nix as a way to support a standard environment (it has more packages), but this new feature makes the distribution of fat binaries a lot simpler than the other solutions. Less is more!

    1. 1

      FWIW, I tried to dissuade Gentoo from using Bash and Nix from creating their own language, both at basically around the 0.0.1 timeframe. I guess I am not terribly persuasive. Guix and Nix should merge. The separation is kinda ridiculous.

      1. 3

        Guix and Nix should merge.

        Seems like a great idea until you consider Guix’s commitment to freedom, and as a result blobless experience. Unless NixOS adopted that stance as well, the philosophical incompatibility would doom it. Nix adopting guile is more likely, I’d say, especially since guile did have a lua like front end that might make it a bit easier to slowly migrate everything…

        1. 2

          It is similar to vegetarian and non-vegetarian, one can have a blobless, freedom filled diet and then occasionally should they choose, sprinkle some bin01bits on top.

          1. 1

            I upvoted, but as a vegan, I kind of take offense to vegetarians (in a half hearted way, of course), who only “half” commit. But, I recognize that not everyone does it for the animals (even vegans).

            But, why would you go out of your way to run a completely free system, only to sprinkle some blobbits on it? That completely invalidates the point! That blob, is where the nasty things that disrespect your freedoms are.

            1. 1

              you wouldn’t run it for the freeness, but supposedly guix has some other strengths as well

          2. 1

            I didn’t realize Guix forbade blobs (though I’m not surprised, given its origin). Is there a with-blob version of Guix? I didn’t see one, but that doesn’t necessarily mean no…

            1. 1

              Obviously, you can acquire and install the blobs yourself, and I’m sure there are blog posts around in support of that. But, yeah, it’s like Trisquel, gNewsense, and the others that have similar governance for totally-libre.

              1. 1

                I haven’t used it in a long time, but I thought that you could point Guix at the package store from Nix, similar to how you can point Debian at apt repos from other sources. You would have to be really careful with this; I remember early on getting burned because I asked Nix to install Firefox and it gave me Firefox-with-adobe-flash which was pretty gross.

            2. 3

              Ha! Well, there must be an alternate universe where you managed to convince them ;) I think they do borrow some ideas and even some code (I remember a FOSDEM talk from Ludovic last year mentioning that). Implementation wise, I would suspect Guix has the upper hand, but the restriction to GNU packages is problematic not you need specific packages.

          1. -1

            Funny, this has a name, Point Free Style

            1. 4

              This is not really the same thing. Here we’re talking about folks extracting local variables into methods unnecessarily.

              1. 1

                Pointless Free Style

            1. 4

              I have been working on a blog post about this topic. The compiler in Warren’s “Logic programming and compiler writing” is about 200 lines IIRC. I think it could be interesting to do more in this vein.

              1. 4

                EDIT: Oops, I think you misunderstood the challenge like a lot of other people in this thread. It’s not about a compiler that’s 100 lines. It’s about reading a 100 line function that shows the structure of an 8,000 line (or 80K line, or 800K line) compiler.

                If you click through to the post I think that’s clear, although I can understand why the title was confusing.

                You can barely write a tokenizer for Python, JavaScript, or C in 100 lines. The “production” tokenizers are 500-2000 lines by themselves.

                100-line compilers are interesting from a pedagogical standpoint, but they don’t pass the test of “Somebody who doesn’t care about compilers built something useful with this.”


                OK awesome, I’m looking forward to it! I wanted to do a blog post about it too, but I likely won’t have time before my trip this summer [1]. To do a good job I would want to look at more existing compilers. I want to hear someone else’s take and see more examples.

                Part of the theme of my blog is “theory vs practice”, and in theory everyone thinks of their compiler as a series of transformations, and that’s how you draw it on the blackboard.

                But in practice, you rarely see the source code reflect this!

                The structure that this compiler had was almost unbelievable until I refactored it. Multiple inheritance was used instead of if statements!!! There were objects that you had to call methods on in a certain order, with hidden state, rather than the state being explicit on the stack.

                [1] http://www.oilshell.org/blog/2018/03/25.html

                1. 2

                  ? I am confused. Are you talking about a 100 line top level function of a compiler ? So you are looking for a sufficiently compact yet expressive piece of compiler poetry.

                  1. 2

                    100-line compilers are interesting from a pedagogical standpoint, but they don’t pass the test of “Somebody who doesn’t care about compilers built something useful with this.”

                    Fennel’s compiler is exactly 100 lines, and I’d argue it’s genuinely useful: https://github.com/bakpakin/Fennel/blob/master/fennel.lua#L600

                    It doesn’t do as much as most compilers, but that’s kind of the point. It does exactly one thing (bring a new more flexible syntax to an existing runtime without any new semantics) but it does it very well.

                    1. 1

                      A lot of people are interpreting this question as 100 lines TOTAL, which is what I was referring to. Fennel apears to be more than that.

                      But this structure is not what I’m looking for. I’m looking for the stages of the compiler all in one function – see my example. This compile1() function looks like a single stage that takes the AST as input.

                      1. 1

                        This compile1() function looks like a single stage that takes the AST as input.

                        In a lisp, the reader is exposed as its own independent first-class feature and isn’t considered part of the compiler. Many lisps have another representation between what the reader returns and the fully-annotated AST used by the compiler, but Fennel doesn’t.

                1. 3

                  IPV6

                      2606:4700:4700::1111
                      2606:4700:4700::1001
                  
                  1. 1

                    Just a note if anyone finds this later, I’ve been unable to find PDFs for the books listed. The books themselves are excellent, and well worth ones time if you’re interested in that sort of thing.

                    1. 1

                      Correct, the books are .tgz of html, but they are still self contained, downloadable books.

                      lf.tgz
                      plf.tgz
                      vfa.tgz
                      
                      1. 1

                        Absolutely, I just got excited, thought I’d be able to print them out after all. Thanks for posting the link.

                      1. 2

                        Two (free) books on beginning category theory mentioned in the question and answer period

                        1. 2

                          This is an ideal problem for Prolog.

                          1. 5

                            Running your browser as a different user is an interesting challenge. Under normal circumstances I want to save my bank statement PDFs in my home directory. I want to upload my burrito pictures to Twitter. Slicing this off to a separate user is a significant usability setback.

                            1. 2

                              It does seem like a silly way to approximate better ideas in privilege separation.

                              1. 2

                                Better ideas like those already implemented in Chrome, which usually uses all means of sandboxing a platform can provide? (including the sec comp sys call filtering on Linux)

                                1. 1

                                  Running as a non-unique unprivileged user means that user can potentially access much more than was intended. If nobody is running both your web and database servers. A compromise in either is a compromise in both.

                                  1. 1

                                    I think my issue with the OP is more the underlying semantics of the Unix model. A “user” is too heavyweight and coarse an abstraction for handling privilege separation, and carries along with it too much historical baggage. But nobody is doing capabilities, which are IMO the correct mechanism. One muddles along, I suppose.

                                    1. 1

                                      Creating a unique UID for an operation could be a very clean separation of privs. How is a different UID to heavy weight? The coarseness is point, it is an unequivocal separation between the main account and the account of the untrusted process.

                                      Mount a FUSE interposer in the sandbox and all kinds of FS behaviors could be proxied through.

                                      1. 1

                                        Unix users carry a lot of implicit assumptions about privilege with them. Have you ever tried to do complex access control with UID/GID permissions? It’s a nightmare.

                                        In a world where the default model of computation involves a large number of actual humans proxied through Unix users logging into an 11/750 or a Sparcstation 20, maybe the Unix user model holds. In a world where 99.9999% of computers are single-user at all times, it’s way too heavy and ill-fitting an abstraction.

                              1. 2

                                Anyone able to speak to pony versus erlang/otp?

                                1. 16

                                  Erlang. Rock solid. Mature as hell. Pony. New Kid on the Block. Immature as hell.

                                  Pony draws a lot of inspiration from Erlang and has drawn interest from Erlang fans. Pony has a lot better performance than Erlang. It’s designed for correctness and speed.

                                  Erlang has OTP and has taken care of a ton issues over the years. Pony has a very small standard lib, its saving grace on the library front is excellent C FFI.

                                  Pony has a great type system that helps you write safe concurrent code. People like to compare it to Rust at times because of that.

                                  Erlang has both concurrent and distributed version. Pony only has concurrent at the moment although plans are in the works for distributed Pony.

                                  Tons of people are running Erlang in production. Pony not so much.

                                  If you have particular questions, I’d suggest dropping by #ponylang on Freenode or checking out the mailing list.

                                  1. 2

                                    Could you compare Pony vs Alice ?

                                    1. 4

                                      I like Alice ML. I maintain a github repository to keep Alice ML building. Pony is entirely asynchronous. There are no blocking operations. Some features of Alice ML that Pony doesn’t have or is different from:

                                      • Blocking operations - via futures and promises. So spawning an operation in a thread in Alice ML returns a future containing the value returned by the operation. If the operation has not yet finished in the thread then any other thread attempting to use that value will block until it is available. Code tends to look quite imperative and easy to follow. There’s no need to break up async operations into requests and replies or use callbacks.
                                      • Constraint programming built in.
                                      • Optional lazy evaluation.
                                      • The ability to serialize and deserialize language constructs. You can serialize entire modules, containing functions, and deserialize them on other machines and architectures. The component system of Alice is based on this.
                                      • Distributed functionality.

                                      Some things that Alice lacks compared to Pony:

                                      • Pony compiles to native code via LLVM. Alice uses a bytecode interpreter with a JIT based on GNU Lightning.
                                      • Pony’s garbage collection system is more advanced with per actor heaps and the ability to GC actors that cannot receive messages anymore. Alice uses a simple stop the world mark and sweep IIRC.
                                      • Pony has an easy to use FFI allowing calling C code and having C code call Pony code with in-language declarations. Alice requires interacting with the Seam VM in C++ and implementing wrappers. These are compiled to shared libraries that can then be loaded from Alice.
                                      • Pony is multicore - actor behaviours are run on available cores and uses a work stealing scheduler (I believe). Alice is single threaded with multiple green threads run within a scheduler in that single thread. The Seam VM is not multicore.
                                      • Pony has the capability system and the ability to have compile time prevention of deadlocks. You can see some examples on the Alice ML mailing list of implementations of channels and other things where subtle data races and deadlocks occur if they are not well thought out - even when using Alice ML features.

                                      I would really like to see an Alice ML VM written in Pony that uses Pony to take advantage of it’s efficient runtime. That would make for an interesting project.

                                      1. 1

                                        I’m not familiar with Alice

                                        1. 2

                                          Pony looks amazing. Do you think a transpiler from Erlang to Pony would be possible? Implement the Erlang runtime in Pony?

                                          1. 6

                                            This is a really interesting question! (Full disclosure: I’m the Pony language designer, so I have a bias).

                                            Erlang uses immutable data types, and Pony can express those. Erlang has actors, and Pony can express those. Erlang is dynamically typed, but Pony is statically typed. However, using Hindley-Milner unification, it would be possible to generate Pony interfaces (i.e. structural types) that expressed the implicit dynamic typing constraints in an Erlang program. So far, so good.

                                            However, there’s a core semantic difference, which is that Erlang allows a blocking receive that pattern matches on the queue. In contrast, in Pony, all actor behaviours are strictly asynchronous. This would make an Erlang to Pony transcoder tricky - not impossible, just tricky.

                                            Implementing an Erlang runtime in Pony would be similarly tricky, but implementing an Erlang runtime using the Pony runtime (which is available as a C library) would be “relatively easy”, where “relatively easy” means quite hard indeed, but with straightforward semantics.

                                            I think the core places where the Pony runtime would be useful to Erlang are in garbage collection of both data structures and actors themselves (unlike Erlang, which requires manually terminating actors, in Pony actors themselves are GC’d with a protocol that allows the runtime to cheaply determine when an actor has no pending messages and can never receive messages in the future) and in code execution (BEAM, while a very impressive VM, doesn’t excel at computational speed, whereas Pony is, surprisingly, a bit faster than C, due mostly to LLVM’s lovely fastcall calling convention, which allows for really good cross-procedure register colouring, plus Pony has aliasing information that’s more useful for optimisations than that available to C).

                                            However, Erlang has things Pony doesn’t have (yet). Particularly for distributed computing (although that’s in the pipeline for Pony).

                                            tl;dr: Pony has been heavily influenced by Erlang (along with other awesome languages, like OCaml, F#, E, AmbientTalk, Smalltalk/Newspeak, and many others), but they aren’t semantically equivalent.

                                      2. 1

                                        Thanks for the overview.

                                        1. 3

                                          There’s more insight into where Pony is trying to go at: https://github.com/CausalityLtd/ponyc/wiki/Philosophy That pages covers general principles and a hierarchy of concerns for the language.

                                          I’m happy to discuss more if you want.

                                          sean@monkeysnatchbanana.com

                                      3. 4

                                        By no means an expert, but the short version is that pony has the potential to be radically faster than erlang; has a relatively tiny/nonexistent library set; and is currently for the adventurous.

                                        1. 2

                                          I bet @seantallen could give you a great overview.

                                          1. 1

                                            I probably could ;)

                                        1. 1

                                          The BRASS project http://www.darpa.mil/program/building-resource-adaptive-software-systems is another interesting one (not linked from the above page).

                                          1. 3

                                            He seems like an interesting designer, as well. If anyone in Chicago would like to try out Pandante, let me know and I’ll get a game together.

                                            1. 2

                                              I bounced off Sirlin’s Pandante (not open ended like Texas Hold'Em) and Puzzle Strike (not sure what happened, just never felt like we had the game in gear), but his Flash Duel and Yomi are two of my desert island games. I’ve played hundreds of games of each and I feel like I’m just getting started.

                                              1. 1

                                                Just moved from Chicago to Seattle. Otherwise I would love to! By the way, you know anyone wanting to rent a house near the fox river?

                                                1. 3

                                                  Just moved from Seattle to Chicago! Enjoy.

                                                  edit: Hey! How is my comment off topic and not mempko’s ? Must be a passive aggressive Seattle downvoter.

                                                  1. 3

                                                    I upvoted you to cancel-out whoever’s downvote. Welcome to Chicago. PM me if you’re looking for tech meetups or anything else.

                                                  2. 2

                                                    What brought you to move to Seattle?

                                                    I was planning to move to Seattle in 2014, but ended up finding a better job market in Chicago, and I’m actually quite happy that I landed here (Chicago). With the large finance sector, there’s a very strong adult (30+) job market and it’s nice to be in a big city.

                                                1. 1

                                                  Haxe seems just as compelling as Kotlin. It has

                                                  • Algebraic Data Types
                                                  • Pattern Matching
                                                  • Array Comprehensions
                                                  • Multiple Backends (Java, C++, JavaScript)
                                                  • Intellij plugin support

                                                  http://haxe.org/documentation/introduction/language-features.html

                                                  1. 7

                                                    To be clear, this is within the scope of a single Dept. of Social Services procurement for a new Child Welfare System.

                                                    1. 2

                                                      This is still huge. Hopefully this will spread to other organizations. Many cul-de-sacs of government are captured by organizations that resell the same low quality custom software. Patient systems, library management, transportation demand management and often the winning bid something like 20% below the actual cost to build.

                                                    1. 15

                                                      This guy seems overly emotionally invested in the internals of MongoDB.

                                                      I find Multicorn and UDFs to be excellent extension mechanisms for PostgreSQL. Whatever gets the job done in the least amount of lines. Have

                                                      1. 18

                                                        A quick reading suggests that his company’s complimentary product to MongoDB is being threatened by Mongo’s cheerful repackaging of Postgres–that may have something to do with it.

                                                        1. 13

                                                          I’m the author, and you’re right, I’m definitely not unbiased!

                                                          I have three main biases that I can see: first, I didn’t like the one-sided partner experience I felt at my day job; second, I was a strong proponent for MongoDB to release an Apache 2-licensed BI connector that leveraged open source work I contribute to (which does 100% in-database analytics); and third, I co-founded an open source company based on the premise that relational analytics aren’t a good fit for NoSQL databases.

                                                          So yeah, I’m definitely biased. I try not to let those biases cloud my judgement, but I’m no vulcan.

                                                          I would have a different opinion of the connector if (a) they had been 100% upfront about the Postgres database and the (severe) limitations of the approach, rather than pounding their chest and omitting the Postgres connection; OR (b) they had released their own connector (even proprietary) that properly dealt with the problem (native support for nested data structures, 100% pushdown, etc.).

                                                          They didn’t do either. Which means I can’t get behind their decision. Others may come to very different conclusions, which is fine by me. Agree to disagree. :)

                                                          1. 2

                                                            Gotcha gotcha, good luck to you sir. :)

                                                            Out of curiosity–what do you mean by 100% pushdown?

                                                            1. 5

                                                              Thanks for that! And sorry for the jargon.

                                                              By 100% pushdown, I mean that every query is translated into operations on the target system that run entirely inside the database. Without pushdown, you end up sucking data out of the database, and relocating it into another system which actually executes the query.

                                                              The whole analytics via PostgreSQL via FDW via Multicorn via MongoDB route ends up pulling ALL the data out of ALL the referenced(s) collections for nearly ANY possible query (!).

                                                              Which only works if the collections are really, really small. :)

                                                              1. 3

                                                                Predicate pushdown is a more common name for the concept, which makes its meaning more obvious. You push predicates down the levels of abstraction closer to the data. Applying predicates reduces result set size, so the sooner you apply them, the less data you have to transfer around to other systems.

                                                                But you can also push down other operations. In addition to what @jdegoes said, this shows up a lot in big data type stuff. For example, MapReduce can be done in strictly Map / Shuffle / Reduce phases, but it’s (almost always) better to run the reduce locally on each map node before shuffling the map results over the network.

                                                        1. 21

                                                          Decoupling Thunderbird development from Firefox development might not be bad for Thunderbird either, if it’s possible to do in any sort of way that doesn’t just result in de-facto killing Thunderbird. The main reason it seems to be so tied in with it is the legacy of Thunderbird having developed out of the old integrated Mozilla suite, which produced all sorts of possibly unnecessary coupling.

                                                          1. 3

                                                            I would assert the coupling resulted in the rise of MIME-encoded email, causing email clients to need to display messages formatted in HTML. Certainly I agree the coupling makes more sense in a pre-gmail world, but the Netscape was trying to create an “office suite”-like set of applications for all internet protocols, not just HTTP.

                                                            1. 6

                                                              I would assert the coupling resulted in the rise of MIME-encoded email, causing email clients to need to display messages formatted in HTML.

                                                              I’m fairly certain that was Outlook.

                                                              1. 3

                                                                That was more RTF-based email, which they tried to hang onto using attachments.

                                                            2. 1

                                                              They should move to being an Electron/NW/etc based application. Or even a web app that happens to be running locally. Over integration killed MS and it could kill Mozilla as well.

                                                            1. 1

                                                              I think the runtime and the language and the OS would need to be merged. The JIT or runtime management system would need to weigh the cost of storing and retrieving the result vs re-running the computation. Computations across all invocations would need to be stored, so there would be some security issues. If you have infinite storage and the program runs infinitely long, it will memoize all possible states. Memoize all the things!

                                                              1. [Comment removed by author]

                                                                1. 11

                                                                  The assumption that people do not come to harm because of tech is precisely the crux of the matter. It is a discipline where sooner or later, your work has the potential to cause harm, and so if you’re not learning about the ethics of what you’re doing from very early on, you can easily do harm.

                                                                  1. 9

                                                                    bridges are stable because no one cares about driving over the latest and greatest bridge.

                                                                    and nobody ever wants stuff added to bridges once they are already built. Nor does the gravity suddenly change because gravity was deprecated and has been replaced by gravity 2.0 which is much better. As a matter of fact, many buildings fail to stay upright when their operating conditions suddenly change (like earthquakes or fires)

                                                                    The problem behind the instability isn’t (just) budget or bad engineers. It’s the constant demand for change either to the solution itself or to the foundation required by the solution.

                                                                    1. 5

                                                                      I think that the title can and should work for different types of software developers, and that it should require a PE-style certification. Software Engineers should be the people designing and implementing software that runs cars, elevators, healthcare systems or really any shit that can kill people. These people can’t move fast and break things. They can’t ship bugs. That kind of development should absolutely require the rigor that a PE is supposed to guarantee.

                                                                      Other software developers, like the ones that make up many companies in the Valley don’t need to meet such requirements. People’s lives (thankfully) don’t depend on any code that I, or most others in SV, write. That’s fine. There shouldn’t be any shame in not being a software engineer, and SV companies shouldn’t require a PE to do work for them.

                                                                      Both titles can exist, but they should absolutely imply different qualifications. Ideally, the term engineer should become less ambiguous than we’ve made it.

                                                                      1. 6

                                                                        I looked around, but can’t find the position paper the ACM published about fifteen years ago, explicitly refusing to participate in creating a certification process for software engineers. It had some very strong words about how no such certification would be able to guarantee or even measure the things that certifications do in other engineering fields. Given that it would be a liability-shunting fiasco that made everything worse by creating a false sense of safety, they felt they shouldn’t be involved.

                                                                        I notice that they have a professional code of ethics, today, but that’s it.

                                                                        1. 1

                                                                          I’d love to read that.

                                                                            1. 8

                                                                              As background, this article is largely the ACM side of a 1999 disagreement between IEEE and ACM over Texas’s move to create a category of licensed software engineers.

                                                                              In 1997, the IEEE and ACM had formed a joint working group to better define the body of knowledge making up the field “software engineering”, with the main agreed goals of improving standards in the field, providing guidance to educators, and better establishing software engineering as its own discipline, rather than just a fuzzily defined variant of “computer science”. SWEBOK (SoftWare Engineering Body Of Knowledge) is the acronym for that effort, and both groups initially thought it was a good idea. Where they diverged was over the political question in 1999, when that Texas move unexpectedly arose: IEEE supported engaging with Texas’s process and thought the SWEBOK effort could be used to positively influence it, avoiding a negative outcome of Texas making up its own standards, while ACM was strongly opposed to professional licensing, and pulled out of the SWEBOK effort entirely out of fear that it might be used that way, both in Texas and elsewhere.

                                                                              IEEE went on to approve and publish the document in 2004. The ACM and IEEE also somewhat reconciled over part of the original agenda, and formed a different group in 2001 to develop a set of guidelines specifically for software-engineering curricula, the “Curriculum Guidelines for Undergraduate Degree Programs in Software Engineering”, which were also released in 2004. That side of the agenda has been fairly successful: there are now a lot of software-engineering degree programs, distinct from computer-science programs.

                                                                              1. 2

                                                                                Saw that last night…it’s rather telling that you can’t simply just download the damned thing.

                                                                                1. 1

                                                                                  Thanks. I was young enough at the time that that background went over my head; it’s nice to close the loop on it.

                                                                        2. 3

                                                                          Side note: Fortran and Ada are fine languages for their domains. In fact, had Twitter used Ada instead of Ruby we wouldn’t have seen the fail whale. It is a fallacy that new is better or that old is worse.

                                                                          1. 3

                                                                            I’ll respond the same way I did when this was just a blog post: without a definition of boring, this is useless. I find Redis indispensable. I understand it, I like it, and its advantages over the unstructured pile of data that is memcached mean that I will choose it for any project I work on in the future. I despise MySQL and have worked for weeks trying to fix performance issues and plain old badness (and trying to sell those fixes to people who didn’t understand what was happening…) that would not have been issues in a capable database (PostgreSQL).

                                                                            When does a technology become “not boring?” I mean, Scala is in use at many large companies. It runs on the JVM, which is the definition of boring, right? Why is it not boring? Haskell has been around longer than Python, Ruby, or PHP. Common Lisp has been around even longer (almost as long as C++)! Speaking of which, why aren’t we just using C++? Java wasn’t boring in 1998, but people certainly started using it instead. Or, you know… COBOL! Good, boring history there. If we didn’t spend our innovation tokens on writing Ruby instead of COBOL, maybe we could make better software.

                                                                            1. 1

                                                                              I think boring is relative to the team using it. I wanted to use a KV store on a project, and it would have worked wonders, but it would have been too much for the dev and ops teams. It was not the appropriate technology for that group. In this case technology can be very generic, if you are on a team where everyone is versed in compiling and parsing, it might make sense to make a small high performance DSL to solve a particular problem. Others might just use PCRE+JIT and others might just generate some PHP with Python and send it into HHVM. It all depends on how the group can adapt to using a new technology.

                                                                              1. 2

                                                                                That’s fair, but the post mentions the burden of maintenance when the people from the current team have “moved on;” that implies a certain level of lowest common denominator programming, which I think has generally had a bad effect on our industry.