Skip Navigation
InitialsDiceBearhttps://github.com/dicebear/dicebearhttps://creativecommons.org/publicdomain/zero/1.0/„Initials” (https://github.com/dicebear/dicebear) by „DiceBear”, licensed under „CC0 1.0” (https://creativecommons.org/publicdomain/zero/1.0/)TU
Tushta @programming.dev
Posts 4
Comments 13
Factor Cannot apply “call” to a run-time computed value
  • Thanks to johnb on the Factor's discord channel I got answers to these two questions:

    In terms of nicer way to do a nested map nicely, fried quotations are the answer:

    '[ _ map ] map

    and in order to call a quotation inside a word definition, one needs to use call( stack effect ) form:

    : nested-map ( a quote -- a' ) '[ _ '[ _ call( x -- x' ) ] map ] map ;

  • Factor Cannot apply “call” to a run-time computed value

    I wanted to map over a nested array in factor so I created a helper function:

    : nested-map ( a quote -- a' ) swap [ over map ] map nip ;

    which i then called with

    { { 1 2 } { 3 4 } } [ 1 + ] nested-map

    But when I call it I get the error from the title.

    If I just paste the body of the function it works as intended:

    { { 1 2 } { 3 4 } } [ 1 + ] swap [ over map ] map nip

    So I guess I have two questions: is there a better way to achieve the original goal, but also how am I supposed to create higher order functions without getting this error?

    1

    ITX build for photo editing / graphics design

    I'm building a PC for my wife to do photo editing / retouching / other 2d/non moving stuff. I'm aware that this kind of software does benefit from GPU acceleration, but I'm also under impression that it's not critical. One additional constraint is that it should fit into teenage engineering's computer-1 case, because orange. I'm personally having a preference for AMD stuff, but I could be talked out of it. Two similarly priced options I had in mind were:

    • Ryzen 5600 / 16G ram / radeon 6600 GPU
    • Ryzen 8600G / 32G ram / no gpu

    Thoughts / suggestions?

    1
    mycology
  • I mean, yeah, but that's on the level of "because they're eucaryote" like us and all plants and animals, as opposed to bacteria which are procaryote. It's not really some freakish similarities.

  • Did deep sleep broke for anyone else recently or is it just me?
  • No, hibernation saves state to disk, and turns the computer off, drawing no power. Deep sleep is what was for me just sleep until recently: it uses power to keep data in ram, so it's faster to wake up than hibernation. The amount of power used is really small, so unless you don't use your lap top for a couple of days, it won't deplete the battery. New hardware has this new "S2 Idle" state, that is basically an "On" state minus the screen and it's OS's job to try to use as little power as possible usually by telling each and every device to chill as much as possible (this is my understanding, but don't quote me on this). On Windows, with the first party device drivers, this sorta works OK + OS drops to deep sleep or hibernation depending on battery or something.

  • Did deep sleep broke for anyone else recently or is it just me?
  • It's 2021 Lenovo ThinkBoot 15 G2 Intl with Intel i3-1115G4, 8GB onboard ram, integrated GPU and two NVME slots.

    Here are some lines from dmidecode if they mean anything to anyone:

    Getting SMBIOS data from sysfs.
    SMBIOS 3.3.0 present.
    Handle 0x0000, DMI type 0, 26 bytes
    BIOS Information
            Vendor: LENOVO
            Version: F8CN42WW(V2.05)
            Release Date: 06/28/2021
            Address: 0xE0000
            Runtime Size: 128 kB
            ROM Size: 16 MB
            Characteristics:
                    PCI is supported
                    BIOS is upgradeable
                    BIOS shadowing is allowed
                    ACPI is supported
                    USB legacy is supported
                    BIOS boot specification is supported
                    Targeted content distribution is supported
                    UEFI is supported
            BIOS Revision: 2.42
            Firmware Revision: 2.42
    
    Handle 0x0001, DMI type 1, 27 bytes
    System Information
            Manufacturer: LENOVO
            Product Name: 20VE
            Version: ThinkBook 15 G2 ITL
            SKU Number: LENOVO_MT_20VE_BU_idea_FM_ThinkBook 15 G2 ITL
            Family: ThinkBook 15 G2 ITL
    
    Handle 0x0002, DMI type 2, 15 bytes
    Base Board Information
            Manufacturer: LENOVO
            Product Name: LNVNB161216
            Version: SDK0J40700 WIN
    
  • Did deep sleep broke for anyone else recently or is it just me?

    I was running KDE Neon on ThinkBook 15 G2 and had deep sleep working after adding mem_sleep_default=deep to GRUB_CMDLINE. It worked for a while until it didn't. I didn't do anything other than running regulat updates. Since couple weeks back, when going to sleep, it shows BIOS Recovery progress bar or something and restarts.

    I switched to Debian and the behavior is the same. S2 sleep is next to useless as it drains something like 10% battery / hour, and the lap top is warm to touch.

    15
    Thousands protest in Belgrade to demand annulment of elections
  • Vucic literally spent a year illegally registering people from outside of Belgrade (including Serbs from Bosnia and Croatia) to Belgrade addresses and bussed them on the election day to vote, just so he could narrowly win local elections. That is the main outrage. These protests aren't even organized by opposition parties, people are just that pissed.

  • It turns out I really enjoy programming puzzles, is there something useful I can do with it?

    There is a commonly shared view in the programming community that algorithm puzzles are something you do to prep for an interview and than you never use in the actual job. This certainly rings true as in 15 years of programming, i feel I can count on fingers the number of times I needed to stop and think about data structure / algorithm, rather than usual workload of thinking about what's even the problem being solved; how to structure code; what's the interface at the module/service/package boundary; how to make code testable/maintainable/flexible etc... Iterating though a list or a dict is all ds/algo you'll need 99% of the time.

    FF to now when I'm on a burnout induced sabbatical, and after a while I got itchy to write some code again. Problem was that all the ideas for projects I'd like to do are, well... projects. I still don't feel like digging through manuals for libraries and frameworks and writing boilerplate and doing all the things that need to be done to push things through. Anyhow, I was sitting in a coffee shop with my illustrator friend, who, at some point, just pulled out a notebook, spent 20-ish minutes drawing something that caught his eye and was like: "that's it for today". That's it... 20 minutes, it's done, tomorrow something else, new blank page... So I got into puzzles. Now, the first thing I do in the morning is solving a daily puzzle on leet code. If I feel like it, I might also do problems from an old competition. And I'm having a blast!

    Which brings us to the question from the title: is there a direction I can push this forward? I mean, I don't mind this just being fun, but I was curious, is there something out there in the "Real World" that I'm missing that is closer to this kind of problem solving from what i was doing so far?

    11
    5 roadblocks to Rust adoption in embedded systems
  • I must admit that I'm disappointed with this article. It' fairly standard "why isn't X used in a field A" and the answer is: we've always used Y, so all libraries and tooling assume Y, and things are slow to change around here anyway. There is nothing specific to Rust, and the only semi-specific thing to embedded programing is noting the reliance on vendor provided libraries. I wouldn't be surprised if it was generated by ChatGPT.