News for hackers. Stuff that matters.
Re:Janet: a lightweight, expressive and modern Lisp by oblio on Wednesday May 13, 2020 @05:31AM (#23165093)
I wonder if his question was not rhetorical, as in: It is really Lisp if it doesn't have cons?
Re:Janet: a lightweight, expressive and modern Lisp by phoe-krk on Wednesday May 13, 2020 @05:34AM (#23165112)
That question has been a source of multiple flamewars in the past that have only made the world worse as a result. I prefer not to go down that hole again.
Re:Janet: a lightweight, expressive and modern Lisp by lispm on Wednesday May 13, 2020 @06:12AM (#23165318)
Is it really Lisp without 'lists'?

https://janet-lang.org/api/index.html

that does not mention list in meaningful ways. It seems to prefer to work with other data structures (like arrays) - which is okay, but then I won't call it a List Processor dialect.

Re:Janet: a lightweight, expressive and modern Lisp by dleslie on Wednesday May 13, 2020 @10:58AM (#23167497)
I would say no: without list processing it's not really a lisp. It's something that looks like a lisp, but isn't.
Re:Janet: a lightweight, expressive and modern Lisp by jonathanstrange on Wednesday May 13, 2020 @08:57AM (#23166415)
I don't understand why somebody downvoted you, I've seen a number of languages that look like Lisp, but are based on vectors or arrays, and that changes the language drastically. So I'm wondering, too. I was trying to find out whether Janet programs are lists or something else like arrays, but didn't find it in the docs.
Re:Janet: a lightweight, expressive and modern Lisp by bakpakin on Wednesday May 13, 2020 @09:09AM (#23166517)
This does change the language drastically - source code is represented as tuples usually, although all of the core data structures have literal forms. This means writing macros is still easy, although certain idioms like consing are usually replaced by splicing, which is like unquote-splicing in Common Lisp but more general.
Re:Janet: a lightweight, expressive and modern Lisp by hexmiles on Wednesday May 13, 2020 @04:18PM (#23171338)
as someone who dosen't know the theory what is the difference between list and array? consing and splicing?

is there a pratical difference in the way you write programs or is more of theory/implemetation detail?

Re:Janet: a lightweight, expressive and modern Lisp by bakpakin on Wednesday May 13, 2020 @08:37PM (#23173721)
A list refers to a singly-linked list, while tuples are implemented as immutable arrays. The former is flexible in that multiple lists can hare structure, and prepending to a list is an O(1) operation that does not change the original list (consing). This property allows all sorts of interesting data structures which at their core are simply lists of atoms and other lists.

Janet on the other hand just uses tuples, which are easier to pack densely into memory so usually have better cache performance on reads (clever lisp implementations can sometimes can make lists fit densely in memory, but usually they take about twice as much memory as a tuple).

splicing is the like the spread operator in JavaScript or the splat operator in Ruby. This turns out to be very useful in a language without cons for manipulating tuples in macros, even though it is not as efficient as a cons.

Re:Janet: a lightweight, expressive and modern Lisp by hexmiles on Thursday May 14, 2020 @02:45AM (#23176202)
thank you!
Re:Janet: a lightweight, expressive and modern Lisp by andrewflnr on Wednesday May 13, 2020 @03:08PM (#23170529)
What are the most prominent examples? I tend to think that vectors are a better basis for a practical language.
Re:Janet: a lightweight, expressive and modern Lisp by alexkowalenko on Wednesday May 13, 2020 @05:45AM (#23165173)
Is it a lisp without car cdr and cadaaaadmycateatsmiceadaddddr?

Just in case -

))))))))))))))))))))))))))))))))))))))