Synthetic biology weaponized virus, 0day exploit infects your brain? - <AUTHOR> http://blogs.computerworld.com/19409/dna_hackers_synthetic_biology_weaponized_virus_0day_exploit_to_infect_your_brain

<comment><USER2> There are certainly dangers associated with synthetic biology and the spread of low-cost at-home biology tools, but this is a ridiculous fluff piece devoid of any real scientific content. Even if a low-cost "DNA printer" could be used by individuals to simply synthesize a protein (it doesn't work like that, by the way), the idea that you'd proceed to download an unknown sequence off the internet, express it, and eat it is ridiculous.

I'm not sure what a "weaponized virus" means in this regard. "Reformatting your brain"? "Booting DNA" maliciously in a specific person? We're probably going to see whole new worlds of possibilities involving bioterrorism in the next hundred years, but this article is singularitard nonsense.

<comment><USER3> > the idea that you'd proceed to download an unknown sequence off the > internet, express it, and eat it is ridiculous.

While I find it just as ridiculous as you do, I am also looking in disbelief as people trust for-profit corporations with everything from their complete financial data (Mint), correspondence (Gmail) social life (Facebook) -- and furthermore, often publicly give enough info through e.g. Facebook to every burglar so that they know when it is a good time to come burgle.

So we might both wake up in ten years to people downloading sequences off the net, printing and eating them.

</comment></comment><comment><USER4> This idea is almost identical to the ideas in Life Artificial: <http://lifeartificial.com/></comment>


Fear of a College-Educated Barista - <AUTHOR> http://www.theatlantic.com/business/archive/2016/09/fear-of-a-college-educated-barista/500792/?single_page=true <comment><USER2> The article discusses some great points. I think one of the big issues effecting college grad underemployement is also that there not as many people going into technical schools. Those are careers which are almost always in demand much like the STEM fields the article discusses but there is somewhat of a stigma about going for technical things vs. liberal arts or the full on STEM areas.</comment>


HP Reveals Envy X360 15 Laptops with AMD's Latest Ryzen APUs - <AUTHOR> https://www.anandtech.com/show/14103/hp-reveals-envy-x360-15-laptops-with-amd-ryzen-mobile-3000series-apus <comment><USER3> Just anecdotal; I bought the previous gen x360 because reviews said it had good battery life. I find it a terrible machine; I get maybe 2 hours of battery out of it since I bought it; I went back many times and they say it is my usage (Chrome and Visual Studio) but other laptops do not have the same troubles. Also, it seems to have incredibly inefficient standby battery usage; again HP says it is normal 'for my usage'. I would never buy again.

<comment><USER4> Which year? I bought mine in 2017 and can honestly say it's the best laptop I've ever owned (though to be fair, it's almost always plugged in - <USER2> life started around 7 hours, and is now around 5)

</comment></comment><comment><USER5> 8GB RAM soldered on board. It's like 2009 again.

</comment><comment><USER6> these look surprisingly sweet, especially the black colorway.

id like a 13in model as depicted in the article, and id like a bigger battery though as ryzen stock doesnt exactly sip battery

wonder what international availability is like</comment>


Pluto.jl – a reactive, lightweight, simple notebook - <AUTHOR> https://github.com/fonsp/Pluto.jl <comment><USER2> I've switched from Jupyter to Pluto recently. Here's a few experiences with it.

* The fact that I can actually use the source files later because they're just Julia files is incredibly useful. I often copy-paste from them into actual REPL-code, and sometimes I just polish the notebook until its source becomes usable as a command-line tool.

* I like the reactive notebook concept. It does really help with bugs

* Pluto is still rough around the edges. Too few keyboard shortcuts. Buttons and text are tiny, afloat in an ocean of useless whitespace. pushing to LOAD_PATH doesn't work properly. Pluto is a very young project and just now gaining attention in the Julia community, so I'm confident these usability issues will improve.

<comment><USER3> The inability to simply import jupyter notebooks as python files has always been a point of friction for me, I'm glad to see this is a main feature for Pluto.

<comment><USER4> I'm not sure if Python has something like this, but in julia we have [https://github.com/stevengj/NBInclude.jl](https://github.com/stevengj/NBInclude.jl) which allows us to import jupyter notebooks like regular files.

<comment><USER5> I did not know about this. Nice. Thanks!

</comment></comment></comment></comment><comment><USER6> Really happy to see that the good ideas from Observable notebooks are being copied elsewhere. I don't use Julia myself at the moment (although I think it's a beautiful language), but I know some people who will be very happy with this! Also, the playful enthusiasm in the presentation video linked in the description just makes me smile:

[https://www.youtube.com/watch?v=IAF8DjrQSSk](https://www.youtube.com/watch?v=IAF8DjrQSSk)

<comment><USER7> Very interesting, thanks.

I don't understand the point of the "reactive" cell order, instead of conventionally doing top to bottom. It seems like it goes against the idea of "the program state being completely described by the code you see".

<comment><USER6> So in the context of these notebooks it is actually quite useful to not depend on cell order, because the idea is that notebooks aren't simply programs or scripts, they are (potentially interactive) _documents_. You can write an article that presents the results of your script, with cells that contain text, interactive widgets and plots at the top, and put the code and data that generates these plots in "appendix" cells below that. Observable, a "JavaScript ancestor" of Pluto.js, has plenty examples of these:

[https://observablehq.com](https://observablehq.com)

Also, I guess that you haven't used notebook environments like Jupyter before, so a bit of historical context might help. In Jupyter, cells _aren 't_ necessarily executed top-to-bottom, they are executed when the user asks it too. The result is then stored in the global state (well, assuming there is a global variable that the data is assigned to). This means that cells that depend on other cells _also_ depend on the order in which those cells were executed. Worse still, if you write your notebook in a sloppy manner, you can end up with a state that you cannot reproduce from the still-remaining code (for example, you can have variables A and B, B is generated from the result of A, then you remove A. Because Jupyter is not reactive this does not update B, so your notebook keeps working just fine... until you decide to edit B). So previously, notebook-like environments made it really easy to introduce bugs like this.

With reactive cells you don't have to think of state. It's kind of like pure functional programming: it removes global side-effects. And note how on a technical level, making cells execute top-to-bottom is really just very a simple way to enforce that cells must executed in order of dependency! So either option insists that this global-state-that-does-not-respect- dependencies is a big problem that should be avoided, they just present different solutions for the problem.

<comment><USER7> Thanks a lot for the write-up.

</comment></comment></comment></comment><comment><USER8> This looks excellent.

In my opinion, these kinds of apps are the future of data science / data analyst work. Forget no-code, just enable these professionals to work in a single programming language that they're familar with and give them visualization superpowers. The Python ecosystem has [https://www.streamlit.io/](https://www.streamlit.io/) and [https://gradio.app/](https://gradio.app/) now. R has [https://shiny.rstudio.com/](https://shiny.rstudio.com/). I think we'll see more.

</comment><comment><USER9> Looks good but I haven't tried it yet.

Julia is a remarkable programming language, and pure Julia projects like this show that it is also good for general purpose development.

I want to try this combined with the Flux DL library.

</comment><comment><USER10> I've been using Pluto for several weeks and I absolutely love it for quickly iterating on plots and making small UIs for interactively showing off results. It's altogether a much better experience than Jupyter for me.

<comment><USER11> wonder if you have tried it on large datasets given ur background.

Does it work well with large-datasets given its reactive nature?

<comment><USER10> Everything is cached unless something upstream changes, so it should work just fine with big datasets. I've only been using relatively small datasets so far, though.

</comment></comment></comment><comment><USER12> Sounds like they fixed a bunch of things that are broken about Jupyter notebooks. I still don't understand why anyone would want to do work in their browser though.

<comment><USER13> would be curious what Jupyter notebooks things are better with Pluto.jl, can you name some concrete points?

<comment><USER14> 1\. Dependency graph for cells, letting it automatically rerun what's needed when you change one. This keeps everything up to date.

2\. git-friendly.

<comment><USER13> I wonder how they are doing it? simply re-evaluating every cell?

<comment><USER15> It's mentioned in the video [1], it does static analysis of the code to create a graph of dependencies (for example which cell uses a variable defined by another cell), so when you update any cell it will find what cells are affected by the change (the downstream nodes on a directed acyclic graph) and only evals the code on them (instead of running everything). Julia is particularly good for those kind of code analysis since it's a very Lispy language.

It also does a trick of creating new modules to manipulate scope to make deleted variables/import/cells invisible (and therefore free to be garbage collected).

[1] [https://youtu.be/IAF8DjrQSSk?t=596](https://youtu.be/IAF8DjrQSSk?t=596)

</comment></comment></comment></comment></comment><comment><USER16> Just tried it. A couple of things.

Why are results displayed above the code cell instead of below it (as in Jupyter/IPython)? Was a bit confusing at first.

I'm noticing it crashes a lot. Get messages like:

       Worker 2 terminated.
       Distributed.ProcessExitedException(2)

Really like the reactive aspect, though.

<comment><USER17> > Why are results displayed above the code cell instead of below it (as in > Jupyter/IPython)? Was a bit confusing at first.

I also strongly agreed with this at first, but after working with it some more I've found it compelling. The key mental model is to think of the code as something akin to a "figure caption."

</comment></comment><comment><USER18> Pluto.jl appears to be a Julia centric notebook alternative to Jupyter and its multi-language Kernels, including IJulia [1]. I imagine there are many trade- offs between the two but the primary one I see is the runtime size/Python- dependencies of Jupyter versus the reach of the platform.

There is also a great deal of overlap between IDEs and Notebook platforms.

[1] [https://github.com/JuliaLang/IJulia.jl](https://github.com/JuliaLang/IJulia.jl)

Edit: "pure Julia" => "Julia centric" based on jakobnissen's comment

<comment><USER2> Not quite. Pluto is also built on JavaScript (of course, since it's a browser notebook).

The main advantages of Pluto is that

* The sources files are executable Julia files with minimal metadata, so it plays nice with Git. Also, the code of the source files is ordered to reflect the execution order of the cells, to keep the source code and the notebook in sync.

* It attempts to remove all global state. If you change a cell, and dependent cells will change as well (similar to Excel). This makes bugs less likely.

<comment><USER18> Git friendly native Julia files and clean cell reordering/refactoring are very nice features. Julia seems like a compelling data science platform, especially for greenfield projects.

</comment></comment></comment><comment><USER19> Seems really smooth. I would like to see how does this scale with larger chunks of codes. Is there any benchmark comparisons?

<comment><USER6> It just runs Julia under the hood, so I would expect it to be simply as fast as Julia (assuming that the data processing is the more significant bottleneck compared to the HTML output that is used to present the results). Performance more likely affected by the _way_ the data is processed than the language's speed.

From what I understand, results of cells are cached though, and they don't update unless something upstream changes, so there is a form of memoization happening. Which of course also has both implications for performance as well as memory usage.

</comment></comment><comment><USER20> The thing that still frustrates me about Pluto is that I have to put a `begin ... end` block in each cell where I want multiple commands to run. It would be nice if it ran more like Jupyter notebooks in this sense, where blocks can be _blocks_ of code and not individual lines.

</comment><comment><USER21> This would be better if there was VS Code integration with their notebook system.

Personally, I will never code in a web browser and don't understand how people can do so with large code bases.

<comment><USER22> Nobody has "a large codebase" in a notebook. They're for explorative programming and visualisations and they're excellent for that. And VS Code is technically a web browser, so...

</comment></comment><comment><USER23> One thing that is pretty great about Pluto.jl, is how responsive the author is (Fons van der Plas, or @fonsp on GitHub). I've been able to get great suggestions from him (as well as the fast growing community of Pluto users) on Zulip discussion group for Julia ([https://julialang.zulipchat.com](https://julialang.zulipchat.com))

</comment><comment><USER24> Imagine now the same but without HTML/CSS/JS - using a native 2D and 3D rendering, with acceleration. That would be blazingly fast.

</comment><comment><USER20> Pluto is hard to do R&D but great if you want to compose a report using existing code.</comment>


Ask HN: How Has Therapy / Counseling Helped You? - <AUTHOR> Therapy doesn't just have to be for individuals facing trauma, or other forms of mental illness or distress. I've heard it can be a useful tool and service for learning how to deal with emotions, dissect problems in life and have a professional to talk to.<p>I'm set to attend my first appointment, and I was hoping to see how therapy / counseling has helped members of HN get through life, and how it has benefited them, be it due to mental health issues or something else. <comment><USER2> I found that it helped me work through how strange and at times counter to my wellbeing hyperrationality is. When I get stressed, I become hyperrational. It makes me well suited to business but poorly suited to connecting with people under stress. Further, I have a real need for stimulation so I seek out difficulty to overcome, which forces me back into this hyperrational state that hurts my relationships in ways that are hard to be aware of without a neutral third-party advising you. In terms of life outcomes, therapy can really reset your trajectory in terms of how you perceive yourself, and make sure the various levels of your identity, stress responses, etc. are working. I never used it when I really needed it, but when I got better I was able to convince myself it is worthwhile, and I do not regret that at all.</comment>


A fun optimization trick from rsync - <AUTHOR> https://blog.plover.com/prog/switch-case-optimization.html <comment><USER2> I don't like it. You should put the logic where the logic should be, so it's clear to see what was intended.

        typedef int (*MethodFunc)();

        void doMethod() {
            static int methodId = 0;

            static const MethodFunc methodFuncs[] = {
        #ifdef METHOD_1_CAN_COMPILE
                method1,
        #endif
                method2,
                ...,
                NULL
            };

            while (methodFuncs[methodId]) {
                int success = (methodFuncs[methodId])();
                if (success)
                    return 0;
                methodId++;
            }

            return -1;
        }

<comment><USER3> If all of the methodFuncs fail, this will attempt to jump to whatever address happens to be in memory after the last element of methodFuncs. You've forgotten to stop iterating.

<comment><USER4> There is a terminating NULL at the end of the array to stop the iteration.

<comment><USER5> oh my... that never went wrong

<comment><USER6> A terminating null element or logical equivalent in an array is helpful in lots of situations. As one example it simplifies the logic of looking for an element in an array and performing some special operation if it was not found. No bool found variable necessary.

<comment><USER5> Well yes, but it can easily be removed by accident, and is easy to oversee. See the parent comment

</comment></comment></comment></comment></comment></comment><comment><USER7> That's not clever, that's language abuse and horrific -- You could do this in so many other ways there is absolutely no point in abusing #includes mid- source-code (without mentioning the code smell around statics.)

Now, as a working curiosity, this is pretty damn cool.

<comment><USER8> Not really its just a static var on a switch statement nothing really bad about it, in fact its a semi nice way to handle a simple state machine.

<comment><USER9> Not _tooo_ uncommon either. It's a "reasonable" way to write generators in C (if you're masochistic Python programmer, I guess.)

Switch on the last return point at the top of the function, and make all variables that need to persist between calls `static`.

(I've written it before, and I swear I didn't invent it... Maybe it's just a short skip from Duff's Device? Still, using it to pick up _before_ the last return instead of after is new trick for me!)

<comment><USER10> Yes, it's basically the idea in Duff's device. Protothreads ([http://dunkels.com/adam/pt/](http://dunkels.com/adam/pt/)) uses a pretty similar trick.

<comment><USER9> Ah, that's exactly the trick I was thinking of. I think I learned it from [1], but I'm pretty sure Protothreads predates that post. Thanks for the link!

1: [https://www.chiark.greenend.org.uk/~sgtatham/coroutines.html](https://www.chiark.greenend.org.uk/~sgtatham/coroutines.html)

</comment></comment></comment></comment></comment><comment><USER11> An interesting trick, but it seems like there would be a simpler way, like having set_the_mtime be a function pointer. Initially it would point to an implementation that figures out which method works and sets the function pointer to point to a particular implementation.

<comment><USER12> Sounds really clever, but also has the potential to be really opaque and confusing. On the other hand, the trick in the article is quite verbose.

Can be tricky balancing terseness with readability.

<comment><USER11> > has the potential to be really opaque and confusing

Yes, but.. compared to switch and preprocessor hacks described in the article? Granted it's subjective but I'd find a function pointer that's assigned to once to be way easier to comprehend.

<comment><USER13> Yeah, I think both methods are somewhat opaque, and the one described here is opaque + hacky. I wouldn't let this through code review.

</comment></comment></comment></comment><comment><USER14> Awesome, that's horrifying.

One concrete issue with this technique: it doesn't "loop". Meaning, for example, if initially method #3 doesn't work but method #4 does, it'll settle on method #4. If later, method #3 starts working, it won't switch it. Worse, if method #4 stops working, it'll just always fail.

I imagine this isn't an issue for rsync's use but could be a concern if applying it more generally.

<comment><USER15> According to the article, a step isn't skipped because it had a transient failure, it's skipped because it returns a special error code ENOSYS that means the syscall hasn't even been implemented, and therefore there's no point in ever trying it again.

<comment><USER13> That's correct. Although it's a very specific use-case.

</comment></comment></comment><comment><USER16> Andrew Tridgell's thesis is also a very interesting read, as rsync has some pretty innovative algorithms that make the file transfer and remote diffing fast:

[https://rsync.samba.org/~tridge/phd_thesis.pdf](https://rsync.samba.org/~tridge/phd_thesis.pdf)

</comment><comment><USER17> Thanks, I hate it. I'm a bit bemused about this bizarro case_N.h trickery. I'm also almost positive __COUNTER__ would be adequate and entirely remove the need for __LINE__ as suggested in the addendum which is likely to be quite large in any non-trivial source unit. I mean, something gcc this way comes I guess...

<comment><USER18> __COUNTER__ is not standardized. Repeated inclusion is.

</comment></comment><comment><USER19> So thread unsafe?

<comment><USER20> Note that if this were C++ (11 or later) this could be done with the static variable in a thread-safe way, since function-scoped static variables initialized by functions are guaranteed to be initialized exactly once. So this code could be something like:

      int set_the_mtime(...) {
        static int starting_from = set_mtime_starting_from(0);
        set_mtime_starting_from(starting_from);
      }
      // Try various ways of setting mtime until it works.
      int set_mtime_starting_from(int starting_from) {
        // horrible switch statement
      }

<comment><USER9> In C++ you could also make an object (per thread?) and use member vars instead of static vars.

Also, if you're going to use static vars in multithreaded contexts doing this, better to write

       thing = 5;

(via that macro magic) than `thing++`. Then at least nothing _too_ bad should happen...

</comment></comment></comment><comment><USER5> So without actually looking into anything. What id you have a directory structure which is built out of 2 mounts. One local fs and one network mounted. Then lets say method 5 works on one, and method 1 works on the other, both are the only ones that work. Then it would basically fail, depending on the order of directories enumerated, eventhough there is a supported method.

<comment><USER21> I haven't looked at the code, but the ENOSYS error is more about the capabilities of the kernel. So when we eventually start swapping entire kernels at runtime then it'll break.

</comment></comment><comment><USER22> Edit: d'oh - I misread, the addendum is doing exactly this...

I don't understand the need for the macro-fu to generate the case values. The use of switch_step++ in each previous case seems to drive that, but couldn't the same be accomplished by setting switch_step to a constant?

      static int switch_step = 0;
      switch(switch_step) { // Falls through between cases
        default:

        #if METHOD_0_AVAILABLE
          switch_step = 0;
        case 0:
          if (method_0_works(...))
            break;
        #endif METHOD_0_AVAILABLE

        #if METHOD_1_AVAILABLE
          switch_step = 1;
        case 1:
        ...
      }

</comment><comment><USER23> So, slightly off topic, but one thing from C that I really miss in other languages is subroutine-local static variables. It always annoys me in Java or C# that you can't really make a static variable that's scoped to a single method or function, you have to scope them to the entire class. It's common enough that a private static variable is only needed in a single method or function, so why not do it the way C does it?

<comment><USER24> In js you can use `this.x` or `this.methodname.x`

</comment></comment><comment><USER25> rsync is an amazing tool, full of delightful secrets.

One thing it _doesn 't_ have natively (unless it's really well hidden) is the ability to look at two directory structures, and generate a delta of the two out to a separate location (say a USB stick).

A very useful feature for backups where you've got good enough (to run an rsync --dry-run) network connectivity, but not good enough to actually do the transfer.

<comment><USER26> can rsync --dry-run and | output to a file?

<comment><USER25> Yup, that's what I ended up doing [1] - but was mildly surprised it wasn't built in, and very surprised that I couldn't find anyone else's solution.

[1] [https://jeddi.org/b/2016/05/28/rsync-from-a-to-b-via- usb/](https://jeddi.org/b/2016/05/28/rsync-from-a-to-b-via-usb/)

</comment></comment></comment><comment><USER27> I'd be interested if someone could show me a FP friendly solution to this problem.

</comment><comment><USER28> Some compilers turn large switches into lookup tables. Using side effects like this however, makes the compiler shy away from this optimisation, and compile it literally. So it's probably not a good idea anymore.

<comment><USER29> I'm not sure switch performance is a relevant concern for setting the last modification time of a file.</comment></comment>


Coolest things people made with LEGOs - <AUTHOR> http://www.ebaycollectors.com/2010/coolest-things-with-lego/

<comment><USER2> Wot no James May's lego house?

[http://www.dailymail.co.uk/news/article-1214729/James-May- si...](http://www.dailymail.co.uk/news/article-1214729/James-May-size-Lego- house-wants.html) (With much regret at having to link to the ( _spit_ ) Daily Mail for description and pics).</comment>


How Facebook is taking over our lives - <AUTHOR> http://money.cnn.com/2009/02/16/technology/hempel_facebook.fortune/

<comment><USER2> "The site pulled in estimated revenues of just $280 million last year, and sources close to the company say it didn't break even."

Lots of good facts in this article. "Early board member Jim Breyer, who put in $1 million of his own money and $12.7 million from an Accel Partners fund, says that profits are 'a secondary consideration in this stage of the growth.' He wants to get a return on his investment, but he's not pushing anything now."

</comment><comment><USER3> Good article.

The last paragraph in the article starts with:

"Facebook has influenced Microsoft in other ways. Its new operating system, OS 7, features a list of interactions, news, and information that happens to look a lot like Facebook's news feed."

I thought Microsoft's new operating system was "Windows 7" not OS 7... ;)</comment>


The Man Who Couldn't Read "California" - <AUTHOR> http://languagelog.ldc.upenn.edu/nll/?p=217

<comment><USER2> I thought that was going to be about Arnold Schwarzenegger but I was wrong.</comment>


Show HN: Ruby on Rails Bootstraping - <AUTHOR> https://github.com/hugodias/railStrap

<comment><USER2> This would be better if it used a template file instead of forking a whole repo.

[http://guides.rubyonrails.org/rails_application_templates.ht...](http://guides.rubyonrails.org/rails_application_templates.html)

The one we use at my work is here: <https://github.com/dockyard/sail_plan>

<comment><USER3> Yes, indeed. The RailsApps project resource has kept up to date with the recent Rails updates, and has many different templates based on testing, DB, etc: <http://railsapps.github.com/>

And like another commenter noted, Rails 3.0.3 is _very_ old. Not sure why that's being used for something new.

<comment><AUTHOR> yes ! i'm already changing all the structure to support rails 3.2.x . Thanks for the tip!

</comment></comment></comment><comment><USER4> Like others have pointed out, you'll probably not get much traction with this project due to the way you've decided to package everything.

One immediate problem I see is that you don't have version set in your Gemfile. Down the road, when you run "bundle install" it's just going to pull the latest versions and most definitely break at some point.

Also, it looks like you just moved to rails 3.2... Your assets were moved into the asset pipeline, but still exist in the public folder.

Finally, you have no tests. No serious developer is going to use ANY project that's not well tested.

Reality is, Rails already has very mature projects using generators to accomplish what you are tying to do. Generators allow you to give your users options when initially setting up their application. Check out Daniel Kehoe's "RailsApps" project here: <http://railsapps.github.com/>

Kehoe's project is a phenomenal example of how to do this well.

Good luck!

<comment><USER5> I've added Hugo Dias's project to the list of Rails starter apps at <http://railsapps.github.com/rails-examples-tutorials.html>.

Building a starter app is a great way to get familiar with Rails. Which may be why there are quite a few. Maintaining a starter app is more difficult (because of frequent changes to Rails and popular gems). Which may be why the Rails roadway is littered with the carcasses of abandoned starter apps (remember Caboose, circa 2006?). The best are those (like Brian Cardarella's <https://github.com/dockyard/sail_plan>) that are maintained to support ongoing development by an organization.

Thanks for the kind words about the RailsApps project <http://railsapps.github.com/>. It thrives because of the active contributions from this enthusiastic community. BTW, I'll be announcing the newest release very soon, a Rails prelaunch app for startups <http://railsapps.github.com/rails-prelaunch-signup/> (it's not quite ready for "Show HN").

</comment></comment><comment><USER6> This is a great way to get all of that boilerplate app code out of the way from the start.

However, I recommend taking a look at RailsApps Composer for deeper customization.

<https://github.com/RailsApps/rails_apps_composer>

It's a snap to use their DSL to write scripts that generate rails templates like this:

<https://github.com/wnadeau/rails-application-templates>

Using their composer, I wrote my own "Mailchimp" recipe for bootstrapping a Mailchimp integrated app, including twitter bootstap (customized with Mailchimp colors the general taste of their brand), backbonejs, oauth sign-in all from the start.

Not to rain on any parade, this certainly looks good (and I did actually pull down the code and take a peak).

If you like doing this kind of thing, I think you'll be really pleased with something like RailsAppsComposer.

<comment><USER7> I tried Rails Apps Composer - specifically one of the example apps - <https://github.com/RailsApps/rails3-bootstrap-devise-cancan> \- and it didn't work as advertised.

It seems to have added some of the gems to the gemfile, but for others I had to remove them and re-add them and go through setup manually. Specifically, Devise & CanCan.

Do these composers just add the gems to the Gemfile then you have to configure each manually? If that's the case, I can do that myself.

I was under the impression that these would take you to some 'baseline configuration', then you tweak it from there.

E.g. Once I roll it up, I should have a login screen with an admin and 'dummy' user created that I should be able to login with immediately. Some basic authorizations setup, etc. But that's not how it works.

Maybe I was expecting too much? If it doesn't do that though, then what's the point?

I even had to re-install the Twitter bootstrap to get it to work.

<comment><USER5> Marc, if you use the app template you'll have a ready-to-run app as soon as "rails new ..." is done. Submit a GitHub issue [1] if it doesn't work; I'll take a look as soon as I can. You can also clone the repo and use that as your reference implementation. Hundreds of Rails developers have used the app; usually any issues are resolved quickly.

[1] [https://github.com/RailsApps/rails3-bootstrap-devise- cancan/...](https://github.com/RailsApps/rails3-bootstrap-devise- cancan/issues)

<comment><USER7> Thanks for reaching out to me Daniel. What do you mean by 'ready-to-run' app? Is it fair to have my expectations that I laid out - i.e. with say an admin & user already created, and maybe one or two authorization rules set up?

Or is that fanciful thinking?

I guess the issue is just a disconnect between what I perceive as this particular template being able to do (based on my impressions from the docs) - and what it actually does.

<comment><USER5> The app will do as you expect, as described in the README and the tutorial.

</comment></comment></comment></comment></comment><comment><USER8> (Shameless self-promotion alert! But related)

My current side project is themes for Rails based on Bootstrap, launching next week: <http://dresssed.com/>. Demo here: <http://dresssed.com/tour>.

It will require Rails 3.1 or > for the asset pipeline.

</comment><comment><USER9> If this anything useful buried in this, I'd much rather see it exposed as an article detailing the techniques and the value behind them so I can apply them to my own projects, rather than having to pick through the source to figure them out for myself...

</comment><comment><USER10> Is it really Rails 3.0.3? That's kind of old.

<comment><AUTHOR> Haha I created this repository now in the morning and was already about to change the Rails version. I did not know would have an audience so quickly. I'll switch to Rails 3.2.x

</comment></comment><comment><AUTHOR> Thanks for all tips, i already changed to rails 3.2.x and i'm studying a better way to implement this template without the entire rails structure !

</comment><comment><USER11> If you want to do this as a repo it should be setup nicely with some examples and a index#home page that lets you connect to them. Test suites are nice too. Other value add could be testing the deploy readiness of the asset pipeline on heroku or other such things. Lastly, your boilerplate files have horrendous spacing, you may want to introduce them or fix cross platform compatibility. If it's designed to be an example it should be easily readable.

</comment><comment><USER12> Don't use this without defining a new cookie secret (which is normally generated randomly when you create a new project):

[https://github.com/hugodias/railStrap/blob/master/config/ini...](https://github.com/hugodias/railStrap/blob/master/config/initializers/secret_token.rb)

<comment><AUTHOR> Nice ! Just included this tip in documentation [https://github.com/hugodias/railStrap/commit/9fb4087173d04e9...](https://github.com/hugodias/railStrap/commit/9fb4087173d04e97f923501c5000835ba4672132)

</comment></comment><comment><USER13> the coolest part about templates is you can modify them later on. so when we all get tired of bootstrap or maybe you want to add coffeescript or haml or maybe you always use the syslogger gem...with an app template you can add that into the template itself without having to fork the whole repo.</comment>


Gems of Corrado Böhm - <AUTHOR> https://arxiv.org/abs/1812.02243 <comment><USER2> I now understand the contribution of the Bohm-Jacopini paper [1] towards structured programming. It should be as well-known as Dijkstra's "Goto considered harmful".

[1] [https://en.wikipedia.org/wiki/Structured_program_theorem](https://en.wikipedia.org/wiki/Structured_program_theorem)

</comment><comment><USER3> The article itself is written by a giant in the theory of the lambda calculus.</comment>


XKCD: ISO 8601 Dates - <AUTHOR> http://xkcd.com/1179/

<comment><USER2> I've been using this format for years. It's the only reasonable format for dealing with sorting information. Nothing aggravates me like files that use month/day/year format; it's useless.

<comment><USER3> Indeed; I was introduced to it by a boss in 1987-88, and when I did a lot of high speed, high volume document imaging and management work in the early-mid '90s it saved my posterior more times than I can count.

</comment></comment><comment><USER4> I was gonna post this, but didn't think it was important enough. But I like the idea, so much so that from today forward all dates I ever write will be formatted like that, change yourself then change the world: one date at a time.

<comment><USER5> This date format is great for sorting. No need to chop up strings or break into components.

</comment></comment><comment><USER6> It's also worth mentioning that the same ISO 8601 provides formats for the same date in other forms, like:

2013-058, 2013-W09-3, and so on...

</comment><comment><USER7> As soon as you have to do any significant sorting (for yourself, not using a utility/function) on these values, you arrive at this conclusion for yourself. (What becomes debatable is whether to use subfield separators, and if so, which. If you have to eyeball the values at all, the answer to the first part tends to quickly become "yes". System constraints as well as legibility then tend to constrain which is/are chosen.)</comment>


Ask HN: Angel Investment and VC – recommended readings? - <AUTHOR> Im interested in knowing how an angel investment and VC firm functions. Any books, blogs that you can recommend ? On a longer run - if a programmer aspires to be a VC - where should he start to work his way up. <comment><AUTHOR> Any inputs anyone ?</comment>