Hacker News new | past | comments | ask | show | jobs | submit | ghfwlc's comments login

Compared to Python, Common Lisp hardly has any performance issues.


Okay well when pytorch, tensorflow, pandas, Django, flask, numpy, networks, script, xgboost, matplotlib, spacy, scrapy, selenium get ported to lisp, I'll consider switching (only consider though since the are probably at least another 20 python python packages that I couldn't do my job without).


That is a typical consumerism: "Give me everything ready to use and then I'll use it."

How about bringing some value to the community?


For the sake of anyone reading this thread who isn't in the know: many of these libraries are really written in C/C++ and have Python bindings.


i said ported not implemented; the likelihood that any of those libraries sprout lisp bindings is about as likely as them being rewritten in lisp. so it's the same thing and the point is clear: i don't care about some zany runtime feature, i care about the ecosystem.


Stop moving the goalposts: your answer to a commenter who stated that Common Lisp was faster than Python (a fact) was a list of packages, many of which are (1) not even written in Python and (2) some of them actually do have Common Lisp bindings.


Restarting from the debugger keeps state without third party Python hacks that you mention. In this example Python increments x twice, Lisp just once:

  >>> x = 0
  >>> def f():
  ...     global x # yuck!
  ...     x += 1
  ... 
  >>> def g(y):
  ...     h()
  ... 
  >>> 
  >>> g(f())
  Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
    File "<stdin>", line 2, in g
  NameError: name 'h' is not defined
  >>> 
  >>> def h(): pass
  ... 
  >>> g(f())
  >>> 
  >>> x
  2

Versus:

  * (setf x 0)
  * (defun f() (incf x))
  * (defun g(y) (h))
  * (g(f))

  debugger invoked on a UNDEFINED-FUNCTION in thread
  #<THREAD "main thread" RUNNING {1001878103}>:
    The function COMMON-LISP-USER::H is undefined.

  Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.

  restarts (invokable by number or by possibly-abbreviated name):
    0: [CONTINUE      ] Retry calling H.
    1: [USE-VALUE     ] Call specified function.
    2: [RETURN-VALUE  ] Return specified values.
    3: [RETURN-NOTHING] Return zero values.
    4: [ABORT         ] Exit debugger, returning to top level.

  ("undefined function")
  0] (defun h() nil)
  ; No debug variables for current frame: using EVAL instead of EVAL-IN-FRAME.
  H
  0] 0
  NIL
  * x
  1


Common Lisp is still the most pleasant REPL language. The only complaint I have is that too many function names are taken due to the large spec.


It's fine, you can shadow any function you want: <https://cl-community-spec.github.io/pages/shadow.html>


Join us for AI Startup School this June 16-17 in San Francisco!

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

Search: