gchristensen changed the topic of #nixos-chat to: NixOS but much less topical || https://logs.nix.samueldr.com/nixos-chat
<samueldr> follow-up to yesterday's article, with the cursed UEFI implementation
rajivr has joined #nixos-chat
nullheroes has joined #nixos-chat
kalbasit has quit [Ping timeout: 272 seconds]
<thefloweringash> rockets... in hobbit land even
<hexa-> JJJollyjim: you know what?
<hexa-> JJJollyjim: I wonder if they have matrix-appservice-irc somehwere out there in the universe
<hexa-> and whether or not they got it merged
<hexa-> aliens!
<JJJollyjim> lol
cole-h has quit [Ping timeout: 265 seconds]
lovesegfault has quit [Quit: WeeChat 2.9]
lovesegfault has joined #nixos-chat
neeasade has quit [Remote host closed the connection]
<colemickens> I wonder if anyone has a "script" for choosing a random packet spot instance that fits requirements. wouldn't be too hard to hack up I guess
kalbasit has joined #nixos-chat
<samueldr> C + POSIX(?) question
<samueldr> I have an UTF-8 string, how can I get the first char? (assume only one char, any extra in the string can be ignored)
<samueldr> mbtowc somehow fails with -1
<samueldr> so I guess mbtowc and widechars are not utf-8?
<lovesegfault> samueldr: is a "char" well defined in the concept of unicode?
<samueldr> yes
<JJJollyjim> no
<JJJollyjim> :P
<lovesegfault> Yeah, I don't think it is
<samueldr> are you being obtuse for no good reason?
<JJJollyjim> i mean it does depend on your use case what you actually want here
<samueldr> the first unicode character
<JJJollyjim> code unit or grapheme cluster or extended grapheme cluster?
<lovesegfault> I wouldn't do that, I just really don't know what you mean by a char in the context of unicode. Is a char a codepoint?
<lovesegfault> Right, exactly what JJJollyjim is saying
* samueldr searches for a unicode glossary
<samueldr> I don't want to start off on wrong assumptions on any side
<samueldr> gosh I love how unicode is now "emoji the company"
<lovesegfault> I think this is what you want
<lovesegfault> and this has a lot of the meaningful distinctions
<samueldr> why do you think I care about the unicode scalar value?
<JJJollyjim> because that glossary doesn't have "character" in it
<samueldr> uh
<samueldr> yes it does
<lovesegfault> b/c I think that's what people "translate" the concept of character to in unicode-speak
<JJJollyjim> er sorry yes
<JJJollyjim> but that definition is in terms of human understanding
<lovesegfault> PSA: I am not a unicode expert, this is just my personal, probably incorrect, knowledge
<samueldr> I guess my issue is I'm not even sure what the other end of where I'm shoving it into wants
<lovesegfault> in that PDF I linked they say how an abstract character (synonym to a character in the unicode glossary) is _not_ what is traditionally thought of as a character
<lovesegfault> AIUI the problem of splitting a unicode string into characters is not at all trivial
<lovesegfault> b/c there's a zillion languages and ways for things to be different
<lovesegfault> consider those emojis that combine a bunch of codepoints (doctor + woman + skin tone whatever)
<samueldr> okay
<samueldr> so let me rephrase
<samueldr> or uh
<samueldr> just
<samueldr> this is getting to me
<JJJollyjim> oh god wchar_t
<samueldr> some lib uses a uint32_t for "a character"
<samueldr> I want to shove an "é" from a string from another lib into that
<lovesegfault> what's the char encoding?
<samueldr> utf-8
<lovesegfault> got it, just making sure
<samueldr> I guess "a character" in that case is "a code point" or "code unit"
<samueldr> but we'll only assume (yes, it's bad) the simple cases
<lovesegfault> So far I agree
<JJJollyjim> or it can be LATIN SMALL LETTER E + COMBINING ACUTE ACCENT, two different code points :P
<samueldr> JJJollyjim: to the corner with you
* lovesegfault tosses something on the wall
<JJJollyjim> :D
<samueldr> in this case it's supposed to be one character AFAIUI
<JJJollyjim> ⇲
<samueldr> there are even simpler cases that are not handled by widechars
<samueldr> because I thought foolishly that widechars were utf-8
<samueldr> apparently I'm wrong lol
<JJJollyjim> man the mbtowc man page is bad
<samueldr> yes
<JJJollyjim> what even is a wchar_t on linux?
<lovesegfault> what even is a wide character
<samueldr> an unsigned int IIRC the error messages
<samueldr> but I don't care about wchar
<samueldr> I need the U+00E9 as uint32_t
<lovesegfault> Some french grammarian 500 years ago: "I'm about to ruin this person's whole career"
<JJJollyjim> "in the GNU C Library wchar_t is always 32 bits wide", okay phew
<samueldr> lovesegfault: your portuguese linguistic toots, too, would ruin my day :)
<samueldr> roots*
<lovesegfault> :D
<samueldr> but toots too
<JJJollyjim> mbtowc feels right
<JJJollyjim> oh damn that's probably gonna depend on your locale huh
<samueldr> OH FROGS ON A SNACK
<JJJollyjim> (which is something that never works right for me on nixos...)
<samueldr> I don't have locales in stage-1, and it makes sense
<lovesegfault> back to ASCII :P
<samueldr> that's my problem, I can't even get the ascii chars with certainty because of the encoding, only a subset
<samueldr> and it almost feels like xkbcommon is trolling me, for *a key* I can get an UTF-32, which I guess I can fudge into an uint32_t
<samueldr> but for a compose sequence, which is required for dead keys, it seems utf-8 only
<JJJollyjim> "Your program starts in the C locale, which treats strings as ASCII (or, an unspecified ASCII-compatible 8 bit encoding). So mbtowc() simply copies the first byte in the string into the wchar_t"
<JJJollyjim> screaming
<samueldr> yes, that's about what I get
<samueldr> and when you said locale, it totally made sense in how it makes no sense
<JJJollyjim> glad i could """"help""
* samueldr cries
spudly1 has quit [Ping timeout: 260 seconds]
spudly1 has joined #nixos-chat
turlando has quit [Remote host closed the connection]
turlando has joined #nixos-chat
turlando has quit [Remote host closed the connection]
turlando has joined #nixos-chat
turlando has quit [Remote host closed the connection]
<lovesegfault> > The main use of UTF-32 is in internal APIs where the data is single code points or glyphs, rather than strings of characters.
<{^_^}> error: syntax error, unexpected IN, expecting ')', at (string):399:27
turlando has joined #nixos-chat
<lovesegfault> makes sense
<JJJollyjim> erlang combines the worse of both worlds by storing strings as linked lists of UTF-32 codepoints
<lovesegfault> no
<lovesegfault> please say no
<JJJollyjim> so indexing is still O(n) lol
<JJJollyjim> haskell too by default i think?
<JJJollyjim> unless you use the text library
<samueldr> I've re-worked the code to deal with utf-32 instead and now I'm just left with handling that utf8 string to pick up the first codepoint
<samueldr> since anyway that's what the code I'm interfacing with wants
waleee-cl has quit [Quit: Connection closed for inactivity]
<__red__> JJJollyjim: use binaries instead
<JJJollyjim> yeah i know
<__red__> <3
<__red__> okie -=- I'm out - nite!
FRidh has joined #nixos-chat
<sphalerite> samueldr: what is it you're doing with this unicode stuff?
<samueldr> sphalerite: pain
<samueldr> sphalerite: going from evdev keycodes to a useful keyboard input
<sphalerite> uh oh
<sphalerite> I wonder how much password handling normalises unicode :D
<sphalerite> (because that's the first thing that comes to mind with keyboard and stage-1)
<sphalerite> samueldr: and not sleeping of course, right? :p
<samueldr> sphalerite: probably extremely variable and I'm scared about the normalization consequences
<samueldr> I was just about to turn in
<sphalerite> fair enough
<samueldr> though thinking back about that, I'll have to do an invasive change in the toolkit to be able to handle passing strings rather than only "characters"
<sphalerite> yes, that sounds like the right approach
<sphalerite> though not easy or fun
<samueldr> yep
<samueldr> at least the toolkit already pretends to do more than basic ascii
<sphalerite> I once defined a compose sequence for ¯\_(ツ)_/¯ (compose, i, d, k)
<sphalerite> it worked in my terminal, and nowhere else
<samueldr> speaking of compose sequences: xkbcommon is used for that input
<samueldr> so you could have compose sequences in stage-1 gui passphrase thingy
<samueldr> [when input is done through the physical keyboard]
<sphalerite> hahaha
<samueldr> dead keys, those keys you need to sequentially do [`][e] to get [è] are done through compose sequences at the xkbcommon input layer!
<sphalerite> oh yeah, I think I saw those in the compose definitions too
<sphalerite> I love dead keys in terms of actually using them
<samueldr> in fact that's the only reason I needed to go from utf-8 to 32 bit codepoint
<sphalerite> can't imagine working with them in code is much fun
<samueldr> in the "ca" layout, ` is done through compose keys, either [`][ ] or [`][̀`]
<samueldr> since it's a dead key
<sphalerite> and of course the dead key comes _before_ the modified letter. Because turning the key into a combining diacritical would be too easy :D
<sphalerite> ò_ó
<samueldr> well, [compose][e]['] defaults to é
<samueldr> so through compose you could do it the other way around :)
<sphalerite> right, but compose is a lot more complex than dead keys specifically
<samueldr> yeah
<samueldr> well, I'm not sure, they could conceivably be explained as basically the same level of complexity
cole-h has joined #nixos-chat
<sphalerite> I guess
<sphalerite> though compose is more general
<sphalerite> aaaaargh. an rpm in a tarball in a zip in a zip in a zip
kalbasit has quit [Ping timeout: 240 seconds]
FRidh has quit [Ping timeout: 256 seconds]
FRidh has joined #nixos-chat
<eyJhb> sphalerite: *logic* \s
thibm has joined #nixos-chat
cole-h has quit [Ping timeout: 264 seconds]
<eyJhb> Anyone using combojack (sound + mic ) on Linux? I cannot get it to work, and I am unsure where the fault is. I know that the headset works
<eyJhb> Not sure if my x230 just does not support that
<eyJhb> First step, enabling the internal microphone, which also enables the external ones
<eyJhb> Apparantly...
dadada_ has quit [Ping timeout: 256 seconds]
dadada_ has joined #nixos-chat
__monty__ has joined #nixos-chat
Ashy has quit [Quit: WeeChat 1.9.1]
tilpner has quit [Remote host closed the connection]
tilpner has joined #nixos-chat
Ashy has joined #nixos-chat
supersandro2000 has quit [Quit: The Lounge - https://thelounge.chat]
supersandro2000 has joined #nixos-chat
Jackneill has quit [Ping timeout: 256 seconds]
Jackneill has joined #nixos-chat
waleee-cl has joined #nixos-chat
cjpbirkbeck has quit [Quit: cjpbirkbeck]
FRidh has quit [Quit: Konversation terminated!]
tilpner_ has joined #nixos-chat
tilpner has quit [Ping timeout: 264 seconds]
tilpner_ is now known as tilpner
tilpner_ has joined #nixos-chat
tilpner has quit [Ping timeout: 260 seconds]
tilpner_ is now known as tilpner
FRidh has joined #nixos-chat
kalbasit has joined #nixos-chat
Jackneill has quit [Ping timeout: 264 seconds]
<drakonis> ahhh i have a dilemma
<drakonis> i found a decent laptop
<drakonis> it comes with a high end ryzen cpu and a non garbage nvidia gpu
<drakonis> its overall faster than my own desktop lol
<sphalerite> drakonis: but the owner wants it back?
<sphalerite> in that case the question isn't which computer runs faster, it's which _person_ runs faster
<drakonis> i mean
<drakonis> hah
<drakonis> phrasing
<drakonis> i meant that i found a decent lappy for sale
<sphalerite> :p
<drakonis> worth a buy?
<drakonis> i didnt want to spring for lappy with nvidia because of the pain it inflicts
<drakonis> but the price isnt bad at all
Jackneill has joined #nixos-chat
FRidh has quit [Ping timeout: 246 seconds]
FRidh has joined #nixos-chat
endformationage has joined #nixos-chat
<sphalerite> naaah
rajivr has quit [Quit: Connection closed for inactivity]
<eyJhb> drakonis: how much not bad?
<drakonis> price?
<eyJhb> Yeah
<eyJhb> And what make?
<drakonis> oh
<drakonis> uhhh
<drakonis> its an acer nitro 5
<drakonis> 929 dollars
<samueldr> hard to know without knowing the overall landscape of available machines and their prices in your locale :)
<drakonis> oh yeah
<drakonis> the landscape is that it is expensive to get a decent laptop
<drakonis> they're usually intel/nvidia or amd/nvidia
<drakonis> i haven't been hyped for a kickstarter in years
cole-h has joined #nixos-chat
supersandro2000 has quit [Quit: Ping timeout (120 seconds)]
supersandro2000 has joined #nixos-chat
FRidh has quit [Quit: Konversation terminated!]
<infinisil> Spam mail saying I won the lottery, apparently my wins are in a greek bank
<infinisil> The funniest part is how they included part of lorem ipsum
<ajs124> infinisil: lorem ipsum is how you know it's legit
<infinisil> Ah yes, very greek
<infinisil> Wait, does latin come from greece?
<samueldr> obviously
<samueldr> why would it be part of a greek bank's mail otherwise?
<infinisil> latin seems to be actually quite closely related to greek
<infinisil> (from my quick screening of https://en.wikipedia.org/wiki/History_of_Latin)
<samueldr> member of the broad family of Italic languages
<infinisil> lol
<samueldr> puns always were treated with no respect at all
<samueldr> here, they're thrown into the sea
MichaelRaskin has joined #nixos-chat
<gchristensen> freaking lol
thibm has quit [Quit: WeeChat 2.6]
<jtojnar> infinisil: I would not call Latin closely related to Greek
<jtojnar> the alphabet, sure
Jackneill has quit [Ping timeout: 256 seconds]
<jtojnar> but the language itself was just influenced IIRC
<samueldr> jtojnar: but in a geographical sense, it's closely related
<samueldr> ;)
<jtojnar> 🤷‍♀️
<samueldr> (you know, a metric that doesn't really matter as much for languages)
__monty__ has quit [Quit: leaving]
<infinisil> Ohh nice: https://devfonts.gafi.dev/
<infinisil> I've been wanting to find a better font for a while, this is perfect
<samueldr> Go Mono or bust
<samueldr> wow, it's not even in that list
<samueldr> neither is my second favourite, M+
<infinisil> It's just features on HN: https://news.ycombinator.com/item?id=25159038
<samueldr> is this list only limited to fonts based off of dejavu mono???
<infinisil> There's probably also many suggestions in there, and I wouldn't be surprised for more fonts to get added to the page over time
<MichaelRaskin> But DejaVu Mono _is_ great!
<samueldr> it is good yes
<samueldr> but not my favourite :)
Jackneill has joined #nixos-chat
<MichaelRaskin> I like it a lot. At least as long as antialiasing has been burnt down tothe ground.
<MichaelRaskin> Otherwise I do not have time to like anything, I need to burn down AA.
<samueldr> aah
Jackneill has quit [Ping timeout: 240 seconds]
<samueldr> I love how this toolkit pretends to support unicode, but a small é shows up as no glyph :)
<samueldr> (but it's actually in the data still, and other than the fact there's nothing to show it's there, works as expected)
<MichaelRaskin> Did you try both versions?
<samueldr> only the one xkbcommon produces
<samueldr> it might work with one of the other variants
<samueldr> but at that point it's _still_ a problem, whether it works with some of them or not
<samueldr> I also haven't verified the font actually holds the glyph
<samueldr> it might just be that it doesn't!
<MichaelRaskin> I wonder if xkbcommon has both a layout that produces precomposed é and a layout where decomposed é is the thing to type.
<samueldr> in "ca" you get both the dead ́ and pre-composed é
<samueldr> so I can é and é
<samueldr> but I don't know what it's configured to actually output
<MichaelRaskin> Deadkeys give you precomposed
<MichaelRaskin> For one thing, decomposed is postfix
<samueldr> it could give anything because it's part of compose key sequences :)
<MichaelRaskin> Well, that would not be ca as is anymore
<samueldr> yes it is
<samueldr> dead keys are implemented as compose key sequences internally
<MichaelRaskin> I mean dead keys _do_ yield precomposed versions
<samueldr> yeah, possibly, as I said I haven't looked at what they produce
<samueldr> but it could be changed to produce anything, anything is possible with zombo.com^W^W xkbcommon :)
<jared-w> go mono is a mono serif font? Nice
<samueldr> Go Mono has quite a character to it, but I absolutely love reading it at all sizes
<MichaelRaskin> iso12x22 !
<samueldr> (hah, pun not originally intended)
<jared-w> M+ MN type-1's mono font has quite a bit of character to it too. It's got a very japanese flavor to its serifs. I quite like those two. I'm currently using victor mono patched in with the nerd font ligatures (and a tiny bit of customization so that it's not broken with the phone symbol appearing where it shouldn't), but I've always had a soft spot for serify fonts
<samueldr> yeah, before going with Go Mono I was using M+, I don't recall why I switched
<jared-w> "I absolutely love reading it at all sizes", perhaps? :p
<gchristensen> 'If interpreter is unspecified, sensible defaults will be chosen based on the system OS." what does that even mean??
<gchristensen> I assume it picks the system's glibc interpreter
<samueldr> jared-w: I don't think so, Go wasn't chosen to replace M+, but M+ needed to be replaced, I think it was perhaps block characters for TUIs or something along the line
<jared-w> gchristensen: of course. Unless you're using an obscure BSD variant. Then it'll pick some hardcoded libc stub that just returns 4 for every syscall in glibc
<gchristensen> hah
tilpner_ has joined #nixos-chat
tilpner has quit [Remote host closed the connection]
tilpner_ is now known as tilpner
<supersandro2000> Is there a timeline when there is a decisions about new nixpkgs commiter?
<supersandro2000> something like every third monday when the month does not have 3 or 5
<samueldr> no
<samueldr> extremely ad-hoc
<{^_^}> #50105 (by Infinisil, 2 years ago, open): New nixpkgs committers requests
<infinisil> Oh, you're probably asking because of exactly that issue :)
<gchristensen> 50k issues ago...
<joepie91> that's like, 3 days, in NixOS issue counts? :P
<supersandro2000> infinisil: definitely not at all 😄
<supersandro2000> I read that the bot kept re-inviting people that declined
<gchristensen> after github changed their API to let the bot do that
<gchristensen> when the bot was first made, github remembered the user declined
<gchristensen> (I'm sour about that)
<samueldr> building your product on [a closed source product]'s API is like building a house on the side of a volcano
<samueldr> or proprietary could also be an okay wording
<abathur> a proprietary volcano?