Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
munificent
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
2780 ms
·
7411.
▲
by
munificent
16y ago
Best use of nesting instinct ever.
7412.
▲
by
munificent
16y ago
> I mean, what happens if you delete 3 things, and realize that you want to undo the 1st one? Just drag the first one out of the trash and leave the other two there. > What happens if the action you take, changes the state of the us
7413.
▲
by
munificent
16y ago
What programming language is that not the case for?
7414.
▲
by
munificent
16y ago
> "Given an infinitely long linked list which you can only traverse once select a random item with O(1) storage." If the goal of the question is to select a random item where all items have the same probability of being selected, it's i
7415.
▲
by
munificent
16y ago
> What's an example of "more fine grained control"? Sure, consider this: http://pastebin.com/H3c83X1K Here we can give a client a write-only interface to the Mailbox, or one of two readonly (i.e. "const") interfaces that each have acc
7416.
▲
by
munificent
16y ago
Const != immutable. Const in C++ gives you a read-only view into an object. You can accomplish the same goal with more fine-grained control by using interfaces in C# (or Java, which also lacks const). Instead of returning a const reference
7417.
▲
by
munificent
16y ago
> However, I find this rather harsh aversion to paying a few bucks for peer-reviewed, scientific content curious. I already paid for it. A fraction of my taxes go to funding educational organizations so that they can produce these paper
7418.
▲
by
munificent
16y ago
> What if you've got a few dozen local variables? In that case, I would consider that I have a larger problem than merely one of documentation.
7419.
▲
by
munificent
16y ago
I used to find it unnatural too. Recently, I changed my working habits so that I keep a running todo list of things I'm working on. When I complete a task, the todo becomes the commit message, and I leave it in present tense. Other reasons
7420.
▲
by
munificent
16y ago
> When you encounter a token that is the same token as a keyword, you need to use context to determine if it is actually a keyword or part of an identifier. You're presuming here that a space delimits tokens. In this language, that may
7421.
▲
by
munificent
16y ago
> I want metaprogramming on top of everything and its brother, not Ruby syntax. Depending on what you mean by metaprogramming, my goals for Magpie may fit what you're looking for. Its syntax is a bit like Ruby, and it features the dynam
7422.
▲
by
munificent
16y ago
I don't think you have that right. I read it as that kind of behavior modification isn't done that often after load time . During load time, all sorts of shenanigans are going on (monkey patching, etc.)
7423.
▲
by
munificent
16y ago
Type inference is nice and goes a long way, but it's still fundamentally different from being able to modify types imperatively at load time. For example, in Ruby, it's trivial to swap out a method with a version that does some logging, but
7424.
▲
by
munificent
16y ago
> Another fairly interesting paper titled "Evaluating the dynamic behaviour of Python applications", shows that programs in dynamic languages with these runtime modification behaviours often stop modifying their behaviour after a certai
7425.
▲
by
munificent
16y ago
From skimming wikipedia and the code, it looks like a trellis is more or less a VList where each array in the VList is represented by a complete binary tree of an appropriate depth. That gives you the VList's O(1) average performance to fin
7426.
▲
by
munificent
16y ago
Circular data structures where you need to simultaneously initialize two values to each other are the common case where this is problematic. To me, that's a fairly rare edge case and you can easily handle it using mutable variables and opti
7427.
▲
by
munificent
16y ago
Constructors are easy to write in GO: Maybe I didn't clarify it enough, but I tried to explain my problem with initialization functions in the "Future-proofing" section: "If you later need more complex initialization, you’ll have to repla
7428.
▲
by
munificent
16y ago
Yeah, at the time, I found his explanation uncompelling: which means you should have the choice to do efficient things, if you know what you're doing. That directly clashes with other design choices in Go. For example, taking the address
7429.
▲
by
munificent
16y ago
I agree completely. I had a note to discuss that (and globals, eww!) but I cut it because honestly that post was too long already.
7430.
▲
by
munificent
16y ago
I do think D is probably closer to where my heart is. I think my ideal low-level language is a bit like C + some of ML's type system. I think it may be possible to get that without being as heavyweight as D, but I'm not sure.
7431.
▲
by
munificent
16y ago
Go is supposed to be minimalist. Every language is designed according to that rule. No language designer thinks, "Let me just slap some extra unneeded stuff in there." They just differ on what they consider necessary. In Go's case, I th
7432.
▲
by
munificent
16y ago
This is from hazy memory, but I stated that because I think GCC, Clang, MS's C# compiler, and javac all use hand-rolled parsers.
7433.
▲
by
munificent
16y ago
> the language implementation is incredibly easy to read and understand. Thanks! After wading through an SML compiler whose author apparently thought single-letter variables and no documentation was perfectly fine in a language that doe
7434.
▲
by
munificent
17y ago
My book aims to cover sort of the code-between-the-features. It won't teach you too much about AI, physics, etc. (there are plenty of other books for that), but I hope it will help you get those systems to hang together gracefully.
7435.
▲
by
munificent
17y ago
I'm the author. When I add new content, I'll make a note of it on my blog here: journal.stuffwithstuff.com. You can watch the RSS feed for that to see when new stuff is up. I'm talking to a publisher right now, so it might be a little while