@loke@functional.cafe avatar



Lisp, Emacs, APL and a bunch of other stuff.

From Sweden, living in Singapore.

I always work on a bunch of projects. My current major ones are:

A graphical frontend to Maxima: https://github.com/lokedhs/maxima-client

Kap: An APL-based programming language: https://codeberg.org/loke/array

#lisp #commonlisp #apl #retrocomputing #linux #kap #climaxima #emacs #atari #fedi22

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

stephaniewalter, to random
@stephaniewalter@front-end.social avatar

There are the people who say "hi" in every DM conversations, even when you continue a discussion from the day before.
And they are the chaos raccoons who said "hi" 8 months ago, and just continue the async discussion, as if days didn't exist in between.
Which one are you?

@loke@functional.cafe avatar

@stephaniewalter I'm the kind that never says "hi", and just talk. Is that the third type?

mhoye, to random
@mhoye@mastodon.social avatar

This is a remarkable graph.

You might have heard that "EV sales are slumping", "people are starting to avoid EVs", etc.

That's not what's happening.

What's happening is "Tesla is cratering so hard that it's skewing the aggregate market data."

@loke@functional.cafe avatar

@huitema @peterbutler @mhoye It appears the US is a bit of an oddball market where BYD isn't found. They sold 3 million vehicles in 2023, and apparently none of them in the US.

zhenech, to random
@zhenech@chaos.social avatar

There is no way in C to check if a given struct has a member named X, right?
Like, in Python, you'd do hasattr(thing, 'X')?

@loke@functional.cafe avatar

@zhenech No. Structs is an entirely compile-time construct, and once the code is running, it's just pointer offsets.

@loke@functional.cafe avatar

@zhenech You don't really have much compile-time control in C (certainly nothing like C++), but if you're asking if it's possible to use the C preprocessor to make compile-time decisions based on the existence of certain fields in a struct, then the answer is no.

The reason for this is that the preprocessor works at the tokenisation level, before the any struct definitions are available.

@loke@functional.cafe avatar

@zhenech Especially Common Lisp: (EVAL-WHEN :COMPILE-TOPLEVEL)

dgar, to random
@dgar@aus.social avatar


  • Loading...
  • loke,
    @loke@functional.cafe avatar

    @dgar @waderoberts The future of that movie is a hell of a lot better than the future we have right now. 😜

    9to5Mac, to random
    @9to5Mac@mastodon.online avatar

    Apple may label iOS 18 artificial intelligence features as a beta preview, signaling Apple is still playing catch-up https://9to5mac.com/2024/05/26/apple-ios-18-beta-preview-artificial-intelligence/?utm_source=dlvr.it&utm_medium=mastodon

    @loke@functional.cafe avatar

    @9to5Mac catchup? To what? A worse experience?

    And I'm not even an apple fan.

    mjd, to random
    @mjd@mathstodon.xyz avatar

    This is the world's first use of the modern equals sign, from Robert Recorde's 1557 book The Whetstone of Witte.

    (Screencap from Internet Archive's scan of the book: https://archive.org/details/TheWhetstoneOfWitte/page/n237/mode/2up)

    (I also wrote a blog post a couple of years back explaining what it says if you are interested: https://blog.plover.com/math/recorde.html)

    @loke@functional.cafe avatar

    @johncarlosbaez @mjd What is the word before "...lines of any lengthe"?

    Anyway, if any length is valid, I will save ink and write equals as ":".

    mhoye, to random
    @mhoye@mastodon.social avatar

    ok everyone's gotta pick a corner and then we can put this week behind us

    @loke@functional.cafe avatar

    @mhoye Can I pick all dimensions? Glue men eating rocks with bears.

    corbin, to random
    @corbin@toot.community avatar

    Google Search has told people to use gasoline in spaghetti, drink urine, and eat rocks. It said President James Madison graduated from college 21 times, and that there's no country in Africa that starts with the letter K.

    This is one week after Google executives and engineers spent almost two hours on stage evangelizing about the power of AI at Google I/O. I really don't know if I've seen another product failure this bad in recent history.


    @loke@functional.cafe avatar

    @corbin I wonder how Danny Sullivan feels about joining Google now.

    annika, (edited ) to random
    @annika@xoxo.zone avatar

    What's the "correct" way to label an image (specifically an SVG) inside a link, when there is no other link text? 🤔 Firefox's accessibility audit complains if I don't label both. Would I do like "Link to annika@xoxo.zone on Mastodon" as the <a> title and "Mastodon logo" as the svg <title> element?

    @loke@functional.cafe avatar

    @annika Can you add a <label> element and use CSS to only show it on screen reader devices?

    @loke@functional.cafe avatar

    @annika You can use <label for="some-element">This is the label</label> and put in anywhere actually. The warning talks about you not putting interactive elements inside the label itself, at least that's how I read it.

    andrewt, to random
    @andrewt@mathstodon.xyz avatar

    "this is environmentally friendly, it says so on a blockchain"

    A "genuine leather" tag photoshopped to say "100% vegan"

    @loke@functional.cafe avatar

    @andrewt I read it as weara ware. What is it supposed to be?

    atomicpoet, to random
    @atomicpoet@atomicpoet.org avatar

    Often, when people see me using “old” tech, this conversation happens…

    STRANGER: Why are you using that format?

    ME: Because it’s cheap and plentiful and I benefit from it.

    STRANGER: Why do you still use it when a superior format exists?

    ME: Because this format has features that the other format doesn’t have. Also, I like it.

    STRANGER: Well, I’m not going back to that old format.

    ME: I’m not telling you to go back to it, I’m just telling you why I use it.

    The stranger then goes away, only for another stranger to re-appear – who triggers this exact same conversation with me again.

    @loke@functional.cafe avatar

    @atomicpoet is the old format XML?

    @loke@functional.cafe avatar

    @atomicpoet there are a lot of things where there is no substitute for XML. Specifically it's the only standardised format that allows you to not only have comments, but also lets you parse and edit them.

    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

    stux, to random
    @stux@mstdn.social avatar

    They shouldn't be cheaper, the company should pay you by the hour if you're wearing a shirt with their logo in public

    @loke@functional.cafe avatar

    @stux that's how I explain why I always remove all logos from my bikes.

    Well that, and it looks cleaner.

    x00001, to random
    @x00001@corteximplant.com avatar

    Hertz caught attention last week for how it handled a customer whom it had charged a "Skip the Pump" fee, which allows renters to pay a premium for Hertz to refill the tank for them. But of course, this customer's rented Tesla Model 3 didn't use gas — it draws power from a battery — and Hertz has a separate, flat fee for EV recharges. Nevertheless, the customer was charged $277.39 despite returning the car with the exact same charge they left with, and Hertz refused to refund it until after our story ran. It's no isolated incident either, as other customers have written in to inform us that it happened to them, too....

    Some People Who Rented a Tesla from Hertz Were Still Charged for Gas: https://www.thedrive.com/news/hertz-is-charging-tesla-model-3-renter-277-fee-for-gas-wont-back-down

    @loke@functional.cafe avatar

    @x00001 whenever I have rented an EV (in Sweden) from cogent providers, you never have to charge it before returning. It's that a thing in other places?

    jannem, to random
    @jannem@fosstodon.org avatar

    Methinks the rainy season has started on .

    @loke@functional.cafe avatar

    @jannem pretty standard here. This is what the whether forecast looks like pretty much all the time.

    jeffjarvis, to random
    @jeffjarvis@mastodon.social avatar

    Guardrails are futile, like suggesting a printing press can be prevented from publishing lies. Generative AI is a general machine that will do what it is told. The issue is the actor. Get used to it.
    AI chatbots’ safeguards can be easily bypassed, say UK researchers

    @loke@functional.cafe avatar

    @jeffjarvis you are off course not wrong. But people don't know this, and keep issuing these tools as if they were able to provide reliable information. I see those articles as attempts to rectify that misinformation. Just like all journalism, they simplify, and honestly I don't know how I would be able to explain it better.

    schratze, to random
    @schratze@todon.nl avatar

    It's so weird how many sci-fi stories will have technology that is hundreds, thousands, even ten thousands of years old and still just works, whereas in real life, it is a challenge to find 30+ year old technology that is still in an operable state

    @loke@functional.cafe avatar

    @jens @schratze just look at the age of the B52 and how long they are planning to keep them flying.

    etchedpixels, to retrocomputing
    @etchedpixels@mastodon.social avatar

    The elegance of the DG Nova instruction set really becomes apparent when you write emulation code for it. The entire core CPU emulation (no devices) is 250 lines of C, including comments and not even written to be small.

    Nova 3 and 4 will probably add another 50-100 lines at most

    @loke@functional.cafe avatar

    @etchedpixels Your post made me go and read the documentation for the instruction set. I found this nice summary: http://users.rcn.com/crfriend/museum/doco/DG/Nova/base-instr.html

    Now, after reading it, I have one question you might be able to explain.

    It says the following:

    Hence, location 1 must contain the start address of the interrupt handler. When an interrupt happens, further interrupts are disabled until they are explicitly re-enabled. A return from the interrupt is performed by jumping indirectly through location zero (i.e. JMP @0).

    Earlier in the document, it's explained that interrupts are enabled using the INTEN instruction, so if I read the correctly, the end of the interrupt handler should be an INTEN followed by JMP @0.

    But what happens if there is another interrupt after enabling it, but before the jump is done?

    Does the jmp implicitly reenable interrupts?

    @loke@functional.cafe avatar

    @etchedpixels @0 Thanks, that explains everything. I'm not sure it would be possible to create a reliable interrupt hander without that feature.

    At least I couldn't think of a reasonably straightforward way.

    jannem, to sweden
    @jannem@fosstodon.org avatar

    There's no post offices any longer? What's going on with this place?

    @loke@functional.cafe avatar

    @jannem You visiting Sweden? I'm going there for a week in July, and it'll be interesting to see what else have disappeared since last I was there.

    ruud, to android
    @ruud@mastodon.world avatar

    After 15 years of using an iPhone, I'm considering switching to Android. I've ordered a cheap Samsung just to try it for a while before buying a top-end model.
    Let's see if I can get used to it.

    (I'm also a Mac user so there will be some trade-offs..)

    I really like the Busycal iOS app, does anyone know a good alternative? It syncs with my calendar & tasks on Nextcloud.

    @loke@functional.cafe avatar

    @ruud it has one feature that even a lot of seasoned Samsung users don't know about. If you connect it to a USB-C docking station with a monitor, keyboard and mouse you get a full desktop experience where you can run your applications in windows. Or works better than you might think.

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