(due to the limited editing capabilities of Blogger.com, I have to post the examples at CandleScript.net)
From the examples, you can see that Candle Markup has a very expressive
syntax and flexible data model, with which you can easily invent your
own pseudo DSLs to suit your application and still enjoy all
the benefits of a general markup format. Just to reiterate the
advantages of a general markup format over a domain-specific format:
- easier-to-learn: your application user do not have to learn all kinds of abstract domain-specific syntaxes;
- easier-to-use: you'll be able to leverage the tools that supports advanced editing, validation, refactoring on the general markup format;
- easier-to-process: you'll be able to use advanced scripting features, like schema, path selection, query, transformation and CRUD update on the general format;
x
"=" +{ "-"b "+-" sqrt{b sup 2 "-" 4 a c}} over _{2 a}
might be very readable but can be hard to process with flat lists of
nodes. A more structured representation could be:math { in { i{x} divide { plus-minus { minus { i{b} } root { minus { power { i{b} 2 } times { 4 i{a} i{c} } } } } times { 2 i{a} } } } }No matter you prefer a terse format or a structured format, the power is now in your hand. Candle supports both equally well, and can easily transform one into the other.
You seem to be doing some incredible work here.
ReplyDeleteI'm curious, there seems to be no organisation or institution behind you, is that correct?
You also need adoption. Do you have a sense of how or who in this regard?
To be very frankly, YES, currently there's no organisation or institution behind Candle. It's very much my personal effort.
ReplyDeleteBut the biggest institution Internet, and the biggest organization OSS is behind me. :-)
Yes, I agree that moving forward, Candle needs some kind of endorsement by some standards body. IEFT RFC is one option.
How would Candle fit as an alternative for the current syntactic XML support in Scala? Could you show what it would look like?
ReplyDeleteBelow is a simple XML sample that I take from some Scala tutorial:
ReplyDeletedef makeXML(id: String) = <span id={id}><strong>Hello,</strong> World!</span>
When converted into Candle Markup, it would look like:
def makeXML(id: String) = <span id={id}><strong>"Hello,"</strong> "World!" </span>
Generally, for Scale to support Candle Markup, it has to be enhanced to support parsing Candle's syntax. It'll also need to introduce some option for user to specify whether the embedded markup is in XML syntax or in Candle syntax.
Projects like (http://anti-xml.org/) shows how scala.xml package can be replaced. To support Candle Markup in Scala. A similar package needs to be developed.
ReplyDeleteHenry, the Cancle Markup that you present for Scala disappoints me. It is basically the same as the old XML, including the repetition of the tag names at the closing tags.
ReplyDeleteLet's make the Hello World XML sample slightly more complicated: the "ll" should be italic. The Scala version would then be
<span id={id}><strong>He<italic>ll</italic>o,</strong> World!</span>
I would hope a Lua version would be something like
<span { id = {id} strong {"Hello" italic {"ll"}"o, "} "World!" }>
What do you think?
You example in Candle element notation:
ReplyDelete<span id={id}><strong>"He"<italic>"ll"</italic>"o,"</strong>" World!"</span>
Yes, it is very close to XML except that string are quoted.
In Candle object notation:
span {id={id} strong{"He" italic{"ll"} "o,"} " World!"}
Very close to your Lua version.
The element notation can be easily embedded in Scala. The object notation probably requires more change to Scala language.
Another hybrid way might be as you used in your Lua example. Keep the outer most node in element notation, it serves as the delimiter to separate the markup from normal Scala script. Inside the element, object notation can be used for its terseness.
Excuse me; I wrote Lua when I meant Candle. And I made a mistake in the "Hello" part.
ReplyDeleteAnyway, I really like the Candle Object Notation; I would prefer it much above the embedded XML in Scala.
Maybe you should keep the outer "<" and ">" brackets so that the Scala compiler can easily parse it.
I'm glad we have consensus now. :-)
ReplyDeleteGreat Article. Thank you for sharing! Really an awesome post for every one.
ReplyDeleteProject Centers in Chennai
JavaScript Training in Chennai
Final Year Project Domains for IT
JavaScript Training in Chennai
rastgele görüntülü konuşma - kredi hesaplama - instagram video indir - instagram takipçi satın al - instagram takipçi satın al - tiktok takipçi satın al - instagram takipçi satın al - instagram beğeni satın al - instagram takipçi satın al - instagram takipçi satın al - instagram takipçi satın al - instagram takipçi satın al - binance güvenilir mi - binance güvenilir mi - binance güvenilir mi - binance güvenilir mi - instagram beğeni satın al - instagram beğeni satın al - polen filtresi - google haritalara yer ekleme - btcturk güvenilir mi - binance hesap açma - kuşadası kiralık villa - tiktok izlenme satın al - instagram takipçi satın al - sms onay - paribu sahibi - binance sahibi - btcturk sahibi - paribu ne zaman kuruldu - binance ne zaman kuruldu - btcturk ne zaman kuruldu - youtube izlenme satın al - torrent oyun - google haritalara yer ekleme - altyapısız internet - bedava internet - no deposit bonus forex - erkek spor ayakkabı - webturkey.net - karfiltre.com - tiktok jeton hilesi - tiktok beğeni satın al - microsoft word indir - misli indir
ReplyDeleteaşk kitapları
ReplyDeleteyoutube abone satın al
cami avizesi
cami avizeleri
avize cami
no deposit bonus forex 2021
takipçi satın al
takipçi satın al
takipçi satın al
takipcialdim.com/tiktok-takipci-satin-al/
instagram beğeni satın al
instagram beğeni satın al
btcturk
tiktok izlenme satın al
sms onay
youtube izlenme satın al
no deposit bonus forex 2021
tiktok jeton hilesi
tiktok beğeni satın al
binance
takipçi satın al
uc satın al
sms onay
sms onay
tiktok takipçi satın al
tiktok beğeni satın al
twitter takipçi satın al
trend topic satın al
youtube abone satın al
instagram beğeni satın al
tiktok beğeni satın al
twitter takipçi satın al
trend topic satın al
youtube abone satın al
takipcialdim.com/instagram-begeni-satin-al/
perde modelleri
instagram takipçi satın al
instagram takipçi satın al
takipçi satın al
instagram takipçi satın al
betboo
marsbahis
sultanbet
takipçi satın al
ReplyDeleteinstagram takipçi satın al
https://www.takipcikenti.com
marsbahis
ReplyDeletebetboo
sultanbet
marsbahis
betboo
sultanbet
ucuz takipçi
ReplyDeleteucuz takipçi
tiktok izlenme satın al
binance güvenilir mi
okex güvenilir mi
paribu güvenilir mi
bitexen güvenilir mi
coinbase güvenilir mi
tiktok jeton hilesi
ReplyDeletetiktok jeton hilesi
binance referans kimliği
gate güvenilir mi
tiktok jeton hilesi
paribu
btcturk
bitcoin nasıl alınır
yurtdışı kargo