Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
djacobs
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
25 ms
·
211.
▲
by
djacobs
16y ago
Convention says: get your mutual friends to share it on Facebook. My suggestion? A dream within a dream within a dream.
212.
▲
by
djacobs
16y ago
I don't mind downvotes, but what are they for? (I upvoted the parent post out of the negatives and now I'm there... I guess that's karma huh.)
213.
▲
by
djacobs
16y ago
I agree with you. This is simple substitution. (If we're going to call this a regex mechanism, so is Find/Replace in Word.)
214.
▲
by
djacobs
16y ago
For the backend task, is the file encoding UTF-8 with Unix line feeds?
215.
▲
by
djacobs
16y ago
The point is that you have to write the for loop and if statement and concatenation for each different function you want to define. The better way is to use higher order functions, which Java lacks.
216.
▲
by
djacobs
16y ago
I used this exact example a few months ago to compare Java and Ruby [1]. Funny how it keeps coming up. (While I was using Java, I never even knew there was a need for higher-order functions.) [1] http://news.ycombinator.com/item?id=1947723
217.
▲
by
djacobs
16y ago
Excellent, will send an e-mail tomorrow. I'm really excited about making an integral part of my day as up-to-date as the rest of my workflow.
218.
▲
by
djacobs
16y ago
I work in a lab and also code. I was just thinking about implementing a prototype site with this functionality this week . I have coded for a while but have no coding resume, so I don't know if I qualify for your position. But here are a
219.
▲
by
djacobs
16y ago
I've hit #2 and #5 and not had to cache my site. I was running Rails 2.3.8, thin and nginx on the cheapest slice that Slicehost sells. Is it normal not to have to cache for HN + Reddit?
220.
▲
by
djacobs
16y ago
So the exact same bug affects Javascript?
221.
▲
by
djacobs
16y ago
Maybe I'm dense, but why does this affect apps that use JSON?
222.
▲
by
djacobs
16y ago
Polymorphism.
223.
▲
by
djacobs
16y ago
Exactly, but there should be an easier syntax that declaring a lambda for each algorithm I want to map over.
224.
▲
by
djacobs
16y ago
I'm going to go ahead and guess that you didn't read the entire article. You can disagree with what I say, but it's anything but a rant.
225.
▲
by
djacobs
16y ago
I'm not a fan of if statements (especially nested) or for loops (except for side effects), which is why I coded like I did — in the style of a Lisp. That said, thanks for the excellent code. I'm going to look it over. I'll go back tomorrow
226.
▲
by
djacobs
16y ago
It seems to me like join makes sense in any context where you have multiple elements that you want joined. With strings, you happen to have a separator. But you might also want to join several lists into one flattened list. (Edit: I know th
227.
▲
by
djacobs
16y ago
Sounds to me like join would work better as a function ;)
228.
▲
by
djacobs
16y ago
I stand corrected. However, I do think that in order to use this like I want ... map(str.capitalize, ['a', 'b', 'c']) ... you have to understand far too much of Python's implementation (for example, that str is not a function, but a class t
229.
▲
by
djacobs
16y ago
You could always do map(lambda s: s.capitalize(), strlist) That I could, and in fact, I do give an example like that in the accompanying analysis article [1]. However, it's not simple as Ruby. This is a comparison, after all. The tw
230.
▲
by
djacobs
16y ago
I don't think so, select is just a filter. List comprehensions map and select at the same time. Regarding TLDMs, how do you propose mapping a TLDM over an array? For example: def transform(x) # implementation ... end list = [1,
231.
▲
Ruby and Python: pivot points
(allthingsprogress.com)
43 points
by
djacobs
16y ago
|
31 comments
232.
▲
by
djacobs
16y ago
Interesting in light of the (relatively) new penchant for pop up ads that don't create a new window. Can we expect those to go away, too?
233.
▲
by
djacobs
16y ago
Ruby for functional programming ... I realize lots of people don't swing that way. Thoughts?
234.
▲
by
djacobs
16y ago
I've been coding Python in Vim for a while but hadn't heard of a lot of these. Nice find.
235.
▲
by
djacobs
16y ago
Now I just need something to open up the mail, scan it, and forward it to me as an attachment. Talk about etherealization[1]. [1] http://paulgraham.com/tablets.html
236.
▲
The 'ugliness' of Python - Ruby, Python, functions & objects
(allthingsprogress.com)
40 points
by
djacobs
16y ago
|
9 comments
237.
▲
by
djacobs
16y ago
I chose Ruby then Python [1]. I use them both for the same kinds of things (especially functional programming [2]), but I'm surprised almost daily at how these similar languages drive such different ecosystems. [1] http://news.ycombinato
238.
▲
by
djacobs
16y ago
As someone who's learning both right now and not sure which to use, this is invaluable.
239.
▲
by
djacobs
16y ago
This article is a great example of what's so great about the Python ecosystem. I don't think I've ever seen something like this for the Ruby data structures (except for in the Hamster data structure project [1], which has solid performance
240.
▲
by
djacobs
16y ago
Interesting because it does make it harder for a curious straight friend to find out that you're gay, but it's still not impossible. If you're that concerned about it, I don't think OKCupid is really the route to go. If you're not so concer
More ›