book
onelinerizer
Our great sponsors
book | onelinerizer | |
---|---|---|
18 | 19 | |
1,159 | 1,514 | |
0.6% | - | |
2.7 | 0.0 | |
2 months ago | over 2 years ago | |
OCaml | Python | |
GNU General Public License v3.0 or later | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
book
-
OCaml: a Rust developer's first impressions
Some of your questions might be answered in this book (free online version): https://dev.realworldocaml.org/
- Compiler Development: Rust or OCaml?
-
Nix-Powered Development with OCaml
I don't think they're wrong
the Jane Street side are quite prolific with blog posts etc
as a newcomer to OCaml one of the first, and nicer-looking, intro resources you'll likely encounter is the Real World OCaml book https://dev.realworldocaml.org/ which unfortunately does everything using Base instead of the stdlib
Personally that didn't sit right to me and I prefer to use the stdlib by default (which seems fine and not in need of a wholesale replacement)
-
Comparing Objective Caml and Standard ML
This is an oldie but a goodie.
OCaml has, unlike Standard ML, grown quite a lot since this page was made.
In particular, the section "Standard libraries", I'd recommend looking at:
https://dev.realworldocaml.org/
A couple of places where the comparison is outdated:
- OCaml using Base [1] allows for result-type oriented programming
- OCaml using Base uses less language magic and more module system
While there was and is truth to the distinction that SML is for scientists and OCaml is for engineers, this dichotomy is getting dated: OCaml is under active development, which means that scientists who want better tooling will choose OCaml. For example, 1ML [2] by Andreas Rossberg was built in OCaml.
[1]: https://opensource.janestreet.com/base/
-
Resource recommendations for a beginner.
Real World OCaml (version 2 is finally out) is also pretty good.
-
OCAML HELP!
Real World OCaml is also a good resource, geared more towards people who already have some programming experience and want a more industry/practical focused learning experience.
-
Teach Yourself Programming in Ten Years
ocaml.org’s new website is packed with lots of great early intros.
most learners eventually gravitate towards Real World OCaml https://dev.realworldocaml.org/ for additional learning.
Unfortunately, the learning resources for different domains out there isn’t as highly curated or prolific as, say, rust. If you do web dev like me, it takes a bit more work to find the tools and put them together. But the language itself lends itself well to systems level programming.
Fortunately, the forum is a great help.
-
Help getting started with Ocaml
In general, better read the second edition which is updated to use current Core versions. A print version was published recently.
-
learning ocaml this semester.
I recommend https://dev.realworldocaml.org/ and https://cs3110.github.io/textbook/cover.html
-
Functional Reactive Programming
Elm is not dead. It just prefers a slow release schedule but is still actively worked on in the background.
That said, you might want to check out OCaml for general purpose programming. Super fast compiler, great performance, can target both native and JS.
It is easier to use than Haskell due to defaulting to eager evaluation (like most languages) strategy instead of laziness and being generally more pragmatic, offering more escape hatches into the imperative world if need be. Plus great upward trajectory with lot's of cool stuff like an effects system and multi-core support coming.
Real World Ocaml is a decent resource: https://dev.realworldocaml.org/
onelinerizer
-
Flatliner: turn python programs into one line of (still python) code
Very cool. Also, Chelsea Voss did this in 2016 with Python 2 (https://github.com/csvoss/onelinerizer) and did a great talk about it at PyCon (https://www.youtube.com/watch?v=DsUxuz_Rt8g) . She also has try/except working, maybe something similar to her solution would also work in Python 3.
-
I think someone broke the matrix!
Ahhh, allow me to introduce you to Oneliner-izer. Devs smarter than me laugh at your thinking loops cannot be implemented in a single line without semicolons
-
C'mon Python, surely you can figure out what I meant
lambda would like a word
-
The next level of if even
It’s still possible to have it be a single line in Python!! http://www.onelinerizer.com
-
I compressed a pong game into 14 lines of code! See if you can improve it!
Outdated but if you downgrade to python 2 or figure something out from the examples: http://www.onelinerizer.com/
-
Python f-strings Are More Powerful Than You Might Think
Entire python programs can be converted to a single one-line expression.
-
What is your favourite Rust specific feature that you miss in other languages?
And then there's also oneline.py, the mother of Python onelineization.
-
The JSF*ck Keyboard, an entirely original idea.
For a similarly awful idea in python, observe the onelinerizer
-
Is there any code in python that provably needs more than one line to run?
No, in fact Chelsea Voss made http://www.onelinerizer.com/ which can convert any Python (2) program into one line (without using eval, compile, exec or semicolons). The approaches used are talked about in this PyCon 2016 talk: https://www.youtube.com/watch?v=DsUxuz_Rt8g
-
Pro tip for debugging!
You're welcome.
What are some alternatives?
swift-async-algorithms - Async Algorithms for Swift
Power-Fx - Power Fx low-code programming language
awesome-ocaml - A curated collection of awesome OCaml tools, frameworks, libraries and articles.
Transcrypt - Python 3.9 to JavaScript compiler - Lean, fast, open! -
reason - Simple, fast & type safe code that leverages the JavaScript & OCaml ecosystems
movfuscator - The single instruction C compiler
learn-you-a-haskell - “Learn You a Haskell for Great Good!” by Miran Lipovača
mdp - A command-line based markdown presentation tool.
ocaml-containers - A lightweight, modular standard library extension, string library, and interfaces to various libraries (unix, threads, etc.) BSD license.
JavaWord - Microsoft Word as a Java "IDE"
reflex - Interactive programs without callbacks or side-effects. Functional Reactive Programming (FRP) uses composable events and time-varying values to describe interactive systems as pure functions. Just like other pure functional code, functional reactive code is easier to get right on the first try, maintain, and reuse.
fetlang - Fetish-themed programming language