Other articles

  1. War Vs Peace






    War is best done, not wanting it.

    But something that has to be done.

    In order to see your children in the eyes ...

    In the years to come.

    To tell them stories ...

    About tyranny and madness.

    And what a real hero do.

    To make our life free ...

    Of men that …

    read more
  2. Stolen Computer (ChatGPT4)

    This is an inside joke!





    (Verse 1)


    I stole my friend's computer, like a hacker in the night,

    With code radar blipping, my heart shining bright.

    But in the digital space, our friendship was lost,

    A broken RAM in my soul, a system failure at all cost.




    I was …

    read more
  3. On the fundamentals of charge

    What is charge? why is there a positive charge, why negative? why is it a fundamental universal constant? why do we similarly have the universal constant \(\hbar\) of angular momentum. Why is the electron is so small and the proton so large, similarly when it comes to mass? There are …

    read more
  4. Donate To Ukraine

    When it comes to the war in Ukraine I, as most Swedish people, have taken side of the Ukraine in the conflict. And I think that the only logical conclusion one can take is to stand up against Russia's invasion of the country. Therefore if you find any of my …

    read more
  5. Fåglar






    Dotras hand berör,

    En målning av kärlek, tre fåglar, hon gjort.

    Tänker att det är själar som hälsar på.

    Fåglar är som stjärnjus av minnen.

    En pappa förlorad i strid.

    Mamma med våld bragt om liv.

    Ett barn som lekt när bomb slog ner.

    Fåglar påväg till sina kära,

    Att …

    read more
  6. Nightingales






    A daughter's hand so tender,

    A painting of love, with birds she's rendered.

    She thinks they're souls, to visit they flew,

    Birds like the starlight, memories they drew.


    A father in battle, forever lost,

    A mother whose life, at violent cost.

    A child at play when bombs rained down,

    Their …

    read more
  7. Budhismic






    As a leaf falls, and the wheel of life turns,

    We grieve the loss, and for unity, we yearn.

    Yet in Buddha's teachings, we find our guide,

    To understand impermanence, and put fear aside.


    We who journey onward, along the Eightfold Path,

    Hold your essence within, a light to combat …

    read more
  8. Society 2000

    I have asked myself a couple of times, why are our society at the mercy of companies and foreign states. Why do not the people control how we express ourselves and how we match the speaker with the listener. Why do we organize information in such an obviously messed up …

    read more
  9. Logic

    I like brainy people. And hate surface. A good heart is actually brainy if you think about it. Our culture tend to hail IQ as brainy. But IQ with no heart is just surface.

    read more
  10. Training

    I trained quite heavily until about 30 years of age and discovered after being unrestrained, that I now longer, with the new medicines, get the kick from endorphins. That is needed to make running and other such exercises possible. I just stopped doing these things that was a part of …

    read more
  11. Free speech

    I was interested to see what people think about free speech and especially how we treat each other under this freedom. I did a small exercise to ask a question and be a good moderator at quora, here is the swedish discussion speech

    There are pro's and cons with free …

    read more
  12. yield from

    The current effort is to improve the speed of python-on-guile. To see a nice result consider the following python one liner,

    print(sum(1 for x in range(1000_000_000)

    The result with python-on-guile is, 1.6s and for python3 we have 27.9s on my machine.

    But the …

    read more
  13. Ny års natten 2022

    Nyårs poesin klingar ut på TV. Så vackra ord, kloka insikter i stort och smått. Känner mig varm i bröstet av våra förefäders genialitet. Ligger och grubblar så smått, vad kommer nästa år, finns det något ljus? Sonen sover brevid mig och hunden gnyr i sömnen där den ligger vid …

    read more
  14. Pig and Dinnner


    Can you propose a Christmas poem about a pig contemplating how he will make the people enjoy the Christmas dinner.


    Twas the night before Christmas, and all through the barn The pigs were a-snuffling, their snouts in the yard They dreamt of the treats that would soon be …

    read more
  15. Taking the Blue Pill


    Make up a story about the blue pill and red pill from the Matrix movie where the character took the blue pill because he was the programmer behind the matrix and could not take the self referential explosion the red pill would result in


    In the year 2022 …

    read more
  16. Food Fight


    tell a story about a dinner that ends in a food fight that ends with a roaster entering the fight coming through the window


    Once upon a time, a group of friends decided to have a dinner party at one of their houses. They spent the afternoon preparing …

    read more
  17. Chat War


    Make a story about Elon Musk buying Twitter and implement a generous freedom of speech approach. Include that the freedom was used by modified ChatGPT trolling AI bots to spread hate and false information. Include how Elon Musk used good bots to combat the bad bots and how in …

    read more
  18. Spell Check

    Me: write a spell checker in scheme that implements suggestions of corrections using the levenstein distance


    (define (levenstein-distance str1 str2)
      (define (min3 a b c)
        (min (min a b) c))
      (define (lev-distance str1-len str2-len)
        (if (or (= str1-len 0) (= str2-len 0))
            (max str1-len str2-len)
            (let ((cost (if (char=? (string-ref str1 …
    read more
  19. Wind power

    I wrote an honest question to find out how much energy need to go via hydrogen storage if we want to make ideally a source of power that is as stable as nuclear and how much extra wind power do we need to compensate for losses? Out of all current …

    read more
  20. Messiah

    In many parts of the world, the information is controlled with great effort and therefore you cannot put their world view on equal footing with interpretations in the free world. In the free world, there may be controlling factors as well, but only locally. A researcher usually needs a grant …

    read more
  21. Emotional

    I am following an interesting series of history classes made public from Yale by Timothy Snyder and associates. The series is reaching the end and after watching the latest I am very emotional, thinking about my own history that actually is more mysterious than I grown up with. Something not …

    read more
  22. Determinism

    When contemplating super-determinism I remember a conversation with a wild man that probably was a genius and at the same time often quite lost in himself many decades ago. He thought life was deterministic and worked like a clockwork and logic ruled the world. I countered that in deterministic system …

    read more
  23. Who am I

    It's always good to reflect about your person, your action and how it is to be a human. First of all, what we write, is not who we are in private. We should all learn to separate what we ideally think and who we are as a human. There is …

    read more
  24. Ett födelsedags poem






    En blomma som sträcker sig ut

    litegran emot solen

    för att färga en stråle

    att beröra våra hjärtan

    och skicka ett meddelande

    jag älskar dig ...

    vår värd


    En man av hat stryper ljuset

    vill ej ha färger för sin syn

    vill ej att kärlek visas

    eller talas och bli hörd …

    read more
  25. Ukraine

    This text is my own thoughts and I put it in the public domain, the text only wants to do good, it would be silly to claim publishing rights on such a text so please if you like the idea, improve on it and/or copy/link it as you …

    read more
  26. A birthday poem






    A flower that want to stretch out

    Just a little towards sun

    to color a flare

    to touch our hearts

    and brings a message:

    i love you ...



    A man of hate is strangling the light

    does not want colors to show

    does not want love

    to be spoken

    an …

    read more
  27. Iran 2022

    I have got several Iranian friends and I want to write something about the recent protests. First of all, let's be fair. Western powers has not been kind historically to Iran and the hard Islamic ruling of the country would most likely not exist today if it hasn't been for …

    read more
  28. An European way for Muslims?

    As an atheist, an ignorant person regarding the great religions, but someone that cares and sincerely want's the world to become better, that worries that in the future, people will destroy what good is, how the world is attacked by division, how I see patronizing is poisoning our world, how …

    read more
  29. Democracy

    Sweden has an interesting story and is the country I know best as I live here. At the start of the war in Syria, Sweden open it's border for refugees and I got interested in the politics around it. It turned out that we had a similar but smaller event …

    read more
  30. Mind the gap

    I am usually quite shy and doesn't make much fuss out there in what most call life which is typically Nordic introvert behavior. But I have a story I experienced while working in Tokyo for a month that opened my eye's in a new way. It turned out that I …

    read more
  31. In the eye of a parent

    One of my strategies as a parent, when the kids are a bit older (teenagers), is to try encourage my kids to think for themselves, let them have solitude, avoid conflicts unless it is important and just guide them a little. Trust them to take the right decision, and be …

    read more
  32. Master your mind

    I samhället och världen finns det sprickor, d.v.s. röken av en välmenad konspiration. Jag har set hur en hel del gått lite "bananas" (självupplevt så jag vet vad jag talar om) när deras världsbild krossas när sådant blir uppenbart för dem, känner sig lurade av t.ex. läkare …

    read more
  33. About speech

    Normally I'm quite focused. And when so, struggle to speak and I need to really concentrate to find at least one word for what I want to say, usually I invent things or pick a bad one although I do not have a bad word ability. I have made about …

    read more
  34. My Belief

    Well basically what I believe in is in humans. In a sense our nature is both good and bad. We tend to think in we and them and treat life as a football field. Maybe our nature to do that is calmed by the fact that you can go to …

    read more
  35. The Double Slit Strangity

    The double slit is the following experiment. We place 2 slits maybe 5mm apart and each slit very very thin. Send a laser against two of the slits and you will see an interference pattern on a photon counter CCD sitting behind the slits e.g. alternating bright and black …

    read more
  36. On the Stern Gerlach experiment

    The start of the discussion can be taken from the very nice Wikipedia article, [Stern Gerlach][https://en.wikipedia.org/wiki/Stern%E2%80%93Gerlach_experiment] The basic thing to note is the quote,

    " If the particle is treated as a classical spinning magnetic dipole, it will precess in a …

    read more
  37. On The Fine Structure Constant

    We have the following numerology,

    $$ a_1 = \alpha = 0.007297352569311, $$


    $$ 1/a_1 = 137.03599908348923, $$


    $$ a_2 = 1 - 137*\alpha = 0.0002626980043929361, $$


    $$ 1/a_2 = 3806.6524422630514, $$


    $$ a_3 = 1 - 3806*a_2 = 0.00017139528048515373, $$


    $$ 1/a_3 = 5834.466370190515, $$


    $$ a_4 = 1 - 5834 …
    read more
  38. On The Electron and Photon

    One interesting thought experiment that will gain you a lot of insight is to boost the hydrogen action close to the speed of light and then take the limit. So you do a Lorenz transformation. This will result in a time dilation and a length contraction. Interestingly the photon field …

    read more
  39. On Hydrinos

    To understand this post in details, you need to read the following sub post and study them. I'll discuss this in the redit r/hydrino if you have some physical understanding you should be able to understand what Mills is doing with his approach to GUTCP and the novel compound …

    read more
  40. Helium Energy levels II

    I will start by first do a retake of getting the energy levels of Helium. The idea is that for helium we have two spherical shells at the same radius. Each of them has a B-field where the component of the vector that gives and internal field is the radial …

    read more
  41. Move Slowly

    As the gas prices has skyrocket here in Sweden I needed to take care of my driving habits. And one of the biggest contribution to this is a 300km journey I quite often take to visit friends and family. So what did I do. Well I now drive much much …

    read more
  42. En av mina idoler

    Om ni undrar varför jag vet en del om Ing-Marie Wieselgren kan jag säga att som forskare och samhällsintresserad statistiker så kommer man i kontakt med många intressanta människor och områden. Jag följer medicinsk vetenskap i alla fall lite mer än de flesta. Jag har när jag doktorerade pratat en …

    read more
  43. Helium Energy levels

    The question is if we can find an alternative derivation of the ground state for the hydrogen atom then Bohr and especially Mills GUTCP. Now Mills indicate that this is due to a tilt of \(\theta = \pi/3\) radians. The idea here now is to look at two circles that …

    read more
  44. Display Strings

    Displaying a string in guile has the speed:

    > (define p (open-file "/dev/null" "w"))
    > (define x (make-string 100000000 #\a))
    > ,time (begin (display x p) 1)
    1.015054s real time, 1.014577s run time.  0.000000s spent in GC.

    That's about 100MByte of data pushed out in 1 …

    read more
  45. Printing Doubles

    Printing reals in guile head has the following characteristics.

    > (define x (make-vector 10000000 0.8888888888888888888888))
    > (define p (open-file "/dev/null" "w"))
    > time (begin (write x p) 1)
    15.812557s real time, 15.808950s run time.  0.000000s spent in GC.

    Now with my heavily optimized SCM/C …

    read more
  46. Suspendable Soft Ports

    Guile has the ability to define a soft port e.g. create a port with scheme code handlers that are executed in stead of C code when basic operations on the port is done. This works quite ok as long as one does not trip up due to the continuation …

    read more
  47. One Shot Prolog

    We are going to play with an idea how to implement prolog programs using one shot continuation or simply where we allow a stack-code unit to be attached and detached to the active stack at will.

    So the building blocks are that each predicate, \(f\), is defined as a vector …

    read more
  48. Association Performans Test

    We did some series of benchmarking between the fast assoc taking advantage of SIMD, the fast hash taking advantage of SIMD, normal assoc and normal guile hash. The keys used was integers and we performd tests for different sizes (N) with a differnt sizes subsample (M).

    Here is the table …

    read more
  49. Association List

    For small numbers of elements in an assoc list we know that a simple list assoc search is faster than a hash table lookup. The question is can we improve on the association list? First of all we could search a vector in stead of a list or even lay …

    read more
  50. Hash tables

    Hash tables are a real workhorse for programmers and is essentially a quite effective way to store an association between a key and a value. For small number of pairs a simple association list is quite efficient. But for larger numbers of elements, a hash table is usually best until …

    read more
  51. Klein Gordon and the Bohr model

    We will derive an alternative way modelling Hydrogene like atoms or ions, at least for simple energy levels, using the classical relativistic quantum mechanics as building block and show that they produce Energy level estimates as well as indicating a connection to more classical approaches like the Bohr model and …

    read more
  52. Poetry






    After a good night's sleep,

    whispering ancient words

    in an unspoken language

    touches my soul,

    and begins its journey

    to my fingers.


    I sit and wait

    for inspiration.

    Then suddenly,

    the flow comes.


    A tide of ideas

    that twists my ancestors lives

    with what has reached my eyes

    and ears …

    read more
  53. Wolf






    A flare touches my skin,

    my soul takes a bath

    in the clear morning

    as fresh cold air slowly twists around my body.


    The wolf in me

    and outside of me,

    guard my sensitivity

    and I relax.


    A black beauty,

    a concentrated soldier

    of ancient times

    marshes up my spine …

    read more
  54. Knowledge






    Follow the flow,

    but keep it cool!

    To spend time waiting for knowledge

    to develop is never wrong.


    I do not like

    when other people push things too fast

    for no apparent reason.

    This includes me as well.


    The reason is one of my favorite principles,

    to put your paper …

    read more
  55. Dans






    Ord viskar i natten.

    Du sover med öronen öppna

    och sakta nynnar dina känslor

    en öm melodi.


    Visst dansen kan vara vild,

    men också i nuet,


    i väntan på ett nytt andetag,

    ter sig mörkret ljust.


    Sällan är själen

    något skrämmande

    även om våra ögon är förbundna.

    Vi litar …

    read more
  56. Mindfullness






    Why do we need more mindfulness?

    Because it is important to listen to each other.

    One of the things I am most proud of

    is when I stopped and listened to one person

    crying for help.


    I listened to her through

    listening to myself.

    Suddenly I got a feeling

    that …

    read more
  57. Förgänglighet






    Visst konturerna av oss alla

    suddas ut.

    Armar och huvud försvinner

    på stenens byst och kvar,

    ett märke i tiden.


    Även en runa försvinner

    lite för varje frostnatt

    och vattendroppe.

    Men är det så illa,


    varför ska vi synas i evig tid

    utan att nya ideer får födas,

    nya ljusglimtar …

    read more
  58. Inspiration






    The flowers on the stream move so slowly,

    so gently.

    A strange dance with the waves.

    Hardly anything can remove these flowers

    as they are the souls we meet on the street,

    the souls we hear talk in the bus

    or the souls of our friends cheering a game.


    Nothing …

    read more
  59. Vänskap






    Lite av dig finns i mig.

    Lite av mig finns i dig

    och när jag ser på dig lär jag om mig.

    När du ser på mig så tar du mig i en dans

    och vi far fram.


    Vild hysterisk dans

    liksom långsam elegant,

    låter tiden smeka oss varma,

    i …

    read more
  60. Youth







    you are so honest.

    You show yourselves

    and we all try to understand you.

    But for those ready to break up.

    On the long journey called life,

    frustration is the fuel that enables you to take off.


    Of course I would like a smile,

    but also deep inside I …

    read more
  61. Bråk






    Två ögon i mörkret,

    två liv som möts.

    I mörkret blir vi sanna,

    i mörkret lutar vi oss mot varandra.

    Facklor som lyser upp,

    Tåras för att skänka tröst.


    Ibland vi spänner känslors båge

    och stångas mot urberg:

    av osäkerhet,

    av okunskap,

    av onda tillfälligheter.


    Det märkliga här är

    hur …

    read more
  62. Dilemma






    What is good and what is evil

    when both are 'intelligent'.

    Many many people go around here thinking that

    what says it is evil is evil and

    what says it's good is good.


    As an example if a politician takes a photo op

    outside a church and signals,

    hey I'm …

    read more
  63. Karate






    A misspoken word,

    a Freudian slip and the silent self

    of the speaker shows themselves.

    At least in the silent mind of a broken heart.

    The Horse continues to laugh as heat

    from the other side starts to wind itself around worries,

    and memories of someone loved,

    who cries in …

    read more
  64. Turas om






    Hotet närmar sig

    och ömhetens öga blinkar tvärt

    för att kunna parera och släppa fram

    soldaten inom oss.


    Humaniserade känslor försvinner,

    och enkla sinnen leder oss i vårt försvar.

    Vi kan alla låsas i detta,

    få ett stenhjärta

    och glömma de sånger som sjöngs för oss.


    Men så öppnas porten …

    read more
  65. One Shot Continuations

    Guile has adjustable stacks and one thing that struck me when implementing generators in python on guile with the help of delimited continuations are that the overhead is pretty high as one need to tear down store, reload and tear up the stack for it. If you apply the continuation …

    read more
  66. Non Radiation

    Previously we saw that it's possible to define an electron as a set of great circles on the sphere and for this model conjecturing that the resulting angular momentum is as much as possible, but maintaining a uniform density has the propert that if we put that this angular momentum …

    read more
  67. Call And Define

    In functional programming we pass the state as arguments to functions. It can be tedious to track all funciton arguments and not only this when we want to add an extra state parameter to a huge codebas you end up in an never ending work of updating function arguments and …

    read more
  68. A deep question

    Executive summary This question is about covering a sphere with great circles so that the resulting density is uniform and that if we for each circle associate a normal vector, then the magnitude of the sum of them would have an upper limit of 1/2. This has a bearing …

    read more
  69. functool

    Considering associate meta information to functions. Closures are at your service but the question I had is if we could make it more functional. The idea is that at each time the value of a handle is unique and cloning is done through copying. Also we would like this to …

    read more
  70. Native Compilation

    To compile scheme to native code natively how would we go about? Generating assebler and have a native compiler is kind of difficult if we want to reach a system that can compile to many different targets. What we would like is to take a scheme file and output byte …

    read more
  71. Tables

    As soon as you see a table most computer programmers probably think about databases. And that's probably right, many times. But always?

    In a table we manage a set of rows with a key or id field. If the table is small, say less than 10.000 the science of …

    read more
  72. Text Data Structure

    This is a short discussion about how to model a flow of data enabling sharing and moving trough the datastructure in a left to right fashion. We ould like to cut out objects and insert them in other places and maintain everything in a prolog like datastructure.

    The idea of …

    read more
  73. Paralell 2 Ideom

    This is a continuation of the paralell conjunction ideom i've been working on. Previously the system could not handle variables that is located in many branches at the same time e.g. if you set X=1 in one branch and X=2 in another you would get into troubles …

    read more
  74. Paralell Ideom

    Execution of prolog code is sequential in nature, but one would like to be able to execute multiple algorithm in paralell. Turns out that swi's engine's are quite good att performing this task for us, we can fire up one engine per algorithm and generate answers back and let them …

    read more
  75. Store The State Of Multiple Paralell Engines

    My next task for guile-log is to make paralell engines store and restorable. This does not work before. In order to see how one can solve this with the already implemented framework, lets first recap paralell engines.

    By issuing paralell engines e1,...en we device a scheme where we manually …

    read more
  76. Guile fibers

    Check out wingo's fibers. I added support for fibers in guile-log and guile-log prolog. Fibers are an attempt to model multitasking, like in erlang, with cooperative scheduling (meaning that you need to enter a sleep now and then to allow other threads to run. Currently the interface is very simplistic …

    read more
  77. Swi Engines in Guile Log

    A recent addition to swi prolog is engines. These objects are self contained prolog engines with their own stack that maintaines the computation state and will generate each answer back stepwise. Guile log have implemented the same API and is reachable from the library (logic guile-log guile-prolog engine). A good …

    read more
  78. Dependency and Guile Log

    Having had a taste for executing things in paralell in kanren let's move over to guile-log. Executing stuff in paralell is similar but we can take advantage of variable binding beeing done directly on the variable and not bound in a binding data structure. The idea is for each engine …

    read more
  79. Dependency and Kanren

    We will discuss here a kanren version that will modify just partial results and not redo the whole datastructure in order change an underlying value. This means that we are considering paralell executions of code that only modify the data relevant to their code section the solution is a combination …

    read more
  80. Continuations in Minikanren

    Swi prolog recently got predicate continuation and knowing of extearamly functional minkanren/microkanren is, one should be able to construct such a beast. Now in most languages you would need to make sure that a cach throw mechanism is working in the return values and somehow knit that together. But …

    read more
  81. Fast Looping in Prolog

    When coding my prolog VM I noticed that the overhead of a prolog call is in the order of 2M execution per second, and this is typically what I see when executing simple prolog perdicates in swi prolog as well. So all complexity that one need to care for simply …

    read more
  82. Set Mania

    We are going to explore how set's are handled in guile-log prolog. Lets start off simple.

    To define a set just do:

    X is {1,2,3}.
    X = {1,2,3}

    We have added common set operators e.g.

    % union e.g. all combined elements (cup in latex).
    ?- X is …
    read more
  83. Versioning

    Consider a variables, a box with a value. Guile-log has the notion of a state. At any point in time all the prolog varibales are bound. And this information can be stored in a state. The guile-log variables are more general than pure prolog variables in that they can be …

    read more
  84. Return Values

    Prolog passes all in,out,in/out values as arguments to the predicate. This has the drawback, for out variables, that the variables need to be allocated from the heap and adds complexity and overhead to the predicate. If in stead the out variables could be passed over without making …

    read more
  85. Type Magic

    Let's consider the task to match something that has a type. We could use the extended matcher and :<, :, :>, as a default. If we don't like it it is possible to redefine it. So what to expect. We genereally constrain types to be of a certain type.

    f(X :< number, Y …
    read more