Posts

This profile is from a federated server and may be incomplete. Browse more on the original instance.

loke, (edited ) to random
@loke@functional.cafe avatar

On the APL Matrix channel, it was asked what a nice tacit version of the following code was:

5 {⊃⍸⍺=∘.+⍨⍵} 2 3 5<br></br>

It's a bit of an odd piece of code, since it returns the coordinates to the matching value in the resulting grid, but OK.

Some suggestions using Dyalog was:

  • (⊃∘⍸⊣=∘.+⍨⍤⊢)
  • ⊃⍤⍸⍤=∘(∘.+⍨)

The reason I'm posing this, is because I find my Kap solution much nicer:

  • (↑⍸=)∘(+⌻⍨)

I've said this before, but I do believe that the style of function forks that are implemented in J and Dyalog were a mistake. Explicit forks and hooks are much better, and makes plain function chains into simple right-to-left function call sequences.

publicvoit,
@publicvoit@graz.social avatar

@loke >{¿:›«‡★&₱=|()√~∆} 🙇

loke, to random
@loke@functional.cafe avatar

As a programming language designer, I think it's bound to happen, but every time it does, it really makes you question yourself:

When people shows they are better at using your language than you are.

I think game designers must feel this all the time.

loke,
@loke@functional.cafe avatar

@tfb I agree, if "love" is a synonym for having an attack of something that bears a resemblance to imposter syndrome.

You feel that you are supposed to easily best whatever the person did. How could you not? You know everything about the thing.

tfb,
@tfb@functional.cafe avatar

@loke I see it as evidence that I've made something so usable that people can do things with it I didn't expect

loke, to random
@loke@functional.cafe avatar

Is it me that is weird, or is this song remarkably catchy for a Merzbow album? https://www.youtube.com/watch?v=t69vShQFohs

loke, to random
@loke@functional.cafe avatar

I like the @404mediaco podcast. I just have one issue with it.

In the introduction, they say "..both online and... irl". In my mind, I keep wanting them to say "...both online and... off".

loke, to random
@loke@functional.cafe avatar

This collab is just as appropriate as you'd hope. 🙂

https://www.youtube.com/watch?v=EDnIEWyVIlE

loke, to random
@loke@functional.cafe avatar

A new engineerguy video. This time about duct tape. What could be more interesting? Nothing, I tell you. https://www.youtube.com/watch?v=E-F2QQuZZGk

loke, to random
@loke@functional.cafe avatar

Went to see Arch Enemy.

loke, to random
@loke@functional.cafe avatar

So I watched the two first episodes of Andor (the Star Wars TV series).

Why were people raving about this? After two episodes there should be at least one likeable character, and I would have hoped at least something would have happened?

It may be because I have a general dislike for TV series which are not episodic. But, I get the feeling that this is something that was meant to be a movie, but the writer was told to stretch it out into a TV series. The stuff that happened in the first two episodes could have been 5 minutes.

lispegistus,
@lispegistus@hachyderm.io avatar

@loke This show has very little sugar and a lot of relevant, poignant and bitter political medicine, and it does take a while to get going. I'd give it a shot until the end to figure out if it's your thing or not and not judge it early. I happen to absolutely love it.

loke,
@loke@functional.cafe avatar

@lispegistus thanks, and even though your comment hints that I likely won't enjoy it, it was very helpful.

I think I should read the synopsis on Wikipedia before watching any further. If the story is actually to my liking, I'll watch more of it.

loke, to random
@loke@functional.cafe avatar

I'm currently trying to decide on the syntax and semantics of field lookup in Kap.

The general syntax of looking of a value in a named field will be the use of the period, just like most object-oriented languages. Such as: foo.bar to look up field bar in the value referenced by foo.

Now, the primary datatype in Kap is of course the array, with the majority of them being 1- and 2-dimensional. Kap also provides the ability to attach labels to any axis, so I can name the the axes of a 3-by-3 array of numbers like this:

    "foo" "bar" "xyz" labels 3 3 ⍴ ⍳9<br></br>┌───┬───┬───┐<br></br>│foo│bar│xyz│<br></br>├→──┴───┴───┤<br></br>↓  0   1   2│<br></br>│  3   4   5│<br></br>│  6   7   8│<br></br>└───────────┘<br></br>

Now, if I have such an array, what better way to select a column than to use the period? So if the above array is tored in the variable "abc", then typing abc.bar would return a 1-dimensional array of the numbers 1 4 7.

Now, this may seem straightforward, but there are some details that makes this a big tricky to get right.

Currently, the labels are strings. But when I parse an expression like foo.bar, the foo and bar are symbols. And symbols in Kap has a namespace attached to them. The semantics of symbols and their namespaces in Kap are almost identical to Common Lisp.

So one may think that the best approach is to allow symbols to be labels, and then permit lookup using the period only for labels that are symbols.

The problem with that is that is that when creating such labels, you have to choose if you use symbols in your own namespace, or if you want to use keywords. If the user of the array is in a different namespace, the way to look up an axis would then be either using keyword:

foo.:bar`<br></br>

Or, if the label is in the namespace of the source:

foo.namespace:bar`<br></br>

Both of which looks ugly.

Since keywords would be by far the most common, you'd want plain foo.bar to refer to the keyword :bar, but then accessing elements in your own namespace wouldn't have a natural syntax.

And yes, I know an alternative is to use plain string matching (similar to how the Common Lisp LOOP macro matches symbol names using strings). That feels a bit ugly though.

loke, to random
@loke@functional.cafe avatar

OK, all those aurora photos. I think this is one of the few times I regretted moving to the equator.

tfb,
@tfb@functional.cafe avatar

@loke If it makes you feel any better, most of us just saw grey in the sky. Colours in photos were not exactly representative

loke, to Cat
@loke@functional.cafe avatar

Here's some hungry cats.

loke, to random
@loke@functional.cafe avatar

These guys always hangs around the place where I stay. I wonder where they lay their eggs.

loke, to singapore
@loke@functional.cafe avatar

I need to try Wakueh. I never heard about it before.

https://www.youtube.com/watch?v=aReI67oXGuM

loke, to random
@loke@functional.cafe avatar

I have some broken CSS. I changed the CSS used in the language documentation, and it looks OK with one exception: There is a horizontal scrollbar, and when I move it, it doesn't look good anymore.

Here's a link. The problem should be pretty obvious:

https://kapdemo.dhsdevelopments.com/tutorial.html

I kinda suck at CSS, so I can't fix this. Is there some simple change that can be done to stop the horizontal scrollbar from appearing? (perhaps the method I used to put the menu on the left is wrong?)

kopio,

@loke On phone, can't check. Off the head of my head, try overflow clip?

loke,
@loke@functional.cafe avatar

@kopio It's less terrible on the phone, indeed. Although I know I've seen it misbehave there as well. Perhaps not on the tutorial page, but on one of the others.

They are all generated from Asciidoc but with a modified CSS.

loke, to random
@loke@functional.cafe avatar

So I just upgraded my test Fedora VM (running on Virtualbox) to version 40. After that, the mouse was incredibly sluggish in Plasma.

Well, wouldn't you know it. It had switched to Wayland by default. Switching back to X11 made it fast again.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • JUstTest
  • mdbf
  • ngwrru68w68
  • tester
  • magazineikmin
  • thenastyranch
  • rosin
  • khanakhh
  • InstantRegret
  • Youngstown
  • slotface
  • Durango
  • kavyap
  • DreamBathrooms
  • megavids
  • tacticalgear
  • osvaldo12
  • normalnudes
  • cubers
  • cisconetworking
  • everett
  • GTA5RPClips
  • ethstaker
  • Leos
  • provamag3
  • anitta
  • modclub
  • lostlight
  • All magazines