Hacker Newsnew | past | comments | ask | show | jobs | submit | useranme's commentslogin

Good to know. I'll never work for Amazon no matter what the pay is.


I want to start using HackerNews again.


Is there anything OCaml can do that no other language can do?


The most unique feature is the type system which allows you to both model domain problems effectively and guarantee consistency. This reduces a huge number of bugs in compile-time.


MemSQL and Smalltalk generate C at runtime.


If you mean Squeak, it surely does not.

Generating C is part of the bootstrapping process, it isn't used at runtime, the JIT generates the usual machine code directly.


Which Smalltalk?


Smalltalk/X can fileout packages as C projects that are then compiled by C compiler. But AFAIK this was never meant to be used as JIT and is primarily an deployment mechanism and non-ancient versions use in-process code generator implemented in Smalltalk as JIT backend.

There are Common Lisp implementations that support similar mechanism of generating C code (ECL, Kyoto CL...), but I don't think any of then compiles C into .so which then gets dlopened right away as poor-mans JIT.


KCL generates .c files and compiles those to .o object files. I played with this year ago (via the descendant GCL: GNU Common Lisp). The load function handles object files, like COFF or whatever. It's reminiscent of the Linux kernel modules.

See here, starting on P. 36: http://www.softwarepreservation.org/projects/LISP/kcl/doc/kc...

When KCL compiles a lambda expression, it generates a C file called "gazonk.lsp" and compiles that.

(The above paper report is a little confusing; in some places it claims that an object file has a .o suffix, but then with regard to this gazonk implicit name, it claims that the fasl file is gazonk.fasl.)


Example with GCL: compile individual function to C, compile it with C to a .o (for example on my 32bit ARM it is a elf32-littlearm file) file and then load it:

    >(defun foo (a) (* a 42)) 

    FOO

    >(compile 'foo)

    Compiling /tmp/gazonk_24158_0.lsp.
    End of Pass 1.  
    End of Pass 2.  
    OPTIMIZE levels: Safety=0 (No runtime error checking), Space=0, Speed=3
    Finished compiling /tmp/gazonk_24158_0.lsp.
    Loading /tmp/gazonk_24158_0.o
    start address -T 0x888488 Finished loading /tmp/gazonk_24158_0.o
    #<compiled-function FOO>
    NIL
    NIL


Algorithm interviews underestimate how long it takes to flesh out good ideas to hard problems.


For better security, you may want to update the SSL cert on your website. It's expired.


The most effective method I know of is to buy 10 Litecoins, because they'll be worth $100k+ each within 3 years. Then you're set.


What are the five kinds of lists you need?


- Phrases (space separated lists): a b (c d) e

- Comma-separated lists: a, b, (c, d), e

- Square-bracket lists: [a, b, c]

- Blocks (curly brackets and separated by newlines or semicolons): { a b; c d }

- Dotted lists, where sometimes the dots can be omitted: foo.bar.baz

In combination, you can write something like:

  for x in [1, 2, 3] {
    foo.bar(x + 1, x * 2)
  }
Which can be interpreted as 7 lists. The top-level list has five items, the last two of which are lists. The last list is a block containing one item, which is a three-item dotted list. The argument list after "bar" is a two-item comma list containing two phrases.

I've implemented this, but I'm not satisfied with it; the corner cases are tricky to understand.


> Did anything Wave-like developed subsequently turn into a big market?

Slack.

Trello.


Slack is basically a spiffed-up IRC. Trello is a virtual index card board. Neither is, "designed to merge key features of communications media such as email, instant messaging, wikis, and social networking."


I know it's not there yet but how far from "best thing available" is crypto?


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: