15 ms·
Cyber is a new language for fast, efficient, and concurrent scripting
- thyrsus 4y agoThis looks great. The first use case that occurs to me is to accelerate pieces of our horribly slow Ansible scripts - but I'm probably the only one on our team who's interested in making the investment in learning a new language, and dealing with the bespoke code. How do I generate the required enthusiasm?
- pram 4y agoPersonally I think that would be a pretty hard sell. Writing custom code, presumably for things used in production, in a new language that isn't even at version 1?
- deafpolygon 4y agoPlus slow & steady wins the race. It's better to use predictable code in production and this language hasn't even been battle-tested yet.
- renox 4y agoItself implemented in a new language not yet at version 1..
- 0cf8612b2e1e 4y agoIs Ansible slow because of Python? I had always assumed the performance was due to excessive network roundtrips.
- JediPig 4y agobingo. there is a flag you can set that eliminates most , if not all. It's not slow cause it's written in 'python'. It's slow because of safety.
- Octabrain 4y agoFrom my experience, it is not always just the network. Ansible can be slow in operations such as copying files between directories on the remote target. I suffered from this a couple of years ago and the solution I implemented was to delegate the copy operation to a bash script and leave Ansible to just take care of uploading that script and run it passing the configured parameters. Anyways, if the network is a problem I strongly recommend to have a look to "Ansible pull".
- thyrsus 4y agoWe're using ansible-pull. Aside from occasional access to NFS mounts, there's a minimum of network traffic. E.g., the git retrieval is usually: I've got version x. That's current? Thanks, we're done. The time is spent executing Ansible modules on the local system. 200+ tasks ok, 200+ tasks skipped, maybe 10 changed. That takes between 5 and 20 minutes. I have an unsubstantiated suspicion that the large dictionary representing the package inventory is a contributor - systems with fewer packages seem to work faster.
- Jedd 4y agoIf you're committed to, and enjoy the combination of, Python & YAML & Jinja2 - but don't enjoy the architecture, performance, and sharp edges of Ansible, you may want to review Saltstack as a config management tool. It's not a drop-in replacement, of course, but it's much closer to where you are now than the traditional two alternatives. However, as others have observed to you, it's not a good idea to replace your current functional Ansible menagerie with a new unstable language + no framework.
- tubs 4y agoIs there someone alive who enjoys that particular combo? It's probably the set of three words most likely to send me into a corner, crying.
- cdogl 4y agoFirst, establish that the language is the issue. Measure. It's difficult for me to imagine a situation with Ansible scripts where the performance bottleneck is the raw performance of the python runtime.
- matu3ba 4y ago> How do I generate the required enthusiasm? Find a good use case that justifies using an unstable language. This is typically internal developer tooling or testing systems. Personally I would love a language with better type+test system than python for shuffling json around and math stuff. Python's dict functionality feels like a big fat hack (recusive merging, splitting json, detection of subdict etc) and likewise the xml stuff (there is no guide what xml tooling to use and what is broken in what python version and a third party package is better than libstd).
- booi 4y agoDoes this mean the term “being good at cyber” will actually mean something now?
- sumeno 4y agoHaving grown up on the internet in the 90s I assure you it meant something before
- ganoushoreilly 4y agoYes, yes it did and it's part of the reason I really hate the term.
- sacnoradhq 4y agoCyberterrorist hacker department of redundancy department again. It could be worse: grandmas could still be using AOL on Windows 95 getting to know a lovely Nigerian prince. Apropos: ProgressBar95. Where Clippy attacks.
- radicalbyte 4y agoI love it, it unmasks charlatans and those who live in constant fear of the FBI van picking them up..
- ganoushoreilly 4y agoI like your perspective
- incanus77 4y agoI still make fun of Cyber Monday.
- eggy 4y agoI grew up in the 70s with the term cybernetics from Norber Wiener, and I liked it before Gibson's Neuromancer in the 80s, so I guess I was innoculated before the pandemic use of the word. Cyber-Physical Systems (CPS) is a term being bandied about a bit now (reading Logical Foundations of Cyber-Physical Systems, and it is pretty cool[1]; Andrew Sorensen's Extempore as an environment for Cyber-Physical Systems). I also attended the first HOPE in 1994 in NYC and although the press abused the term cyber, it's still cool to me! [1] https://link.springer.com/book/10.1007/978-3-319-63588-0 https://link.springer.com/book/10.1007/978-3-319-63588-0
- DethNinja 4y agoThis looks awesome. What are the plans for host security? For example, LUA is secure in the sense that you can explicitly disallow it to use APIs that can modify the operating system. This makes it a good candidate for multiplayer games.
- tecleandor 4y agoOOC... What's that lua option called? Thanks!
- deleted 4y ago[deleted]
- 0cf8612b2e1e 4y agoLots of features that look really great to see at first blush. As a bruised and battered Python programmer, the only thing missing from my list would be static compilation target/deployment strategy. Having a first class option to distribute code is important to me.
- giraffe_lady 4y agojanet then. I think it's the only one of the class of small embeddable languages that also has that use case built in from the beginning.
- tionis 4y agoI think the syntax puts most people off, as they are used to c-like languages.
- boberoni 4y agoImplemented 96.3% in Zig. Very cool! Although for my own scripting language, I use Rust. The functional bits make writing compiler programs really fun.
- kmlben65 4y agoasync dispatch / job groups / continuous input processing? closures / text or int data ranges and filters(comprehensions)? databases / sqlite related data processing tools? "std"-like shim/ boiler plate commands for popular tooling to launch ml / cv tasks, or any tasks that require a bunch of standartized steps?
- neapolisbeach 4y agooh
- chime 4y agoLove that it allows circular reference and does not crash immediately. > https://github.com/fubark/cyber/blob/master/docs/docs.md#hello-world https://github.com/fubark/cyber/blob/master/docs/docs.md#hel... > 1 == 2 -- Evaluates to `true` Is that an error in the doc because I am not sure why this would the case then: > 1 != 2 -- Evaluates to `true` Seems very Javascripty to me if it isn’t a typo.
- capableweb 4y agoYou mean allowing circular references seems Javascripty or you mean outright incorrect equality checks seems Javascripty? I don't think Javascript suffers from the latter, as long as you understand the implicit casting Javascript deos.
- chime 4y agoSorry I was typing on the phone so didn't space out the two issues properly. The circular reference handling is neat and something I've never thought of before. The docs comment about 1==2 and 1!=2 was unrelated. But if the doc was not in error, then it was Javascripty.
- mkl 4y agoIt's an error in the docs. 1 == 2 evaluates to false.
- andrewinardeer 4y agoI feel really stupid for asking this - how do I install it to play around? I cannot see anything in the docs.
- TacoSteemers 4y agoHere are the build instructions: https://github.com/fubark/cyber/blob/master/docs/build.md https://github.com/fubark/cyber/blob/master/docs/build.md
- andrewinardeer 4y agoThank you very much.
- mkl 4y agoFrom the GitHub page, here are some binary releases: https://github.com/fubark/cyber/releases https://github.com/fubark/cyber/releases You can also try it online: https://cyberscript.dev/play.html https://cyberscript.dev/play.html
- andrewinardeer 4y agoThank you for your guidance.
- 2h 4y agono windows: https://github.com/fubark/cyber/issues/1 https://github.com/fubark/cyber/issues/1
- thefz 4y agoa/s/l wanna cyber?
- samuell 4y agoNo performance comparisons to julia? Julia is pretty much the language I would currently look into for a scripting language outside python, so it might be a pretty relevant comparison target.
- larsrc 4y agoWhy are programming language designers so bad at naming languages. Pick something that doesn't already have a gazillion search results, people! Go, Swift, Rust, Cyber, all bad. Though I'm still hoping for a UI library for Go where the elements are called gadgets, just so we at Google can look them up under go/go/gadget/Button.
- deleted 4y ago[deleted]
- Aisen8010 4y agoIt's a hard job! All the good names (Java, C, Brainfuck) are taken.
- RobotToaster 4y agoC is a terrible name for searching too, although in it's defence it was invented before Google.
- asah 4y agoSo was Java!
- detrites 4y agoAnd yet, it doesn't appear to have hurt my ability to quickly and easily locate information regarding any of those languages.
- Ecstatify 4y agoThose other languages were created/sponsored by huge corporations. Search for "Cyber Script" on Google, none of the top results include cyberscript.dev
- schaefer 4y agoOkay. When I search for “Cyber Script” on kagi.com, cyberscript.dev is the third result. Google search is user hostile. Or to drag out that overused cliche, on Google search, the advertisers are the customers, while the attention of people searching the web is the product.
- ngrilly 4y agoI’m wondering if all values are boxed, like in Python, which is increasing RAM usage and creating a lot indirections, instead of being able to create arrays and structs where the members are located in the same block of contiguous memory.
- exebook 4y agoValues seem to be nan-boxed, which means numbers are simply doubles and therefore will still be located in the same block of contiguous memory. When the higher 8 bits are FF the remaining 48 normally are an indirection pointer. So right, for anything other than numbers your cache misses increase, but storing dynamically sized objects like strings or tuples or maps continuously in array is a hard problem anyway not to mention storage in maps or in tables. Since this is seemingly a byte code or threaded code based VM, your code execution probably also contributes to cache exhaustion.
- Tepix 4y agoQ: Suggest five names for new scripting languages ChatGPT: "ZenScript" "FluxScript" "EchoScript" "QuantumScript" "NimbleScript" Q: Suggest five more names, but pick names that do not end in "script" A: "ZenCode" "FluxLang" "EchoCode" "QuantumLang" "NimbleCode" Q: Can you suggest 5 more names that are not based on existing words? A: "Krynn" "Nymbl" "Zephyr" "Glimmr" "Vynce"
- mdaniel 4y ago> Suggest five more names, but pick names that do not end in "script" Kinda cheating to reply to this with s/Script/Lang/ from the previous answer, since those were not 5 more names. I blame it using the same seed for its random number generator : - D
- LegitShady 4y ago>Zephyr I have news for chatgpt
- BiteCode_dev 4y agoIt seems to have kept a lot of good things from python, but fixes many quirks: - slicing with index or with index+length ? Well, both apparently! - len() is a method - ranges and slices have the same syntax - you can use | to avoid the indentation hell that comes with ''' - true, false and none don't have an upper case first letter - the lambda design allow for multi lines, despite the language being heavily biased toward statements. And it's using "=>". - circular imports do not cause errors - explicit export, although i'd prefer it to be opt in - lua style ffi - mapping on dict key/values is the simple case - CYON is quite interesting - and of course concurrency and perf from the start But some of them will cause big troubles: "errors are values and do not propogate up the call stack by default. Users are not forced to handle errors unless the error value is passed to a typed destination." Yeah, silent errors in bash scripting taught me I really don't want that. "The shorthand method for calling functions omits parentheses and commas" The reason I still can't parse Ruby after 15 years.
- iTokio 4y agoThe shorthand method use case is declarative UI code, an important use case for scripting languages (flutter also changed Dart syntax for this)
- jamesu 4y agoBenchmarks for fib are great and all, but unless you are making fibonacci simulator 2023 it's not really a good selling point. What I really want to know when looking at a scripting language is: how easy is it really to embed? Does it have a good debugger? Does it make too many assumptions about how your program works? Can it scale for a larger project? Does it have any interesting features like apis for reflection?
- explodingcamera 4y agoLooks really nice! one thing I instantly noticed though is the import order, would be nice if they could consider switching the path and module name around, like `from "x" import y`, not sure why modern languages would still do it like this.
- antihero 4y agoHow’s the standard library?
- cmontella 4y agoBuilding a new language in a new language (zig) is quite the choice. Usually you choose your host language to leverage some aspect of its ecosystem — whether that be a VM like JVM, or a standard library, or something else. The other reason would be that writing a language takes time, measured in years and decades. Usually you would pick a well-supported language so that you can be assured it won’t disappear before you’ve finished yours. I’m only just looking through the project now, but would be interested in finding the author’s rationale for writing this in Zig. Seems like with Zig you wouldn’t get any of this, so I’m wondering why go this direction.
- AYBABTME 4y agoZig isn't that new at this point. It was talked about here when Go reached 1.0.
- cmontella 4y agoLooking at the commit history of the Zig repo, the first commit was in 2016, so that can’t be right; Go hit 1.0 in 2012. Unless maybe it was just being talked about in 2012. Either way, that’s still pretty new as far as languages go these days, and the bus factor still seems to be 1 or at best 3. There has to be some compelling reason that Zig was the choice here and I’m curious.
- rofrol 4y agotrue, first appearance in 2016 https://andrewkelley.me/post/intro-to-zig.html https://andrewkelley.me/post/intro-to-zig.html