This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| :: brute force and KMP string search | |
| :: arms accessible in dojo after /+ string-srch | |
| :: try test:string-srch | |
| :: | |
| :::: /hoon/string-srch/lib | |
| :: | |
| /? 314 | |
| !: | |
| :::: ~novlen-hanweb | |
| :: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "intros": [ | |
| "Just write some Hoon that", | |
| "Just compose Nock formulas that", | |
| "Just use Arvo to" | |
| ], | |
| "ships": [ | |
| "~zod", | |
| "~fyr", | |
| "~ped", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| :- %say | |
| |= {{@da eny/@uvI beak} $~ $~} | |
| :- %tang =< (to-tang (easy)) | |
| |% | |
| ++ to-tang | |
| |= l/(list tape) | |
| ^- tang | |
| %- flop %+ turn l | |
| |=(t/tape ^-(tank [%leaf t])) | |
| ++ dlists $: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ~novlen-hanweb@ grants that it's a little heavy-handed | |
| --------------| for '=' /urbit-meta | |
| --------------| --met ~tanpem-rolnul-danneb-hoslyt--socnyl-figteg-fotlev-datben | |
| --------------| for '=' /urbit-meta | |
| --------------| --met ~bolryl-niddem-poctyv-sapwep--fogsur-tornux-fotlev-datben | |
| -------[12.955] | |
| ~lavbyr_datben* now anyone can be a _dotben! | |
| ~haclud_malfep= looks pretty good to me | |
| ~lavbyr_datben deploys an audience fix | |
| ~haptem-fopnys= why are people's audiences messed up |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| :- %say |= * :- %noun | |
| =< (cartesian-product (sy ['a' 'b' 'c' ~]) (sy ['x' 'y' 'z' ~])) | |
| :: | |
| |% ++ cartesian-product | |
| |= {a/(set @t) b/(set @t)} | |
| =+ r=*(set {@t @t}) | |
| |- ?~ a r | |
| =+ b=b :: shadow b for inner loop walkthru | |
| |- ?~ b | |
| =+ ^= r |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| :- %say |= * :- %noun | |
| :: | |
| :::: sets (http://urbit.org/docs/hoon/exercises/data-structures/) | |
| :: | |
| =+ s=(silt `(list @t)`['urbit' 'arvo' 'hoon' 'arvo' ~]) | |
| ~& 'original set' | |
| ~& s | |
| :: | |
| :::: #1 | |
| :: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| function joinNested(x) { | |
| return x.map(function(y) { | |
| return Array.isArray(y) ? joinNested(y) : y | |
| }).join('') | |
| } | |
| } | |
| // match all rules, consuming the entire input | |
| root = a:all EOF { return a } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| xquery version "1.0-ml"; | |
| (:~ | |
| : Utility module from converting structured queries to/from JSON, XML, and cts:query | |
| :) | |
| module namespace sq = "http://marklogic.com/mlpm/structured-query"; | |
| import module namespace ast = "http://marklogic.com/appservices/search-ast" | |
| at "/MarkLogic/appservices/search/ast.xqy"; | |
| import module namespace sut = "http://marklogic.com/rest-api/lib/search-util" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| xquery version "1.0-ml"; | |
| declare variable $numeric-scalar-types := ("int", "unsignedInt", "long", "unsignedLong", "float", "double", "decimal"); | |
| declare function local:scalar-types() | |
| { | |
| xdmp:read-cluster-config-file("database.xsd")/xs:schema | |
| /xs:simpleType[@name eq "scalar-type"]/xs:restriction/xs:enumeration/@value/fn:string() | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'json' | |
| class ServerConfig | |
| alias_method :original_deploy_modules, :deploy_modules | |
| def deploy_modules | |
| # if @properties['ml.deploy-include-packages'] | |
| # deploy_packages | |
| # end |