The js code can be tested on https://csl.name/mandelbrot
833 karma · joined July 19, 2008
The js code can be tested on https://csl.name/mandelbrot
https://github.com/cslarsen/busy-beaver
Of course I cheat by knowing S(n).
Can anyone in the know illuminate this with some examples?
A tip is to look at the function declaration in the header files. There I, at least, use somewhat longer parameter names for descriptive purposes (along with documentation) but usually use short ones in the function bodies.
So, if your functions are short and to the point (low coupling, high cohesion, in Coding Complete parlance), then I consider short parameter and variable names a good style. But it's just one ingredient in good code.
Unless you're looking at competitive programming, I feel the best programmers make clear code with short names.
What I'd like to see is hotpatching the function for another process, but I guess that's very hard to do with ASLR. Probably doable with some tricks, though.
Edit: Come to think of it, gdb is able to attach to a running process w/o debug symbols and find function addresses. So in other words, I just need to dig into and grok the gdb source.
Discussion: https://news.ycombinator.com/item?id=8172461
Of course, you should be pretty careful with interpreting results as a hobbyist (as I am). But probing your genome with a parser, like the one I've made, is a great vehicle for piquing your intellectual curiosity.
https://github.com/cslarsen/dna-traits
The test for Alzheimers is here: https://github.com/cslarsen/dna-traits/blob/master/py-dnatra... (the algorithm used to be patented, by the way). By closely reading the algorithm, you can probably find out yourself, given that 23andMe still lets you browse your genome.
To see all health reports, run this file on the downloaded genome: https://github.com/cslarsen/dna-traits/blob/master/py-dnatra... (you have to compile the C++ code first)
Actually was playing with the idea of monetizing off this project, but the laws in my country prohibit me from doing so. In fact, just using the program I made is illegal unless its my own genome.
I know this is a problem for at least the Byteplay module.
I'm certainly seeing a lot of cool projects that make assembly more accessible, not to mention a lot of good guides on the web. As for myself, I've recently made Python ctypes bindings for GNU Lightning, which lets you write architecture agnostic RISC assembly, then JIT to native code on x86, ARM, etc. See https://github.com/cslarsen/lyn/
It's pretty light-weight and JITs fast. The point is that it's very fun and addictive to do assembly from a language like Python.
And, I guess it's web-only, which is a shame, since I wouldn't be able to automatically check my TeX-documents as part of the build process.
I'm Norwegian, and I do consider English as one of my primary languages --- but it's not my native language, so it's easy to write something that doesn't sound right to others, not to mention grammatical problems. For instance, it's been years since I learned about punctuation and comma, and there are differences between Norwegian and English in this regard.
Writing comments online is one thing. It's entirely different when I have to write reports and stuff like that. That's when I'd like to use a good tool to help with grammar and general flow. It's easy to make a mistake when you're writing tens of pages of text that you have to deliver somewhere.
Some people have suggested removing call/cc from Scheme. I don't know if they want to put delimited continuations in its stead. See http://okmij.org/ftp/continuations/against-callcc.html
I think the best explanation (mentioned in the article) is that you take a copy of the entire call stack, and can then reinstate it whenever you want to.
An even simpler explanation is Guy L. Steele's that it's "gotos with parameters", that is, basically goto, but let's you pass a parameter to the destination:
(define saved-continuation #f)
(display (string-append "hello "
(call/cc (lambda (here)
(set! saved-continuation here)
"world"))
"!\n"))
; Displays: "hello world!"
(saved-continuation "everyone")
; Displays "hello everyone!"
Running it with guile: $ guile cc.scm
hello world!
hello everyone!
This code makes `saved-continuation` equivalent to (lambda (param)
(display (string-append "hello " param "!\n"))))
Matt Might has an explanation, too: http://matt.might.net/articles/programming-with-continuation...Finally, we have delimited continuations, which lets you basically slice off a portion of the current call stack, instead of taking it in its entirety. It's more powerful and lets one create true functions, and implement any other control flow construct.
#1: What's often not mentioned is the fact that you can only jump to code you've already run. So you can't jump straight into somewhere your program has not been, yet.
Hard to see from the videos, but I don't really expect anything better than 10ms. At least, we can hope to see incremental improvements in the coming years.
I also remember Hein recommended me to study Paxos before delving into Raft, actually, even though Raft is supposedly easier to get started with.
Also, if this thing is truly mangling bytecode, it's not portable between
different python versions [...] seems to be done by interpy_untokenize,
which boils down to some string mangling
It uses the Python file encoding property ("# coding: foobar") to rewrite the source code, not the bytecode, and they refer to pyxl as an inspiration.For a good explanation, see https://github.com/dropbox/pyxl
If you compare yourself with others,
you may become vain and bitter;
for always there will be greater and lesser persons than yourself.
Enjoy your achievements as well as your plans.
I recommend reading the whole thing; it's beautiful and very inspirational.
Also, Richard Feynman has a great quote about disregarding what others are doing, which I guess is from "Surely you're joking, Mr. Feynman", but can't find his exact words (can anyone help me out?).From https://imagineer7.wordpress.com/2013/03/14/the-most-importa...
Feynman wrote one word, in capitals: DISREGARD on his
notepad when he read that. This word became his motto.
That, he said, was the whole point. That was what he had
forgotten, and why he had been making so little progress.
The way for thinkers like himself to make a breakthrough
was to be ignorant of what everybody else was doing and
make their own interpretations and guesses.
You can't stop time, so you better learn how to deal with getting older. I'm sure you're a great person, just find out what you want to spend your time on and focus on that, and disregard what others are doing. As Max Ehrmann said: "Strive to be happy".Anyway, here's a great post on solving a Project Euler problem using Z3/SMT-lib, which may be inspiring for other novices like myself:
Yes. It could be as simple as receiving values from a Python generator (or equivalent mechanism in your favourite language), where you don't know the number of items beforehand (and querying for the length is either impossible or expensive).
In such a cases, using reservoir sampling is an elegant solution, because you're probably in a situation where you'll be iterating through all values anyway.
It would be nice to be able to see results by specifying a geographic radius.
I've used it while making bindings for it for my Scheme project: https://github.com/cslarsen/mickey-scheme/tree/master/lib/op...
(And they use Stripe for payments, which of course is relevant here on HN. And as a first time user, it was a breeze to donate.)