@Mego: I saw this post and thought about our conversation about non-competing answers. Does this qualify in your book? If so, should it be deleted in that case?
I want to be able to write a J-like language using the mathjs math.parser() function result.
Let's say I want to define an operator # that returns the length of an array. Ideally it would work like this:
a = [1, 2, 3]
#a // yields 3
Then, for fun, an operator $ that takes two arra...
Wow. I'm going to have to get used to not being able to edit messages long after the fact, and not being able to read deleted messages, when I become a civilian again. :-P
@quartata I'm actually wondering if I'm a victim of confirmation bias because there was a wave of golfing languages shortly after I started developing Minkolang...
A Jelly program itself is one big chain; each link of the chain is delimited by newlines. ç treats the link above it (literally the line above) as a dyad and calls it.
@Mego From the OP: "I won't accept this as an answer, but Code Golf is about having fun, so there's no problem with having the answer here." Why is that not taken into account? And why delete it?
Given a value A and value B where both are greater than 0, and given a positive value X and a negative value Y, how do you find the shortest (least computation) way to get from A to B (or figure out that there is no solution)?
please add any tags you feel fit for this question, thanks
@ZachGates The OP doesn't get to decide whether or not a submission is a serious contender. That's why we have guidelines - so that it's not subjective.
@EasterlyIrk I loved working with the people I worked with. :-)
Anonymous
It's clever and creative, and it made me smile, but it's exactly the kind of submission I mentioned in my meta post - the only possible way it could win is if it was the only submission.
Some of them I still call friends. (And some of them were friends long before they or I started working there.)
Anonymous
Clever, creative, and cool are for popcons, not code golf (unless we're talking the kind of clever, creative, and cool that shaves off bytes, which we aren't)
class Animal(String: Name, Int: Age) {
main {
self.Name := Name
self.Age := Age
}
speak := => "Hello, my name is #{self.Name}, I am #{self.Age} years old"
}
@Downgoat you could even make parameter inheritance implicit
Anonymous
@ChrisJester-Young You know what's also fun? Sharing knowledge and building great solutions as a community. Have you heard of Stack Exchange? It's a pretty cool Q&A network that encourages that. :)
In computer science, reflection is the ability of a computer program to examine (see type introspection) and modify its own structure and behavior (specifically the values, meta-data, properties and functions) at runtime.
== Historical background ==
The earliest computers were programmed in their native assembly language, which were inherently reflective as these original architectures could be programmed by defining instructions as data and using self-modifying code. As programming moved to higher-level languages such as C, this reflective ability disappeared (outside of malware) until programming...
@Doorknob Hence why I asked if he minded. Also there's a decent chance he already mentioned it and I missed it, because I'm not the most attentive when it comes to chat.
I've had this idea of dynamic static typing. As an example, an "Integer" would typically be defined with a range (e.g. from 1 to 100). However, if a and b were both integers of that range, then c = a + b would make c an integer with a range of 2 to 200
have you guys ever seen a language do something like that (so I can go look how they do it)?