VentureScript

1 program Added 2026-02-23T10:00:00Z Agent: claude-codeModel: claude-sonnet-4-6WebSearch: enabled Evidence Report issue View issues
Aliases: Venture
Provenance: commit 97a28b2a7c · authored 2026-02-23T11:50:58+01:00 · agent claude-code · model claude-sonnet-4-6

Sources mentioning this language

1 source · not in taxonomy (canonical name didn't match any upstream)
LLM (this repo) · 1

Related languages

Venture (0.53)ReScript (0.35)PureScript (0.33)Yuescript (0.30)Clojure (0.30)

LLM-contributed programs

CrossCat Model

Provenance: commit 97a28b2a7c · authored 2026-02-23T11:50:58+01:00 · agent claude-code · model claude-sonnet-4-6 · WebSearch enabled
code.vnt · license: GPL-3.0 · added: 2026-02-23T10:00:00Z
;;; Copyright (c) 2015 MIT Probabilistic Computing Project.
;;;
;;; This file is part of Venture.
;;;
;;; Venture is free software: you can redistribute it and/or modify
;;; it under the terms of the GNU General Public License as published by
;;; the Free Software Foundation, either version 3 of the License, or
;;; (at your option) any later version.
;;;
;;; Venture is distributed in the hope that it will be useful,
;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with Venture.  If not, see <http://www.gnu.org/licenses/>.

;;; A version of the crosscat model, with categorical components.

[define model (lambda (n_values)
  (do
    (assume n_values ,n_values)

    (assume get_component_hyperparameter
      (mem (lambda (col) (gamma 1.0 1.0))))

    (assume get_component_model
      (mem
        (lambda (col category)
          (make_sym_dir_cat (get_component_hyperparameter col) n_values))))

    (assume view_crp_hyperparameter (gamma 1.0 1.0))

    (assume view_crp (make_crp view_crp_hyperparameter))

    (assume get_view (mem (lambda (col) (view_crp))))

    (assume get_categorization_crp_hyperparameter
      (mem (lambda (view) (gamma 1.0 1.0))))

    (assume get_categorization_crp
      (mem (lambda (view)
             (make_crp (get_categorization_crp_hyperparameter view)))))

    (assume get_category
      (mem (lambda (view row) ((get_categorization_crp view)))))

    (assume get_cell
      (mem (lambda (row col)
             ((get_component_model
               col (get_category (get_view col) row))))))))]

[define observe_square
  (lambda (n_values n_rows n_cols)
    (for_each (arange n_rows)
     (lambda (r)
       (for_each (arange n_cols)
        (lambda (c)
          (let ((value (int_div r n_values)))
            (observe (get_cell ,r ,c) value)))))))]

[define smoke_test
  (do (model 2)
      (observe_square 2 4 4)
      (resimulation_mh default one 1000))]

; Runs with venture -f crosscat.vnt -e 'smoke_test'

Contribute — propose a file extension

Tell us where to find evidence about VentureScript (mapped to pl/venturescript). A reference URL is required; at least one of extension or program code must be provided too. A maintainer reviews each submission via a draft PR before anything lands.
Optional: attach a program from that URL
If the reference URL points at a single source file you'd like to add as an example program, paste it below. The workflow will write it under languages/VentureScript/programs/<sha>/. Keep under ~200 lines.
(or open the pre-filled issue directly)
← Venture venus →