An Experiment: Polyphasic Sleeping - <AUTHOR> http://www.mahdiyusuf.com/post/19990471857/ill-sleep-when-i-am-dead-1 <comment><USER2> I attempted the Uberman sleep cycle about a year ago. I managed to get by with 20 minutes sleep every 4 hours. I lasted 2 weeks before bad things started happening (hallucinating, extreme weakness, and major cognitive deterioration). It was a fun experience but something I am convinced is fabricated and doesn't work despite some peoples anecdotal evidence.

Eventually I ran into this blog and when I read it I immediately quit the cycle <http://www.supermemo.com/articles/polyphasic.htm>

If anyone has any questions about it/are thinking of trying a sleep cycle I would be glad to answer!

<comment><USER3> That was my experience as well when I tried it 10 years ago.

I started with Uberman, but had to shift to a schedule with 4 hours of core sleep towards the end of the second week, as I was getting severely sleep deprived and unable to function. I'd gone close to four days without sleep a few years prior, and the feeling was pretty much the same.

My interest was sparked as I've always had trouble with my circadian cycle, and my free running sleep eventually evolved to a polyphasic rythm to keep up with work, study and social life. I eventually had to give that up, as I ended up having extremely vivid dreams that were hard to discern from reality.

Getting a good nights sleep and possibly an afternoon nap really is the key.

</comment></comment><comment><USER4> It's hard for me to say anything on this topic without resorting to hyperbole. I have a serious sleep disorder and in desperation, I tried a polyphasic experiment about 7 years ago.

I was determined to see it through no matter what the cost. The conclusion I came to was that it is a complete scam, perpetrated on life-hackers who are often, productivity hounds. Polyphasic sleep does not work; it does not improve productivity; it is not healthy. The only people who have slept like this on a consistent basis are soldiers or other people in extreme situations, where wakefulness is equivalent to survival and so the damage to your mind is a trade-off. If you are not fighting to stay alive, then you gain nothing by not following your body's natural rhythms, and you can seriously mess yourself up by experimenting with alternatives.

Then again, you're young so you'll probably recover. Probably.

<comment><USER5> I know a developer who tried polyphasic sleep. He said it worked as far as productivity goes, but his unwelcome side effect was that he would get sick very easily.

</comment></comment><comment><USER6> I had a biphasic schedule about 8 years ago for 9 months. I slept at night from 1:30am to 6:00am and in the afternoon from 3:00pm to 4:30pm. I was never tired. I felt like I had two days in one. It was great. I worked from 7am - 2pm, ate lunch, and went back to sleep. When I woke up at 4:30pm, I had 9 hours of free time until I would sleep next.

I don't have a flexible work schedule like that anymore, and now that I live in San Francisco, the environment is not exactly quiet enough at 3pm for quality sleep.

I recommend trying it out if you have the flexibility. Avoid caffeine. Treat the afternoon sleep time, the same as you would the night time. Block out noise and light. Be consistent. Having two days in one is pretty awesome.

<comment><USER7> I have a biphasic sleep schedule, but it just means it takes me two sessions to sleep through the night.

</comment></comment><comment><USER8> I experimented with this though college. I found the idea that you could have extra months in your year amazing. But I could never stick with it for more than a couple days at a time. It was primarily this that kept kicking me off:

"I also have a theory about just being conscience that long, you start to lose a sense of time there is no finality just this never ending loop of waking up and sleeping"

I really decided I needed significant time sleeping to reset my brain. Otherwise it did just feel like a single extended consciousness.

And if you believe John Medina in Brain Rules (<http://www.brainrules.net/>) sleep is what solidifies memory. Which missing that isn't so helpful to a college student.

<comment><USER9> I never tried any unusual sleep schedule, but I have worked third shift while trying to keep a social life.

It _does_ get hard, even on a third shift schedule that millions of normal people deal with, to tell the days apart. When the day switches in the middle of your work shift, when it's light out all "night", even a normal third shift schedule makes the days run together. I did it for a year, and not a single day went by when it didn't feel like I took a short nap through the day then worked the rest of the time. Even when I got 8 hours of sleep.

I started drinking. I started smoking. I got short with my friends. I had to quit, because when there are no "days", life became meaningless to me. It was just one long night that lasted for a year. Things that happened ten minutes ago went into my memory as happening yesterday. When I quit my job and went back to sleeping normal, I stopped my self destructive habits literally overnight.

Millions of normal healthy people do it every day. But beware of forcing yourself into sleep schedules that you are not mentally prepared to handle. Know when to throw in the towel.

<comment><USER10> My sleep schedule naturally is all over the board, that is just the way my body is designed, I can't help it, and I have found my days running together in some sort of glob, like there is nothing in between.

To me it is a weird sensation, but being a work-aholic I hardly noticed it till I started being off by a day or two and my boss caught me on it. I started making sure to take the weekends off and it has slowly corrected itself, now I take the weekends off and do what I want to do not work and it is absolutely fantastic.

</comment></comment></comment><comment><USER11> I saw an article that debunks a lot written by a doctor, that might be biased but it's still worth a read: <http://www.supermemo.com/articles/polyphasic2010.htm>

Don't get me wrong, I've tried it, and failed like many others before me. I'd tried the uberman method for about 2 weeks before falling, and I didn't feel very productive during that time at all (although there were times that I felt more awake than I ever have done, and time seemed to merge, days didn't exist... it's a weird feeling)

I've now adapted the old version of polyphasic sleep, take a nap in the afternoon and sleep for about 6 hours on a night and it seems to be doing me well :)

But! I am tempted to give the uberman method another try, and I will write about it if anyone would be interested?

</comment><comment><USER12> I'm the dad of a five-week old and, give or take a little, this seems pretty much the pattern I had for weeks 0-3. The thing I found most surprising was how I did manage to function after waking, and in a relatively short space of time after waking. The second most surprising thing was how hellish, for me, it felt to be waking after the naps.

Edit: Since about week 4, I've tried to pack more 'regular' sleep in.

<comment><USER13> That's something I remember about having an infant, how the experience of waking up was literally painful. Sometimes, I would stay up later than was wise, just because I was dreading the experience of dawn. Obviously, that's not a smart strategy.

</comment></comment><comment><USER14> This comes up on HN about once a year. Here's my blog where I wrote about trying it: <http://www.pchristensen.com/blog/category/polyphasic/>

tl;dr version: \- the first 5-7 days are just awful but after that you're not tired \- deviating from the schedule (say, staying awake 7 hours one time instead of 4) is devastating \- you do feel different and perceive time differently. Kind of like San Diego weather instead of Boston.

Interesting experience, worth a try, I'd do it again in a heartbeat if my home and work schedule accommodated it.

</comment><comment><USER15> I wouldn't even try something like this, so good on you for giving it a shot and writing about it.

However, having researched polyphasic sleep before, my reaction at coming to the end of your essay was surprise that you'd ended the experiment prematurely. It seemed like you hadn't given yourself time to fully adjust. I expected a Week 3 during which you were able to drop immediately into REM and wake up refreshed.

I assume you just ran out of vacation, which is understandable. But it seems unfair to judge polyphasic sleep based on an incomplete run.

<comment><AUTHOR> That maybe the case; I am not sure; albiet by that point I quickly realized other affects that would be make the sleeping routine, undesirable. The sleeping may have been better in Week 3, but I did run out of vacation. :)

</comment></comment><comment><USER16> If you are interested in polyphasic sleep, the best long run experiment I know is from Steve Pavlina. 90 days of polyphasic sleep:

<http://www.stevepavlina.com/blog/2005/10/polyphasic-sleep/>

<comment><USER17> I read this some years ago.. I've since then become very skeptical about his story. The guy makes money off of his blog, he's basically the internet version of a life coach. Writing "inspirational" articles on how to improve your life, with almost nothing to back them up. There's plenty incentive for him to have fabricated this. And back when I was interested in the uberman sleep schedule, he was the only person on the internet I could find who claimed he had done it for more than a couple of weeks

<comment><USER4> Steve Pavlina is a known charlatan whose lies have been disproved on several occasions.

Further reading: <http://stevepavlinalies.wordpress.com/> [http://www.scottfreethinking.com/2010/02/why-steve- pavlina-i...](http://www.scottfreethinking.com/2010/02/why-steve-pavlina-is- wrong/)

I don't think he lasted 5 months on his polyphasic regimen for the same reasons listed in the sleepmemo article.

<comment><USER18> I'm not debating your position on whether or not Steve did the polyphasic sleep, but none of those links don't really have much actual evidence of him being(or specifically call him) a liar or a charlatan.

</comment></comment></comment></comment><comment><USER19> Interesting experiment, thanks for sharing.

Original polyphasic sleep was divided into two periods of night sleep. The historical evidence shows this was considered normal in most pre-industrial societies. [http://www.historycooperative.org/journals/ahr/106.2/ah00034...](http://www.historycooperative.org/journals/ahr/106.2/ah000343.html)

</comment><comment><USER20> Is there any actual evidence that anyone has ever been able to stick to one of these polyphasic sleeping schedules for a long period of time? All I ever hear about it is vague unsubstantiated claims about how a bunch of really smart people did it their entire lives and stories about how people tried it for a week or two and then stopped.

</comment><comment><USER21> I have a sort of strange sleep schedule.

I work for international teams with no one I work with being on my timezone, I work from home.

So every day my sleep schedule is different. My wake schedule is different. I should record my schedule since it's difficult to remember since it changes every day.

To give some impression, yesterday I had meetings at 2am, 6am, 6pm, and 10pm. Through that I slept, and had social time. I ate and had normal experiences.

They just weren't on any sort of real schedule. Tired? I sleep. Awake? I go do things or work.

Anyone else do this sort thing? So far I don't ever feel "wrong" about the schedule physically, because it's always changing. Now constant change feels right.

Sleep all night tonight? Sure. Wake up at 2am and work till 10 am this night? Sure. Have a meeting a 3am, then sleep till 6am, then work some more? Sure.

I just follow whatever seems like the most reasonably course of action. Including work 10 hours today, and 6 hours the next. Whatever makes sense.

International-Logic-Phasic Sleep. Heh.

<comment><USER22> There was a while in college I was like that. It's like you confuse your circadian rhythm enough that it stops bothering you. It was super convenient, but once you sleep the several days in the row it starts breaking down. You just need to constantly be changing it up a bit.

<comment><USER21> My experience is the same. If I constantly change it up, I have no problems.

On weekends I try to hold to a more timezone specific schedule, but include odd naps at odd times to sort of keep the schedule of broken sleep.

One other aspect I've noticed is I used to feel more tired and people would always comment on how tired I looked. Now I feel much more awake and in the moment, although honestly I have no idea why this would matter.

I think I'm always kept at a constant state of having slept not all that long ago, even if it was a short period of time, and that helps? This is guessing.

The other aspect is, I try to keep my sleep intervals at an hour 30. so, 1:30, 3, 4:30 hours. Not sure if that has anything to do with it, but easier for me to wake up when I do that.

<comment><USER23> About 1:30 is usual natural sleep cycle length.

</comment></comment></comment></comment><comment><USER24> I've gotten locked into strange sleep cycles simply out of necessity (I am an undergraduate student at Carnegie Mellon). I've found that, while my body will accept a psuedo-equilibrium of somehow getting ~ 20 hours of sleep a week, it will almost always become unsustainable after 2 weeks... in which I'll need another day or two to recover. But after that (usually I take an entire week off, where I get at least 30 hours of sleep) I go back into my regular routine (note that I have a 105 minute sleep cycle, which is a little longer than most people's:

M3:30 T0:20 W3:30 R0:20 F3:30 S7:00 U3:30

<comment><USER25> I'm curious: how did you figure out your sleep cycle that precisely (105 minutes)? I have been feeling like 90 minutes is not exactly right for me, but I haven't figured out a way to measure my sleep cycle.

</comment></comment><comment><USER26> This is a perennial topic on HN. Prior discussion highlights: <http://news.ycombinator.com/item?id=1464142> and <http://news.ycombinator.com/item?id=652747>

</comment><comment><AUTHOR> Just some notes; on what I thought about polyphasic sleeping; I will answer any questions people may have.

<comment><USER27> It seemed like all the other articles were super positive about it. This one seems more in line with my own experiences. I've settled on a biphasic sleep (5-6 hours + 30-40 nap midday) but only when I can. If I have too much trouble waking up or if I can't take a day nap I sleep like a normal person.

<comment><USER28> Can you find one of these "super-positive" people that are still doing it after, say, a year?

Honest question, BTW, if you've got a link. I'm not aware of any, though.

</comment></comment></comment><comment><USER29> I tried what might be called polyphasic sleeping twice. When both of my kids were born. It sucked. Babies do it, and their parents are forced to join them for the first few months of life. It's a damned good thing we teach kids the normal way of sleeping, when it's night.

</comment><comment><USER30> The BBC published an interesting article recently about how it was possibly customary until fairly recently to sleep in two sessions at night, with an hour or two of wakefulness in between them. People would get up, read, eat, talk with their partners etc. in the wakeful hours.

TBH, I'm not sure the evidence is convincing, but it'd an interesting concept.

<http://www.bbc.co.uk/news/magazine-16964783>

[edit: earlier HN discussion of the BBC article: <http://news.ycombinator.com/item?id=3620742>]

</comment><comment><USER31> Well, I'm not sure that's a very good idea. Apart from the fact that sleep helps solidify facts learned during the day (not sure whether this is really true or not but from my experience I'd say there is something to it) I remember reading a paper claiming sleep could have a crucial function in cell refreshing and rest even on a molecular basis. In fact, the former physiological and psychiological effect could be very well implicated by the latter one actually.

</comment><comment><USER32> "I found myself constantly switching between reading, coding or the next shiny thing finding it hard to focus on any given one."

This is a symptom of ADD, however it is caused by lack of sleep. I experience this, so I'm very familiar with it. I've tried CPAP, oral sleep appliances, and everything else. Nothing has worked perfectly.

</comment><comment><USER33> Well what about the siesta? Or, before lighting, people more commonly had segmented sleep. <http://en.wikipedia.org/wiki/Segmented_sleep>

This seems to be a modern, social issue, not so much a physical one.

</comment><comment><USER34> The sailors that cross oceans single-handed use some variant of this. The reports I've read is that the first two days are quite hard to handle but once in the quite issolated routine it works for certain folks.

</comment><comment><USER35> Hm, no concrete data on mental performance on benchmarks, or recordings of sleep data (eg. via a Zeo).

Oh well. Someday someone will do the experiment better.

</comment><comment><USER36> Maybe it's just my lousy Dell laptop... but the difference between those two colors on the graph is nonexistent.</comment>


Static, Ahead of Time Compiled Julia - <AUTHOR> http://juliacomputing.com/blog/2016/02/09/static-julia.html <comment><USER2> I think this [0] is worth reading before starting a project in julia (it's quite shocking). Does anyone know if anything has changed in julia's development process over the last year?

[0] [http://danluu.com/julialang/](http://danluu.com/julialang/)

<comment><USER3> I'm an enthusiastic julia user, observer and very minor contributor. IMO a lot of the issues in this constructive rant have been addressed to some extent. For context, here's the previous HN discussion [https://news.ycombinator.com/item?id=8809422](https://news.ycombinator.com/item?id=8809422)

Going through the post in order:

The stable releases still have some bugs as you would expect in a young language, but 0.4 is now well below my tolerance level. For a rough idea, I now use julia daily and encounter a bug perhaps once every one or two weeks. In 0.4 I haven't encountered any bug which was a real show stopper and couldn't easily be worked around.

Testing has gotten a whole heap nicer with a decent test framework in Base (accessible in 0.4 via BaseTestNext.jl). Testing and package manager integrate in a simple but effective way which really makes the friction for writing a suite of tests for new packages very low, much lower than other languages I've used. I can't speak for actual coverage in Base, but I know it's now actually being measured and work has gone into the coverage tools.

I'm going to skip over the complaints about error handling, because others have already responded to this, for example StefanKarpinski's post to the julia-users list [https://groups.google.com/d/msg/julia- users/GyH8nhExY9I/0Bzn...](https://groups.google.com/d/msg/julia- users/GyH8nhExY9I/0BznqtD5VJgJ)

Consistent benchmarking is currently being addressed, with great work going on at BenchmarkTrackers.jl, and a proper setup with dedicated benchmarking hardware for the language itself. I don't have the depth of knowledge to comment on Dan's other complaints regarding skewed benchmarking.

Regarding contributing, my experience is that contributions to Base and the runtime by unknowns (myself, say) are generally met with the fair skepticism and good taste that all good maintainers should display. Sometimes I feel the core devs could do more to encourage new contributors, and the environment can feel slightly hostile when suggesting new features. I'm not sure how to entirely avoid this, when a core job of a good maintainer is to say "no" to a lot of poorly considered requests! Much of the code in Base is still commented in a minimalistic fashion, if at all. In contrast my experience in contributing to packages has been almost entirely positive, with a lot of excitement and energy leading to some really great code and interactions.

With precompliation, slow package load times have really been improved to the extent that they're no longer a major hassle, but there's still room for improvement here.

The real sting in the tail of this blog post is the paragraph about nastiness in the community. There was a couple of unfortunately worded (though not unambiguously malicious) mails on the julia-users list following Dan's post, but the discussion was largely constructive and helpful. I've no idea about the "private and semi-private communications" and I can only hope things were patched up there.

Overall I've found the julia experience almost entirely positive. It's a joy to work with for numerical and statistical problems, and we're moving forward at work to get our first major pieces of julia code into production.

<comment><USER4> > I've no idea about the "private and semi-private communications" and I can > only hope things were patched up there.

I'm the co-creator that Dan was talking about. He wrote a bunch of less-than- charitable comments on the aforementioned semi-private forum – not specifically to me, but where he surely knew I would read them – to which I responded with:

[https://gist.github.com/StefanKarpinski/c72219ff8ce261172b11](https://gist.github.com/StefanKarpinski/c72219ff8ce261172b11)

You can judge for yourself whether I was nasty or dishonest. Things were, unfortunately, not patched up. Dan posted a number of responses, deleted all of them before I could read them, then left the conversation permanently.

<comment><USER5> Luu's claims made me hold off on pushing people to contribute to Julia as I waited for corroboration (or refutation) of them. I appreciate you linking to that very fair post that replies to it. The contrast between how the two of your present your claims adds credibility to yours. I also got a great laugh out of part about one guy that barely speaks English using the project as a personal Stackoverflow. A problem I'd have not anticipated starting a language/compiler project haha.

Curious, are you all still coding the internals of the compiler in femtolisp, is most of it written in Julia indirectly relying on that, or no LISP now? A barrier to entry question basically.

<comment><USER4> The parser and some lowering passes are still written in femtolisp. There has been some discussion of switching to the native JuliaParser package [1]. However, JuliaParser doesn't implement the fairly tricky lowering passes that the femtolisp parser does. I personally would prefer to have the parser in Julia, but at this point the most pressing issue with parsing and lowering is speed – so it's possible that the parsing and lowering will be converted to C instead.

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

<comment><USER6> > I personally would prefer to have the parser in Julia, but at this point the > most pressing issue with parsing and lowering is speed – so it's possible > that the parsing and lowering will be converted to C instead.

But isn't Julia supposed to be fast? ;)

<comment><USER5> And this is just a parser. Nothing too fancy. Analysis should be able to produce some efficient code for one.

</comment></comment></comment></comment></comment></comment></comment><comment><USER7> I personally find the syntax of the language and quality of the current implementation (speed!) excellent. However, it doesn't experience the marketing languages like Rust or Golang receive.

What I personally also find worrisome is the perception (at least for me) that Julia is confined to scientific computing whereas I find it should really be a general purpose language.

<comment><USER8> There is no technical reason that Julia can't be used for general purpose computing. (Well personally, I'd like nested namespaces, but) it is an amazing language. Just a matter of someone putting in the time to build the required libraries and glue code. Which will happen in time.

<comment><USER9> The lack of AOT has been the main thing holding me back from adopting it for more general purpose computing. Now with AOT I can "compile" the code and get some reasonable expectation of performance and ease of deployment. I'm probably going to start using Julia and (hopefully) extending the web server packages. Basically it feels similar enough to JavaScript for web development but with more expressiveness, so I'm pretty excited by the prospect.

Now this turns up a terrible delima, do I try to use Julia or Rust for writing embedded controllers? Rust has macros and direct memory control, but the article mentions. :)

I also think the more of us that recommend Julia for general compute, the more likely it'll get used that way.

</comment></comment></comment><comment><USER6> > _For example, the Julia community seems to have coined the term "type- > stability" to describe a concept that static / compiled languages have > historically enforced and dynamic / scripting languages have historically > disregarded._

I was not aware that this was a Julia neologism. It seems like such an appropriate term for discussing how to make code make the most out of JIT- compilation.

<comment><USER10> The closest concept I can think of is the concept of "strong typing," that a value does not change type based on its context, which is a fairly widely used term. It seems like Julia has some form of weak typing, at least between the different numeric primitives, and "type stability" refers to avoiding any usage of weak typing. I don't know a lot about Julia, though, so I could be way off here.

<comment><USER4> "Strong typing" and "weak typing" don't really mean anything:

[http://blogs.perl.org/users/ovid/2010/08/what-to-know- before...](http://blogs.perl.org/users/ovid/2010/08/what-to-know-before- debating-type-systems.html)

You probably mean "static typing" versus "dynamic typing" which I wrote a bit about in the context of Julia here:

[http://stackoverflow.com/questions/28078089/is-julia- dynamic...](http://stackoverflow.com/questions/28078089/is-julia-dynamically- typed)

Basically, I think "type stability" hasn't really been a thing in the past because in dynamic languages, people have traditionally not cared about ensuring that return types are predictable based on argument types, and in static languages, a program is _incorrect_ if that's not the case. As people care more and more about being able to statically predict the behavior of programs in dynamic languages, the concept of type-stability in dynamic languages becomes increasingly important.

<comment><USER10> I disagree: strong and weak typing are fairly well defined terms. I'm going off the definition given in "Programming Language Pragmatics," which states "a language is strongly typed if it never allows an operation to be applied to an object that does not support it; a language is said to be statically typed if it enforces strong typing at compile time."

<comment><USER11> Even if you are correct that they are well defined, by that definition Lisp, Ruby, Python, JavaScript and Julia are strongly typed. C, Forth and assembly language are not. So the distinction isn't useful in this discussion.

<comment><USER10> Javascript is probably one of the weakest typed languages out there. {}+{}, []+[], {}+[] are all completely valid operations in javascript that cause all kinds of implicit coercions. And assembly language is very strongly typed: it just has a very simple type system.

As for Julia, I'm not sure how strongly or weakly typed it is, but I would probably put it at around the same level as Java.

</comment></comment></comment></comment></comment></comment><comment><USER12> Julia seems like an almost perfect MATLAB replacement. (for my personal preference, I would like a slightly more static/rigid language, but I understand why that's not the right choice for Julia's target users.) There is just one problem... I really, really wish they had dropped the 1-based indexing and <= upper bound on index ranges. It is so annoying.

<comment><USER13> "I really, really wish they had dropped the 1-based indexing and <= upper bound on index ranges."

really? There are quite a few things I don't like about julia, but using 1-indexing and "end" makes implementing algorithms much clearer IMHO.

The main pain points for me in julia are the module/pkg system and that the runtime is not just batteries but more like 10 generators included i.e. it could be way more minimal. But I get that the goal is to have a powerful scientific computing language and not to build a multipurpose language that emphasizes modular construction of code units and production ready package and build management utilities.

All in all, when judged by how well julia achieves its self-stated goals, I think it is excellent.

<comment><USER14> This is kind of bike-shedding (since that's such a small part of the language), but I also think there are arguments for using 0-indexing with open upper bounds.

Guido explains his choice best:

[https://plus.google.com/115212051037621986145/posts/YTUxbXYZ...](https://plus.google.com/115212051037621986145/posts/YTUxbXYZyfi)

<comment><USER15> Well, Julia is a language designed for mathematics, where indices starting at 1 is common (vectors, matrices). You can argue that polynomials have exponents starting at zero, but then you quickly get to Laurent polynomials, and what you really should be arguing is that the lower bound should be configurable, rather than being set at one specific value (which, of course, is still possible with custom types).

Second, I don't find Guido's argument convincing. Yes, half-open ranges can be mathematically more elegant (and that's actually Dijkstra's argument), but that doesn't mean that the code necessarily becomes more readable. For example, to construct an array without the element at index i, you'd do the following with Python-style indexing:

      a[0:i] + a[i+1:n]

and the following with closed intervals and indexing starting at 1:

      a[1:i-1] + a[i+1:n]

While there is an element of subjectivity to it, I at least find the latter option more readable (possibly because of habituation to mathematical notation).

While the notation for the specific example of i:i+k-1 might be less elegant with closed ranges, closed ranges are something that you find in every math textbook, because sums, products, unions, intersections from a to b (and other operators in that style) operate on closed ranges normally. Closed ranges are the norm in conventional mathematical notation and it makes sense to pick the option that minimizes the overhead when transcribing between mathematical texts and code.

<comment><USER12> Here are some tasks that are ugly with [1:n] indexing:

        - the 1D index of element (i,j) in a matrix is i+(j-1)*m instead of i+j*m

        - the i'th 3-element subvector of a vector is v[3*(i-1)+1:3*i]
          instead of v[3*i:3*(i+1)]

        - if you have vector of indices that partitions an vector into chunks,
          the i'th chunk is v[ind[i]:ind[i+1]-1] instead of v[ind[i]:ind[i+1]]

Perhaps small issues, but these are all real examples from my most recent Matlab project that were annoying.

But maybe, like the static typing issue, my opinion on this topic is distorted because I spent a lot of time programming in C++ and comparatively little time reading math papers.

Or maybe it would be equally easy to make a list of tasks that are ugly with [0:n) indexing.

<comment><USER16> _> I really, really wish they had dropped the 1-based indexing

>, my opinion on this topic is distorted because I spent a lot of time programming in C++_

Mathematics-related programming[1] in MATLAB, R Language, Mathematica, SAS, etc all use 1-based indexing. Given that the originators of Julia are MATLAB users, it makes sense that they made a deliberate choice to keep 1-based indexing.

In other words, it was more important to grab mindshare from those previous math tools rather than appeal to C/C++/Java/etc programmers.

One outlier in the landscape of numerical programming is Python+NumPy/SciPy in the sense that it uses 0-based indices. While Julia also wants to be attractive to Python programmers, it still seems like the bigger motivation was programmers of MATLAB and other math software.

[1][https://www.youtube.com/watch?v=02U9AJMEWx0&feature=youtu.be...](https://www.youtube.com/watch?v=02U9AJMEWx0&feature=youtu.be&t=1m57s)

<comment><USER17> This, pretty much. Not to mention that, beyond languages, _data_ is often 1-based indexed. I have never gotten a patient data set with ID=0 as the first entry. In my mind, compatibility with what users are expecting, and trying not to induce indexing errors, trumps most other concerns.

<comment><USER16> _> , beyond languages, data is often 1-based indexed._

That's a good point. Probably the most widespread _data_ example for non- programmers is spreadsheets (MS Excel, Google Sheets). The first row[1] in the spreadsheet is labeled as "1" instead of "0". The idiomatic Visual Basic programming code to loop through the rows would look something like:

      For Each cell In Range("a1:a25")  ' not "a0:a24"
          ' do work
      Next cell

[1][https://www.google.com/search?q=microsoft+excel+spreadsheet+...](https://www.google.com/search?q=microsoft+excel+spreadsheet+a1&source=lnms&tbm=isch)

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER18> Julia is really following Lisp and Dylan's footsteps!

Congratulations to all involved in pushing the actual state of dynamic languages.

<comment><USER19> "following Lisp and Dylan's footsteps"

I hope not, especially regarding popularity.

<comment><USER18> I was thinking in terms of language design and tooling. :)

Agree with you.

</comment></comment></comment><comment><USER20> > Julia Computing carried out this work under contract from the Johns Hopkins > Applied Physics Laboratory (JHU APL) for the Federal Aviation Administration > (FAA) to support its TCAS (Traffic Collision Avoidance System) program.

It's great! Looks like a very interesting contract.

<comment><USER21> In case you are interested, here are slides ([http://juliacon.org/2015/images/juliacon2015_moss_v3.pdf](http://juliacon.org/2015/images/juliacon2015_moss_v3.pdf)) and a presentation ([https://www.youtube.com/watch?v=19zm1Fn0S9M](https://www.youtube.com/watch?v=19zm1Fn0S9M)) about TCAS (and its successor, ACAS X)

</comment></comment><comment><USER22> In the literature this is called Gradual Typing. Or optional typing.

Python uses it in the last couple of versions.

</comment><comment><USER23> I come from AOT languages and have lost my patience by now. Julia is overrated.</comment>


How to self-publish a book: A handy list of resources - <AUTHOR> https://blog.datascienceheroes.com/how-to-self-publish-a-book/ <comment><USER2> Indie publisher here. Nice job - it came out quite well, judging by the images. Curious if the editor and proofreader were working with the same software, or it had to be exported to markdown or some other format.

Facebook ads are not a good investment, IMHO. They are expensive, campaigns take time to set up, and most people on FB are not on the site to browse books. Amazon Advertising is more effective and will be available to Amazon KDP users.

A note about ISBNs: You don't need one if you are just publishing a PDF on Gumroad or an ebook on KDP. If you are creating a print edition through KDP or a service like IngramSpark, you will need an ISBN, though.

For authors based in the states, a warning: The U.S. ISBN registry, Bowker, is a monopoly and prices accordingly so if you do want to go that route the outlay will be significant: $125 for a single ISBN in the registry and $250 for 10 (the last time I checked). Bowker will try to upsell overpriced and unnecessary services, like $25 barcodes and copyright assistance for $80 a pop not including Copyright Office fees. Bowker also left the barn door open on its CC page for six months earlier this year ([https://www.publishersweekly.com/pw/by-topic/industry- news/b...](https://www.publishersweekly.com/pw/by-topic/industry- news/bookselling/article/78506-bowker-investigating-breach-of-isbn- site.html)).

<comment><USER3> $125 for ISBN seems like a ripoff to me - the ISBN are given for free where I come from: the Czech Republic; and the system is administered by the National Library

<comment><USER4> ISBNs and healthcare tend to follow similar patterns in the US, contrasted with the most of the rest of the 1st world.

<comment><USER5> The AMA to both certifies doctors and runs the medical schools. Obviously, they have a vested interest in controlling supply to protect their membership, thus artificial scarcity leads to high prices.

</comment></comment></comment></comment><comment><USER6> Is it only me, or does anyone else think that the prevailing business practices of the likes of Amazon are an absolute rip-off when it comes to the low royalties? You go through all the work of writing, editing and producing a book and upload it. Amazon does nothing by the way of marketing & promition, so you end up marketing links to your book on social media yourself. If you want a decent price, you get 35% royalties, maybe another 5% for affiliate marketing. That means that Amazon gets more out of the project than you do, despite the fact that you're the one doing almost all the work (handling downloads & payments seems like a pretty commoditized thing these days).

Compare that to selling music on bandcamp: They take 15%, the rest is yours to keep.

It is absolutely beyond me, how self-publishing authors put up with that.

I GUESS the difference between music and e-Books, to some extent, is how the channel influences perceptions of the quality of the product. People have got very used to low quality writing being available for free on the web. So if your ebook is just another piece of text on some website, many people will not be willing to pay for it, whereas being on amazon creates an expectation that the quality would be in line with properly published work (where, at least, there is a four-eyes principle at work, at shouldering financial risks around a book project etc.)

Someone should do something about that and create an ebook marketplace that enforces certain quality standards and pays decent royalties.

<comment><USER7> A friend of mine did $120k completely passive with his book (+ audio book) on Amazon. Without Amazon, he would have to get the outreach. Outreach is the expensive and difficult part. When the customers are already there, it's just a matter of converting them.

There are many people who make $25k/month completely passive on Amazon. I'm not a big fan of Amazon, either, but you're not signing a bad deal with them. Most publishers are worse (and don't deliver the outreach).

edit: Another thing to consider: Don't limit yourself to selling books. Add value and place upsells in your books. And for fiction writers: Maybe add merch and other stuff. For non-fiction: Sell online courses or coaching for your expert topic. Usually the book is just the entry.

<comment><USER8> What was the book's subject? I've always managed to convince myself that the poor performance (relatively to values such as I see you have quoted) is because my market is somewhat niche, but it may not be the case, so any info on such self-published success would be useful for me.

<comment><USER7> I'm not gonna lie: Daytrading.

It's _the_ definition of a money topic. But I know that there are people who make a fortune with small cook books. I know some other very profitable niches, but I can't talk about them in detail - competition is already extreme. But trust me: There's a ton of money in most topics.

OT: About daytrading (most people think it's basically a scam) - I know people who do daytrading on a daily basis (what a pun) and who live relatively comfortable investing $25-40k. I know a guy who went from 12k to 80k with one investment (was a 2-year investment, though). He's not gambling, he is a trading nerd reading the news and all company reports constantly. But yes, 99% of daytraders lose money because they start to become greedy or have no discipline.

<comment><USER6> ...well I guess the important question is whether or not you think you have a high chance of showing up at a high rank for search terms with enough traffic, whether you have a chance of being featured prominently by amazon's recommender engine etc etc. If you want to make that work for you, you probably have to play a game like being a demand-driven content farm gaming Amazon in a way akin to how SEO tries to game Google.

Maybe there's money in it, but it's probably not the kind of content I would either want to produce or consume.

For most authors, the point of departure is probably, more idealistically, some well written content, maybe with an audience that's a bit niche, and the desire to find a way to get remunerated fairly on the effort that went into producing the content. It sounds to me like that's not really what Amazon is offering.

<comment><USER7> His book is fairly good and well-written, but I know what you mean.

I'm currently helping an author who wants to write a book and make some money with it (she wrote books in the past and worked with publishers). I explained to her how the self-publishing business works and she also had the same reaction. It's possible to write high-quality content and get fairly compensated, but you should definitely know that most people seem to be content with sub-par books. The average quality is really bad and people seem to like it (e.g. another very profitable niche: erotic books, Shades of Grey is just one of many of them).

Amazon is very generic. If you want to build an audience, you should stick to Facebook, Instagram, Pinterest, Snapchat, Slack/chat groups, write a blog, do vlogs and videos, organize local and offline groups, events and other methods. You can then build a whole community around a niche and sell way more than a book. This is also what I've recommended to her because this is how you build high-quality communities.

</comment></comment></comment></comment></comment></comment><comment><USER9> Editing your own text can be difficult because when reading it, you'll mentally fill up missing words that aren't on the text.

Use a text to speech reader like Textaloud, balabolka and you'll catch more errors.

There's a setting in Microsoft word to check for grammar, run-ons, verb agreement... and readability rating of your text.

Write first, edit later to reduce writers' block in drafts - Turn off the spell checker or simply write in notepad.

<comment><USER10> Do yourself a favour and get Scrivener. Don't use Microsoft Word or any generic word processor if you're writing a book, sure you _can_ do it but god is it a painful experience.

I have been using Scrivener for a few years now and I couldn't go back to using a generic word processor for writing now.

I try not to recommend closed source software but there really isn't anything else that comes close to it.

<comment><USER11> I have Scrivener and have used it. The problem is that, at some point, I need to start collaborating and otherwise sharing copies. At that point I need to switch to a common format anyway. So I'm not convinced that Scrivener helps me a lot given that I'll have to export well before I'm finished (in my case). Maybe if I were working on something solo for a long period of time but that's not how I generally write.

<comment><USER10> Yes I can see the issues in real-time (or near-time) collaboration as that is not something Scrivener really deals with elegantly. I was talking about it more from an individual writers perspective which is how I use it.

I export sections/chapters to PDF, ePub, etc. to send to my editors and technical reviewers.

Actually you got me thinking about how I would need to approach this should a collaborative project come my way. I need to investigate this further as that is now an itch that needs to be scratched :)

<comment><USER11> For work stuff, I use Google Docs as a matter of course and that works well. It's not perfect insofar as the "it's over to you now and I won't touch it any more" handoff isn't baked into the workflow but once people learn to have discipline around that, it works well.

I do like Sccrivener. I just don't really do the working on screenplay/novel/etc. over the course of months to years that is really it's sweet spot. The one time I used it which was really useful was assembling a book partly out of a series of previously written pieces. It was very good for moving parts around although I suppose outline mode on a standard word processor could have substituted.

</comment></comment></comment></comment></comment><comment><USER12> I self-published a book and sold $250k worth over the past year.

I cannot recommend getting an editor/typesetter highly enough. I paid mine something like $500 total and she absolutely saved my life.

I'd go the Gumroad + Stripe route (or maybe Kickstarter if you need some motivation) - Amazon sales have been negligible for me.

<comment><USER13> >I'd go the Gumroad + Stripe route

Why do you need Stripe? AFAIK Gumroad already handles payments. Something to do with free vs. paid Gumroad plans and features?

<comment><USER12> They didn't process payments when I set it up. Or rather, they processed them through Stripe

</comment></comment></comment><comment><USER14> Most of those resources only cover text-heavy books in paperback format. i currently write an astronomy book (many high res images and illustrations) in a large A3(ish) format. the whole process is completely different.

for example:

\- you should NOT let a third party print the book for you without any control over the quality of the final product. amazone print on demand does a decent enough job with paperback text books, but should probably not be used for printing anything else.

\- unfortunately there is no real (OSS)alternative to CS software like illustrator and indesign when it comes to actually creating the book. yes, you CAN do it with other tools - but if you want to keep your sanity, DON'T. ( I tried and ultimately gave up on the idea of using anything but adobe software....)

\- color management is a nightmare. prepare for some real headaches when the first test prints come back and everything that should be "100% black" comes back in different shades and color variations of dark grey.

\- if you want any layout-heavy book to be easily translatable into different languages, plan for it from the get go. text like small info-boxes underneath images tend to vary in length a lot from language to language. some languages produce much longer texts than english, others are more compact. this can become a significant problem if all your layouts rely on character-perfect text placement and fixed lengths.

\- binding techniques vary from one printing company to the next. it is advisable to choose a company early on, so that you can adjust your layout process accordingly. a simple change to color management, paper format or line characteristics can become a huge problem, when you have to change dozens or hundreds of embedded illustrations.

\- you dont need amazons print on demand at all: most printing companies let you put in a small initial order (like 200 books). sell those first, then use the money to order more. margins are great if you actually publish yourself, so you can easily scale up your orders without risk of financial overextension. if you do it with the same company this should not take longer than 2 weeks. that kind of response time is totally acceptable.

Edit: I should add that this only works for books with a high retail price (like 50+ dollar)

</comment><comment><USER8> I've written a book about a domain I know about - Music Technology - and self- published it about 5 years ago , using lulu.com. It sells for £24.95 [1], and I get about half of that in a lulu sale. This is a 650 page text book which has a LOT of content - it would take hundreds of hours to go through it all for a beginner.

If it sold on Amazon, I would get about £4. I guess I should have gone via Amazon direct? (given that the author mentions 40%?)

Lulu makes about £4-5 on a sale (going on the printing costs that I pay, and me factoring in a bit that I would pay even on a copy that I'm buying myself), whereas Amazon would be taking more like £12-13 going on those numbers.

So, that's why my book isn't available on Amazon - I'd have to sell 3 times as many to make the same money, and that seems unlikely to me. If it was more even, I would sell it on Amazon as well as Lulu as I'm sure I'd get -some- more sales, but not drastically more.

The book is a reasonable seller and a useful source of side income for me, but it's certainly not an 'earner' \- I've spend about 3 weeks of very full time work updating it for the latest version, and that will be in print for a year before the next x.5 version comes out (and usually this means changing a large amount of content as lots of little things change). Dividing the year's earnings over the time taken to update it means I get a reasonable rate for that time, but certainly not a good one.

I've thought about writing another book (going into more depth on the same subject, and being a Cubase 'expert'), but I remember that it took about a year of spare time to write the first one, and while it's been a reasonable proposition over that time, it was only because it got picked up by the software company's education rep that it went anywhere and reached any kind of 'critical mass' \- for about a year it sat and literally sold only copies to students I was teaching (which was the initial reason for writing the book as there was no text book of worth available). Just to be clear, I didn't enforce purchase by the students, I'd say under 10% of them bought the book.

[1] - [http://www.lulu.com/shop/darren-jones/the-complete-guide- to-...](http://www.lulu.com/shop/darren-jones/the-complete-guide-to-music- technology-using-cubase-95/paperback/product-23486148.html) (latest version of the book, until Cubase 10 gets released, then it will be superseded)

</comment><comment><USER15> In my spare time I've been developing a Java-based (don't hate me) WYSIWYM tool that integrates R, Markdown, and a fair bit more. For example, Scrivenvar can also transform XML into Markdown via XSLT, then use an R engine to perform computations that are substituted back into the Markdown document prior to generating an HTML preview from the final text. (For the OOP enthusiasts, it uses the Chain-of-Command design pattern.)

I wrote Scrivenvar because I wanted the ability to use interpolated variables while writing, so as to create documents free from duplicated content (e.g., character names, locations, and timeline calculations in a novel). (My favourite part of the book's R code is integration of a GIS API to compute driving distance based on the lat/long coordinates of two places in the novel, falling back to the Haversine formula if the website is unavailable; the number is then converted to English text using a Chicago Manual of Style function call. Effectively, if I change the lat/long of either location, the value of the book is updated without having to remember where in the text that that particular number was referenced.)

Once a YAML document is loaded, inserting a variable is quick: type a few letters from a value followed by Control+Space to insert the corresponding variable name. This is handy if for deeply nested variable hierarchies.

The software is open-source and very much beta:

[https://github.com/DaveJarvis/scrivenvar](https://github.com/DaveJarvis/scrivenvar)

Ping me on GitHub if you like the concept and have comments or questions.

</comment><comment><USER16> Does anyone know how I can self publish on the "bible paper"? It's the super thin yet strong, high quality, paper.

I want to print a large book but want to have it not be too thick.

<comment><USER17> What your looking for is called onion skin paper and it seems to be pricey, but I agree, great for certain uses

<comment><USER16> I'm willing to pay. Do you know how to get a book bound using that paper?

<comment><USER18> Like ilamont said you'll probably have to go through an offset printing process. There are some online services that offer offset printing for flyers etc. but only with the most common setups. Easiest is to find a few printing companies in your area and ask for offers. You might ask book designers or publishers in your area to recommend printers.

</comment></comment></comment></comment><comment><USER19> I enjoyed the article and appreciated the information on ISBN numbers in particular. In addition to the suggestions in the article, I would also add Scrivener and Vellum to the list of important writing and publishing tools.

For the most part, I think this article is full of excellent advice. I do disagree with three of the author's tips on how to write well though.

Specifically:

1\. There is no need to avoid alliteration. You shouldn't drown your work in it, of course, but skillfully employing alliteration in your text can help your sentences flow and can make certain aspects of your content more memorable. I'd say it is better to learn to use alliteration, and use it to good effect, than to eschew it altogether.

2\. Comparisons are not bad, especially in technical writing. When teaching, it is helpful to tie new concepts to existing knowledge and comparisons are one way to create these mental connections.

3\. Generalizations aren't bad in technical writing either, especially in code samples. For example, telling a programmer how to print "Hello, World!" to the screen is a helpful generalization. With that knowledge, the developer can now use that same print statement for console output, messages, debugging, logging, and other tasks. Developers can take this deceptively simple generalization and use it for all kinds of specialized needs.

I think the key here is to learn to use alliteration, comparisons, and generalizations in a way that strengthens your writing, rather than detracting from it.

<comment><USER20> Hi! I wrote the post, glad you found useful!

Also, I'm with you with the recommendations :P It was just a funny image I found on the internet and shared to produce some laughs...

I use a lot of comparisons alongside the book, especially from the "technical to the real world".

Generalizations are also important, otherwise, it is impossible to get to the point. They shape ideas. cheers!

<comment><USER19> Excellent job! Thank you for your efforts in sharing the information.

</comment></comment></comment><comment><USER21> I have a (draft) article where I've dumped all of the technical nitty gritty of self-publishing: [http://wiki.secretgeek.net/creating-a- book](http://wiki.secretgeek.net/creating-a-book)

</comment><comment><USER22> For papers and presentations at work (ones where i have time to do it right) I write the text, then run it through the xkcd simple writer ([https://xkcd.com/simplewriter/](https://xkcd.com/simplewriter/)), then make a new version with that output, then compare the two side by side and either edit the original down or the simple one up.

It is a fascinating lesson. Some names or terms are understood and should be there. Sometimes a more uncommon word is still clear AND more precise, so it stays. Other times I find complete sentences that I can just remove and my points are more visible.

I try to anticipate counter-arguments and head them off with detail, and/or add qualifiers to statements at the cost of my main point. This technique makes it clear when that happens so I can pull such out entirely or move to a distinct section. Do it a few times and you benefit even when not using the tool, though I need to refresh my brain monthlyish.

I removed "tend to", "most", "some", "often" and three sentences from the above. I also broke my second paragraph into two, just from habits I've learned this way.

</comment><comment><USER23> I'm currently in the process of drafting a book about modern data engineering. Data pipelines and data warehouses have changed drastically in the last five years and I feel the few books on the subject are drastically outdated.

I figured I'd just start with content and work my way into the logistics of the actual publishing process. This, and the comments in this thread, are a huge help on the logistics side. Thank you!

<comment><USER24> Your book sounds interesting! How to keep a track of your project?

</comment></comment><comment><USER25> A shameless plug for my own.

Publish on Kindle by Joel Dare

Explains how to format and publish a book using Libre Office. The book is short, getting strait to the point quickly. I don't see a lot of sales but readers that have reviewed it seem to like it.

[https://www.amazon.com/Publish-Kindle-write-ebook- software-e...](https://www.amazon.com/Publish-Kindle-write-ebook-software- ebook/dp/B00A4112ZM)

</comment><comment><USER26> > …and a website.

=:) Have you seen Superbooks on web with [https://bubblin.io](https://bubblin.io)?

Disclosure: I'm one of its developer.

<comment><USER27> Pretty cool site. FYI the page turn animation is unstable if I grab it near the center of the page (it rapidly rocks between angled-down-from-top and angled-up-from-bottom).

<comment><USER28> hi, I'm Sonica, CTO and cofounder of Bubblin here.

Yes, the transition is shaky when the curl is near the horizontal axis. We'll fix or remove it on our next iteration of Bookiza.JS [1]

[1] [https://bookiza.io](https://bookiza.io)

</comment></comment></comment><comment><USER29> I self published a book with leanpub. I used their online markdown editor. Then I used their preview feature to export in all formats: pdf, epub and mobi.

Then I uploaded these to my gumroad account, created a product and setup a payment widget on my website.

Smooth and simple process.

</comment><comment><USER30> A few comments. 1) kindle KDP is good, but you need to read up on format issues for print on demand. fine detail around gutter and margin needs to be understood for a high quality product. The specific DPI you render cover artwork in, and sizing has a huge impact. Kindle can be a bit arbitrary on what they accept and what they reject for print.

2) Kindle ePub demands a different set of outcomes. Do your print hardcopy first, then modify it to make the inputs to upload. I used calibre to do all the mods, but people swear by sigil. How you index makes a huge difference. Remember ePub is flow text. All those pagerefs have to be re-calculated into logical offsets and marks, not literal paper counts.

Again, the submission system can be a bit opaque.

If you want PoD hardcopy in Australia.. Avoid kindle. The amazon trade war with Australian taxation has hit hard and they have no local printery.

I recommend Ingramspark, who can do PoD, _and_ manage epublishing into kobo and nook and the like, and who have an agency status in amazon to sell your hardcopy. The PoD rates look competitive with the KDP ones, once you factor US delivery costs in.

(Amazon are pretty cool for worldwide rights)

Ingram demand really tight conformance on the PDF ISO specs for final output. Adobe, craptacular code though it is, will emit the legal form. Sigil and (yay!) libreoffice seem to also do this, but ymmv. Again, the DPI of your images make a huge difference to submission here. Some stuff demands 300, some demands 72 (for eprint covers)

Employ a professional editor/proofreader. They make a huge difference. Seriously, its money well spent. Some of them index too.

<comment><USER31> _Kindle can be a bit arbitrary on what they accept and what they reject for print._

For e-books, too. One of my books was mysteriously blocked without justification, and after several months and attempts at escalation was just as mysteriously re-instated.

</comment></comment><comment><USER32> Self-published books often have horrible layouts and graphical design, all- around. Thankfully basic LaTeX styles are quite decent and do their job.

Casas's Data Science Live Book looks nice with its basic LaTeX style, I think.

<comment><USER20> Thanks! All the magic for the layout is thanks to LaTeX and the use of the R package Bookdown: [https://bookdown.org/yihui/bookdown/](https://bookdown.org/yihui/bookdown/)

Bookdown provides a template to produce the pdf, and you can modify later on (for example customizing the table of contents, image positions, etc)

You write the book once, and it can be exported to html, pdf, epub (and kindle)...

<comment><USER32> These multiformat outputs have come a long way in the last five years, and it's good to see them working. Thanks for the link! The automated approach works best for technical books, just as in your case. There are still some esoteric layout features that are very difficult to automate.

</comment></comment></comment><comment><USER20> Hi! I'm Pablo Casas, the author of the "how-to" post & the Data Science Live Book. I didn't notice the link was here!

Let me know if I can help you, I see a lot of interest here :)

</comment><comment> atom-morgan Softcover should be listed here: [https://www.softcover.io/](https://www.softcover.io/)

You're familiar with it if you've been through Michael Hartl's Rails tutorial.

I used Softcover to self-publish my own book, releasing it in paperback on Amazon: [https://www.amazon.com/gp/product/1980891419/ref=dbs_a_def_r...](https://www.amazon.com/gp/product/1980891419/ref=dbs_a_def_rwt_hsch_vapi_taft_p1_i0)

</comment><comment><USER33> Nice post! I am an Indie Publisher as well and you hit on quite a few things I ran into as well. I went Gumroad right from the get-go and was very happy with my experience. I later added KDP into the mix as well with a Kindle/Printed version of the book, it hasn't done great but it is added credentials in a job interview :)

</comment><comment><USER34> Does anyone have experience publishing a book similar to a kid's coloring/activity book? I'm not interested in the e-book route and the services I've looked at don't seem to offer the type of binding books of this type have.

</comment><comment><USER35> A similar example based on my own experience, but for a non-technical book: [http://www.gabrielgambetta.com/tgl_open_source.html](http://www.gabrielgambetta.com/tgl_open_source.html)

</comment><comment><USER36> Just curious, is it (still) possible to make a living from writing books?

</comment><comment><USER37> Does anyone have a recommendation for just simply printing a book (epub or pdf) that I'm not interested in selling? Just to print a copy for me?

<comment><USER25> For short / simple books or "zines", consider a simple rotatable stapler and print at home. Look at many of the zine resources online. This is my own favorite way to publish small one-off or short run books.

</comment></comment><comment><USER38> I use [https://leanpub.com/](https://leanpub.com/) and it works for me.

</comment><comment><USER39> Does anyone know of a PoD service that will do hardcover books for a decent price?

<comment><USER8> Can you define 'decent'?

<comment><USER39> ha. OK, how about a PoD service that does hardcover books, at any price!

<comment><USER8> [http://www.lulu.com/create/books](http://www.lulu.com/create/books)

I've done all my books through Lulu - including doing a couple of projects for clients (schools) who did a 'make a book' project with the kids writing the stories, etc... their service has always been pretty good. The site is a bit clunky, but works. I've done a couple of one-offs for my own use as well.

And looks like they do hardcover (although I've never tried it).

<comment><USER40> I bought Operating Systems: Three Easy Pieces in hardcover from Lulu.

[http://www.lulu.com/shop/http://www.lulu.com/shop/remzi- arpa...](http://www.lulu.com/shop/http://www.lulu.com/shop/remzi-arpaci- dusseau-and-andrea-arpaci-dusseau/operating-systems-three-easy-pieces- hardcover-version-100/hardcover/product-23779861.html)

The book is over 700 pages. It's very nicely done. The front and back covers are just the right thickness. The book is not bound in signatures, it's edge glued ("perfect bound") like a paperback. But, the spine is extremely flexible and not attached to the casing. I was very careful to open it properly by gently creasing down sections of pages starting at the front and the back. If this is not done, there is risk of breaking the spine. I can open the book at any page and it lies flat on the table. The paper is medium weight, light ivory, and non-glossy. The casing is printed nicely with the title, and the dust jacket is first rate. Altogether, I'm quite pleased.

</comment></comment></comment></comment></comment><comment><USER41> Traditional offset printing company with a plug / PSA: below 500 copies print on demand services are great. Above 500 copies going with a traditional offset printing house will get you a better price. Of course you take on more inventory risk that way.

You also get access to more finishing and cover options, etc.</comment>


Introduction to programming in Java - <AUTHOR> http://www.cs.princeton.edu/introcs/

<comment><AUTHOR> Despite being an experienced Java programmer I found the scientific computation section really useful at bridging the gap between math formulas and working algorithms. Very concise explanations and example code included.</comment>


Qualcomm Said to Seek U.S. Import Ban for iPhones - <AUTHOR> https://www.bloomberg.com/news/articles/2017-05-03/qualcomm-said-to-seek-u-s-import-ban-for-iphones <comment><USER2> Dumb move by Qualcomm. They just put a bullet thru the head of any remaining modem business they had with Apple.

But maybe it had already reached that point? Qualcomm might already have lost all further modem design wins with Apple? So now they have nothing to lose by shifting to the ITC to battle exclusively on the patent front?

<comment><USER3> Arguably a dumber move was by Apple's CEO when he decided he just isn't going to pay anything (disregarding the fact they already signed a contract).

[https://finance.yahoo.com/news/apple-ceo-tim-cook- withholdin...](https://finance.yahoo.com/news/apple-ceo-tim-cook-withholding- royalties-owed-qualcomm-230913988.html)

Guess twice which way is ITC going to lean now.

It will be fairly interesting to see how this develops.

<comment><USER4> I think the company with $260 billion will win.

<comment><USER5> based on Appple's past lawsuits with Nokia, Ericsson, etc, Apple for the most part ended up paying up after a brief licensing renegotiation dance.</comment></comment></comment></comment>


Eben Moglen on privacy and the technology of memory - <AUTHOR> http://blip.tv/file/492903/

<comment><AUTHOR> Transcript: [http://en.wikisource.org/wiki/Freedom_Businesses_Protect_Pri...](http://en.wikisource.org/wiki/Freedom_Businesses_Protect_Privacy)</comment>


Why are programmers dead set against my concurrent Node.js runtime? - <AUTHOR> http://programmers.stackexchange.com/questions/315454/why-are-programmers-dead-set-against-my-concurrent-node-js-runtime-implementatio <comment><USER2> Does your concurrent runtime guarantee that scripts will be executed as if they were running on a single-threaded runtime ?

Consider a naive function that queries several asynchronous data sources and constructs an array of all distinct responses:

        function distinct(sources, next) {

          var left = sources.length;
          var result = [];

          for (var i = 0; i < sources.length; ++i)
             sources[i].query(process);

          function process(data){
             if (result.indexOf(data) < 0) result.push(data);
             if (--left == 0) next(result);
           }
        }

This code can only work if each call to `process()` is executed atomically, start-to-finish, without another call touching `result` or `left`. In any language but JS, this would be an obvious race condition. But JS guarantees that there will be no concurrent access, and plenty of third-party code relies (perhaps unknowingly) on this serial execution property.

Yes, this could have been implemented as a join, followed by duplicate elimination from the array of results, but it wasn't, and you'll find plenty of JS code which reinvents the wheel in a similar way. Even worse: you can't be sure that a given JS plugin or dependency _doesn't_ rely on single-threaded evaluation without an in-depth code review.

I'm not saying that your concurrent runtime is a bad idea. In fact, I think it's an absolutely great idea, but I also know that it's an insanely _hard_ thing to implement, because you need to reliably detect whether two pieces of code are allowed to run in parallel, or if there's a non-obvious dependency between them that would prevent it (e.g. thread A is about to read memory cell X, is there any way for thread B to write to memory cell X before it yields to the scheduler ?)

<comment><USER3> _This code can only work if each call to `process()` is executed atomically, start-to-finish, without another call touching `result` or `left`. In any language but JS, this would be an obvious race condition. But JS guarantees that there will be no concurrent access, and plenty of third-party code relies (perhaps unknowingly) on this serial execution property._

Wow, this is very strong guaranty. Thanks for this insight.

I do not write code in JS (only small spinets when necessary), so I do not have deep knowledge in it, but it would be really interesting to know where this property is described or what books should one read today to get into JS programming.

<comment><USER2> Not an easy read, but the ECMAScript specification is very interesting if you have the time:

[http://www.ecma- international.org/ecma-262/6.0/index.html#se...](http://www.ecma- international.org/ecma-262/6.0/index.html#sec-execution-contexts)

> At any point in time, there is at most one execution context that is > actually executing code.

> Evaluation of code by the running execution context may be suspended at > various points defined within this specification. Once the running execution > context has been suspended a different execution context may become the > running execution context and commence evaluating its code.

Suspending the evaluation context is triggered by executing certain constructs, some of which are obvious (calling a function suspends the caller context until that function returns) and some of which are complex (there's a nice game of context switching whenever generators are involved). The general idea is that the evaluation context decides to be suspended, rather than forced to do so by anything else (like a thread scheduler).

</comment></comment></comment><comment><USER4> Hard to say without knowing what you mean by "if two tasks try to access a variable concurrently it gets marked atomic and they contend for access." People who have worked in depth with multithreaded programs know that there be dragons here, and so unless you've proved your code correct for all cases, the assumption will be that it's broken. Do you handle the case that Thriqon brings up safely, for example? Do you take all locks in a consistent well- defined order? (If you don't, you're inviting deadlock.) What counts as a variable? If you mutate an array element, do you lock the whole array or just that one object?

These issues are why Python has a GIL and why Java has separate "synchronized(monitor) { ... }" blocks, and Java programmers still get it wrong all the time.

</comment><comment><USER5> People need a compelling reason to switch from the tried and tested to something new and unproven. So you need a compelling feature/benefit. But I cannot see what it is.

Is your approach going to significantly improve performance? Doubtful. You really need to prove this.

Is your approach going to make it easier/faster to write code? Definitely not, multithreaded code is many times harder to get right than single threaded code.

Is your approach going to be more robust? Definitely not, deadlocks, race conditions etc. are a nightmare to fix.

<comment><AUTHOR> Try writing a raytracer using a single thread, now try again with multiple threads working in tandem.

Trust me, I tried.

<comment><USER5> If you need that level of performance then JavaScript is the wrong tool for the job.

Node is mostly for request/response scenarios such as a web server or REST API server etc.

<comment><AUTHOR> That's exactly what I'm trying to change. JavaScript should be the right tool for that level of performance. It has JIT compilers, now it needs concurrency, and it'll perform with the best of them.

<comment><USER6> Javascript has mostly web programmers as a community. I'm not sure they have the same mindset as people who normally try to wring out the most performance from their machines. Even QBasic programmers knew how to turn to machine code for more performance. Nowadays the culture is "megahertz are cheap". That is the kind of culture that leads to e.g. Microsoft making an IOT operating system for the PI that weighs half a gigabyte and does not do much. Or people thinking that a 1 Ghz system with 512MB of RAM is too slow and is only good for browsing the Web and a 300 MHz system with 128MB of RAM is useless nowadays. These were once called workstations back in the day.

If you're trying to push Javascript to its limits and make it comparable to C++, good for you. Just remember that JS has many flaws.If you're going down that road I'd much prefer you give the world a Turbo javascript that comes with an IDE like Turbo C and the requisite documentation that all fit on a single 1.44MB disk and which can compile to directly executable code that doesn't need any runtime.

</comment></comment></comment></comment></comment><comment><USER3> You say that "if two tasks try to access a variable concurrently it gets marked atomic and they contend for access."

This is actually not sufficient. As victorNicollet pointed out, JS gives very strong guaranties when executing the code.

Let say

      function swap(a, b) {
        var swap;
        swap = a.amount;
        a.amount = b.amount;
        b.amount = swap.
      }

If you just mark a and b atomic, the code above will fail. You have to run it in transaction (see software transactional memory) or use locks.

If you use STM, then you can abstract away locks and have control over the lock taking order so you can avoid dead locks.

For example Clojure language is using STM, but they assume that the variables used in transaction are immutable, as they only manage the control over the references.

</comment><comment><USER7> First of all, if you enjoy this project keep at it. What you learn in the process will be more valuable to you than any advise you get from the naysayers.

However, don't expect everyone to jump on it. The original purpose of Node was to provide a simple way of handling I/O in a non-blocking fashioned without having to deal with the headache of true multi-threaded programming. So you are trying to re-write the engine to do the exact opposite of what it was created for.</comment>


Douglas Crockford's JavaScript Encyclopedia - <AUTHOR> http://www.crockford.com/javascript/encyclopedia/ <comment><USER2> A great resource. But I was put off by the preponderance of "Blah" in the entries.

<comment><USER3> I guess you could say those entries are the less good parts.

<comment><USER4> Well, both 'Browser' and 'CSS' appendices are just 'blah'. And 'Further Reading' just goes 404.

<comment><USER3> For the avoidance of confusion, I was just making a (fairly weak) joke in reference to Crockford's famous "JavaScript: The Good Parts" book.

The "blah" bits are obviously just placeholders - I'm sure there's no value judgment associated with them!

</comment></comment></comment></comment><comment><USER5> I don't think it's worth the effort writing another section on regex, just link to [https://regex101.com/](https://regex101.com/) or [http://www.regexr.com/](http://www.regexr.com/) a cheatsheet and call it done.

</comment><comment><USER6> "An array is a sequence of values. Each value is given an ordinal number.

Blah."

Why the "blah"?

<comment><USER7> He explains this here: [http://www.crockford.com/javascript/encyclopedia/preface.htm...](http://www.crockford.com/javascript/encyclopedia/preface.html)

(In summary, it's a started work but not finished, and he's hoping people will step in to help him finish it).

I do wonder how useful this going to prove, given Mozilla's already excellent reference material ([https://developer.mozilla.org/en- US/docs/Web/JavaScript/Refe...](https://developer.mozilla.org/en- US/docs/Web/JavaScript/Reference)).

</comment></comment><comment><USER8> Given the request for contribution, converting to markdown and sourcing on github would probably be prudent. Blah.

</comment><comment><USER9> JavaScript is a trademark of Oracle Corporation?

<comment><USER10> it is [https://news.ycombinator.com/item?id=8344049](https://news.ycombinator.com/item?id=8344049)</comment></comment>


Google Now: Is it just hype? How is it better than Siri? - <AUTHOR> http://www.google.com/landing/now/

<comment><AUTHOR> When you combine Siri, Find My Friends, and other built-in Apple apps, as well as 3rd party, I'm not convinced Google Now does anything new. If you really want to know how your favourite sports team is doing, you can just ask Siri "How are ___ doing?" Despite all the bashing Siri's voice recognition gets, I actually use it every day, with 99/100 time success rate.

</comment><comment><USER2> Google doesn't have a wholesome "voice" product like Apple has Siri.

They have Voice Search, which is used for searching stuff with your voice, or asking questions - much like Siri. As others have proven in tests, it's much faster than Siri, and also much more accurate, too.

Then they have Google Now, which is about giving you data "pre-emptively" before you even ask about it, like telling you how much you have till work in the morning, what is the latest score for your favorite sports, letting you know when your package is arriving, etc. It's based on Google search data, your location, your habits, your Gmail e-mails, and so on. They keep improving it and adding more stuff they can show you like this.</comment>


Putting Freebsd on little Wi-Fi router devices - <AUTHOR> http://adrianchadd.blogspot.com/2015/05/freebsd-wifi-build-or-wait-you-can-run.html

<comment><USER2> My primary use-case in small border firewalls like this is running sshuttle on them as a lightweight VPN.

The problem is, FreeBSD cannot properly run sshuttle - it can do it for regular traffic, and it works well, but it cannot do DNS lookups for the entire network over the tunnel. This shortcoming is documented by the sshuttle README @ github.[1]

I am very interested in having this fixed / worked around and am willing to PAY SOMEONE TO FIX IT. If anyone out there is interested in (finally) getting sshuttle working on FreeBSD, please email firstname.lastname@example.com and we can discuss.

[1] [https://github.com/apenwarr/sshuttle](https://github.com/apenwarr/sshuttle)

<comment><USER3> You sure you linked the right repo? There are forks with newer activity, and the linked readme doesn't say anything about DNS not working? (Or I'm to tired right now to find it) Is any of the forks a new "official" version?

<comment><USER4> If this is still a problem then yeah, join #freebsd on efnet and ask for some help. :)

</comment></comment></comment><comment><USER5> that's awesome. now for those who have a plethora of other MIPS & ARM devices but next to zero kernel hacking skills, what can they do?

<comment><USER4> jump in and ask questions. :)

<comment><USER5> ok. how do I add support for other similar Atheros MIPS SoCs? I have a few, and a bit of FreeBSD user/admin experience; but the kernel config files in the wifi git repo might as well have be conjured up using magic, to me.

more directly: how'd you do what you did? :)

<comment><USER4> Aha! Jump into #freebsd on IRC (on efnet, don't ask) and poke me (adri) and/or ask for help.

If it's the same SoC in a different box, then it isn't too hard:

* Attach serial console, boot to uboot. If you're using a d-link then you likely can't without some hardware hacking (and even then they sometimes disable serial RX in u-boot. Grr.) If you're using tp-link then you mash 'tpl' at the console whilst uboot is counting down from 1 second -> 0 seconds to drop into the prompt. * Chances are an existing kernel will boot - you can test using tftpboot and go. So, build an existing image, grab kernel.BLAH from ../tftpboot/, put it somewhere tftp'able, and:

uboot> setenv ipaddr ip-for-AP uboot> setenv serverip ip-of-server uboot> tftpboot 0x80050000 kernel.BLAH uboot> go 0x80050100

Some uboots don't have 'go', only 'bootm'. In that case you can grab the kernel.BLAH.lzma.uboot file - it's a compressed u-boot application. You have to ensure you load it /above/ where FreeBSD boots from, as uboot will decompress it for you into the right spot (here it's loaded into 0x80050000.) I typically put it 16MB above (and thus assume you have at least 32MB RAM):

uboot> tftpboot 0x81050000 kernel.BLAH.lzma.uboot uboot> bootm 0x81050000

It should decompress the kernel and start running. If it's the same SoC, then it should boot.

There are a few things you'll need for the board, which typically you lift from the openwrt board config files :) :

* The ethernet setup (what mode each port is in, PLL setups, etc) * the ethernet switch setup (which switch, internal/external, whether ports are hooked up pass-through or to the switch itself, the port config, LED config, etc.) * The atheros onboard wifi and where in flash the calibration data is. * The MAC addresses - where in flash are they. * if there's PCI/PCIe devices, where that is and where in flash the calibration data is * What the GPIO setup looks like. * If there's any custom required GPIO hacks - like say, "wifi RX LNA on gpio X", "enable the serial UART GPIOs explicitly", etc.

That part will take a little more to describe. Maybe I should also write a blog post/wiki article about it. But if you get it to the point of tftpboot'ing on a new piece of hardware then I'll absolutely help you with the rest on IRC and we can write it up.

If it's a different SoC - that's a different article. I have support up to the QCA955x - I think I have two or three more newer SoCs and ethernet switches to write support for, and some more wifi support to port from their reference driver. If you really want to do /this/ part then I'll write that up separately. :)

<comment><USER6> Can't help myself, why is there an official efnet and freenode channel? What's the deal there?

<comment><USER4> FreeBSD's older than freenode. Inertia is.. inertia. A lot of FreeBSD developers only hang out on efnet, so that's where a lot of stuff happens.

<comment><USER6> ah, good, was worried there was a split of the community or something.

</comment></comment></comment></comment></comment></comment></comment><comment><USER7> > Others have added ipfw support to do NAT and firewalling - I'm going to add > configuration rules for NAT, IPFW and routing soon so it's all integrated.

I thought that most of the BSD world had transitioned to PF at this point. I checked FreeBSD handbook and indeed all three firewalls are supported: IPF, IPFW, PF. Are the older ones still really relevant?

<comment><USER4> pfsense is using PF, and I'm not going to try and take any steam away from them.

ipfw is small, lightweight and fine for what I'm experimenting with.

If people want to include pf and send me a pull request with that as an option then by all means, please do!

<comment><USER8> pfSense sucks. PF sucks too.

<comment><USER4> _glare_

</comment></comment></comment></comment><comment><USER9> How little is little? Can I put it on the "original" linux router, the Linksys WRT54GL with 16MiB RAM and 4 MiB flash?

<comment><USER5> I believe it's impossible to squeeze relatively recent (9 or 10) FreeBSD versions down to that size. The linked git repo makes mention of needing at least 8MB for some builds. And you don't get IPv6 at that size.

<comment><USER4> Yup. OpenWRT uses (patched!) Linux, but with a much smaller set of libraries/utilities to fit in small storage footprints. I'm using ye normal FreeBSD libc, libcrypto, etc - things are pretty big.

It could be fun to take something like the BSD kernel and an alternative BSD licenced userland to make a much smaller footprint device, but I don't have the energy to /also/ do that.

If someone would like to do that then please do step up and do it! I wouldn't even mind if the FreeBSD wifi stack and Atheros MIPS support was ported back to NetBSD and NetBSD was used for this purpose.

<comment><USER9> Can you build a BSD on a case-insensitive file system? I wanted to look at modifying openwrt to fit on my routers but I was shocked to discover that linux needs a case-sensitve file system to build.

Anyway, it was a good read, thanks.

<comment><USER4> nope, it only builds inside freebsd for now. that's a bit of a sore point which I'd like to fix, but .. you know, ENOTIME.

</comment></comment></comment></comment></comment><comment><USER10> He mentions pfSense and though it's sort of tangential, I have used pfSense on a Netgate device for years and years and been very happy with its performance. Highly recommended.

<comment><USER11> Netgates are nice, but not cheap. What do you do when you want to run FreeBSD on a $50 wifi router you have laying around?

<comment><USER12> Not $50 and you probably don't already own one, but it can be done on the Uniquiti EdgeRouter Lite ($100, runs Debian MIPS + Vyatta as the default officially-supported Ubiquiti image but very hackable): [http://rtfm.net/FreeBSD/ERL/](http://rtfm.net/FreeBSD/ERL/)

<comment><USER5> to get the performance people are constantly raving about, you need the very proprietary binary blobs that take full advantage of the Cavium hardware acceleration.

otherwise it's just another beefy MIPS machine.

<comment><USER11> Yes, this is an important bit of subtext that most people don't realize.</comment></comment></comment></comment></comment>


FBI violated Americans' privacy by abusing access to NSA surveillance data - <AUTHOR> https://www.theverge.com/2019/10/8/20905678/fbi-violated-americans-privacy-rights-court-ruling-fisc-surveillance-nsa <comment><USER2> J. Edgar Hoover would have approved. The FBI is still doing things _his_ way.

</comment><comment><USER3> wow, that's really amazing. I'd never have thought that the FBI was violating my privacy</comment>


Racket 7.3 - <AUTHOR> https://download.racket-lang.org/v7.3.html <comment><USER2> I am really excited by Racket.

Unlike most minimalist LISP languages with a community of individual hackers who each have their own macros and packages, this one is battery included while still being the most flexible with the #lang header. Seriously, it comes with awesome data structures (actuelly more than Python).

The only thing that prevents me from using it as much as Python or C++ is the lack of tools for major editors. DrRacket is NOT ok, I would like a langserver and vscode extension so badly! When I have a bit of free time and have finished other projects with a higher priority, I'll definitely give it a try. (yes I'm aware there are some langservers but none of them is really production ready)

<comment><USER3> Emacs has a decent Racket mode with most of the functionality of DrRacket.

<comment><USER4> These days racket-mode for Emacs is more than decent!

Could wish for similar modes for SublimeText and VisualCode though.

<comment><USER5> [https://marketplace.visualstudio.com/items?itemName=evzen- wy...](https://marketplace.visualstudio.com/items?itemName=evzen- wybitul.magic-racket)

For VSCode

</comment></comment></comment></comment><comment><USER6> And yet I'm still too stupid to understand the macro system. Oh well.

I also didn't know there was a Chez version. Racket already has a native AOT compiler, right? What would the advantage be to run on Chez, faster or smaller compiled code?

<comment> jim-jim-jim Is it the general Scheme syntax-rules macros that you're struggling with? Or something unique to Racket? (which I haven't used)

If it's the former, I found this little article helpful when I was new to Scheme:

[http://www.willdonnelly.net/blog/scheme-syntax- rules/](http://www.willdonnelly.net/blog/scheme-syntax-rules/)

<comment><USER7> For Racket specific macro tooling syntax-parse [0] in combination with syntax classes is usually the suggested starting point. Hygenic with pattern matching and a bunch of other features for parsing s-expression grammars. As mentioned down-thread Greg Hendershott's Fear of Macros [1] is a good starting point for a number of folks. The curriculum for Racket School 2018 [2] also has exercises that help introduce the syntax-parse tooling.

0\. [https://docs.racket- lang.org/syntax/Parsing_Syntax.html](https://docs.racket- lang.org/syntax/Parsing_Syntax.html) 1\. [https://www.greghendershott.com/fear-of- macros/](https://www.greghendershott.com/fear-of-macros/) 2\. [https://summer- school.racket-lang.org/2018/plan/](https://summer-school.racket- lang.org/2018/plan/)

</comment></comment></comment><comment><USER8> I really wish there was a standard Scheme that compiled to native for all desktop and mobile OS'es and also supported multi-threading. Does anyone know about one ?

<comment><USER9> LambdaNative is a cross-platform development environment written in Scheme, supporting Android, iOS, BlackBerry 10, OS X, Linux, Windows, OpenBSD, NetBSD, FreeBSD and OpenWrt.

[http://www.lambdanative.org/](http://www.lambdanative.org/)

<comment><USER8> LambdaNative is a wrapper and abstraction over Gambit Scheme. It does not support multi-core threading.

<comment><USER9> Well, that was my best shot :(. I'm sorry I don't have an answer then.

You were asking for threads, and gambit has lightweight threads, so I assumed there was a way to use them via ln. Multi-core threading is a different story though.

<comment><USER8> Yes, it's a bit of a pity that great functional languages like Scheme and even the veteran common LISP are loosing out to modern languages like Kotlin because of lack of support in these critical, functional areas. Especially when REPL based development is so _amazingly_ productive.

<comment><USER10> Common Lisp has real threading with a standardized interface via Bordeaux- threads and, with some limitations runs on most of the desktop and mobile operating systems one would expect (the limitation being that most workflows have you write the GUIs in a different language and then call into CL, although EQL is an exception to this rule: [https://www.cliki.net/EQL](https://www.cliki.net/EQL)

<comment><USER11> Does EQL still depend on smoke like common-qt does? Because smoke is so deprecated now that I simply gave up trying to get it to build common-qt on a recent distro.

<comment><USER10> I don't think so, it's built on ECL, so the lisp is compiled to C and then linked to Qt. However, I'm not sure how all the details work.

<comment><USER10> And, there's a qt5 version.

</comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER12> Is typed racket still very slow? I'm interested in hearing how Racket's gradual typing works.

<comment><USER13> Typed racket isn't slow (as far as scripting languages go). Maybe you're thinking of Racket's "contract" system?

AFAIK typed racket does type-checking during compilation (via raco); the resulting code is no slower than normal Racket, although I'm not sure if it's faster either.

The contract system is different; it works on normal, untyped Racket code and performs checks at runtime; similar to using Python decorators to check the input and output of a function. This slows things down, so it's recommended to only check things at module boundaries. For example:

        #lang racket
        (require racket/contract)
        (require racket/match)
        (provide factorial)

        (define/contract (factorial n)
          (-> exact-nonnegative-integer?
              exact-nonnegative-integer?)
          (fact n))

        (define (fact n)
          (match n
            [0 1]
            [_ (* n (fact (- n 1)))]))

This module exposes the `factorial` function, which checks (at runtime) whether its argument and return value are non-negative integers (i.e. 0, 1, 2, ...). The actual calculation is done by the `fact` function, which is private and doesn't do any checks. If we don't separate the checks from the calculation, we would end up running the checks on every recursive call, which would slow things down a lot.

As far as I'm aware, Racket's gradual typing is done by contracts at the interface between typed and untyped code. Hence it's not that typed racket is slow, it's that passing untyped values into typed functions can be slow, if we want accurate blame information for errors.

<comment><USER12> I'm referring to Takikawa et al (2016), who reported performance 50-100 times worse performance numbers by mixing typed and untyped Racket code together. Actually 100 times slower execution. They used type annotations on the module level. Would be interesting to know if Racket developers have proven them wrong and if so, how.

[http://www.ccis.northeastern.edu/home/types/publications/gra...](http://www.ccis.northeastern.edu/home/types/publications/gradual- dead/pre-treatment.pdf)

<comment><USER14> Just to make it clear, the authors of that paper (including myself) are all to some extent Racket developers. Some big improvements have been made but there are still pathological cases. For the latest published on this see this paper: [http://users.cs.northwestern.edu/~robby/pubs/papers/oopsla20...](http://users.cs.northwestern.edu/~robby/pubs/papers/oopsla2018-fgsfs.pdf)

But also it's important to note that it's not Typed Racket or Racket in isolation that are slow, but the inter-mingling of the two due to contract overhead.

</comment></comment></comment></comment><comment><USER15> Font looks like shit in Firefox on macOS X.

<comment><USER3> For reasons I find difficult to understand, the text is between <pre> tags and uses a monospace font (Inconsolata). It is curious that a project that cites Matthew Butterick as a contributor should make such poor decisions about typography, especially when the rest of the documentation is above average in that area.

<comment><USER16> It's wrapped in <pre> tags because it is preformatted text of the type that would be used in email, etc., announcements (probably becauae it's the exact text from those media, without transformation), so not using <pre> would lose significant formatting.

Of course, the formatting is broken anyway, because two of the continuation lines of bullet-pointed lines are underindented by one space.

<comment><USER15> Making the font bold is what makes it look so bad in Firefox. In combination with the font.</comment></comment></comment></comment>


Building Web Reputation Systems: On Karma - Lessons on User Reputation Design - <AUTHOR> http://buildingreputation.com/writings/2010/02/on_karma.html <comment><USER2> I'd like to see a site that used the proposed karma system. It feels a little complex, though.

</comment><comment><USER3> Impressive level of depth. Long read, bookmarked to finish later, but really good so far!</comment>