13 ms·
REBOL Oneliners
- superdisk 7y agoThis language just looks super cool. It's a shame it's sort of dead. Red (the spiritual successor) isn't ready for production yet.
- timbit42 7y agoLogo on steroids.
- WaxProlix 7y agoIt's been really active; you can hop on their gitter and get a feel for where development is at (the sorts of things that are getting attention). I wouldn't use it for a production load, but it's ready enough for writing internal or personal tooling in. (And edit to say, I think some of the core team got pretty far into the blockchain rabbit hole at some point, so that may have derailed more mainstream efforts)
- analognoise 7y agoRed died the minute they announced they were going to launch their own crypto currency.
- 9214 7y agoThat's a rather bold claim. What you call cryptocurrency is an ERC-20 token intended for experimenting with community economy (e.g. tipping contributors, voting for features, app market, etc). It's an untrodden path and the idea is quite interesting in its own way. Regardless of the blockchain involvement, I encourage everyone to stay open-minded and judge the project on its technical merits.
- kaminari 7y agoSo the cryptocurrency stuff isn't at all part of the language or stdlib?
- 9214 7y agoWhat makes you think it is? There are plans to offer a lightweight console module for the Ethereum scheme and C3 dialect, but since there's very little interest in this branch of development from the community (and a lot of skepticism with nay-saying) it's not a priority.
- kaminari 7y agoI don't think it is, I (and I assume many developers) just want to stay far away from anything cryptocurrency-related.
- praptak 7y agoIt believe it had a restrictive license which was a showstopper for a programming language. The current version is Apache(?), but it might be too late.
- greggirwin 7y agoRebol2 was closed source, and is no longer maintained. Red has a non-restrictive license.
- pyuser583 7y agoRed is pretty awesome. Last I tried it out, it was not ready for graphics work on Linux.
- 9214 7y agoGTK backend is in a fairly good state, albeit lives in a separate development branch (which you are encouraged to check out). https://www.reddit.com/r/redlang/comments/dzobh0/latest_gtk_build/ https://www.reddit.com/r/redlang/comments/dzobh0/latest_gtk_... https://static.red-lang.org/dl/branch/GTK/linux/red-latest https://static.red-lang.org/dl/branch/GTK/linux/red-latest https://gitter.im/red/GTK https://gitter.im/red/GTK
- xgchiu 7y agoLow number of users doesn't mean dead. A Rebol 3 version now compiles to wasm. You can check the interpreter running in a browser at hostilefork.com/media/shared/replpad-js/
- lwb 7y agoLooks really interesting. Anyone able to get this to work on Catalina? I'm getting "bad CPU type in executable" for both the PPC and Intel versions.
- adamzegelin 7y agoPPC definitely won't work on Catalina. PPC support was dropped from macOS years ago. The Intel binary is 32-bit only. Catalina will only run 64-bit binaries. $ file rebol rebol: Mach-O executable i386
- pmarreck 7y agoDoes anyone else think cutting off 32-bit support basically killed off what remained appealing about the Mac that differentiated it from being just a “desktop iOS iPad in the iCloud ecosystem”? I lost access to so much cherished stuff that I am currently evaluating a switch to Ubuntu 20.04
- mushufasa 7y agowell, ubuntu is also dropping support for 32-bit. they tried to a little while ago and got a lot of backlash so they're supporting for a bit longer, but it's only a matter of time.
- kragen 7y agoI think they're dropping support for installation on 32-bit machines, not the 32-bit libraries needed to run 32-bit software on a 64-bit OS.
- michaelmrose 7y agoThe former already happened. In this case it was the latter. this would have ruined wine right when stream was beginning to make running games with wine easy.
- voldacar 7y agoThe syntax looks kind of odd - it feels a bit like trying to read lisp without the parentheses. Seems like a very expressive language though based on the number of characters needed to get stuff done
- noobdood 7y agoIIRC I read somewhere that Rebol is homoiconic but not sure.
- Izkata 7y agoIt is. For example, in the third example: foreach file load %./ [if not dir? file [write/binary join ftp://user:pass@example.com/ file read/binary file]] Those two sets of [ ] are the block! datatype, which is an array-like type. "foreach" is a function that takes an identifier and two block!s ("load" returns a block!), executing the second for each one in the first. Quick example showing it: >> something: [print val] == [print val] >> foreach val [1 2 3] something 1 2 3 >> append something [+ 3] == [print val + 3] >> foreach val [1 2 3] something 4 5 6 The second example in the oneliners kinda shows this as well, but I suppose it's not obvious without knowing more of the language. The outer block! is actually a separate dialect being passed to the layout function as data, that the layout function parses and handles. What's normally thought of as rebol is called the "do dialect", because that's how you run a block! as code: >> X: [print 1 + 2] == [print 1 + 2] >> do X 3 >> X/3 == + >> X/3: to-word {*} == * >> X == [print 1 * 2] >> do X 2
- noobdood 7y agoThanks.
- 9214 7y agoCurious ones can find a brief explanation of this core idea in a Github wiki (shameless plug!). https://github.com/red/red/wiki/%5BDOC%5D-How-Red-works:-a-brief-explanation https://github.com/red/red/wiki/%5BDOC%5D-How-Red-works:-a-b...
- abrax3141 7y agoThe idea of a one-liner is sort of silly when applied to functional programming. Every lisp expression, for example, no matter how long in editor space, is logically a single line.
- jmnicolas 7y agoTo me all (complex) one liners are bad : they're hard to read and they don't manage errors. I'd rather go through 5 lines of simple statements than try to decipher a "clever" one liner. From the fine article : > Open a GUI, read web page, sent it as email You really want to do that in one line ?
- glofish 7y agosending someone a link via email is a relatively common task. why would it be undesirable to write short code that can do that?
- abrax3141 7y agoNot undesirable, just odd to make a big deal about it. Like making a big deal about Unix pipes. Yeah, when they were invented, okay. Nowadays ... old hack.
- samatman 7y agoIt's only silly if you don't apply a reasonable character limit in your definition. I would say < 80 is definitely a one-liner, < 100 is more-or-less a one-liner, < 120 is really pushing it. After that, you're cheating. Even Java style guides cut you off after 120. 12 of these "one-liners" fail even the most permissive of these criteria, but, y'know, YMMV. None are over 140.
- Izkata 7y ago> None are over 140. Their limit is at the top of the page: > 2. How long is a line? Here, we limited users to 132 chars. It's the old line printer standard.
- EFruit 7y agoREBOL and its derivative Red seem like cool languages, but I can't get over the fact that it's impossible to bootstrap these free software projects because Red requires REBOL 3, which is self hosting using REBOL 2, which is proprietary.
- 7thaccount 7y agoRed will be self hosted at some point. I know they're working towards it, so it shouldn't put you off forever.
- 9214 7y agoFor what it's worth, only 1/4 of the toolchain (Red → Red/System compiler and Red/System → native compiler + loader/linker) depends on Rebol2, which in turn is 90% compatible with Red.
- xearl 7y agoRed requires Rebol 2, which is proprietary; Red does not require (and, in fact, does not work with) Rebol 3. However, Rebol 3 (and it's active descendant Ren-C) bootstraps itself; it does not require Rebol 2.
- xgchiu 7y agoYou've probably forgotten but at one stage the red.r script was ported to ren-c.
- Izkata 7y agoFirst programming language I learned, back around 2000. I still use it often for my personal projects.
- haolez 7y agoLooks a little like FORTH, but with batteries included.
- Zelphyr 7y agoI’m really encouraged that REBOL has made it to the front page of Hacker News. Hopefully that will translate into more contributors to the REBOL and Red projects.
- tejtm 7y agoBack on the Amiga I once found this weird language on Aminet or a ffish disk called "Lava" and it had all these builtin datatype for amazing things like ip addresses, I just could not wrap my head around that. What do you mean? I don't have to write my own token parsers in C that's outrageous! I ran away at first but went back over summer break and it had been renamed Rebol. I used it all through school blowing through programming assignments like they weren't there. Remember once earning 10% of a term's grade in something like 70 chars It was by far the most enjoyable programming I ever did. But (why does there always have to be that But) using it at work, as I did after school, was a disservice to everyone around me. Hardware - was all 64bit Rebol was still 32bit. Proprietary - brilliant author was from the time before, when that made sense. Co-workers - most neither could, nor wanted to "get it" Rebol sure was not going to help on their resumes. It tried to go Rebol2->Rebol3 ala perl/python but when a community in the hundreds splinters, there is just not that much left.
- twsted 7y agoBy the way Rebol was created by Carl Sassenrath, the designer of the kernel (exec) of Amiga OS. https://en.m.wikipedia.org/wiki/Carl_Sassenrath https://en.m.wikipedia.org/wiki/Carl_Sassenrath
- gyrcom 7y agoOver the years I have used 20+ languages, starting with CobolC and Watfor, and now python is my daily driver. Rebol is by far the most enjoyable language I have ever used, very similar to Smalltalk and Lisp. More productive than any other system out there and a very small footprint. The language is unbelievably versatile as you can overload any word and create your own mezzanine functions super quickly. The drawback are that you can really messup if you are not careful. Another thing is that compiling is out of the question as the self modifying code possibilities of this language make it truly dynamic. Carl did a marvellous job on this language. The design is impeccable. If you like messaging then this is THE language.
- 9214 7y agoCompiling is not entirely out of the question: Red (Rebol's descendant) handles static compilation where it can and delegates the rest to the interpreter.
- ygmelnikova 7y agoRen-C is a branch of the open-sourced Rebol 3 codebase. https://github.com/metaeducation/ren-c https://github.com/metaeducation/ren-c 2019 Rebol Conference Vids https://2019.reb4.me/talks https://2019.reb4.me/talks
- lbj 7y agoIts a very impressive show of one-liners, I love how expressive the language is. I wonder however, how easy it would be to extend compared to something like Lisp. If these idioms for parsing html weren't built-in, what would a Rebol implementation of those funcs look like?
- soapdog 7y agoI've spent the best part of 2000 programming with REBOL until I made the switch to the early builds of MacOS X and moved to program using LiveCode. REBOL remains one of my most fond memories of being a developer. So much power in such a little language. I wish REBOL 2 was still being developed and its GUI was updated to latest trends. I'd switch back to it in a heartbeat. I'm quite excited about Red and been playing with it occasionally.