<Begasus>
doing well, upstreaming patches for the KDE frameworks
arjen_ has joined #haiku
arjen__ has joined #haiku
wicknix has joined #haiku
mmu_man has quit [Ping timeout: 480 seconds]
wicknix_ has quit [Ping timeout: 480 seconds]
jmairboeck has joined #haiku
|cos| has joined #haiku
mmu_man has joined #haiku
mattlacey has joined #haiku
clee has joined #haiku
clee_ has quit [Ping timeout: 480 seconds]
mattlacey has quit [Ping timeout: 480 seconds]
mmu_man has quit [Ping timeout: 480 seconds]
nipos has left #haiku [Disconnected: Received SIGTERM]
nipos has joined #haiku
mmu_man has joined #haiku
HaikuUser3 has joined #haiku
HaikuUser3 has quit []
<Hanicef[m]>
in messages, why are some fields prefixed with be: and others aren't?
<phschafft>
I *think* the idea was that there are well defined ones and private (to the application) ones.
<phschafft>
but from what I see, I would not assume/depend on any specific logic there.
<Hanicef[m]>
so, the ones that are prefixed with be: should not be used in applications?
<phschafft>
never said that.
<Hanicef[m]>
the reason why i asked is because i'm trying to fix a system bug, and it would be easiest if there was a way to send a field in a message that shouldn't be used in applications
<Hanicef[m]>
but i don't know how to do this most elegantly
<phschafft>
my understanding is that the namespace is flat and completly unregulated.
<phschafft>
so just come up with whatever you like and it's other people's problem if they try to do something with it. ;)
<Hanicef[m]>
ok, then i might need to put in some more effort so it's exposed elegantly
<phschafft>
(which doesn't mean one should design it in a hostile way. but as in there is no good way so just do as good as you can by yourself)
<Hanicef[m]>
haiku's codebase is so elegantly put together, though, and i don't want to ruin that
<Hanicef[m]>
so i'm trying to be very careful
<phschafft>
but I wonder a bit to what kind of system bug a new message field is the solution to. maybe you have a ticket or something?
<Hanicef[m]>
one already has a patch that partially fixes it
<Hanicef[m]>
the thing is that i need to expose what type of device the input comes from, so i can filter it properly
<phschafft>
hm.
<phschafft>
I see.
<phschafft>
so basically you're extending the definition of the input event structure?
<Hanicef[m]>
yes, at least that's what i think i need to do (i'm still kinda new to the codebase, so if you know a better solution, let me know)
<phschafft>
as of my understanding from the ticket you try to figure out if the pointer input comes from a mouse of a touchpad?
<phschafft>
and the idea is that if someone types the tochpad should be disabled while typing to not cause false inputs?
<Hanicef[m]>
yes, and i think the best solution is to add a field that indicates what type of device that triggered the event
<Hanicef[m]>
so, one for mouse, one for touchpad and one for tablet, but i will only check for touchpad for the bug
<phschafft>
that sounds fine/sane to me.
* |cos|
is trying to understand some C code, but that really isn't my language any longer (if it ever was).
<Hanicef[m]>
phschafft alright, thanks for your input
<phschafft>
plus having that extra info might be useful to applications as well.
<Hanicef[m]>
that's what i was thinking
<Hanicef[m]>
so, it's kind of a feature/fix combo
<phschafft>
so I would in fact aim for some name of the property that is not considered private but to become part of the formal/public API.
<phschafft>
|cos|: hm?
<|cos|>
My vim + vim-ale manages to have clangd navigate the immediate code, but it misses Haiku's include files. Would anyone have a hint on how to make clangd pick them up?
<|cos|>
Would I need to make bear find them, or is it a config issue for vim-ale+
<phschafft>
ah, so not a language problem. not my area then.
pabs has quit [Ping timeout: 480 seconds]
<|cos|>
The actual problem I'm having is why bind() on a socket sets errno to -2147483643, but I guess that's too deep to get an answer too.
<phschafft>
what does it return?
<|cos|>
-1
<phschafft>
what kind of socket do you try to bind (AF_*)?
<|cos|>
AF_UNIX
<phschafft>
what does strerror() report?
<|cos|>
ah! that's probably the function i was looking for. (:
<phschafft>
I mean I see what it does. but I'm not sure that is what you wanted. ;)
<|cos|>
I agree. It sure doesn't look right. Thanks for identifying those faulty parts!
<|cos|>
They both are actually from the code I'm trying to port, not added by me... So I guess it might be key to why it doesn't work on Haiku, even if it happens to do so on other systems.
<phschafft>
people tend to 'understand' standards differently ;)
<phschafft>
generally:
<phschafft>
memset(&some_struct, 0, sizeof(some_struct)); is a good idea before using it.
<phschafft>
that is if it's not zeroed already (e.g. by being allocated with calloc())
<phschafft>
I think the strlen() thing tries to caluclate the actual size of the used part of the structure.
<phschafft>
and it seems to assume that sa_family_t is 16 bits (but I don't think that is given in any standard).
<|cos|>
ah! that's the +2
<phschafft>
it also assumes no padding. which... I would avoid assuming.
mmu_man has quit [Ping timeout: 480 seconds]
Begasus has quit [Quit: Vision[]: i've been blurred!]
mmu_man has joined #haiku
deneel has joined #haiku
<|cos|>
I got my mve working thanks to you, phschafft. Will go to the stores now, but once back I'll get back to actually giving the port a new attempt.
* |cos|
is a bit scared of running gnu screen after realizing the state of its code though...
<Monni>
Lines like "a.sun_path[ARRAY_SIZE(a.sun_path) - 1] = 0;" usually try to make sure struct member is always NULL-terminated even if the contents are too long to fit in the struct member...
<|cos|>
Monni: I also realize what it attempts to do. Whoever wrote that code though... I updated the hedgedoc-page with my working snippet.
<Monni>
macros like ARRAY_SIZE() are kinda overkill when the string is ASCII, make only sense with Unicode strings... sizeof() does the same for ASCII strings and is cleaner IMHO....
<phschafft>
em.
<phschafft>
I would stringly object here.
<phschafft>
starting, but clearly not ending, with the fact that a.sun_path is *not* an ascii string.
<Monni>
I'm not going to differences between types of 7-bit or 8-bit strings and encodings.... That I leave for discussion about when strlen() is good or not...
<|cos|>
I'm quite sure one can't assume paths are ascii in the real codebase.
<Monni>
I've had issues when code assumes paths are UTF-8... But that doesn't change the fact that it still uses 8-bit elements ;)
<phschafft>
so? you're still working with an array here. and you're statement that it's ascii is still false.
<|cos|>
Ah! That is what that macro is doing. Dividing by the size of one char. Ohmy. I'm really not a C developer.
<Monni>
Didn't assume the contents are ASCII... Just implied that for ASCII strings, sizeof() returns same result...
<Monni>
Haiku doesn't use UTF-16 or UCS-2 as far as I know...
mmu_man has quit [Ping timeout: 480 seconds]
mmu_man has joined #haiku
<phschafft>
... and that code is not Haiku specific. nor is it wrong or something in any way.
<Monni>
phschafft> Nobody said it was wrong or anything... Just that dividing by 1 returns same value as the original...
<Monni>
Only not-gonna-say operating system use 16-bit Unicode characters.... That's exactly 1 operating system...
<phschafft>
so what?
<Monni>
Almost every other operating system use UTF-8, 32-bit Unicode characters or country-specific 8-bit or variable width encoding...
<Monni>
phschafft: You're basically just trolling... contributing nothing useful to the conversation...
<phschafft>
I would say the same about you-
<phschafft>
the code is about an array, it uses an array operation. you argue that it shouldn't. the code is meant to be portable. you argue that most systems work the same, so it would be useless.
<phschafft>
so really, I hardly see any valid point from you there.
<phschafft>
and now that I point that out, you call me a troll.
<phschafft>
and my guess is the next thing you will tell is how you're a developer for so and so many years.
<phschafft>
that seems to be a line you really enjoy.
<Monni>
The code is about limiting size of the string... thus zeroing the contents before the function call doesn't do the same...
<phschafft>
which I didn't say.
<Monni>
phschafft: You don't say a lot of things, but often assume people explain things twice... just for yourself...
<Monni>
Seriously no need whatsoever to list all possible character sets just to explain a simple thing about string length...
<phschafft>
which links to the topic at hand in which exact way?
<phschafft>
you got all worked up with the encoding thing to begin with. I for my part have no idea why. it doesn't seem to be related to the topic in any way.
<Monni>
My point was that strings are usually either 8-bit characters or not... and for 8-bit characters size of the element is same as maximum string length + NULL character...
<phschafft>
yes. and that might relate to strlen(). but it does not relate to sockaddr_un and it's members. no strlen() related topic in there to begin with.
kinkinkijkin has joined #haiku
<Monni>
You can have strings without strlen() function... strlen() doesn't work if the string isn't NULL-terminated always... which is commonly case with fixed-width arrays...
<phschafft>
yes. and how does that relate to the topic?
<Monni>
That specific line makes sure the array is valid NULL-terminated string...
<phschafft>
yes. I think nobody questioned that.
* |cos|
is back from the store, without having bought pop-corn though i suddenly realize after reading this channel
<|cos|>
there's no need to argue with that tone, is there?
<Monni>
Now I want popcorn... Anyone going to shop ;)
<phschafft>
|cos|: I got some fried batter pearls. maybe they will do?
Monni has quit [Quit: Monni]
Begasus has joined #haiku
<Begasus>
re
* phschafft
waves to Begasus.
Monni has joined #haiku
qwebirc11673 has joined #haiku
<Begasus>
Hello there phschafft
AyushChandekar[m] has joined #haiku
<nephele_xmpp>
a phschafft
<nephele_xmpp>
phschafft, I found a new toy to play with, ziglang :) That is this time i actually started learning it
<Begasus>
Hi nephele_xmpp
AyushChandekar[m] is now known as bl4ze[m]
qwebirc11673 has quit [Quit: Page closed]
<nephele_xmpp>
hello begasus
Monni has quit [Quit: Vision[]: i've been blurred!]
DKnoto has joined #haiku
Monni has joined #haiku
<phschafft>
oh?
Monni has quit []
<|cos|>
let ale_c_clangd_options = '--query-driver'
<|cos|>
It seems ^ is what one needs to get the systems include files found by clangd.
e1z0 has joined #haiku
Monni has joined #haiku
<MonniTheCat>
Hmmm... latest hrev seems to throw itself to debugger (not KDL)... have to wait until it finish loading symbols...
HaikuUser has joined #haiku
HaikuUser has quit []
<nephele_xmpp>
:)
HaikuUser has joined #haiku
HaikuUser3 has joined #haiku
HaikuUser3 has quit []
HaikuUser has quit []
rexbinary has quit [Ping timeout: 480 seconds]
<MonniTheCat>
last thing Debugger shows is BMenuItem::IsEnabled() then it hangs...
<|cos|>
scratch my previous message. clangd found some headers with that, but still aint able to jump-to-definition for e.g. sockaddr_un :(
kinkinkijkin has quit [Quit: Leaving]
<MonniTheCat>
gotta love when CPU load is 118%... Everything crawls...
Monni has quit [Remote host closed the connection]
<MonniTheCat>
serial log looks funny... only visible output is "malloc() of 7809071836364276279 bytes asked" and that is repeated zillion times...
<botifico>
[haikuports/haikuports] jmairboeck 2f08415 - guile: backport some commits from git to fix the 32 bit build
<|cos|>
After doing Ctrl-Tab, one can do Up- and Down-arrows for most applications to select between its windows. That's described in the documentation and all.
<|cos|>
However I've never managed that for gvim. Is the cause of that a mystery to everyone, or just to me?
<augiedoggie>
crap, Emacs is broken on nightly builds
<augiedoggie>
something in the kernel i suspect :/
<botifico>
[haikuports/haikuports] jmairboeck ebd006f - guile: try to build non-parallel
deneel has quit [Quit: deneel]
<augiedoggie>
and Debugger won't attach to the process, makes it difficult to tell
rexbinary has joined #haiku
scantysnax has quit [Quit: Vision[]: i've been blurred!]
<augiedoggie>
locally rebuilding the package seems to work but it's going to be broken on the nightlies until the next beta :/
xet7 has quit [Remote host closed the connection]
xet7 has joined #haiku
mattlacey has joined #haiku
<MonniTheCat>
For me, Debugger complains that the process died while attaching to it... Seems like the process is not suspended correctly when trying to attach Debugger...
<augiedoggie>
in my case it seems like it won't connect because the app is throwing millions of vm faults
<augiedoggie>
too busy
arjen__ has quit [Quit: Vision[]: i've been blurred!]
arjen_ has quit [Read error: Connection reset by peer]
<MonniTheCat>
augiedoggie: Never tried attaching to a process that isn't running yet... But that's how I do on other operating systems...
<augiedoggie>
i'm sure i can have Debugger launch the app and do it from there
<scanty>
weird, Alt+Fn stopped working, and i had to reboot.
<MonniTheCat>
input_server does weird things sometimes...
<MonniTheCat>
earlier this week I had to change mouse because my mouse cursor went upside down...
<jmairboeck>
MonniTheCat: do you have any idea what could have caused that? Because on Hyper-V, the same happens: https://dev.haiku-os.org/ticket/18882
<MonniTheCat>
jmairboeck: Apparently it's change in Windows 11 Hyper-V implementation... Windows 10 version of Hyper-V did have correct Y-axis...
<MonniTheCat>
Inside Haiku, the mouse isn't detected at all... I only get trackpad and keyboard in "Input" preferences...
<MonniTheCat>
After changing mouse, I get USB Mouse and PS/2 mouse...
mattlacey has quit [Ping timeout: 480 seconds]
GregCrain has joined #haiku
_-Caleb-_ has left #haiku [#haiku]
_-Caleb-_ has joined #haiku
<jmairboeck>
re Hyper-V: but the weird thing is that it only happens with Haiku and not e.g. with Windows 7 or Windows 10 guests
<MonniTheCat>
It doesn't happen with some Windows 10 and all Windows 11 guests... For other operating systems, it needs new mouse driver, which is installed when creating the VM...