Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Another procedural language #50

Closed
alexchamberlain opened this issue Dec 20, 2014 · 7 comments
Closed

Another procedural language #50

alexchamberlain opened this issue Dec 20, 2014 · 7 comments

Comments

@alexchamberlain
Copy link

I think the idea of a well written, open source, stream-based/flow-based/data-flow language is a fantastic one. My only concern about this idea is the initial example

seq(100) | {|x|
  if x % 15 == 0 {
    "FizzBuzz"
  }
  else if x % 3 == 0 {
    "Fizz"
  }
  else if x % 5 == 0 {
    "Buzz"
  }
  else {
    x
  }
} | STDOUT

Do we need an procedural language? Please ignore the syntax, but what about something like this:

from fizzbuzz import fizzbuzz
seq(100) | fizzbuzz | STDOUT

where fizzbuzz is a module written in a conventional imperative language, such as Python, Ruby or C++?

@alexchamberlain alexchamberlain changed the title Another Imperative Language Another procedural language Dec 20, 2014
@markburns
Copy link
Contributor

One thing I like about ruby is the way it was C-like enough that it didn't scare people away but also introduced people to functional programming concepts.

I like the way some of the conversation is going with regards to pattern matching.

I think supporting what you are saying, (which is kind of similar to my suggestion #20) but also providing a familiar language for people would mean more people introduced to e.g. pattern matching.

Actually I'd be interested in hearing @matz elaborate on

I am not sure if proposed process model fit well in the language.

I'm not sure what exactly was meant by that as I probably haven't thought as far or in depth on the topic as he has.

@matz
Copy link
Owner

matz commented Dec 20, 2014

I think we need both. I agree it's good to have API to add vocabulary written in other imperative languages. But at the same time, going back and forth between languages too often will probably make me frustrated.

@matz matz closed this as completed Dec 20, 2014
@alexchamberlain
Copy link
Author

Again, I think the process model is good as a way to think about a problem, but perhaps should be flexible for implementation. It makes sense that I/O happens in a non-blocking thread, independent of computational threads, for example. Maybe it makes sense to inline some computations into a single thread, but keep others separate. Sometimes one may want to replace the (presumably) in memory queue between 2 "processes" by a TCP connection between 2 computers. Essentially, a "process" could be implemented as a functor, a thread, a process or on a whole other machine; it's not important at one level, but is at another.

@alexchamberlain
Copy link
Author

@matz Thanks for the feedback. Maybe try and keep it simple? A language that supports basic calculations, pattern matching and basic string manipulation only. Anything more complicated and you drop into a traditional language. Just an idea.

@calebwin
Copy link

calebwin commented Jan 15, 2019

@alexchamberlain I've begin working on something somewhat along the lines of what you seem to be taking about - github.com/calebwin/pipelines
Comments/criticism would be appreciated.

@matz
Copy link
Owner

matz commented Jan 16, 2019

I like the basic idea of pipelines. Thank you!

@calebwin
Copy link

Thank you @matz; I'm glad you like it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants