Live data from Hacker News

The Janet Language

janet-lang.org

111–120 of 203 posts

Re: The Janet Language

#111
post #88

Earlier quoted context omitted.

I guess: f x -- obscure and mathematical (f x) -- too many parentheses f(x) -- PERFECT

>> (f x) -- too many parentheses >> f(x) -- PERFECT They have the same number of parentheses. f(x) is probably something you have seen for the majority of your life as this is how math is taught.

I was just saying that syntax arguments most of the time are silly. I like LISP and ML languages, so for me it doesn't really matter if I need to write LISPy code or ML code.

Re: The Janet Language

#112

Oh hey! Nice to see this on the front page here. I love Janet -- I've been using it for about year and a half, and it's now my go-to scripting language when I need something more powerful than bash, or when I want to hack on goofy little side project (some examples in my profile). Parsing expression grammars (think, like, declarative parser combinators?) are a really great feature for ad-hoc text parsing -- and nicer…

I went there, saw the Lisp syntax, and noped back out.

Nope as a verb is new to me - just heard it for the second time this week. First time was from my child.

Re: The Janet Language

#113
post #30

So this is kind of like a lightweight non-jvm clojure? I like it. Looks like it could be a nice swiss army knife for data munging.

You mean Python, not Clojure. A number of key underpinnings, such as (almost) exclusively immutable datastructures are missing from this language. It is more of a Python with a LISP syntax.

I meant Clojure. Janet's "more default looking" data structures are the immutable ones which is a pretty strong nudge. I don't see any explicit callout about data sharing for Janet but if that's really all that's missing I still feel good about citing Clojure first.

Re: The Janet Language

#114

One thing that bothers me about languages that compose functions like this f(g(x)) is that when programming interactively f is typically an afterthought. So, you start out with g(x) and then need to go all the way back and add f . Similarly, when x turns out like it needs to be elaborated, and you either have to go all the way back, or edit the expression in place making it longer and inevitably facing problems with…

> So, you start out with g(x) and then need to go all the way back and add f. That's one thing I will say after coming from Perl/PHP to Java, is that despite its verbosity and the uselessness of having to write .stream(), I much prefer Java's stream.map(...).filter(...) syntax over the more functional-style filter(map(list, ..), ..) syntax. The Java syntax reads left-to-right, which is the order you want when you're…

Not sure about other Lisp languages, but Clojure has thread operators that allow you to compose function calls this way, allowing you to visualize code in that preferred left-to-right (or top-to-bottom) order.

Re: The Janet Language

#115
post #30

Earlier quoted context omitted.

You mean Python, not Clojure. A number of key underpinnings, such as (almost) exclusively immutable datastructures are missing from this language. It is more of a Python with a LISP syntax.

I meant Clojure. Janet's "more default looking" data structures are the immutable ones which is a pretty strong nudge. I don't see any explicit callout about data sharing for Janet but if that's really all that's missing I still feel good about citing Clojure first.

> I meant Clojure. Janet's "more default looking" data structures are the immutable ones which is a pretty strong nudge.

Except they're not immutable in the clojure sense (of persistent data structures), they're just fozen / readonly, as can be seen from their complexity bounds (and the lack of transients). And a quick check didn't show any incompatibility between the two worlds either.

Re: The Janet Language

#116
post #72

It's a shame the new Lisps tend to not rip off Common Lisp's type system, being able to declare my types and having SBCL admonish me when I'm doing something stupid is something I would hate to lose.

Isn’t it more accurate to call that unspecified SBCL behavior than “common lisp’s type system”?

The syntax to declare types is specified. What to do with the declared types is then to be specified by a specific implementation.

Typical possibilities:

* ignore

* use for optimizations

* use for type assertions and type checking

Re: The Janet Language

#117
post #35

Earlier quoted context omitted.

What data structure isn't just a list with extra steps?

If by "list" you mean "linked list", then those are never used in practice. There is no place for this data structure in a modern CS toolbox.

The people behind the Elixir programming language certainly disagree.

Re: The Janet Language

#118
post #76

I think the language is unreadable. For me, the purpose of a programming language is to let a human talk to a machine. Show me (for instance) control flow for the example function on the home page. It just isn't making things easier

I assume you've not done LISP or LISP-like languages before?

Re: The Janet Language

#119

Earlier quoted context omitted.

Ooh, nice. I've been messing around with a weird text editor that started with that same tutorial, but in Nim. Janet is intriguing, I'll be digging into your code. How was the debugging experience?

> I'll be digging into your code. My apologies in advance, then! (Ha.) The "main" function is at the very bottom of src/joule.janet. So I'd recommend starting there. As for debugging, Janet embraces REPL-driven development, so the debugging experience is all about setting up, interactively querying, and step-wise updating your program's state, live in memory, using the REPL. It's quite a bit different from a lot of l…

Thanks :) Mine's not public yet, so far it barely does anything. I'm using a piece table and some other stuff that ended up being tricky to get right (hence my debugging question!), then I ended up taking a break. I haven't done much REPL-based work, maybe that would have sped things up.

Maybe I should start looking at that again.

Re: The Janet Language

#120

I love Lisp (particularly Scheme), and heard that Janet was strongly inspired by Lisp and is "really Lisp underneath", but is really fast and strong at math, so I thought I'd give it a try, and after learning it I started wondering to myself, "why am I not simply using Lisp?" Though arguably lispy, Janet just wasn't lispy enough for me. It was missing the simple, elegant sexp syntax I dearly loved, and I started to w…

Uhm, sorry for asking, but are you sure you're not mistaking Janet and Julia?
Post reply on HN