HNHacker News
TopNewBestAskShowJobs

bear8642

240 karma · joined November 18, 2019

submissionscomments
bear8642··on Ask HN: Does anyone care about OpenPOWER?
Although frustratingly loosing support with the new open xlc compiler!
bear8642··on What Adrian Did Next – Part 2 – Sun Microsystems (2022)
https://web.archive.org/web/20240121212049/https://adrianco....
bear8642··on Thinking in an array language
Yep, or even apply inline as {+⌿⍤2(∘.≤)⍤1⍨⍵}cardMatrix
bear8642··on Thinking in an array language
Sure - idea is you've got a 6×30 matrix of the 6 card attributes for each of the 30 cards, and want to know for each attribute how many other cards they'd beat.

  {+⌿⍤2(∘.≤)⍤1⍨⍵}

  {            ⍵} ⍝ single argument (monadic) function with argument ⍵
  {           ⍨⍵} ⍝ "selfie" - ⍵ f ⍵ where f is (∘.≤)⍤1
  {         ⍤1⍨⍵} ⍝ on each row (1 dimensional element)
  {    (∘. )⍤1⍨⍵} ⍝ cartesian (outer) product of each row with itself
  {    (∘.≤)⍤1⍨⍵} ⍝ ≤ comparison of those elements - produces 6 30×30 boolean matrices
  {  ⍤2(∘.≤)⍤1⍨⍵} ⍝ on each of those matricies (2 dimensional element)
  {+⌿⍤2(∘.≤)⍤1⍨⍵} ⍝ sum the columns
leading to: {+⌿⍤2(∘.≤)⍤1⍨⍵} ⍝ compare each row (⍤1) to itself (⍨) and count (+⌿) how many cards that beats

That make sense?

bear8642··on Thinking in an array language
> "learn an array language, they're easy to write on paper" everyone would think they were insane... but there is something to it, in certain cases.

Indeed, and sometimes not needing a computer to quickly splash out an idea you're thinking/talking about is extremely useful!

Over Christmas, I showed my brother {+⌿⍤2(∘.≤)⍤1⍨⍵} as a small expression to explore attribute to pick playing Top-Trumps admist a discussion. Not something you'd be able to do in many other languages!

bear8642··on Interviewing my mother, a mainframe COBOL programmer (2016)
>programmers that keep banks like this running are an enormously underestimated "bus factor" for many of the world's economies, and what kind of back-up plans they have for such a scenario.

Hmm, makes me wonder about potential similar situation with APL programmers - a language I know quite a few large companies use.

bear8642··on Turbo Pascal Turns 40
>maybe pascal syntax was also parsing friendly..

Yep, designed to be single pass, recursive descent friendly

bear8642··on Designing a programming language to speedrun Advent of Code
> tenK←'^........k.$' ⎕S '&' ⊢ words ⍝ regex filter

Is tenK←{(10=≢⍵)∧⍵[9]='k'}¨words better?

Feel that better matches the problem spec, although requires the each

bear8642··on Designing a programming language to speedrun Advent of Code
> words wordlist | filter -:(len == 10 and .8 == "k")

This feels very similar to an APL or K solution.

Are those languages you're aware of?

bear8642··on Why programming languages matter [video]
Just because something's old doesn't mean it's not relevant, yes might not've been the best language to suggest - the more modern BQN, Uiua and Singeli exist too - but it's still a fairly niche paradigm. Ideas tend to come in cycles too - look at the 1980s ideas of the transputer or connection machine.

I wanted to point towards a programming paradigm that's approach enables you to take advantage of the parallel execution possible within chips today due to the notation being both precise in intent yet vague in execution. Take summing an array (`+/vector`) or selecting values given a boolean mask (`mask/values`) - both these very simple expressions are expressible directly in SIMD instructions, as there's no for loop index enforcing an order.

bear8642··on Dyalog APL Keyboard Layouts
> So there must be others out there

Indeed, quite frightening at times seeing the value of firms using Dyalog APL.

bear8642··on Why programming languages matter [video]
Array languages, such as APL and others, tend to be easily parallisable given primitives tend to focus on intent and how to transform data rather than imperative operations.

Some of the SIMD operations feel very reminicent of APL primitives

bear8642··on Exploratory data analysis for humanities data
oh, didn't realise you could do that - I've tended to use `... |awk '{print $NF, $0}'` to add line numbers to something
bear8642··on Draculark: Mudlarking and vampire hunting game in APL for the Commodore SuperPET
If screenshots are whole code we can type it out.
bear8642··on Ask HN: SICP is often recommended as mind opener, what did you learn from it?
> * (the core) the lisp metacircular evaluator

Which leads to the funny footnote in section 4.1.1 when discussing implementing conditionals

6 [...] Contemplation of the meaning of true? here yields expansion of consciousness without the abuse of substance.

bear8642··on Invariants: A Better Debugger?
Yet to watch video, but does visual studio support macros in immediate or watch windows?

That so far has been my frustration when not remote debugging linux vm, where it becomes a gdb front-end

bear8642··on Philosophy of Coroutines
Could you expand?

I have a limited understanding of continuations and never used them myself.

bear8642··on Some of the error messages produced by Apple's MPW C compiler (2006)
They're different enough that you can't goto a case or default label.
bear8642··on Infrequently Asked Questions in Comp.lang.c (1999)
Though think they might be accepted if using pre-ansi standard. Remember reading that in the changes list in my 2nd edition copy of k&r
bear8642··on Exploring the Internals of Linux v0.01
> may I suggest cmForth[6] Hmm, not a forth I've come across before - enjoyed reading JonesForth though.
bear8642··on The Hacker's Dictionary
Are these meant to just be incomprehensible, or is there some translation possible?

Haven't heard the song for awhile.

bear8642··on Jails on FreeBSD
>> Can live processes be moved into or out of a jail?

>No: jails are VM-like in functionality.

Could this be implemented though if moving between sufficiently similar operating systems?

Seems like might be useful to imprison a suspicious acting process or to release once seen to be safe.

bear8642··on Envisioning a Simplified Intel Architecture
> There's no notable advantage...

Potentially one if a large customer's paying you for it.

At work, I'm helping a client upgrade from a decade old version (v12) of our product and having to copy over the switches to keep the even older (v11 and previous) behaviours

bear8642··on The Joy of Computer History Books
Can't remember what the book version's called but found <folklore.org> good about the early macintosh development good fun!
bear8642··on APL: An Array Oriented Programming Language (2018)
> bunch of set of instantly recognizable "chunks"

Indeed! Much of APL programming is using idioms (≠⊆⊢ for example as split on delimiters)

https://aplcart.info has a good selection too

bear8642··on Why we need to know LR and recursive descent parsing techniques
Which might then change the semantics of your grammar - remember this being pointed out in 3rd year compilers course
bear8642··on What the hell is Forth? (2019)
Feel APL similar in-crowd member too, though perhaps even more niche
bear8642··on Assembly Optimization Tips (2004)
Good, I'll explore them then. I'm a competent programmer, just new to various simd and other x86 optimizations.
bear8642··on Assembly Optimization Tips (2004)
Does anyone have good recommendation for beginner friendly optimisation material? Agner's website starts saying "Note that these manuals are not for beginners. "
bear8642··on Thinking Forth (1984)
Jones Forth[0] is a good literate programming implementation that explains the internals as he goes.

[0]https://github.com/nornagon/jonesforth/blob/master/jonesfort...

← PreviousPage 3 of 9Next →