These are public posts tagged with #kap. You can interact with them if you have an account anywhere in the fediverse.
A ... *dynamic* ... kite flying session - and a melancholic kite aerial photography session - above the Ljubljana Marshes landscape park, Slovenia.
https://kapjasa.si/en/seven-rokakkus-in-the-sky-to-say-nothing-about-the-delta/
#kiteaerialphotography #KAP #kite #kites #kiteflying #LjubljanaMArshes #LjubljanskoBarje #nature #landscape #park #river #Ižica #Slovenia
Sonntags in die @stadtbuechereien_duesseldorf am #KAP gegenüber des #Hauptbahnhof|s - I like
Klimatisiert, ruhig, keine Hektik und Lesespaß in Griffweite
#Sonntagsdinge #immerwiedersonntags #bibliothek #bib #buecherei #lesen #buecher #books
Kap marketing post
So, I saw Leetcode question 73, whose description is as follows:
Given an m x n integer matrix matrix, if an element is 0, set its entire row and column to 0's.
In most popular programming languages, something like this is somewhat annoying, forcing you to write some loops that kind of hides what you really want to do.
Even in Excel, I think this will be frustrating, but I'm not an Excel expert.
But if you think about it, if you create a new matrix that contains a bitmask where every cell is 1 where the original matrix contains a nonzeoro value, you can simply check if each row contains all ones, and then do the same check on each column.
Finally, we'll just multiply the new mask with the original matrix, which gives us the result we need:
{
mask ← 0≠⍵
rows ← ∧/mask
cols ← ∧⌿mask
sel ← rows ∧⌻ cols
sel × ⍵
}
Of course, the above is written out with temporary variables. In practice, I'd write it as a single expression like so:
{ ⍵ × (∧/)«∧⌻»(∧⌿) 0≠⍵ }
And of course, people will complain that it's unreadable and whatnot, but these two versions are equivalent, and the latter just takes advantage of the «
and »
symbols to combine functions.
If anyone has a problem they would otherwise use Excel or some python program to solve, share it with me to see if I can use it to show that Kap can be a better solution.
(and if I can't, that's even better, because then I have a reason to improve the software)
Here is some Common Lisp that definitely does not compete with Kap. It only runs in sbcl.
Try it. Marvel at its accuracy. Enjoy!
;; FACTORIAL-CALCULATOR.LISP
;; A straightforward OOP-based factorial calculator in Common Lisp.
;; Prompts for input, computes factorial, then exits cleanly.
(defpackage :factorial-calculator
(:use :cl)
(:export :main))
(in-package :factorial-calculator)
;;; Basic factorial function (simple recursion)
(defun factorial (n)
"Compute the factorial of N recursively."
(if (<= n 1)
1
(* n (factorial (1- n)))))
;;; Calculator class
(defclass factorial-calculator ()
((number :initarg :number :accessor calc-number
:documentation "The number to compute factorial of.")
(value :initform nil :accessor calc-value
:documentation "The computed factorial result.")))
(defmethod initialize ((calc factorial-calculator) n)
"Initialize calculator state."
(setf (calc-value calc) nil)
(format t ">>> Initialized calculator for ~A.~%" n))
(defmethod compute ((calc factorial-calculator))
"Compute and store the factorial in the calculator."
(let ((result (factorial (calc-number calc))))
(setf (calc-value calc) result)
(format t ">>> Computed factorial: ~A~%" result)))
;;; Main entry point
(defun main ()
"Prompt for input, compute factorial, and exit cleanly."
(format t "Please enter a non-negative integer: ")
(finish-output)
(let* ((input (read-line))
(n (parse-integer input :junk-allowed t)))
(if (or (null n) (< n 0))
(progn
(format t "Invalid input. Exiting.~%")
(sb-ext:quit :unix-status 1))
(let ((calc (make-instance 'factorial-calculator :number n)))
(initialize calc n)
(compute calc)
;; Display result
(format t "Result: ~A! = ~A~%" n (calc-value calc))
(format t ">>> Program complete. Exiting.~%")
(sb-ext:quit :unix-status 0)))))
;; To run:
;; sbcl --script factorial-calculator.lisp
;; or in REPL:
;; (load "factorial-calculator.lisp")
;; (in-package :factorial-calculator")
;; (main)
https://www.europesays.com/2240951/ After firing at Kap’s Cafe in Canada, Kapil Sharma breaks silence with his social media post #Canadá #Kap
One of the best kite festivals we've ever been to: 2025 Festival del Viento, Castelló de la plana, Spain!
https://kapjasa.si/en/verano-azul-festival-del-viento-castello/
#kite #kiteflying #kitefestival #festival #kiteaerialphotography #KAP #beach #wind #summer #Castellon #playadelgurugu #Grau #Valencia #Spain #TeamSlovenia
“¡A lo mejor!”– Javi We were a couple of pints deep…
KAP Jasa - kite team SloveniaIt was a hard and nervy kite aerial photography session - but we got one of the most fascinating lakes in Slovenia: the nearly circular Podpeč lake, a true Eye of the Marshes.
https://kapjasa.si/en/eye-of-the-marshes/
#kiteaerialphotography #KAP #kite #flying #aerial #lake #sinkhole #cenote #karst #LjubljanaMarshes #LjubljanskBarje #Podpeč #Jezero #podpeškojezero #eye #Marshes #Slovenia
Cyclops were never cool. Κύκλωπες, circle-eyed, one-eyed…
KAP Jasa - kite team Slovenia@ksaj @praetor @screwlisp Kap is certainly very high level compared to something like C. It doesn't even expose much in the way of system level access. It's more like Python in that respect, except being faster.
To briefly explain how to read the tacit expressions, all you really have to understand is how functions combine when there is no argument given to it.
Let's take the function -
as an example. Just like in standard maths, it has two roles: subtraction (when called with two arguments x-y
) or negation (when called with one argument -x
).
All right, so let's take a look at the simplest possible function definition using a tacit expression:
foo ⇐ -
After this, you can type 5 foo 2
to get the result 3. Or foo 11
to get -11.
Let's try a so-called 'train'. A train is just a sequence of functions:
foo ⇐ -×
Let's call it with two arguments to see what happens:
10 foo 4
-40
So, we can see how this actually evaluates as -(10×40)
. This is a general rule when a train is evaluated with two arguments: the right function is called with the two arguments, and then the result is passed to the left function.
Let's call it with one argument:
foo 4
-1
This is the same as -×4
. I.e. call ×4
and then pass the result to -
. The function ×
is extended to support called with one argument, and when it does, it returns the absolute value, i.e. 1. This value is negated by calling -
.
Now, the rest is just an extension of this. There are several special operators, including ∘
, ⍛
and the pair «
and »
which can be used to combine functions in more fancy ways than just using trains as explained above. All of this is documented in the reference: https://kapdemo.dhsdevelopments.com/reference.html#_compositional_operators
I hope this gives a bit of insight into how these functions can be created.
I was reading this article by @johndcook which makes a good argument that the up- and down-arrow notation is better for logs and exponents.
In APL (and Kap) the symbols are ⋆
and ⍟
which does have symmetry, but perhaps the arrows would be even better.
https://www.johndcook.com/blog/2025/05/13/alternative-exp-and-log-notation/
Alternative notation for exponents and logs using up…
John D. Cook | Applied Mathematics ConsultingHere's one of those interesting posts by @gregeganSF which talks about some interesting properties of hexadecimal numbers: https://mathstodon.xyz/@gregeganSF/114489111257308697
I wanted to play around with this myself, and since I used Kap to do it, I just wanted to share what this looks like. Here's the original list of numbers, computed from first principles by splitting up each number into a binary array, performing the shifts, grouping the bits in groups of 4, encoding each group in binary and then encoding each group in base 16: example
It could have been shorter if I had encoded the entire number in binary first, but I didn't do that because what I actually wanted to do was to work with the groups of 4 bits to show the symmetry where each group adds up to 8. Here's the code to do this: example
The output is as follows:
+/[1] ⊃ (64⍴1 0 0 0) ⊆ ⊃ (⍳5) ⌽¨ ⊂ (64⍴2) ⊤ 0xaf9d03c6be215748
┌→──────┐
↓8 8 8 8│
│8 8 8 8│
│8 8 8 8│
│8 8 8 8│
│8 8 8 8│
└───────┘
If you change the value to a number which doesn't have the symmetry mentioned in the post, the array will not be all the same number.
Here are some 64-bit hexadecimal numbers. af9d03c6be215748 5f3a078d7c42ae91 be740f1af8855d22 7ce81e35f10aba45 f9d03c6be215748a The…
MathstodonHere's one of those interesting posts by @gregeganSF which talks about some interesting properties of hexadecimal numbers: https://mathstodon.xyz/@gregeganSF/114489111257308697
I wanted to play around with this myself, and since I used Kap to do it, I just wanted to share what this looks like. Here's the original list of numbers, computed from first principles by splitting up each number into a binary array, performing the shifts, grouping the bits in groups of 4, encoding each group in binary and then encoding each group in base 16: example
It could have been shorter if I had encoded the entire number in binary first, but I didn't do that because what I actually wanted to do was to work with the groups of 4 bits to show the symmetry where each group adds up to 8. Here's the code to do this: example
The output is as follows:
+/[1] ⊃ (64⍴1 0 0 0) ⊆ ⊃ (⍳5) ⌽¨ ⊂ (64⍴2) ⊤ 0xaf9d03c6be215748
┌→──────┐
↓8 8 8 8│
│8 8 8 8│
│8 8 8 8│
│8 8 8 8│
│8 8 8 8│
└───────┘
If you change the value to a number which doesn't have the symmetry mentioned in the post, the array will not be all the same number.
Here are some 64-bit hexadecimal numbers. af9d03c6be215748 5f3a078d7c42ae91 be740f1af8855d22 7ce81e35f10aba45 f9d03c6be215748a The…
MathstodonBaroque in da house - how a group of bees made Ljubljana a Mediterranean city:
https://kapjasa.si/en/virtuti-musis/
#kiteaerialphotohgraphy #KAP #kite #aerial #Baroque #architecure #art #style #Ljubljana #StNicholas #seminary #academia #operosorum #Pozzo #Robba #Quaglio #Slovenia
Ljubljana is a funny city. It is one of those instantly…
KAP Jasa - kite team SloveniaCelebrating May Day with some glorious shots of Ljubljana Marshes glowing in the late afternoon sun.
https://kapjasa.si/en/a-glorious-day/
#kiteaerialphotography #KAP #kite #flying #aerial #LjubljanaMarshes #LjubljanskoBarje #marshes #barje #nature #spring #sun #Ljubljana #Slovenia
So, Caly the wiener dog had an appointment with a hairdresser.…
KAP Jasa - kite team SloveniaLake Palčje, Slovenia. The star of Pivka seasonal lakes nature park. Ephemeral and timeless.
And hard to get with a camera on a kite.
This is a story that concludes a seven year quest for a successful KAP session here. It was worth the wait.
Enjoy!
#kiteaerialphotography #KAP #kite #flying #aerial #Palčje #LakePalčje #lake #intermittentlake #karst #Pivka #notranjska #Slovenia
On June 18, 2017 we flew our kite with a camera for…
KAP Jasa - kite team SloveniaBit art bot is kind of fun: https://freeradical.zone/@bitartbot/114163397273270380
I tried to express the same in Kap, but this is the best I could do. I guess I don't fully understand the bit art expressions.
Attached: 1 image f(x,y) = ~(~((y * x) & (x / 11))) Extent:…
Free RadicalWe flew our kite above a hillfort of St.Mary of the Snows on Podgorje karst, Slovenia.
This story starts with Neolithic dentirstry, goes through Bronze and Iron Age, and ends with a cute little church. Enjoy! ;-)
https://kapjasa.si/en/mothers-and-goddesses/
#kiteaerialphotography #KAP #history #archaeology #hollfort #church #karst #neolithic #bronzeage #ironage #karst #kras #podgorje #kaštelir #kite #kiteflying #aerial #flying #Slovenia
A young man was in pain. A vertical crack had developed…
KAP Jasa - kite team SloveniaThe fortified church of the Holy Trinity in Hrastovlje, Slovenia.
The walls and the towers are guarding a veritable treasure, the frescoes of Janez of Kastav, including the famous Danse Macabre. And the stony defenders are still quite nervous when something wants to peek inside - even if it is just a kite.
https://kapjasa.si/en/a-fight-above-the-ancient-walls/
#kiteaerialphotography #KAP #kite #flying #church #frescoes #DanseMacabre #tabor #wall #tower #fortification #village #Karst #Hrastovlje #Istria #Istra #Slovenia
A hill – a defensive position par excellence. A fierce…
KAP Jasa - kite team SloveniaSometimes a kite aerial photo seems dull ... Wrong camera settings? Lack of post-processing skills? Is it the old adage - dull weather, dull photos?
Perhaps.
But, at least to us, the real question is - is there really such a thing as a "dull" kite aerial photo?
https://kapjasa.si/en/when-the-skies-are-grey/
#kiteaerialphotography #KAP #kite #kites #flying #aerial #marshes #nature #landscape #grey #weather #LjubljanaMarshes #LjubljanskoBarje #Barje #Insta #rokkaku #Slovenia
This is written, at list partially, in response to…
KAP Jasa - kite team SloveniaI rewrote yesterday's blog post a bit to make the code simpler, and hopefully a bit more understandable.
It appears a lot of my inspiration for writing blog…
Elias MårtensonI was reading the linked thread, and since I didn't want to take away from the discussion about using Binet's formula, I paste my straightforward iterative solution for Fibonacci numbers in Kap (the example below prints the first 100 numbers, if you want to start a different pair of numbers, change the final 1
to the pair you need):
The computation will automatically use bigint when needed, so there is no real upper limit to the numbers)
↑¨ (+/«⍮»↑ ⊣)\ 100⍴1