coolcoder613 has quit [Quit: Vision[]: i've been blurred!]
razetime has joined #haiku
dorje has quit [Quit: Vision[]: i've been blurred!]
vdamewood has quit [Quit: Life beckons.]
* roracle
has returned
<roracle>
i'm home now
<erysdren>
hello hello!
<roracle>
and frustrated. this is the most unprofessional play i've ever done and we open saturday. no one has their lines, we've rehearsed so few times, and people are paying 35 bucks a ticket. i feel embarrassed to be part of this production, yet the show must go on, as they say
<erysdren>
indeed so
<roracle>
the director and assistant director had to take parts in the play because we didn't get enough people auditioning, so they're too busy learning lins to actually direct lol
<roracle>
lines*
<roracle>
anyways, i'm gonna keep looking at this programming tutorial stuff
<erysdren>
ah yeah, that sounds fairly bad
coolcoder613 has joined #haiku
<coolcoder613>
Hello
<roracle>
heyo
<roracle>
so every program has to have "main" as the first function?
<coolcoder613>
It doesnt have to be defined first, but it is what runs first
<roracle>
gotcha
<roracle>
how do i select things in bepdf
<roracle>
to copy/paste that is?
<coolcoder613>
PDF's are more like images than text
<coolcoder613>
On mac, text selection in pdf's uses OCR
<roracle>
okay, so uh, this part I must get a better understanding of:
<roracle>
<outdata> <functionname>(indata)
<roracle>
what is outdata and indata?
<roracle>
it says what it does, but i don't know what it MEANS to be more accurate
<roracle>
i guess "void" means "nothing going on here" but will there be an example to show what it can do?
<roracle>
or would it just be: <outdata> main()
<roracle>
where <outdata> is like "int" in the examples so far
<coolcoder613>
<outdata> means the return type, for main, it is either void or int
<roracle>
which i'm sure they'll explain what "void" means?
<coolcoder613>
viod means nothin basically
<coolcoder613>
void means this function doesnt return anything
<coolcoder613>
erysdren, can you explain void * ?
<erysdren>
"void *" means that it returns a generic pointer with no type assigned
<erysdren>
2, 4, or 8 bytes wide depending on your CPU
<erysdren>
and for the record, "type" is purely a thing for the language, the CPU opcodes don't know what types are
<roracle>
oh okay...so a function isn't an interger? because i have a function as int TwoPlusTwo() and have it return 2 + 2; then main have it printf TwoPlusTwo;
<roracle>
which it says is wrong, so idk what's going on there
<roracle>
can't a return of a function be called by another function?
<coolcoder613>
you need parens when you call a function, so: printf(TwoPlusTwo());
<roracle>
twoandtwo.cpp:6:17: error: 'TwoPlusTwo' was not declared in this scope 6 | printf (TwoPlusTwo());
<coolcoder613>
install the uploadit package from haikudepot, and use it to upload your code so i can see
<erysdren>
ah
<erysdren>
is twoplustwo declared before main()?
<roracle>
no...
<erysdren>
that's required
<roracle>
oooh
<roracle>
lemme try
<roracle>
still didn't work :(
<roracle>
like i said it's two separate functions
<roracle>
so i'm not running it all in one function
<coolcoder613>
try uploading your code so we can see, or pasting it on https://bpa.st
<roracle>
i keep changing it to see if i can grasp these concepts and nothing seems to stick. gimme a few and i'll get it back to two functions
<erysdren>
the issue is that you're using printf wrong
<erysdren>
printf("2 plus 2 equals: %d\n", TwoPlusTwo());
<erysdren>
it's formatted print. it can't print numbers directly
<erysdren>
you need to add them to a format string
<erysdren>
%d == signed integer type
<erysdren>
the first argument to printf is a **string** defining the formatting, and the subsequent arguments are further values (integers, pointers, strings, floats) to place into the format string
<coolcoder613>
It came with an IDE for windows 95 called Quincy 97?
<coolcoder613>
the examples had 'using namespace std'?
<coolcoder613>
there was a calculator example, recursive?
<roracle>
Sam's Teach Yourself C++
<roracle>
i cna't find it but i know it's somewhere
<roracle>
looking it up on ddg, i guess it was a blue book
<roracle>
i think it was in a hard casing, with a CD packaged in with it with the GNU cpp compiler
<roracle>
might have been borland
<roracle>
all i'm saying is that i could look up two tutorials online and they'd say different things. that's NOT a great look
<roracle>
if there are two ways of doing one thing in the same language, it makes it confusing to noobs, which is probably why i never could get the hang of this
<erysdren>
C++ sucks for that, sorry to say
<coolcoder613>
Yes, Quincy 97 used GNU cpp
<erysdren>
C++ has a million ways to do anything
<roracle>
:(
<roracle>
i want ONE way so i'm not confused lol
<coolcoder613>
with the printf/cout thing, the C++ way is cout, the C way is printf
<roracle>
so i was VERY good at algebra in school. so good i could do it in my head, but i failed the class because "you didn't show your work" so no matter how many answers i got right, they were all marked as wrong
<coolcoder613>
The trouble is that C++ is backwards comatible with C...
<coolcoder613>
*compatible
<roracle>
that was 8th grade. they put me in a two year algebra course in high school as a result. instead of playing to my strengths, they hobbled me
<roracle>
i was unable to take the two year computer programming class as a result, i would only get one year in, my senior year. because i'd have to take two years of algebra and a year of geometry, giving me one year of computer science
<erysdren>
that's school for you
<erysdren>
america i assume?
<roracle>
i was so depressed about that through ALL of high school, gained a lot of weight, too.
<roracle>
yes, america
<erysdren>
yeah that's about my highschool experience as well
<erysdren>
stupid as hell
<roracle>
i dropped out the first day of my senior year because i was so let down by the entire experience
<erysdren>
i dropped out of college after 1 semester
<erysdren>
shit sucked
<roracle>
i tried college. everything was how to use power point, which i already knew, followed by "here's why every problem in the world is america's fault"
<roracle>
like, thanks but no thanks
<roracle>
i know we have our problems here, but it's not like the world hasn't pointed their guns at us and said "stay in your lane PLEASE" because practically everyone in the world confiscated their guns lol
<roracle>
so it's like, looks like it's everone's problems now haha
<roracle>
but anyways
<erysdren>
well, i guess we differ there
<roracle>
i want an honest computer science course that won't confuse me
<roracle>
1+1 is always 2
<roracle>
not some crazy other way of getting 2 from 1+1
<erysdren>
right now i'm trying to write x86 assembly for the 1981 IBM PC
<erysdren>
its not fun
moparisthebest is now known as Guest4634
<erysdren>
well, it is kinda fun or else i wouldn't be doing it
<roracle>
lol
<coolcoder613>
What are you trying to write?
<erysdren>
16-bit x86 assembly implementation of farmemset()
<erysdren>
memset, but on a far pointer
<coolcoder613>
and memset is?
<erysdren>
memset takes three arguments
<roracle>
remember when Sun was working on that "Project Looking Glass" operating system, with windows you could flip around and write notes on the back? shove windows to the side (like we see in the new macOS and iOS)?
Guest4634 is now known as moparisthebest
<erysdren>
memset takes 3 arguments: a pointer, an 8-bit integer value, and an unsigned integer defining the number of bytes
<erysdren>
it copies the 8-bit integer value to the pointer value and then repeats it over the whole number of bytes
<roracle>
moparisthebest linux servers are the only ones i know of :P
<erysdren>
basically you can take a block of memory and set all the bytes to the same value
* coolcoder613
understands now
<erysdren>
it needs to be fast. this function is called frequently, and possibly on large chunks of memory
<erysdren>
now, far pointers are more or less 16-bit x86 specific
<erysdren>
and doing a memset for that is more complex
<erysdren>
you need to set the segment offset
<erysdren>
on the appropriate CPU register
<erysdren>
i just can't figure out how, or which register
* coolcoder613
once learned a little Risc-V ASM, the hardest part is rembering the acronyms
* coolcoder613
wishes the instruction names were longer
roracle has quit [Quit: Vision[]: i've been blurred!]
AlaskanEmily has joined #haiku
<mj0908[m]>
Hii everyone, I am Mohit Jaiswal, 1st Year Student
<mj0908[m]>
Please guide me, i want to be a part of you guys.
<mj0908[m]>
Well i am new to this, but i would like to learn and contribution will be a fun way, but i know little to nothing, i only know some portion of C, and confused what else to learn
<erysdren>
learning some C++ is a good place to start, and maybe the geneal haiku programming handbook
razetime has quit [Remote host closed the connection]
<erysdren>
github sucks
razetime has joined #haiku
<Begasus>
err .. no diff in that link :/
<nephele>
phschafft: is that a new programming language? ;D
<coolcoder613>
Github is not so bad, besides for the 2fa
andreaa72 has left #haiku [#haiku]
walkingdisaster has quit [Quit: Vision[]: i've been blurred!]
<nephele>
it's fine, aside from the horrible workflow, backwards use of git, forcing of a web interface for nonsensical tasks, unusably slow interface, forcing me to use keys i have to save on my hdd so they can get stolen, rate limiting me for no reason, lock-in, etc.
<nephele>
The last time I tried to review nheko's patchset i literally couldn't, and that wasn't even Haiku's fault, it doesn't run fine on iOS either in the webrowser
<coolcoder613>
IOS Safari is today's IE, no?
<nephele>
No
<nephele>
I am
<nephele>
*really* glad we still have webkit
<phschafft>
nephele: ?
<nephele>
Atleast it stops google a bit from going 100% insane, and gives us a webengine that still works nicely
<nephele>
phschafft: "nephele++"
<phschafft>
I like to keep google from being the one definition of the web. but I must stress that Safari is not a solution to anything.
<PulkoMandy>
It's the best we have in haiku at the moment…
<phschafft>
for most of my web related work it's like this: how much does it cost? - 1k for all but Safari. - How much for support in Safari? - 100k.
razetime has quit [Quit: Go back to your cringe 9 to 5. I'll be gaming.]
<phschafft>
the problem is not the software, the problem is that Apple tries super hard to do vendor lockin. much more than all the other big players combined.
* coolcoder613
nods.
<nephele>
We have the software, not the vendor lock in with webkit for webpositive
* coolcoder613
nods emphatically
<PulkoMandy>
WebKit is open source and, as far as I can see, more open to contributions than the other engines
<erysdren>
google sucks so bad
<phschafft>
and I must stress that Apple is very much a company of selling, I haven't seen any technological improvement from them in like 20 years.
<nephele>
PulkoMandy: regarding haikuwebkit, is there anything you currently need help with? (other than webkit2, is a bit outside my expertise i think)
<coolcoder613>
Got to go now, g'night
<phschafft>
and they hate all improvement as it would mean to invest or to give up a tiny bit of lockin.
<nephele>
if not i'll just work a bit more on the platform gui drawing :)
coolcoder613 has quit [Quit: Vision[]: i've been blurred!]
<PulkoMandy>
nephele: would be nice to fix the icons in gerrit which uses a font with ligatures we don't support
<nephele>
phschafft: I've observed that apple is perfectly happy to do interopability with competitors as soon as their edge is gone, e.g with matter
<PulkoMandy>
I think that's the main annoying thing for me at the moment
<nephele>
I think madmax posted a script to fix this by replacing it with proper emoji? Otherwise I think ligatures would be primarily app_server work?
<nekobot>
[haiku/haiku] 51355272b3f7 - ArchitecturesRules: error on use of deprecated functions
<PulkoMandy>
I think it needs changes both in app_server and webkit
<PulkoMandy>
Webkit needs to send the string to app_server in one go, not character by character, and probably font metrics handling needs to be reviewed? Not completely sure
<PulkoMandy>
Also, the scrollbars seem to randomly change colors even when websites don't ask for it. I know you made a patch to completely disable website scrollbar customization, but maybe it would be better to just fix that bug?
<PulkoMandy>
And then there's video support. I guess someone should take a serious look at that
<nephele>
Do you have an example of that? I've not observed any such bug, other than websites incorrectly supporting the dark-mode
<nephele>
the patch was intended to make the scrrollbars respect the dark-mode, but as a side effect, they now support the dark mode :)
<PulkoMandy>
On http://pulkomandy.tk I don't think I did anything special and the scrollbar is black
<nephele>
on the right side?
<PulkoMandy>
Yes, there's only one scrollbar :)
<nephele>
Can you send me your appearence preferences by email?
<PulkoMandy>
I think it's all defaults in this machine
<nephele>
Okay
<PulkoMandy>
Maybe you want to check my css in case it's really my fault
<nephele>
I checked mystyle.css but it does not contain anything that should cause this
<nephele>
it is black as in the dark mode style indeed, will have to figure out why. maybe that is a regression :g
<nephele>
the scrollbar customization disabeling is mainly intended to prevent websites from making it too narrow too use anyhow, maybe you have an idea on how to more explicitly fix that :)
<PulkoMandy>
Are there websites actually doing that?
<nephele>
yes, gitea for example
<PulkoMandy>
Ok, indeed that's not great. Would be nice to still keep the custom colors still, maybe?
andreaa72 has joined #haiku
<andreaa72>
installed telegram ... joined haiku
<nephele>
hmmm, a test document with no style has the correct white scrollbar
<nephele>
i'm a bit confused what is different about your site
<nephele>
Custom colors could be fine, yeah. Personally i like "just use the OS style" more, but it would be acceptable if we have a more specific solution just for the minimum size
andreaa72 has left #haiku [#haiku]
HaikuUser has joined #haiku
HaikuUser has quit []
floof58 has quit [Ping timeout: 480 seconds]
<nephele>
PulkoMandy: does your javascript modify the css at all?
<PulkoMandy>
I don't think I have any javascript in there
<nephele>
From how it looks i would guess that the scrollbar somehow indicates it only supports dark-mode (with color-scheme: dark;) but i've not found anything in your css that would explain that
KapiX has joined #haiku
<PulkoMandy>
There is another style.css file (in addition to mystyle.css)
<PulkoMandy>
Does it just inherit the color from the body element maybe?
floof58 has joined #haiku
<PulkoMandy>
Mh, no, doesn't seem so
<nephele>
It might from :root
<nephele>
Well, removing style.css makes it go away
andreaa72 has joined #haiku
<nephele>
PulkoMandy: removing the background: from body seems to make this go away
<nephele>
hmm
andreaa72 has left #haiku [#haiku]
<PulkoMandy>
But changing to another color doesn't
KapiX has quit [Quit: KapiX]
<PulkoMandy>
Or maybe I didn't try a color light enough?
<nephele>
shouldn't matter, color-scheme is supposed to be opt-in
<nephele>
there is no heuristics for "should I use dark mode"
<nephele>
Hmm, i haven't tested actually with sites advertising light mode while using a dark background
<nephele>
Huh, but setting it to #FFF does fix it... I'll check the code :g
<nephele>
PulkoMandy: I'm only testing for scrollbar.scrollableArea().useDarkAppearanceForScrollbars()); I guess this could be a bug that is deeper in webkits code :g
<nephele>
unless that variable is named decpetively
<PulkoMandy>
Yes it may just be WebKit making a bad decision from the body color in absence of any other hints?
<nephele>
If not set the color-scheme property is assumed to be "light" only
<nephele>
iirc
<nephele>
but maybe they did something special, figuring that the scrollbar should just follow whatever the color is of your view in actuallity :fg
<nephele>
have to wait for the clone, githubs code search is useless
vdamewood has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<puck_>
useDarkAppearance() || scrollbarOverlayStyle() == WebCore::ScrollbarOverlayStyleLight; looks like it's set based on documentBackgroundColor's llightness
<PulkoMandy>
Looks like we should set preferredScrollbarOverlayStyle to force it the way we want? (no overlays)
<puck_>
no, because the background changing changes that
<nephele>
yes, but we can set preferredScrollbarOverlayStyle and the function will terminate early
<puck_>
oh right, there, yeah
<PulkoMandy>
But it looks like a bug anyway, we shouldn't be doing anything depending on overlay scrollbar styles
<nephele>
I'll investigate this more once it is cloned, github is pissing me off
<nephele>
(haikuwebkit gerrit when? :D)
<puck_>
PulkoMandy: note that this is actually the same way the adwaita code behaves
<puck_>
even without overlay scrollbars
<nephele>
I agree with pulkomandy though, the logic is based on ovelay scrollbars, but we don't use them, and it's probably the least tested codepath by now, so bugs like this are bound to happen
<PulkoMandy>
ScrollbarTheme disables overlay scrollbars by default
<PulkoMandy>
The code is SrollableArea that decides to use dark scrollbars on light background should probably check that? Or something related to it?
novaphoenix has joined #haiku
<PulkoMandy>
puck_: yes, we have similar code in ScrollbarThemeHaiku
<nephele>
i'd modify the useDarkAppearance() || scrollbarOverlayStyle() == WebCore::ScrollbarOverlayStyleLight;
<puck_>
anything that has a max(r, g, b) - min(r, g, b) of < 25% is considered dark
<nephele>
line to check if overlay is disabled
<nephele>
puck_: we have a different alghorythm, but we also check for light/dark in some cases
<nephele>
(mainly against the system theme, that is the site is dark and you have a light theme, don't use the OS colors but a fallback :)
<puck_>
yeah i meant for the overlay style calculation
<PulkoMandy>
Why did the web make rendering a scrollbar so complicated :/
<PulkoMandy>
Is it dark mode? Is it overlay? Is it standard style? Is it legacy style? (i have no idea what all these things are)
<nephele>
because scroll bars aren't part of the website originally
<nephele>
but web engines wanted to let you style them too
<nephele>
so they are special in all the right ways :)
<PulkoMandy>
… and web browsers implementors didn't say NO
<nephele>
no, but if you want to use them you have to use vendor specific prefixes for all browsers, except firefox, they somehow have the "standardized" keywords nobody else uses
<nephele>
anyhow, i'll fix this issue with a fix in shared webkit code and try to upstream it :=)
<andreasdr[m]>
Sorry, but could not resist, but its even Haiku related as MiniScript builds/works fine in Haiku. We will release this as a product soon, even Haiku Bindings would be possible (by using a generator or something)
B2IA has quit [Quit: Vision[]: i've been blurred!]
B2IA has joined #haiku
ClaudioM has joined #haiku
mmu_man has quit [Ping timeout: 480 seconds]
tombhadAC has joined #haiku
<zdykstra>
what's the tl;dr on MiniScript ?
<andreasdr[m]>
Script Language, easy to use, transpiles to C++.
<andreasdr[m]>
also pretty modern.
<andreasdr[m]>
Easy to maintain also and easy to enhence.
<andreasdr[m]>
Thank you for asking.
<andreasdr[m]>
with pretty modern I mean the syntax.
<andreasdr[m]>
I ll do a forum post after we released the BETA. I can ask there if Haiku bindungs would be interesting.
<Begasus>
ah! no wonder it build debug ... OPTION(WANT_DEBUG "Build with debug information" ON)
bbjimmy has quit [Quit: Vision[]: i've been blurred!]
* Begasus
wonders if people ever read the CMakeLists.txt file ...
<Begasus>
heading out, cu peeps!
Begasus has quit [Quit: Vision[]: i've been blurred!]
<trn_>
PulkoMandy: Is the best way to detect the Haiku version via the C preprocessor the B_HAIKU_VERSION macros?
<trn_>
Like, #if B_HAIKU_VERSION < B_HAIKU_VERSION_1_PRE_BETA_5 ... to do something only for R1b4 and earlier?
<PulkoMandy>
I think yes? That's what they're designed for
<trn_>
OK, I was asked to find out if that's the best and future proof way. libuv can use preadv/pwritev if it's available which is good for performance, and those were added a few months ago.
<trn_>
There would be some svn versions where it doesn't overlap. There isn't anything more fine-grained though.
<PulkoMandy>
A thing to keep in mind is haikuports builder run on beta4, so if it's packaged there, it will not use the new features then
<trn_>
That's fine,
<PulkoMandy>
Until we do a beta5 and update the builders
<trn_>
I just would prefer it not using the workaround unnecessarily.
zdykstra has quit [Remote host closed the connection]
zdykstra has joined #haiku
<trn_>
Thanks.
AD_MOS has joined #haiku
<bbjimmy>
waddlesplash The FAT systm was used to read the SD card and used write to the USB stick. When Windows was used, either natively or with haiky in a Virtual box, The files showed proper date, only when haiku is used natively do the file dates show badly.
<bbjimmy>
*Haiku
mmu_man has joined #haiku
HaikuUser has joined #haiku
HaikuUser has quit []
FreeFull has joined #haiku
<waddlesplash>
bbjimmy: yes I understood that part of your comment
<bbjimmy>
Doesn't haiku use its own FAT system even in a VirtualBox?
AlaskanEmily has quit [Remote host closed the connection]
<waddlesplash>
yes
<waddlesplash>
but there must be something different here
<waddlesplash>
timezone handling can be odd
<waddlesplash>
the FAT driver really needs a major overhaul
jmairboeck has joined #haiku
trn_ has quit [Quit: That's it for today]
roracle has joined #haiku
jmairboeck has quit [Quit: Konversation terminated!]
<roracle>
what's the deal with "yab-IDE"? is that a good program to quickly fabricate UI elements?
<roracle>
or is there a more preferred way?
<waddlesplash>
yab-IDE is an IDE for Yab, a BASIC dialect for Haiku
<roracle>
ah, is it easy to use?
<roracle>
well anyways, since i'm following the "Learning to program with Haiku" guides, what's a good IDE for C++?
gouchi has quit [Remote host closed the connection]