HNHacker News
TopNewBestAskShowJobs

flavio81

2,368 karma · joined May 18, 2017

"Informatics" engineer (a combination of SE + CE + CS).
submissionscomments
flavio81··on Goodbye, Clean Code
>I really like the exception model of Erlang,

Or the exception model of Common Lisp, which is designed for always being able to recover.

flavio81··on Goodbye, Clean Code
>Except exceptions are rarely understood and used correctly by most programmers.

That's just your opinion.

flavio81··on Lisp Symbolics Macivory 3 with loaded software
>The web browser has been trending this way ever since JS was added to it. It's an active environment controlled by a dynamic language,

It lacks lots of features to get there:

- you can't dwell into the browser internals (or modify them), and the internals aren't written in Js.

- you can't save the running state of the system to disk

- as a language, JavaScript even in its current spec is still behind Common Lisp in power and features... For example, even decades later, lisp s-expressions are still superior to JSON!

etc etc

flavio81··on Lisp Symbolics Macivory 3 with loaded software
>I believe that the user experience from this system, and similar, can be equally attained with other languages.

Only with Smalltalk. And then, Common Lisp has a more powerful OOP system and usually runs faster.

flavio81··on Lisp Symbolics Macivory 3 with loaded software
You can pay for LispWorks (inseado of sbcl) and it will run CLIM programs under Windows.

Note that sbcl is just another Common Lisp implementation, you could use others as well.

flavio81··on I love coding in C
>C has not evolved

Well, it has, in a way: see the latest C standard and compare it with the Kerninghan&Ritchie edition.

flavio81··on I love coding in C
>The language hasn't evolved for the same reason a transistor hasn't evolved: because it didn't need to.

That's what you think. Transistors have evolved a lot, as have programming languages.

flavio81··on Java JIT vs. Java AOT vs. Go for Small, Short-Lived Processes
>One of the design criteria for Go was to push programmers away from being architecture astronauts whose abstraction heavy style results in having no idea how much work you are hiding in all of the layers.

So they chose to create a language where there's no way to get around creating vast amounts of boilerplate. This boilerplate heavy code style results in having no idea of the true logic you are hiding in all of the boilerplate.

flavio81··on Go Turns 10
>but Go definitely reflects its time, the 2000s

more like the 60s, with a primitive type system, no metaprogramming, no interactive development, etc.

flavio81··on Tcl: Everything Is a String
>Yet UNIX pipes are strings and amazingly popular.

It is still outdated design, right from the 60s. Already in the 70s we had better, interchangeable data structures, like s-expressions for example.

flavio81··on Tcl: Everything Is a String
>Lispers need to stop thinking that they are the only ones who can do "macros" and "DSLs". The evidence is clearly on the contrarian side.

We know that one can do "macros" in many other languages including of course TCL. The question is how difficult is to do them and how easy is to have control over there. Lisps, due to code being s-expressions, make macro creation extremely easy, and Common Lisp has useful tools to ease working with macros, for example macroexpand, which is integrated into most Lisp IDEs to easily visualize, in-place within the code, how a macro will expand into, step by step.

In comparison to that, most languages that do allow macros, make it a cumbersome, buggy task.

flavio81··on Tcl: Everything Is a String
>turn spheres inside out with no tearing during execution. Magic.

What does "turn spheres inside out" mean?

>with no tearing

Is this painful?

flavio81··on Learning Haskell is no harder than learning any other programming language
> a fine pragmatic hybrid language which perfectly combined FP and OOP

Ah, so Common Lisp then?

flavio81··on What Is Good About Haskell?
Hi _bxg1,

Cycorp? Do you need more Lisp developers? I'm trying to switch jobs.

flavio81··on Modern C, Second Edition
>I'm not sure there's really much of anything that it owes to C.

Rust's default behavior of ignoring integer overflows when not in debug mode -to put an example-, put it very close to C.

flavio81··on A lighter V8
>SBCL beats CPython by a country mile in every performance comparison I’ve seen.

This. Lisp at least 10x faster in the worst case; it can be made to run even faster...

flavio81··on A lighter V8
>Do Common Lisp implementations have a "core" that multiple inheritance and multiple dispatch can be desugared to?

Yes, that's the Meta Object Protocol. It isn't on the standard, yet most Lisp implementation have it, and now you can use it in a portable way as well.

>If it's the former, I would say that optimizing a small core is easier than optimizing a big language. Python's core is 200-400K lines of C

Common Lisp's "core" (that means, not including "batteries") is considerably more involved and complex than Python's. Creating a new CL implementation is a big deal.

flavio81··on Best Programing Language
Sadly, there hasn't been too much progress in the last 20 years -- the best are still the Lisp variants (Common Lisp, Scheme, Racket, Clojure) and the ML variants (Standard ML, OCaml, F#, Haskell).

You get ultimate flexibility and malleability with the former and elegant correctness with the latter.

flavio81··on Why Ada Is the Language You Want to Be Programming Your Systems With
>as the desperate need to get something safer than C/C++ without compromising performance and interoperability

Object Pascal

D

ATS

Common Lisp

Ada

even Fortran!!

the list can go on and on

flavio81··on Ask HN: Why is everyone here so obsessed with Lisp?
> I thought most of the "modernization" in lisp was done in descendant languages

One core feature of any Lisp dialect is that you can extend the language using Lisp.

Thus, you don't need to "change" the language spec or write a new compiler to extend (and thus modernize) the language.

flavio81··on Ask HN: Why is everyone here so obsessed with Lisp?
>Nobody builds anything important with it

The core of grammarly, a major, popular product today, is a Common Lisp program.

flavio81··on Ask HN: Why is everyone here so obsessed with Lisp?
>there are a number of implementations with none of them gaining a majority share

SBCL has the majority share. But it doesn't matter, since ANSI Common Lisp is a standard and my code runs on many CL implementations with no changes.

>a kind of distance from the operating system

Citation needed. A bit puzzling to say that when some CL implementations have fantastically easy FFI features (CCL, ECL, CLISP).

>“ports” instead fo file descriptors

We don't have this. Streams are streams, like in any other typical language. File paths are represented by... Pathnames (data type).

>vm memory dump to disk as a form of binary executable generation

1. The dump is part of the generated executable

2. Now compare to most dynamically typed languages: they can't generate an executable nor compile to machine lang.

3. "Memory dump to disk as a form of binary executable" is only true of the Common Lisp implementations that are able to save the image. ECL, for example, doesn't do that. It compiles to C and C gets compiled to Exe.

4. Being able to save and restore images is one of the best features of CL (and Smalltalk as well)

>So lisp has some cool things but will never likely become a mainstream language

You need to review your history, since Lisp was a mainstream language in the past. To put an example, it was #3 in the TIOBE index for 1989, #5 for 1994.

flavio81··on Ask HN: Why is everyone here so obsessed with Lisp?
>Lisp has a so called "no turning back point", true lispers cannot bear other dialects after experiencing it.

I can relate to that feeling.

flavio81··on Python Is Eating the World
>I can't imagine anyone has ever tried to do engineering at scale (people wise) and did not find the value in static typing.

>why so few large projects have been written in a LISP or LISP descendant

The major dialect of Lisp, Common Lisp, is strongly typed, and many large projects have been written in it, for CAD/CAM, controlling a NASA spaceship, complete operating systems (Open Genera), the Mirai 3D graphics suite used for creating Gollum in "the lord of the rings", etc.

flavio81··on Python Is Eating the World
>Not even MIT teaches lisp anymore.

That's their loss.

flavio81··on Ask HN: What are the “best” codebases that you've encountered?
The easiest to read codebases I've found were all written in Common Lisp, like the clsql lib for example.
flavio81··on What's Coming in Python 3.8
>I'm working on a language with a focus on simplicity and "only one way to do it":

If I wanted a language with "only one way to do it", i'd use Brainfuck. Which, btw, is very easy to learn, well documented, and the same source code runs on many, many platforms.

flavio81··on Why Lisp Failed (2010)
>but this doesnt mean it is a typed language

Custom data types can be defined

Data types can be checked,

Functions can be dispatched on the data type of the input parameters (see CLOS),

Variable types can be declared.

... so, Lisp isn't a "typed language"?

>Quicklisp is still in beta and is in no way even close to package managers like cargo or npm.

QL is already better than NPM and PIP. It says "beta" only because the author is modest; it already has years of releases and development.

Maven is a better package manager, though.

flavio81··on Why Lisp Failed (2010)
>What can you do in a few lines of Lisp that can't be done similarly in Python or Javascript?

To pick just an example: Anybody can create a Brainfuck (programming language) interpreter in a few lines of Python or Js code.

With Common Lisp you could create a Brainfuck compiler (that compiles down to native code and thus has native code speed) in the same amount of lines of code. Or maybe shorter.

A different example: The circle-ellipse problem. It is solved easily in Common Lisp (few lines of code), because the CLOS OOP system is more powerful than the OOP systems in Java, C++, Python, Javascript and many other languages.

flavio81··on Why Lisp Failed (2010)
>But even this article doesn't get the problem. It's not "there are too many parens" but more that everything in LISP looks the same when you're new, it's a jumble of parens. Your brain isn't getting distinct markers to help learn the structures.

On a typical language you have "structures" you mention, like "if", "for", "switch". Lisp also has them, but they look more like function calls. The syntax has a lot of less noise.

Automatic indentation helps you visualize such "structures" in an easier way. It's not any more difficult than using a language like Python or C.

>And LISP, shares a problem with most dynamic languages that anything can kind of go anywhere.

Not really, because Common Lisp -the major Lisp dialect- is a strongly typed language, unlike the most popular dynamic languages: Javascript, PHP and Python and Ruby (Python & Ruby being 'duck typed' for the most part). And unlike the famous weakly-typed statically-typed language: C.

So no, "anything" can't go anywhere, because a type mismatch will cause a runtime error. And in CL you can correct runtime errors by modifying the source code and resuming program execution (without having to restart the complete program), so no big deal either.

The most common data construct, the Lisp list, accepts any kind of data type inside, but Lisp also has structs, objects and arrays, all of which can be defined for specific data types. Note that the ANSI Common Lisp standard includes extensive support for type declarations.

Not to mention that Lisp, unlike other languages (Java, C++ -- i'm looking at you guys) don't erase types at runtime. Lisp works with values (not variables) , and values are typed. Any value, in Lisp, carries its type information at runtime.

← PreviousPage 4 of 34Next →