
Security News
Follow-up and Clarification on Recent Malicious Ruby Gems Campaign
A clarification on our recent research investigating 60 malicious Ruby gems.
= symbolic
This is a proof-of-concept experiment to handle symbolic expressions in Ruby, inspired by Sage.
Symbolic expressions can be built with Ruby syntax in a +symbolic+ block, by declaring variables with +var+:
symbolic do var :x expr = 2+x # now expr contains a symbolic expression puts expr # -> (2 + x) puts eval(expr) # -> (2 + x) self.x = 1.5 puts eval(expr) # -> 3.5 puts eval(expr/7) # -> 0.5 var :y poly = 3x3 - x2 - yx + 7 puts eval(poly) # -> ((7.875 - (y * 1.5)) + 7) puts eval(poly, :y=>5.0) # -> 7.375 end
Functions can be defined with +fun+:
symbolic do fun(:sqr){|x| x*x} var :x expr = sqr(sin(x)) puts expr # -> sqr(sin(x)) self.x = 1.5 puts eval(expr) # -> 0.994996248300223 end
== Similar project
http://github.com/brainopia/symbolic is a similar, more complete project. Because of this the gem released by this project has been renamed to symbolic-math. Note that this project's pretensions are more limited than brainopia's; I only intend to play with syntax to do symbolic Math in Ruby, not to implement any relevant symbolic math functionality.
== Note on Patches/Pull Requests
== Copyright
Copyright (c) 2009 Javier Goizueta. See LICENSE for details.
FAQs
Unknown package
We found that symbolic-math demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A clarification on our recent research investigating 60 malicious Ruby gems.
Security News
ESLint now supports parallel linting with a new --concurrency flag, delivering major speed gains and closing a 10-year-old feature request.
Research
/Security News
A malicious Go module posing as an SSH brute forcer exfiltrates stolen credentials to a Telegram bot controlled by a Russian-speaking threat actor.