Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
geophile
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
15 ms
·
181.
▲
by
geophile
3y ago
Just continue the pipeline, e.g. ls | map (f: f.size) | red + | map (size: size / 1024) You can also leave off "map", so: ls | (f: f.size) | red + | (size: size / 1024) A pipeline produces a stream, so
182.
▲
by
geophile
3y ago
If you stick to marcel commands and python functions, then all the processing happens in a single Python process (with a small number of exceptions). Beside the process overhead, this approach also avoids serialization/deserialization
183.
▲
by
geophile
3y ago
Well there are two points. 1) Piping strings is dumb. 2) Multiple incompatible sublanguages has a long learning curve. How many people can just write complex awk/find scripts without checking the manual? Using marcel, and knowing pytho
184.
▲
by
geophile
3y ago
Sorry, osh as in object shell: https://github.com/geophile/osh .
185.
▲
by
geophile
3y ago
Thank you for all the suggestions for code formatting/colorizing. The problem is that I'm hosting on wix. Posting images sucks, as already pointed out. How do I get formatted, console-like text on wix? I'm not seeing how thes
186.
▲
by
geophile
3y ago
No. Marcel is the successor to osh ( http://geophile.com/osh , https://github.com/geophile/osh ) which actually precedes powershell. The fact is that many many people have implemented the idea of a shel
187.
▲
by
geophile
3y ago
So switching from GPL to LGPL would allow the G*P to use marcel.api?
188.
▲
by
geophile
3y ago
I posted a comparison to xonsh elsewhere in this discussion.
189.
▲
by
geophile
3y ago
For help documentation I wrote my own tool to format things the way I wanted for the console (e.g. colorized, adjusting to console width). For the website, I'm using wix. I'm open to suggestions for using wix better, or choosing a
190.
▲
by
geophile
3y ago
Yes! Please send me email: jao at geophile dot com.
191.
▲
by
geophile
3y ago
But it still sucks because of the unstructured data. I added JSON support to Marcel in an afternoon, and still have structure data flowing through the pipelines. JSON first, then nested Python ducts and lists from the JSON translation.
192.
▲
by
geophile
3y ago
I wrote Marcel, and its forerunner osh, also recently on HN. Osh actually preceded powershell, and in fact I don’t recall it receiving any acknowledgement from Microsoft . To be fair, I’m sure they never heard of it. The idea of piping o
193.
▲
by
geophile
3y ago
I'm not a license connoiseur. Why does GPL present a problem? (Not trying to be conentious, it's a genuine question.)
194.
▲
by
geophile
3y ago
Im the Marcel author. Get in touch, I’d love to do what I can to assist.
195.
▲
by
geophile
3y ago
Almost forgot: I also switch from bash to Python at a low threshold. In that case, I find Marcel’s API useful. I can then do shell-like piping inside of Python.
196.
▲
by
geophile
3y ago
I actually agree with most of this. I tend to use Marcel for ETL sorts of processing, quick database access with data munging on either side, cluster access, etc. it works fine for basic shell usage though. As for a more complex example: ye
197.
▲
by
geophile
3y ago
Thank you! Integration with Python: Xonsh defines a language that is a superset of Python and shell, as I understand it. Marcel takes a different approach, defining only a bash-like shell language. Any customization is done in Python, delim
198.
▲
by
geophile
3y ago
But … but it’s a shell!
199.
▲
by
geophile
3y ago
Hi, I’m the author of Marcel. If you like it and want to work on it, I can use volunteers, for developing features, debugging, doc, porting, improving the website, you name it.
200.
▲
by
geophile
3y ago
That works. There is a Marcel API for Python that allows shell-like usage within Python programs. See this for an example: https://www.marceltheshell.org/scripting-1
201.
▲
by
geophile
3y ago
Marcel is open source, so no.
202.
▲
by
geophile
3y ago
Actually, I did. My daughter loves marcel the shell, I was writing a shell, so it's an obvious choice. It is far enough afield that I can't believe they would care. But I reached out to them, and explained what I was going. They w
203.
▲
by
geophile
3y ago
This is a place where marcel's python grounding is really useful. Reading json, marcel generates a stream of nested dicts and lists. That stream can be turned back to json for output. Similar for CSV.
204.
▲
by
geophile
3y ago
I wrote marcel. I picked the name because of the short that preceded the movie!
205.
▲
by
geophile
3y ago
I wrote marcel. In my view, nushell and marcel are very similar. nushell has tabular output, which I haven't thought was all that useful. Marcel is python-based. The nushell guys have had to invent a lot of language. By basing marcel o
206.
▲
by
geophile
3y ago
I'm responsible. I need to revise those, and images seemed like the way to get colorization right. I'll try to figure out how to do it with code blocks, it will hopefully be more maintainable. Cutting/pasting images is ridicu
207.
▲
by
geophile
3y ago
Marcel (my successof of osh) supports using past commands in a few ways: 1) Command recall, like any shell. 2) Edit of a previous command, giving you access to the command in $EDITOR. 3) Abstraction. For example, suppose you want to find al
208.
▲
by
geophile
3y ago
Check out marcel: https://marceltheshell.org , and https://github.com/geophile/marcel . Both marcel and nushell start with the idea of piping structured data instead of strings, which is incredibly powerful.
209.
▲
by
geophile
3y ago
It does. However, instead of trying and sometimes failing to support Python in the shell, Marcel limits Python to well-defined contexts, always delimited by parens. Also, Marcel has a Python API so that you can use shell-like commands and p
210.
▲
by
geophile
3y ago
Thank you, kind stranger. I am the author of object shell. This project is obsolete, superseded by Marcel, which I also wrote. https://gitHub.com/geophile/marcel . Marcel has a lot in common with nushell, but relies on
More ›