ChanServ changed the topic of #yab to: yab | yet another Basic for HAIKU || Homepage: https://yab.besly.de || Github: https://github.com/lorglas || Forum: http://yab.orgfree.com/forum/ || Logs: https://oftc.irclog.whitequark.org/yab
bbjimmy has quit [Quit: Vision[]: i've been blurred!]
samuraicrow has joined #yab
bbjimmy has joined #yab
<samuraicrow> Hello bbjimmy! I was just looking at the Yab documentation.
<bbjimmy> and?
Maylay has quit [Ping timeout: 480 seconds]
<bbjimmy> samuraicrow for me yab has been a moving target. once I get something working it ic changed and breaks my code.
<samuraicrow> I am thinking through how to do the expression parsing right now but the centralized YabInterface might be helpful.
<samuraicrow> Do you think it would be wise to wrap the libyab-1.x shared object or just make it raw C++?
<bbjimmy> If you could use the .so it would make smaller binaries when compiled.
<samuraicrow> Yes and no. Sometimes the wrapper is heavier than just using the Haiku function call.
<samuraicrow> I need to look at the YabContext sources before I'll know what's best.
<bbjimmy> I think I like raw c++ as it makes a more stand-alone binary and I might even be able to learn c++ !
<samuraicrow> I wouldn't try to learn C++ by looking at the output of my transpiler though. It'll be too messy.
<samuraicrow> Object-oriented C++ is like programming with a directory structure and a path. Yab is more like a flat layout.
<bbjimmy> I thought C++ was messy by design.
<samuraicrow> It is. :D
<samuraicrow> Getting it to recognize flat layout is hard but possible.
<samuraicrow> C was flat layout also so it's backward compatible to it.
<bbjimmy> When I need to, I make objects in yab, but it makes the program harder to read.
<samuraicrow> I think I understand.
<bbjimmy> Hard to read makes hard to maintain.
<samuraicrow> Do you mean gadgets as objects or structures?
<samuraicrow> Yes. C was designed to have the fewest keystrokes and the most punctuation symbols.
<samuraicrow> If you look at the code generated by Yab2Cpp, it's very ugly code but syntactically correct.
<bbjimmy> objects, the only catch is that I can't make yab free an object. makes one really examine if an object or a sub-routine is better.
<samuraicrow> Mostly syntactically correct, anyway.
<samuraicrow> Ok/
<samuraicrow> I'm writing Yab2Cpp in C++11 which has smart pointers. Those defer deallocation to scope of the variable as much as possible.
<samuraicrow> That way you can't forget to free it.
<bbjimmy> I never wrapped my head around pointers and why/when to use them.
<samuraicrow> Yeah, they can be tricky.
<samuraicrow> Once you get pointers, you get C and C++ and not a moment before.
<samuraicrow> How familiar are you with the Peek and Poke commands of the early BASIC dialects before Yab?
<bbjimmy> I figured that out. I can modify a c/c++ program but only by following the references the programmer used.
Maylay has joined #yab
<samuraicrow> Oh ok.
<bbjimmy> I remember using peek and poke for talking to hardware
<samuraicrow> I've been learning Rust lately and it has strict rules against pointer aliasing. It points only at one thing and doesn't let you pull the rug out until you're done with it.
<bbjimmy> I started programming with 8088 assembly. not very readable but useful
<samuraicrow> I started on a Commodore 64.
<samuraicrow> 6510 was tricky to compile but easy to program by hand.
<bbjimmy> I had a coco and quickly moved to a pc
<samuraicrow> The original Coco or the Coco2?
<bbjimmy> ms basic was my main application language, assembly was for work.
<samuraicrow> Yeah.
<bbjimmy> CoCo2
<samuraicrow> Didn't the Coco have a 6502?
<bbjimmy> yup
<samuraicrow> Almost identical to the 6510 on the C64 then.
<samuraicrow> Did you ever try Pascal? After learning C64 BASIC and Assembly, I moved on to Pascal in high-school.
<bbjimmy> Once I started using Basic it stuck and I stayed,
<bbjimmy> They didn't teach computers when I was in high school.
<samuraicrow> Oh ok.
<bbjimmy> In college I took a programming class that used fortran and I had to turn in a stack of punch cards.
<samuraicrow> I could probably explain C++ to you in Assembly but I don't know how much time I have to do so.
<samuraicrow> Fortran 77?
<samuraicrow> I learned Fortran 77 when I got to college too. It was kind of historical by the time I got it. It was typed in but you had to watch the column numbers anyway because it was punch-card oriented.
<bbjimmy> I don't remember what it was, but once I could get a personal computer ( coco, not PC) I was much happier, programs loaded off of cassette.
<samuraicrow> I got the Cassette drive on the C64.
<samuraicrow> Once I got a floppy drive for my C128 later on, I was amazed at what became possible. I used GEOS 128 as an operating system quite extensively.
<bbjimmy> My first disk drive was 5 MB. I thought I would never rtun out of space on it.
<samuraicrow> And well you shouldn't have run out of space. Programs were much more efficient back then.
<bbjimmy> indeed
<samuraicrow> LOL
<bbjimmy> I used cpm at work with 8 inch floppy disks
<samuraicrow> I missed that era. The 5.25" floppies were the first I used.
<bbjimmy> and a tty interface. What a waste of paper.
<samuraicrow> When the CP/M OS disk went bad on my C128, I didn't really miss it.
<samuraicrow> GEOS was much better. It made my C128 feel like a Mac.
<bbjimmy> :)
<samuraicrow> Come to think of it, GEOS was cross-developed on a 68000 based machine using MacroPort as a cross-assembler.
<samuraicrow> What was the last CPU you used for Assembly programming?
<bbjimmy> 8080
<bbjimmy> Z80
<samuraicrow> Oh ok. Never moved up to the 68000 or i386?
<bbjimmy> no
<samuraicrow> Ok.
<samuraicrow> Just before I started my first associates degree, I bought an Amiga 1200. Jumped all the way from 8 bits to 32-bits all at once.
<bbjimmy> microcomputers used in electronic scales and computer tape drives as controllers ... etc.
<samuraicrow> PIC microcontrollers by chance?
<bbjimmy> they wern't around yet.
<samuraicrow> I used those in digital scales in the 90's.
<bbjimmy> I worked on them in the early 80s
<samuraicrow> Ohh ok.
<bbjimmy> off to dinner...
<samuraicrow> That's just when I got started. Catch you later!
samuraicrow has left #yab [Leaving]
Maylay has quit [Ping timeout: 480 seconds]
Maylay has joined #yab
lelldorin has joined #yab
lelldorin has quit [Quit: Vision[]: i've been blurred!]
Maylay has quit [Ping timeout: 480 seconds]
Maylay has joined #yab
Maylay has quit [Remote host closed the connection]
Maylay has joined #yab
Maylay has quit [Ping timeout: 480 seconds]
Maylay has joined #yab
lelldorin has joined #yab
Maylay has quit [Ping timeout: 480 seconds]
lelldorin has quit [Quit: Vision[]: i've been blurred!]
Maylay has joined #yab