Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
yoklov
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
74 ms
·
661.
▲
by
yoklov
13y ago
I haven't written Java in a while and I've never seen any other examples of JAX-RS, so feel free to take this with a grain of salt. That said, in my opinion JAX-RS looks uglier, less clear, and more verbose than Spark, and I'
662.
▲
by
yoklov
13y ago
Writing a reasonable program in Brainfuck isn't that hard. Malborge, on the other hand, was specifically designed to be impossible to write useful programs in. IIRC, Brainfuck was designed to be easy to write a compiler for. From the w
663.
▲
by
yoklov
13y ago
Sure, it's better than the goroutine approach, but that doesn't say much. It becomes quite suboptimal if you have a large amount of data. I also think that you're likely underestimating the cost of the additional memory alloc
664.
▲
by
yoklov
13y ago
For one thing, that will use much more memory and take more time to compute.
665.
▲
by
yoklov
13y ago
Well it's 16 bytes at a time, and not 16 bytes maximum, but there are already the (arguably misguided) repeat prefixes for string instructions, which are designed for more or less that exact purpose.
666.
▲
by
yoklov
13y ago
Err, why? It's fairly easy, and you get so much for free: portability, compiler optimizations, easy use of C libraries, easy interfacing with other languages...
667.
▲
by
yoklov
13y ago
Not unless the compiler did some magic to remove the heap allocations, which iirc none of the JS engines do yet LuaJIT, however, will. see http://wiki.luajit.org/Allocation-Sinking-Optimization . I believe the Dart VM does
668.
▲
by
yoklov
13y ago
I've seen them get quite a bit of use in graphical code, which is, well, actually fairly common in JS. Code that uses bitwise operations looks fairly ugly as is. Hav e you considered enabling them with a prefix or suffix? E.G. ^$ inste
669.
▲
by
yoklov
13y ago
http://creativecommons.org/choose/zero/ is a good alternative/method to releasing into the public domain, and is (to my knowledge, IANAL) unambiguous internationally.
670.
▲
by
yoklov
13y ago
Of course! The parent mentioned JS getting them however, which is, as I mentioned, impossible.
671.
▲
by
yoklov
13y ago
Unfortunately, tail calls can't be implemented without breaking JS semantics. See: http://code.google.com/p/v8/issues/detail?id=457 .
672.
▲
by
yoklov
13y ago
If I recall correctly, this book also comes very highly recommended from Rich Hickey, the author of Clojure.
673.
▲
by
yoklov
13y ago
This isn't an issue for Lua, because so much effort has gone into making it extremely portable. Regardless, a port to C++ would be possible, though I'd (without thinking about it much) guess it would take a performance hit due to the increa
674.
▲
by
yoklov
13y ago
While you could do much worse for a measure of popularity, some languages are popular, but dont have a huge open source community. For example, Objective-C and C# are both probably higher in reality.
675.
▲
by
yoklov
13y ago
I once someone jokingly do (the second only always works in C, not C++) #define else #define struct union Evil!
676.
▲
by
yoklov
13y ago
I'm fairly certain that shadowing a keyword with a macro is forbidden by the standard (or invokes UB?) but this will still work for most compilers, provided LET is defined reasonably. Hm, something like #define LET(name, X) \
677.
▲
by
yoklov
13y ago
I can't disagree more! Everything is an int -- Basically untyped, in C terms! Maybe less noisy, but hard to figure out what's going on.
678.
▲
by
yoklov
13y ago
If you're within the terms of the license, you're fine. The developer should say so in the license (or choose another license) if they don't want it reproduced anywhere. A link to the original is common courtesy, however. In the case of the
679.
▲
by
yoklov
13y ago
Fascinating. I look forward to the coverage of Jemalloc! On a related note, I'd love to use (or see someone else use) some of the techniques used by modern mallocs (tcmalloc, jemalloc, Hoard, etc) in a concurrent garbage collector. I believ
680.
▲
by
yoklov
13y ago
On a vaguely related note, Darius Bacon's Lisp-in-awk has always brought a smile to my face: https://github.com/darius/awklisp/blob/master/awklisp
681.
▲
by
yoklov
13y ago
LLVM (#llvm) uses oftc as well, which I've always wondered about.
682.
▲
by
yoklov
13y ago
I spent a nontrivial amount of time thinking about writing a CoffeeScript-like syntactic sugar layer over C, and I ended up abandoning the project for several reasons, not the least of which being that too many things make nice (or even dif
683.
▲
by
yoklov
13y ago
Not an expert, but my understanding was that most of those were either from bindings to unsafe functions (e.g. C++ functions from LLVM) or false positives from the compiler dealing with the 'unsafe' keyword in the code its compiling.
684.
▲
by
yoklov
13y ago
When using Object pooling, be sure that it causes an improvement, it can invoke pathologically bad performance from certain garbage collectors.
685.
▲
by
yoklov
14y ago
Clearly this calls for a macro (define-syntax naive-for (syntax-rules () [(naive-for start end body ...) (let ([op (if (< start end) + -)]) (let loop ([s start] [e end]) (begin body .
686.
▲
by
yoklov
14y ago
Heh, I'm familiar with that problem. I write in both C and C++ regularly, and be assured, the one I'm not using always seems better (maybe Google is just trolling me by showing me the results for the wrong language). I can only find C lib
687.
▲
by
yoklov
14y ago
It does not, however it makes writing your own doable with not much work. Writing one as good as the JVM's, though, would be a sizable effort.
688.
▲
by
yoklov
14y ago
Well, libraries are probably the largest reason, as providing access to native libraries is much harder (if possible at all) on LLVM due to the lack of reflection in C or C++. Aside from libraries, other reasons for it being unpopular inclu
689.
▲
by
yoklov
14y ago
You can't really have a totally safe systems programming language (correct me if I'm wrong here). It depends what you mean by totally safe, but Cyclone ( http://cyclone.thelanguage.org/ ) is a type and memory safe dialect of C. It works b
690.
▲
by
yoklov
14y ago
Not to imply he's an expert, but author seems to have more than a week's experience writing Haskell. He linked to a blog post[1] from 2011 about writing the libguestfs bindings in several languages, including in Haskell. I'm unfamiliar wit
More ›