Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
pat_shaughnessy
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
7 ms
·
31.
▲
by
pat_shaughnessy
14y ago
FYI I used a Ruby library called Coderay to handle code highlighting. This wasn't integrated with Pages, but instead with the Bookshop Ruby gem after I moved the text into HTML files. The code was inline in the HTML, but set apart using pre
32.
▲
by
pat_shaughnessy
14y ago
XSL! Oh no! I'll have to steer clear of that :)
33.
▲
by
pat_shaughnessy
14y ago
The only complaint I've heard about Leanpub is that they don't give the author access to end user email addresses. I don't use email as a marketing tool much (almost never) but I would guess this could be a show-stopper for many eBook autho
34.
▲
by
pat_shaughnessy
14y ago
Thanks for the links - I had heard of Scrivener but didn't try using it. The approach I took with Bookshop is more geared towards programmers and web developers who are comfortable with HTML/CSS coding. I love your "in 30 minutes" idea! Eas
35.
▲
by
pat_shaughnessy
14y ago
No I didn't. Sorry I'm not familiar with it - can you tell us what the pros/cons of that approach might be vs. what I did?
36.
▲
by
pat_shaughnessy
14y ago
Thank you :) Yes! "magical" is a great way to describe the experience... As you suggest, I tried to keep things simple with the text, but in the end since I use a lot of code samples and diagrams it was difficult to do that. And yes, render
37.
▲
by
pat_shaughnessy
14y ago
Yes, and it might be good enough for short, simple documents. For me using a product like PrinceXML gave me the power of HTML/CSS to control the eBook's appearance more precisely. Also, using a Ruby-based build process let me take advantage
38.
▲
by
pat_shaughnessy
14y ago
Yes - Ruby's internal workings are very mysterious to most people. While the C source code behind Ruby is open source, it's hard to read and understand for most people. In Ruby Under a Microscope, I explain how Ruby works internally… witho
39.
▲
by
pat_shaughnessy
14y ago
Nice! I think I have my design concept for RUAM part 2! :)
40.
▲
by
pat_shaughnessy
14y ago
FYI My download kit includes a mobi file, and it looks acceptable on the kindle. But yes, in black and white you'll lose a lot of the value of the diagrams I drew.
41.
▲
by
pat_shaughnessy
14y ago
Exactly, Peter. It's not tremendously hard to read the C code and understand what it is doing (usually), if you're familiar with C syntax. But it was tremendously difficult at times understanding _why_ it was doing what it was doing.
42.
▲
by
pat_shaughnessy
14y ago
Yea I've thought about that. Let me see what I can do... :) thanks.
43.
▲
by
pat_shaughnessy
14y ago
Hey thanks for asking - and yes, in the preface to the book I do explain how I figure this stuff out. But basically I: - study the C code for a long time - step through it in GDB a lot - add printf statements and recompile it to print out d
44.
▲
by
pat_shaughnessy
14y ago
Thanks for posting this :) ...I'm happy to answer any questions anyone has.
45.
▲
by
pat_shaughnessy
14y ago
I complete agree, Peter! I did have the chance to help proofread it for Jesse and it's awesome - full of great info. Two thumbs up!
46.
▲
by
pat_shaughnessy
14y ago
Oops - I missed that in my research. Yes, I agree this sentence is misleading; I'll update the text later on today. I suppose it's only true that Lisp (specifically Scheme) was the first widely used implementation of closures.
47.
▲
by
pat_shaughnessy
14y ago
You might be right about the general meaning of the term "block." However, in Ruby blocks happen to be implemented as closures. This was one of the main points I was trying to make... that blocks aren't as simple as they seem, at least in R
48.
▲
by
pat_shaughnessy
14y ago
Thank you!
49.
▲
by
pat_shaughnessy
14y ago
I'll be sure to take a look at that, and thanks for the link. No, no thoughts on it right now.
50.
▲
by
pat_shaughnessy
14y ago
Yup - I'm planning to cover that later in the same chapter in my eBook. Your description is perfect: it's a closure with the "self" redirected to a different object (the receiver of instance_eval).
51.
▲
by
pat_shaughnessy
14y ago
No - not the "unholy" part. Like vidarh I'm someone who loves Ruby (why else would I write a book about it!) but I do agree with him about the internal implementation: it's very confusing and hard to understand. At times, this leaks out int
52.
▲
by
pat_shaughnessy
14y ago
Lol - very funny. I have to agree you; as a Rubyist studying MRI internals there's a lot of very confusing code in there. And FYI Ruby 1.9/2.0 retains the confusing Bison grammar file. One of my goals with the eBook is to allow readers to g
53.
▲
by
pat_shaughnessy
14y ago
I admittedly don't know a lot about Smalltalk - I was aware Ruby's (and every other language's) object oriented ideas were invented originally with Smalltalk, but I didn't know it had a block/closure syntax also. In this post I wanted to go
54.
▲
by
pat_shaughnessy
14y ago
Yes you're right! I stand corrected; will update the post when I have a chance.
55.
▲
by
pat_shaughnessy
14y ago
Thanks for the link to Yehuda's post - it was a great read. I love how he compared Javascript and Ruby, and it's intriguing what he said at the bottom about how JS might include "block lambdas" similar to Ruby in the future. Fascinating!
56.
▲
How Ruby Borrowed a Decades Old Idea From Lisp
(patshaughnessy.net)
57 points
by
pat_shaughnessy
14y ago
|
62 comments
57.
▲
by
pat_shaughnessy
14y ago
Agreed! Also, beyond the great tech content there's something charming about this one.
58.
▲
Rare Are GC Talks
(furious-waterfall-55.heroku.com)
138 points
by
pat_shaughnessy
14y ago
|
39 comments
59.
▲
by
pat_shaughnessy
14y ago
Thanks! Yea I like writing about complex topics in a simple way that anyone can understand... that's one of my goals, maybe the most important one.
60.
▲
by
pat_shaughnessy
15y ago
Great idea - although PDF supports search, having a real text version seems like it would be useful for authors to provide also. Thanks for the tip...
More ›