** ** **** * ********* *********
* * ** * * **** ** ** ** ** ** ** **
** ** **** *** ********* * * *
** ** ** **** * * ****** ******
* * * * * * * * * **** ** ** ** ** ** **
** ** ** **** ****** ****** * *
** ** **** * * * ********* ***
* * ** * * **** ** ** ** ** ** ** **
** ** **** ********* ********* *
A modern, high-level programming language for versatile general-purpose applications
Website • Tutorial • Documentation • Try Online • Discussions
Sidef is a modern, expressive programming language that combines the elegance of Ruby, the versatility of Raku, and the mathematical capabilities of Julia. Designed for both beginners and advanced programmers, Sidef offers a rich feature set for diverse programming paradigms.
|
Programming Paradigms
|
Language Features
|
|
Integration & Performance
|
Numeric Computing
|
Via CPAN:
cpan SidefPlatform-specific:
- Arch Linux: AUR package
- Slackware: SlackBuilds
- Other systems: See pkgs.org
say "Hello, World!"Experiment with Sidef instantly at Try It Online without any installation.
- Beginner's Tutorial (PDF) - Start your Sidef journey
- Number Theory Tutorial (PDF) - Mathematical programming with Sidef
- Sidef GitBook (PDF) - Comprehensive language guide
- RosettaCode Examples - Practical code examples
Have questions or need help? Join the conversation:
- Discussion Forum - Q&A and community discussions
- GitHub Issues - Bug reports and feature requests
Demonstrating functional programming with the Y combinator:
var y = ->(f) {->(g) {g(g)}(->(g) { f(->(*args) {g(g)(args...)})})}
var fac = ->(f) { ->(n) { n < 2 ? 1 : (n * f(n-1)) } }
say 10.of { |i| y(fac)(i) } #=> [1, 1, 2, 6, 24, 120, 720, 5040, 40320, 362880]
var fib = ->(f) { ->(n) { n < 2 ? n : (f(n-2) + f(n-1)) } }
say 10.of { |i| y(fib)(i) } #=> [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]ASCII generation of the Sierpinski triangle:
func sierpinski_triangle(n) {
var triangle = ['*']
{ |i|
var sp = (' ' * 2**i)
triangle = (triangle.map {|x| sp + x + sp} +
triangle.map {|x| x + ' ' + x})
} * n
triangle.join("\n")
}
say sierpinski_triangle(4)Show Output
*
* *
* *
* * * *
* *
* * * *
* * * *
* * * * * * * *
* *
* * * *
* * * *
* * * * * * * *
* * * *
* * * * * * * *
* * * * * * * *
* * * * * * * * * * * * * * * *
ASCII visualization of the Mandelbrot set:
func mandelbrot(z, r=20) {
var c = z
r.times {
z = (z*z + c)
return true if (z.abs > 2)
}
return false
}
for y in (1 `downto` -1 `by` 0.05) {
for x in (-2 `upto` 0.5 `by` 0.0315) {
print(mandelbrot(Complex(x, y)) ? ' ' : '#')
}
print "\n"
}Show Output
#
# ### #
########
#########
######
## ## ############ #
### ################### #
#############################
############################
################################
################################
#################################### #
# # ###################################
########### ###################################
########### #####################################
############## ####################################
####################################################
######################################################
#########################################################################
######################################################
####################################################
############## ####################################
########### #####################################
########### ###################################
# # ###################################
#################################### #
################################
################################
############################
#############################
### ################### #
## ## ############ #
######
#########
########
# ### #
#
Explore an extensive collection of Sidef programs at github.com/trizen/sidef-scripts
Sidef includes a REPL (Read-Eval-Print Loop) for interactive programming:
| Platform | Package | Link |
|---|---|---|
| CPAN | Sidef |
metacpan.org |
| Package Search | Multiple distributions | pkgs.org |
| Arch Linux | sidef (AUR) |
AUR Package |
| Slackware | perl-Sidef |
SlackBuilds.org |
Contributions are welcome! Whether it's:
- Reporting bugs
- Suggesting new features
- Improving documentation
- Submitting pull requests
Please visit the GitHub repository to get involved.
Copyright © 2013-2025 Daniel Șuteu, Ioana Fălcușan
This program is free software; you can redistribute it and/or modify it under the terms of the Artistic License (2.0).
Full license: perlfoundation.org/artistic-license-20.html
- Use, modification, and distribution governed by the Artistic License
- Modified versions must comply with license requirements
- No trademark or logo usage rights granted
- Includes patent license for necessary claims
- Patent litigation terminates license
Warranty Disclaimer: THE PACKAGE IS PROVIDED "AS IS" WITHOUT WARRANTIES OF ANY KIND. See full license for details.
Made with ❤️ by the Sidef community
