Earlier quoted context omitted.
> we genuinely can only laugh at people That's perhaps not the best wording. Nonetheless, I do agree with you. D can be very flexible in that regard.
I don't know how else to word it. Every thread about D has people going on and on and on and on about the GC, and they aren't always wrong (there is always good information here) but fundamentally it doesn't matter . Many D programmers come from PHP rather than C++ - D isn't attractive to them because of systems programming but rather high level programming e.g. metaprogramming.
Lang Jam: create a programming language in a weekend
111–120 of 135 posts
Re: Lang Jam: create a programming language in a weekend
#112Earlier quoted context omitted.
My favourite FizzBuzz is in Haskell, I found it in this talk by Kevlin Henney[0], and looks like this: fizzes = cycle ["", "", "Fizz"] buzzes = cycle ["", "", "", "", "Buzzes"] words = zipWith (++) fizzes buzzes numbers = map show [1..] fizzbuzz = zipWith max words numbers Henney explains in detail in the video, but it makes use of lazy evaluation to create an infinite list of FizzBuzzes, and also uses no if statemen…
I think 0 should be a FizzBuzz? Also I'm not sure how that solution would work for negative numbers... Then again what is the right answer for 7i + 24? Corner cases duck!
fizzbuzz = "FizzBuzz" : zipWith...
To make negative numbers work you'd need a new numbers definition numbers = map show [-1, -2..]
Should yield all the negative integers eventually.I've never heard of FizzBuzz defined for complex/imaginary/2-d numbers. That's interesting to consider, I'll be thinking about this for a while
Re: Lang Jam: create a programming language in a weekend
#113Earlier quoted context omitted.
I've heard the opposite about it, that its predictable performance is one of its strength. Do you have any sources?
Darklang is being rewritten in .Net Flowtype has horrible performance, which in my opinion partially explains why it has lost so many users to Typescript, which has much more predicable and fast performance even though it's written in JS. The project is basically dead
Re: Lang Jam: create a programming language in a weekend
#114Earlier quoted context omitted.
Whether or not Swift succeeds at being memory-safe, in theory, it's supposed to be.
It's memory-safe in a single-threaded context. The actor model would theoretically bring multi-threaded memory safety (with a different set of tradeoffs than Rust).
Re: Lang Jam: create a programming language in a weekend
#115Earlier quoted context omitted.
> we genuinely can only laugh at people That's perhaps not the best wording. Nonetheless, I do agree with you. D can be very flexible in that regard.
I don't know how else to word it. Every thread about D has people going on and on and on and on about the GC, and they aren't always wrong (there is always good information here) but fundamentally it doesn't matter . Many D programmers come from PHP rather than C++ - D isn't attractive to them because of systems programming but rather high level programming e.g. metaprogramming.
Re: Lang Jam: create a programming language in a weekend
#116Or something like a lovechild of sed, awk, seq, and cut, with regexp match groups and string interpolation.
Re: Lang Jam: create a programming language in a weekend
#117What kind of language ideas do you folks have? What would your fizzbuzz look like? I'm not sure I've ever seen a more readable compact fizzbuzz than this version in coffeescript ['fizz' unless i%3] + ['buzz' unless i%5] or i for i in [1..100]
I'd like a language that makes it easy to mock and dependency inject without doing anything special. IE, if in my business logic, I write "new Foo()", I'd like to be able to write a unit test where I say something like, "whenever I wrote 'new Foo()' swap in this mock object instead." Or, in a module that's an entry-point, I'd like to say, "whenever I wrote 'new Foo()' swap in this subclass instead." I've spent so muc…
Re: Lang Jam: create a programming language in a weekend
#118What kind of language ideas do you folks have? What would your fizzbuzz look like? I'm not sure I've ever seen a more readable compact fizzbuzz than this version in coffeescript ['fizz' unless i%3] + ['buzz' unless i%5] or i for i in [1..100]
You might have a picture represent a program, like Piet [1]. Or you might have a language specifically designed to show certain types of pictures, like TeX or Processing or more narrowly, PlantUML.
Another area to explore is the distributed space. Perhaps a language with Kubernetes capabilities as first-class objects.
Re: Lang Jam: create a programming language in a weekend
#119I could use something similar to jq, but for XML. Or something like a lovechild of sed, awk, seq, and cut, with regexp match groups and string interpolation.
That would be XPath/XQuery
I have spent 15 years implementing that in Xidel
>Or something like a lovechild of sed, awk, seq, and cut, with regexp match groups and string interpolation.
Sounds like Perl
Re: Lang Jam: create a programming language in a weekend
#120Earlier quoted context omitted.
Or a Lisp and let the user face them instead.
Forth seems easier to do over a weekend, though.