HackerTrans
TopNewTrendsCommentsPastAskShowJobs

tangus

no profile record

Submissions

Reviving the IBM Selectric Composer Fonts (2023)

kutilek.de
79 points·by tangus·2 maanden geleden·9 comments

comments

tangus
·3 maanden geleden·discuss
Here's an index of sorts. I couldn't find anything better.

https://archive.org/details/byte-magazine?sort=date
tangus
·3 maanden geleden·discuss
I guess they wanted to keep working on their slides (at least for the moment) and not be forced to go debugging. Sadly, the hang was deterministic, so they didn't have another option.
tangus
·4 maanden geleden·discuss
Aren't they basically saying opposite things? Perlis is saying "don't choose the right data structure, shoehorn your data into the most popular one". This advice might have made sense before generic programming was widespread; I think it's obsolete.
tangus
·5 maanden geleden·discuss
My minuscule pet peeve is that having only one source where the number 5 is depicted with a triangle (all others show it as a separated segment, like the number 6 but shorter), that's how every article or library draws it. It's all because the guy who wrote a book about them saw that source first so he based his figures on it.

Here's a small summary about the numbers with many examples: https://www.unicode.org/L2/L2020/20290-cistercian-digits.pdf
tangus
·7 maanden geleden·discuss
Everything they have is downloadable. Go to their home page and follow the links.
tangus
·8 maanden geleden·discuss
Everybody carries a gun in Heinlein stories, so those terrorists will be quickly dealt with by armed citizens, thus confirming the superiority of Libertarianism.
tangus
·8 maanden geleden·discuss
For the record, if you want to avoid the creation of intermediate arrays, you can:

    lst.lazy.grep(Array).flat_map(&:itself).sum
Not as clear, because the standard library doesn't have a `#flatten` method for lazy enumerators.

But the point is the interface, not the implementation. Efficiency doesn't mandate assembly-like DSLs. Your interface could be as clear and clean as Ruby's and produce fast, inlined code by the power of macros. Ruby doesn't have macros, so chaining lambdas is the best it can do.

Ruby also has call/cc. None of the iterating methods has any provision to make them "safe" from it. They aren't safe from modifications to the iterated collection either. I think it makes sense; being forced to accumulate using only linked lists and having to be constantly on guard to support a rarely used quirky feature is a bad tradeoff IMO.
tangus
·8 maanden geleden·discuss
Careful. Seeing how I was downvoted for asking, it looks people here don't want that information to spread.
tangus
·8 maanden geleden·discuss
It may be somewhat awkward; zipping collections to iterate over them in unison makes the first one (the sender) seem special, while it not necessarily is. And accumulating more than one value isn't always straightforward; you usually have to reduce explicitly. But it's so much better in the general case!

Like the example you showcase your macro with. In Ruby it would be:

    lst = [[1, 2], :dud, [3, 4], [5, 6]]
    lst.grep(Array).flatten.sum
    => 21
You can see what it does at a glance, you don't have to immerse yourself inside the directives to follow the logic. And when you can't do that, declaring iterators and accumulators outside a loop and then iterating and accumulating "by hand" yields code not so different than your more complex examples.

  def partition (arr)
    yes = []
    no = []
    arr.each do |elt|
      if yield elt
        yes << elt
      else
        no << elt
      end
    end
    [yes, no]
  end
tangus
·8 maanden geleden·discuss
Looping in Ruby is the opposite of awful. You only have to define an `#each` method in your class and include the `Enumerable` module, and you get a plethora of composable methods to iterate and accumulate in every which way. I find it nothing short of brilliant.
tangus
·9 maanden geleden·discuss
It's paywalled, please provide a workaround.
tangus
·9 maanden geleden·discuss
In the late 90's I had a girlfriend who worked for a shop that made web pages in COBOL. I thought those were COBOL's death throes, but apparently I was mistaken...
tangus
·2 jaar geleden·discuss
Last year I needed to make a small webapp to be hosted on a Windows server, and I thought RedBean would be ideal for it. Unfortunately it was too buggy (at least on Windows).

I don't know whether RedBean is production-ready now, but a year and a half ago, that was the catch.
tangus
·2 jaar geleden·discuss
Also of interest: CloudpilotEmu - Palm emulator in your browser

https://cloudpilot-emu.github.io/

When I installed it and could play Vexed again... ahh, the happiness!