witheve / rfcs Goto Github PK
View Code? Open in Web Editor NEWRequest for Comments on changes to Eve
Home Page: http://witheve.com
Request for Comments on changes to Eve
Home Page: http://witheve.com
For example, in
count[given: cell, per: player]
we group by player, which returns two values: the count of cells marked by player X and those marked by O. This can be read “count the cells per player”.
http://incidentalcomplexity.com/2016/08/11/tic-tac-toe/
What about renaming given
to the
?
count[the: cell, per: player]
I copied an svg icon from the internet and translated it into eve syntax, but it didn't fully render and it appears jssrc/renderer.js doesn't support the svg path element. Does it make sense to add support for the path element?
Here is the svg example:
[#svg class: "tc-image-edit-button tc-image-button" viewBox: "0 0 128 128" width: "22pt" height: "22pt" children:
[#g fill-rule: "evenodd" children:
[#path d: "M116.870058,45.3431458 L108.870058,45.3431458 L108.870058,45.3431458 L108.870058,61.3431458 L116.870058,61.3431458 L116.870058,45.3431458 Z M124.870058,45.3431458 L127.649881,45.3431458 C132.066101,45.3431458 135.656854,48.9248678 135.656854,53.3431458 C135.656854,57.7524334 132.07201,61.3431458 127.649881,61.3431458 L124.870058,61.3431458 L124.870058,45.3431458 Z M100.870058,45.3431458 L15.6638275,45.3431458 C15.5064377,45.3431458 15.3501085,45.3476943 15.1949638,45.3566664 L15.1949638,45.3566664 C15.0628002,45.3477039 14.928279,45.3431458 14.7913977,45.3431458 C6.68160973,45.3431458 -8.34314575,53.3431458 -8.34314575,53.3431458 C-8.34314575,53.3431458 6.85614548,61.3431458 14.7913977,61.3431458 C14.9266533,61.3431458 15.0596543,61.3384973 15.190398,61.3293588 C15.3470529,61.3385075 15.5049057,61.3431458 15.6638275,61.3431458 L100.870058,61.3431458 L100.870058,45.3431458 L100.870058,45.3431458 Z" transform: "translate(63.656854, 53.343146) rotate(-45.000000) translate(-63.656854, -53.343146) "]
[#path d: "M35.1714596,124.189544 C41.9594858,123.613403 49.068777,121.917633 58.85987,118.842282 C60.6854386,118.268877 62.4306907,117.705515 65.1957709,116.802278 C81.1962861,111.575575 87.0734839,109.994907 93.9414474,109.655721 C102.29855,109.242993 107.795169,111.785371 111.520478,118.355045 C112.610163,120.276732 115.051363,120.951203 116.97305,119.861518 C118.894737,118.771832 119.569207,116.330633 118.479522,114.408946 C113.146151,105.003414 104.734907,101.112919 93.5468356,101.66546 C85.6716631,102.054388 79.4899908,103.716944 62.7116783,109.197722 C59.9734132,110.092199 58.2519873,110.64787 56.4625698,111.20992 C37.002649,117.322218 25.6914684,118.282267 16.8654804,112.957098 C14.9739614,111.815848 12.5154166,112.424061 11.3741667,114.31558 C10.2329168,116.207099 10.84113,118.665644 12.7326489,119.806894 C19.0655164,123.627836 26.4866335,124.926678 35.1714596,124.189544 Z"]]]
RFC: https://github.com/witheve/rfcs/blob/master/proposed/strings.md
From @shamrin:
I'm still trying to build search-as-you-type input with Eve. However, Eve seems to lack any string functions.
The bare minimum would be to have an expression that checks for substring in a string. Something like this JS function:
var contains = (search, string) => string.indexOf(search) !== -1;
The most flexible would be to have regexp match expression. Something like this:
var matches = (search, string) => !!string.match(new RegExp(search));
The middle ground is to allow prefix-matching for words inside string:
var matches = (search, string) => !!string.match(new RegExp('\\b' + search + '\\w*\\b'));
matches('ab', 'abc def'); // => true
matches('bc', 'abc def'); // => false
matches('de', 'abc def'); // => true
The only thing I could currently do is to pre-build the index with external tools, generating huge amount of [#word-prefix-match]
objects:
build the index
freeze
[#word-prefix-match "a" "apple computer"]
[#word-prefix-match "ap" "apple computer"]
[#word-prefix-match "app" "apple computer"]
// …
[#word-prefix-match "c" "apple computer"]
[#word-prefix-match "co" "computer"]
And I can't even build this index with Eve code: there are no split
or prefix-match
functions.
P.S. Bonus points is to somehow allow to ignore common words like a
or an
, so that an
wouldn't match an apple
, but it would match anne
.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.