News for hackers. Stuff that matters.
Re:Apple releases Pkl – configuration as code language by grashalm on Saturday February 03, 2024 @07:37AM (#39239778)
Pkl was built using the GraalVM Truffle framework. So it supports runtime compilation using Futamura Projections. We have been working with Apple on this for a while, and I am quite happy that we can finally read the sources!

https://github.com/oracle/graal/tree/master/truffle

Disclaimer: graalvm dev here.

Edit: typo

Re:Apple releases Pkl – configuration as code language by krajzeg on Saturday February 03, 2024 @08:13AM (#39240055)
> ...GraalVM Truffle framework... Futurama Projections...

I know it's partly on me for not knowing the domain, but I honestly suspected somebody is trying to make fun of me with some concentrated technobabble.

Especially since I wouldn't expect the topic (configuration languages) to require complex mathematical machinery to work with. Now I have something interesting to dig into.

Re:Apple releases Pkl – configuration as code language by leonheld on Saturday February 03, 2024 @08:36AM (#39240206)
> but I honestly suspected somebody is trying to make fun of me with some concentrated technobabble

Let me tell about a revolutionary device called a Turbo encabulator.

Re:Apple releases Pkl – configuration as code language by ughitsaaron on Saturday February 03, 2024 @09:00AM (#39240393)
sounds like a perfectly cromulent topic to embiggen our knowledge.
Re:Apple releases Pkl – configuration as code language by egberts1 on Saturday February 03, 2024 @09:05AM (#39240432)
Perfectumentous!
Re:Apple releases Pkl – configuration as code language by ChrisMarshallNY on Saturday February 03, 2024 @09:13AM (#39240501)
An author named David Duncan wrote a series of books, called A Man of His Word (and A Handful of Men)[0]. Great books.

One of the races in the books was the Anthropophagi (basically modeled on New Guinea headhunters). They talked like that.

[0] https://en.wikipedia.org/wiki/Dave_Duncan_(writer)

Re:Apple releases Pkl – configuration as code language by yurishimo on Saturday February 03, 2024 @10:06AM (#39240962)
You joke, but this is surprisingly close to the name given to Dumbledore in the Dutch translation of Harry Potter.
Re:Apple releases Pkl – configuration as code language by fuzztester on Saturday February 03, 2024 @09:40AM (#39240709)
supercali ...
Re:Apple releases Pkl – configuration as code language by fuzztester on Saturday February 03, 2024 @02:32PM (#39243896)
What, downvoters, you don't know what "supercali ..." indicates? Still in nappies, maybe? Go back to your kennels, puppies. :)

I just typed "supercali" in Google, and it autoexpanded it to the full word for me.

It even has a Wikipedia page.

https://en.m.wikipedia.org/wiki/Supercalifragilisticexpialid...

Here's an excerpt from the top of that page:

[ "Supercalifragilisticexpialidocious" (/ˌsuːpərˌkælɪˌfrædʒɪˌlɪstɪkˌɛkspiˌælɪˈdoʊʃəs/ ⓘ SOO-per-KAL-ih-FRA-jih-LIS-tik-EKS-pee-AL-i-DOH-shəs) is a song and single from the 1964 Disney musical film Mary Poppins. It was written by the Sherman Brothers, and sung by Julie Andrews and Dick Van Dyke.[1] It also appears in the 2004 stage show version. Because Mary Poppins was a period piece set in 1910, songs that sounded similar to songs of the period were wanted.[2] The movie version finished at #36 in AFI's 100 Years...100 Songs survey of top tunes in American cinema. ]

You're showing your ignorance of anything more than a few decades old (and for many of you, of a word and famous song that is from your own country), your prejudices, and your hive mind. "yeah, bro, only wutz neeeew izzzz kewl!"

Someone could have asked what I meant instead of stupidly downvoting, but better behaviour is not expected on HN, of course.

No wonder Amy Hoy wrote somewhere, "Fuck HN".

I bet if we google, we'll find many similar quotes and reactions by others, like Amy's.

Not to imply that all of HN is shit. There's tons of good stuff on it, though less lately.

It's just the mentality of some of these people that I am talking about, that is shit.

And I know about the guideline that you are not supposed to complain about downvoting, but I don't care about it. That's my right, not to care about it. And it is not complaining, because I don't care about votes or points. I am just expressing my opinion of what I think is the blind, thoughtless, fly-by downvoting.

Now, downvote away, make my karma go below zero (add that HN feature if it doesnt exist), send me a cease and desist notice :), hellban me, shadowban me (such pretentious terms, as if HN is so important as to merit such terms), delete my account, whatever. Who cares?

Maybe it is time for a new and possibly better thing than HN. (Notice that I didn't say a better HN; who needs more of the same?)

Like Mastodon versus Twitter or whatever, or quite different.

Startup opportunity? ;)

Re:Apple releases Pkl – configuration as code language by xmonkee on Saturday February 03, 2024 @04:01PM (#39244699)
Are you okay?
Re:Apple releases Pkl – configuration as code language by fuzztester on Monday February 05, 2024 @02:04AM (#39258174)
no, I'm fuzztester :)
Re:Apple releases Pkl – configuration as code language by spicybright on Saturday February 03, 2024 @05:34PM (#39245445)
Are you really this upset because people don't know a 60 year old movie reference, and downvoted a comment that didn't add to discussion? And you need to flex your age because of it?

If you get this upset you don't have to post on this site. Or you can learn to be not as reactive to social media.

Re:Apple releases Pkl – configuration as code language by fuzztester on Monday February 05, 2024 @02:08AM (#39258204)
>Are you really this upset because people don't know a 60 year old movie reference, and downvoted a comment that didn't add to discussion?

Maybe you should read more carefully before replying.

I already said above that I was not complaining.

As for my comment (the supercali... word) not adding to the discussion, you are wrong again. The comment was in the same spirit as my parent and grandparent comments, who used words like cromulent, embiggen and perfectumentous.

>And you need to flex your age because of it?

Wrong again. Nothing in my comment shows that I was "flexing my age", as you call it.

>If you get this upset you don't have to post on this site.

Oh, I don't mind posting. I am having fun. I don't let comments like the one that I replied to, spoil my fun.

>Or you can learn to be not as reactive to social media.

Er, the term is "social" media, not "lone wolf baying at the moon" media.

It indicates people reacting (by replying) to other people, which could include approvingly, neutrally or critically, just like in real life, you know.

But there is something in what you say. This "comments about comments about comments about ..." scenario is getting boring and tedious.

From now on, I'll let the blind downvoters be blind downvoters and keep doing their thing. As I said earlier, HN points are not at all important, to me, at least.

Re:Apple releases Pkl – configuration as code language by ativzzz on Saturday February 03, 2024 @10:14AM (#39241043)
You joke but newer rails versions come with a front end framework named Turbo, and there's also a JS bundler named Turbo, so this is actually too close to reality
Re:Apple releases Pkl – configuration as code language by Xiol32 on Saturday February 03, 2024 @09:40AM (#39240706)
Really glad it wasn't just me. Genuinely thought someone was trying to make a joke.
Re:Apple releases Pkl – configuration as code language by avisser on Saturday February 03, 2024 @09:59AM (#39240910)
Same - it doesn't help that I read Futamura as Futurama the first 3 times.
Re:Apple releases Pkl – configuration as code language by avianlyric on Saturday February 03, 2024 @10:05AM (#39240951)
Probably because the original comment said “Futurama” not “Futamura” due to autocorrect [0], and was later edited to correct the misspelling.

Even now the OG comment says “Fuamura” but the quote in the GP comment has the original “Futurama” written in it.

[0] https://news.ycombinator.com/item?id=39239965

Re:Apple releases Pkl – configuration as code language by felideon on Saturday February 03, 2024 @10:08AM (#39240976)
For me it was about 5, until I read your comment. :/
Re:Apple releases Pkl – configuration as code language by tomcam on Saturday February 03, 2024 @03:57PM (#39244663)
Same. There was a mini subthread years ago that applies.

https://news.ycombinator.com/item?id=13752964

Re:Apple releases Pkl – configuration as code language by grashalm on Saturday February 03, 2024 @10:08AM (#39240975)
Shameless self plug: Giving an introduction in this video: https://youtu.be/pksRrON5XfU?si=CmutoA5Fcwa287Yl
Re:Apple releases Pkl – configuration as code language by refulgentis on Saturday February 03, 2024 @03:41PM (#39244530)
Gently teasing: linking a 2 hour video with "shameless self plug" definitely did _not_ help obviate the surreality.
Re:Apple releases Pkl – configuration as code language by hoherd on Saturday February 03, 2024 @11:02AM (#39241583)
I'm not sure if it was part of the humor, so pardon me if it was, but it's actually "Futamura" as in Yoshihiko Futamura, not "Futurama".

https://en.wikipedia.org/wiki/Partial_evaluation#Futamura_pr...

Re:Apple releases Pkl – configuration as code language by EPWN3D on Saturday February 03, 2024 @12:02PM (#39242238)
Glad I'm not the only one who had this reaction. I just can't bring myself to accept that a problem that could be solved with a slightly better version of JSON or property lists requires this many buzzwords.
Re:Apple releases Pkl – configuration as code language by usrusr on Saturday February 03, 2024 @03:23PM (#39244369)
If Futamurma means what I think it means skimming across the Wikipedia entry, it would mean that simple value-holder-file configurations would be parsed and checked at the speed of a general purpose tokenizer. But without closing the door to what the language can express in more elaborate configuration file "landscapes". Best of both worlds and presumably all without requiring anybody but the toolmakers to understand what the buzzwords really mean.
Re:Apple releases Pkl – configuration as code language by duped on Saturday February 03, 2024 @03:56PM (#39244653)
Those aren't "buzzwords" though, it's a very specific way to implement programming languages. It's not really meaningful except for the PL implementation nerds.

Especially the Futamura projections. It's almost magic and very few people have even heard of them.

Re:Apple releases Pkl – configuration as code language by grashalm on Sunday February 04, 2024 @07:24AM (#39249698)
Very few people have heard of them. That is exactly the reason why I mention them as often as I can. They are a great entry into the world of meta compilers.
Re:Apple releases Pkl – configuration as code language by TimTheTinker on Saturday February 03, 2024 @12:30PM (#39242592)
What has most impressed me about GraalVM and Truffle is their capability of deep-optimizing high-level code like Python and Ruby.

I once saw a demo where someone took a simple operation in Ruby using inefficient-but-elegant syntax (including creating and sorting an array, where a simple loop would have been the appropriate approach in C). He compiled that using TruffleRuby and the entire array construction and sorting was completely optimized out of the generated bytecode.

Re:Apple releases Pkl – configuration as code language by Alifatisk on Sunday February 04, 2024 @06:49AM (#39249525)
Really? Link?
Re:Apple releases Pkl – configuration as code language by grashalm on Sunday February 04, 2024 @07:22AM (#39249684)
He probably means one of the wonderfully crafted talks by Chris Seaton.

Here is one of the many: https://youtu.be/bf5pQVgux3c?si=S8Dm5d_GXYXgJtnY

If you go looking for more you will find many more marbles.

Re:Apple releases Pkl – configuration as code language by stockholm on Saturday February 03, 2024 @02:19PM (#39243761)
This comment is what PKL is going to be remembered for. Tbh I wouldn’t even have the courage to write the comment myself as the framework was coming from Apple.
Re:Apple releases Pkl – configuration as code language by Cthulhu_ on Saturday February 03, 2024 @06:16PM (#39245765)
It makes me think of this game, basically "pokemon or technobabble". Can't find it now though.
Re:Apple releases Pkl – configuration as code language by girvo on Monday February 05, 2024 @02:33AM (#39258314)
There's Pokémon or Big Data: http://pixelastic.github.io/pokemonorbigdata/

And the (original, I think), Pokémon or Tech Term: https://docs.google.com/forms/d/e/1FAIpQLSfsG7AEFLvlW68aIVIs...

Re:Apple releases Pkl – configuration as code language by pushedx on Saturday February 03, 2024 @11:31PM (#39247636)
> Futamura

not Futurama :D

Re:Apple releases Pkl – configuration as code language by paufernandez on Sunday February 04, 2024 @03:29AM (#39248603)
The best video I know about this stuff is "Compilers for free" by Tom Stuart (https://youtu.be/n_k6O50Nd-4). It is hilarious at one point. Brilliant.
Re:Apple releases Pkl – configuration as code language by dbu21 on Wednesday February 07, 2024 @08:04PM (#39296541)
Fantastic talk! Thanks for sharing.
Re:Apple releases Pkl – configuration as code language by junon on Sunday February 04, 2024 @03:34AM (#39248622)
Genuinely read "Futurama Projections" and figured the same. This doesn't sound real (though I fully trust it is, just sounds funny).
Re:Apple releases Pkl – configuration as code language by konstante on Monday February 05, 2024 @05:45AM (#39259654)
>...suspected somebody is trying to make fun of me...

I think that too, "Futamura projections" are important but they are very very far from "complex mathematical machinery" as you may hear it. They are indeed very simple (even mathematically trivial) and require no special background to understand.

Re:Apple releases Pkl – configuration as code language by jgrahamc on Saturday February 03, 2024 @08:11AM (#39240044)
> Pkl was built using the GraalVM Truffle framework. So it supports runtime compilation using Futamura Projections.

What now?

Re:Apple releases Pkl – configuration as code language by verticalscaler on Saturday February 03, 2024 @08:29AM (#39240158)
On tonights episode of Futurama bender and the gang explore the temple of Pkl on planet VM where truffles are considered the holy grails and barely run away in time from - The Compilations - an ancient secretive order of silver voiced kong-fu monks tasked with protecting the shrine from alien invaders as has been foretold in prophecies - and strangely reminiscent of 20th century Earth doo-wop group The Drifters.

Cue chase montage shenanigans with Under The Boardwalk playing in the background

Do you smell toast.

Re:Apple releases Pkl – configuration as code language by giancarlostoro on Saturday February 03, 2024 @09:41AM (#39240731)
I definitely did a double take to make sure they didn’t write Futurama.
Re:Apple releases Pkl – configuration as code language by maxfurman on Saturday February 03, 2024 @09:58AM (#39240899)
I absolutely thought they wrote Futurama until I saw this comment
Re:Apple releases Pkl – configuration as code language by macintux on Saturday February 03, 2024 @10:59AM (#39241553)
They did (autocorrect) and later fixed it.
Re:Apple releases Pkl – configuration as code language by verticalscaler on Saturday February 03, 2024 @10:53AM (#39241479)
The mind. It is a curios thing.
Re:Apple releases Pkl – configuration as code language by pasta1212 on Saturday February 03, 2024 @12:30PM (#39242583)
holy graals
Re:Apple releases Pkl – configuration as code language by txdv on Saturday February 03, 2024 @08:14AM (#39240064)
A LOT of projects in the Java world do add new features to java. My favorite is CraC
Re:Apple releases Pkl – configuration as code language by catchnear4321 on Saturday February 03, 2024 @08:38AM (#39240224)
new game: llm hallucination, attempt at humor, or legitimate technical explanation.
Re:Apple releases Pkl – configuration as code language by usrusr on Saturday February 03, 2024 @09:31AM (#39240629)
Too close to the "reliably solvable by simple heuristic" end of the spectrum to be a good game: if the text is short it's probably a joke, if it is a very long wall of words it's LLM and anything of somewhat reasonable length can only be a legitimate technical explanation, no matter how unlikely.
Re:Apple releases Pkl – configuration as code language by catchnear4321 on Sunday February 04, 2024 @01:03AM (#39248000)
> and anything of somewhat reasonable length can only be a legitimate technical explanation, no matter how unlikely.

thanks, that will help improve the output.

Re:Apple releases Pkl – configuration as code language by cyanydeez on Saturday February 03, 2024 @09:03AM (#39240419)
all I saw was oracle
Re:Apple releases Pkl – configuration as code language by fmajid on Saturday February 03, 2024 @10:50AM (#39241447)
Agreed. Anything by Oracle is an automatic hard nope.
Re:Apple releases Pkl – configuration as code language by SOLAR_FIELDS on Saturday February 03, 2024 @10:10AM (#39240999)
FWIW Graal is probably one of the most exciting technologies to come out of Oracle in a long time.
Re:Apple releases Pkl – configuration as code language by chris_wot on Saturday February 03, 2024 @12:51PM (#39242824)
It came out of Oracle. Kids of death.
Re:Apple releases Pkl – configuration as code language by sgammon on Saturday February 03, 2024 @04:48PM (#39245095)
It actually didn’t, it came out of academia. Oracle just did the right thing one time.
Re:Apple releases Pkl – configuration as code language by tadfisher on Saturday February 03, 2024 @02:22PM (#39243795)
It's GPL-licensed, and it works. I'm happy they haven't Oracle-ized the JVM, and have been investing into great features that are available to everyone for free.
Re:Apple releases Pkl – configuration as code language by pdpi on Saturday February 03, 2024 @09:17AM (#39240528)
As I understand it:

GraalVM is an alternate JDK that can, among other things, do ahead-of-time compilation for Java.

Truffle is a framework for building languages, that sits on top of Graal.

Futamura Projections are a particularly interesting use case for compile-time partial evaluation.

With partial evaluation you have static (known at compile time) arguments to your function, and dynamic (known at runtime) arguments.

When “your function” is an interpreter, and your static arguments are source code, the output is effectively a self-contained compiled binary.

When your function is an interpreter, and the static arguments are the source code for the interpreter itself, that “self-contained compiled binary” is now itself a compiler.

Re:Apple releases Pkl – configuration as code language by iainmerrick on Saturday February 03, 2024 @09:50AM (#39240827)
That all sounds cool, but is any of that especially useful for a configuration language?
Re:Apple releases Pkl – configuration as code language by SOLAR_FIELDS on Saturday February 03, 2024 @10:09AM (#39240989)
I’m also curious, because Graal is pretty exciting stuff, what this might give over Jsonnet or Cuelang. It’s already a hard enough sell to try to get people to adopt these and they are much older and more robust than Pkl.
Re:Apple releases Pkl – configuration as code language by iainmerrick on Saturday February 03, 2024 @12:10PM (#39242350)
I'm very wary of anything Java-based, having been burned by Java tooling in the past. I work on a few different Android projects and I have to switch between three different JDK versions depending on which I'm working on. What happened to "write once, run anywhere"??

I really like Pkl's comparison page, which includes its weak points as well! https://pkl-lang.org/main/current/introduction/comparison.ht...

Pkl’s native binaries are larger than those of other config languages.

It should be as fast and easy to use and reliable as something like esbuild, so I'd suggest they may want to rewrite it in Go like esbuild. I'm not a Go fan at all, but it clearly does some things really well.

Re:Apple releases Pkl – configuration as code language by spullara on Saturday February 03, 2024 @02:08PM (#39243630)
There are reasons Oracle sued Google over Android and you just articulated one of them.
Re:Apple releases Pkl – configuration as code language by iainmerrick on Saturday February 03, 2024 @05:15PM (#39245313)
It’s not Android per se that’s the problem, it’s that Android uses Gradle as a build system and Gradle uses Java.

The Gradle compatibility matrix is pretty complicated: https://docs.gradle.org/current/userguide/compatibility.html...

I’ve also used Facebook’s Buck build system, as an attempt to get away from Gradle, and it’s also fussy about JDK versions.

Re:Apple releases Pkl – configuration as code language by SureshG on Tuesday February 06, 2024 @03:36PM (#39280212)
>"write once, run anywhere"??

You know that the code compiled using future version of java won' work in older versions..rt? I would like to know if any other programming language does that kind of thing.

> t should be as fast and easy to use and

How did you conclude that it's not fast? They are creating native binaries just like Go or any other AOT languages with GCs. Graal native images are as fast or faster than Go. Also it contains a REPL, that's why bigger size. So for CLI tooling as a developer using pkl, you won't see any difference if it's written in java + kotlin or golang.

Re:Apple releases Pkl – configuration as code language by iainmerrick on Friday February 09, 2024 @07:54AM (#39314322)
You know that the code compiled using future version of java won' work in older versions..rt? I would like to know if any other programming language does that kind of thing.

Of course, but what surprises me is the lack of backwards compatibility -- future JVMs refusing the run old code. I get that you have to deprecate old unsafe APIs sometimes, but it feels silly that I need three different Java versions for different Android projects.

They are creating native binaries just like Go or any other AOT languages with GCs. Graal native images are as fast or faster than Go. Also it contains a REPL, that's why bigger size. So for CLI tooling as a developer using pkl, you won't see any difference if it's written in java + kotlin or golang.

That's good! I thought you needed Java to run it.

I figured I should give it a proper try, so I just downloaded it. 105MB!! They're not kidding when they say it's big. I also checked bun (47.7MB) and esbuild (9.8MB) for comparison.

pkl does seem to start up pretty fast, though. 1.6s on the first run (presumably just the time needed to cache that big binary) and ~100ms thereafter.

Re:Apple releases Pkl – configuration as code language by saynay on Saturday February 03, 2024 @11:45AM (#39242030)
Looks like a more robust type system than Jsonnet (but less than Cue), with some amount of flow-control that Cue doesn't seem to support. I am not very familiar with Cue though.
Re:Apple releases Pkl – configuration as code language by bioballer on Sunday February 04, 2024 @01:27AM (#39248081)
Pkl is newly open sourced, but it not new. It's been used for years at Apple, and has been battle tested internally.

I'd actually say that our tooling in some ways is more mature. For example, I think our IDE experience (at least in JetBrains editors) is the best out there.

Re:Apple releases Pkl – configuration as code language by Perepiska on Tuesday February 06, 2024 @05:28AM (#39272813)
There is no trust in the words “we tested this internally.”

Apple employees can rate it as an old project among themselves, while it is more convenient for everyone else to rate the product from the moment of publication.

Re:Apple releases Pkl – configuration as code language by usrusr on Saturday February 03, 2024 @05:39PM (#39245482)
If you want a tool to be able to generate executable validation from a schema, a compiler framework should come in handy.

It seems like they did not aim to make yet another mvp configuration language, but something that can scale across a wide range of usage scenarios spanning all the way from short-lived processes reading a number from a file to huge libraries of default/override hierarchies. Lack of universality sets an upper bound for the value of a configuration language, particularly when seen through the lens of configuring heterogeneous tech stacks.

Re:Apple releases Pkl – configuration as code language by EPWN3D on Saturday February 03, 2024 @12:15PM (#39242407)
> Truffle is a framework for building languages, that sits on top of Graal.

wtf is Graal? That sounds like a supporting character from Beowulf.

Re:Apple releases Pkl – configuration as code language by sgammon on Saturday February 03, 2024 @04:46PM (#39245068)
https://graalvm.org

Polyglot and native compilation enabled runtime for JVM, can run Js, Python, Ruby and more.

Re:Apple releases Pkl – configuration as code language by matheusmoreira on Sunday February 04, 2024 @01:56AM (#39248220)
> With partial evaluation you have static (known at compile time) arguments to your function, and dynamic (known at runtime) arguments.

That's pretty clever... How is this implemented in actual code though? I can't even begin to imagine how that magic machinery works.

Re:Apple releases Pkl – configuration as code language by simonfxr on Saturday February 03, 2024 @07:55AM (#39239917)
I guess you mean Futamura projections?
Re:Apple releases Pkl – configuration as code language by lionkor on Saturday February 03, 2024 @08:00AM (#39239950)
I wish people named more tech products after popular media instead of common words. Would make it equally hard to web search, but at least it would be funny for non-techies to listen to
Re:Apple releases Pkl – configuration as code language by nindalf on Saturday February 03, 2024 @08:28AM (#39240150)
You'll really like the Quantum Resistant key exchange algorithm - Kyber. A related project is Cryptographic Suite for Algebraic Lattices or CRYSTALS.

Sadly they renamed Kyber to MLKEM.

Re:Apple releases Pkl – configuration as code language by MarkSweep on Saturday February 03, 2024 @12:34PM (#39242632)
There is also Dilithium:

https://pq-crystals.org/

Re:Apple releases Pkl – configuration as code language by grashalm on Saturday February 03, 2024 @08:02AM (#39239965)
Damn you autocomplete! This happens all the time :D
Re:Apple releases Pkl – configuration as code language by SirGiggles on Saturday February 03, 2024 @08:52AM (#39240330)
Not completely related to the OP, but is Truffle going to be upstreamed as part of Project Galahad or will it remain as a library maintained by Oracle Labs?

I ask cause the Project Galahad page on openjdk.org is a bit sparse on details.

Re:Apple releases Pkl – configuration as code language by grashalm on Saturday February 03, 2024 @10:15AM (#39241055)
The truffle compiler extensions in Graal will be part of Galahad. For example the partial evaluator. The truffle framework and all the languages are consumed from a maven repo as a regular java library these days.

Some background on the recent changes there: https://medium.com/graalvm/truffle-unchained-13887b77b62c

Re:Apple releases Pkl – configuration as code language by ithkuil on Saturday February 03, 2024 @09:21AM (#39240557)
Futamura
Re:Apple releases Pkl – configuration as code language by beanjuiceII on Sunday February 04, 2024 @01:19AM (#39248059)
That's iron chef futamura to you
Re:Apple releases Pkl – configuration as code language by lpage on Saturday February 03, 2024 @10:52AM (#39241468)
Your mention of Futamura Projections was a nice reminder of how very mathy/theoretical foundations underpin Nice Things in high-level languages, like Hindley–Milner inspired type systems and modern optimizing compilers targeting SSA form. Value Lattices in Cue [1], another config programmable configuration language, also fall into this bucket.

[1]: https://cuelang.org/docs/concepts/logic/

Re:Apple releases Pkl – configuration as code language by corysama on Saturday February 03, 2024 @03:14PM (#39244282)
Currently using Cue in a major project. It can be a puzzle. But, we like it a lot. Wish it had a bigger community.
Re:Apple releases Pkl – configuration as code language by aardvark179 on Saturday February 03, 2024 @12:12PM (#39242369)
Oh wow, this wasn’t the sort of language I expected to see being built on Truffle, but I’ll be really interested to take a closer look when I’m on a decent net connection.
Re:Apple releases Pkl – configuration as code language by Hixon10 on Sunday February 04, 2024 @07:16PM (#39255928)
Do you know, why they use both ANTLR and Truffle?
Re:Apple releases Pkl – configuration as code language by grashalm on Monday February 05, 2024 @03:37AM (#39258688)
Truffle has no opinion on how you parse the sources. It cares about how you execute them from an intermediate Truffle guided representation produced by the parser.

In other words antlr and truffle are a great fit. We even use this pairing for our example language simplelanguage.

https://github.com/graalvm/simplelanguage

Re:Apple releases Pkl – configuration as code language by Hixon10 on Monday February 05, 2024 @06:06AM (#39259816)
Thanks! I haven't seen before usage of Truffle and ANTLR together, but it makes sense.
Re:Apple releases Pkl – configuration as code language by summerlight on Tuesday February 06, 2024 @01:22PM (#39278238)
It'd be interesting to understand what kind of performance problem Apple had and tried to solve with GraalVM/Truffle. I've seen some instances of heavy configs that generate literally several gigabytes of data, but those were usually not significant bottlenecks since configs are not updated very frequently.

Of course, I know those two frameworks are one of the engineering marble of the age and would understand even if they decided to go without any concrete needs for it.