Click Here
home features news forums classifieds faqs links search
5740 members 
Amiga Q&A /  Free for All /  Emulation /  Gaming / (Latest Posts)
Login

Nickname

Password

Lost Password?

Don't have an account yet?
Register now!

Support Amigaworld.net
Your support is needed and is appreciated as Amigaworld.net is primarily dependent upon the support of its users.
Donate

Menu
Main sections
» Home
» Features
» News
» Forums
» Classifieds
» Links
» Downloads
Extras
» OS4 Zone
» IRC Network
» AmigaWorld Radio
» Newsfeed
» Top Members
» Amiga Dealers
Information
» About Us
» FAQs
» Advertise
» Polls
» Terms of Service
» Search

IRC Channel
Server: irc.amigaworld.net
Ports: 1024,5555, 6665-6669
SSL port: 6697
Channel: #Amigaworld
Channel Policy and Guidelines

Who's Online
24 crawler(s) on-line.
 13 guest(s) on-line.
 0 member(s) on-line.



You are an anonymous user.
Register Now!
 gonegahgah:  7 mins ago
 MEGA_RJ_MICAL:  16 mins ago
 annasolano:  37 mins ago
 K-L:  1 hr ago
 matthey:  1 hr 3 mins ago
 WeiXing3D:  1 hr 8 mins ago
 eliyahu:  1 hr 17 mins ago
 MEGA.RJ.MICAL:  1 hr 49 mins ago
 cc3d:  2 hrs ago
 DiscreetFX:  2 hrs 6 mins ago

/  Forum Index
   /  Amiga General Chat
      /  Amiga Nowhere
Register To Post

Goto page ( Previous Page 1 | 2 | 3 | 4 )
PosterThread
gonegahgah 
Re: Amiga Nowhere
Posted on 22-May-2020 11:45:52
#61 ]
Regular Member
Joined: 5-Dec-2008
Posts: 124
From: Australia

@kolla

Quote:
A Chromebook is just a low end laptop, running a semi locked down version of Linux with an embedded variant of Chrome browser as frontend/desktop.

Thanks for explaining that. It certainly sounds like what would be the case.
My gleaned understanding has been that it is a web browser behaving like a computer?
Is that correct?

I would have lots of issues with this kind of implementation of a system.
But it's some sort of step.
Again it brings all the baggage of legacy including some of its own.
So I do call it a step but not neccessarily the ideal step.

I think that we are so bogged down in our legacy concepts of OSes that we may not break free.
Apple had some new ideas but I don't like those either.

Last edited by gonegahgah on 22-May-2020 at 11:46 AM.

 Status: Offline
Profile     Report this post  
Hypex 
Re: Amiga Nowhere
Posted on 22-May-2020 17:47:38
#62 ]
Elite Member
Joined: 6-May-2007
Posts: 9855
From: Greensborough, Australia

@NutsAboutAmiga

Quote:
You should not use -lauto in final compile, it has horrible initialization code, not correctly check if libraries are opened or not.


Sounds pretty bad not doing the basic stuff. Don't recall 68K having anything similar.

Quote:
I think it was created for when you prototype your program, its kind of useless.
I have all my library init stuff in init.cpp file, so really easy for me just copy It into any new project. Anyhow, to support OS3.x you just have different init.cpp file, and all fine.


I'm thinking it would be useful to have a custom library open routine, so it would run though the libraries and interfaces, then on error be able to output what resource and version failed.

Quote:
Interfaces does break old source codes, you put -D__use_inline__ on GCC command line, its strange you don't know this. What breaks AmigsOS3.x compatibility is developers who don't give fu*k about AmigaOS3.x.


That define isn't enough. You also need to add code to open all the interfaces then close them later, as well as error checking. As well as replace functions that are banned, don't work or have no native replacement. And update code to modern C standard if needed. It's a bit of work. OS3 won't compile out of the box to a working binary with just a define.

Quote:
I seen code where developer, do not wont remove IEXEC ->, so they replace it by macro, so by define macro to nothing its backwards compatible, with removing the ?OBJECT? (library) it belong to.


I don't see how such a hack could work. It would be unwise removing a "->" in a macro but if only IExec is blanked out then there will be erroneous "->" left behind. Also the interface opening and closing would mess up. I don't see how such a messy method could compile at all yet alone actually work.

 Status: Offline
Profile     Report this post  
NutsAboutAmiga 
Re: Amiga Nowhere
Posted on 23-May-2020 9:29:07
#63 ]
Elite Member
Joined: 9-Jun-2004
Posts: 11331
From: Norway

@Hypex

Quote:
That define isn't enough.


Yes sure they also changed a few names for timeval, there is a define for that…
and there new features only available in AmigaOS4.1, for true colors, and for large files, and so on.

There is after all bit of size difference between the SDK for OS3.9 and AmigaOS4.1 SDK.

Quote:
I don't see how such a hack could work.

Not really a hack but you need a header file somewhere, to set this up.

#ifdef __my_namespaces__
#ifdef __amigaos4__
#define NS_IEXEC IEXEC ->
#define NS_IDOS IDOS ->
#else
#define NS_IEXEC
#define NS_IDOS
#endif
#endif

libBase = NS_IEXEC OpenLibarary(“name.librart”,30);
Fd = NS_IDOS Open(“RAM:test.txt”,MODE_NEWFILE);

Last edited by NutsAboutAmiga on 23-May-2020 at 09:31 AM.
Last edited by NutsAboutAmiga on 23-May-2020 at 09:30 AM.

_________________
http://lifeofliveforit.blogspot.no/
Facebook::LiveForIt Software for AmigaOS

 Status: Offline
Profile     Report this post  
Hypex 
Re: Amiga Nowhere
Posted on 24-May-2020 18:15:49
#64 ]
Elite Member
Joined: 6-May-2007
Posts: 9855
From: Greensborough, Australia

@gonegahgah

Quote:
I guess maybe it would discard the first x in x,y=GetMouse().


Makes sense.

Quote:
So maybe it would be essential to put (x,y)=GetMouse()?


It could be but it then might assign y to the value of GetMouse(). Or in place of the last x,y put in GetMouse() also assigned to y.

Quote:
Would C be comfortable in passing these as two updated (but separate) arguments even though they are in brackets?


Usually it would but it would want to calculate what's inside them as one parameter to pass.

Quote:
It started as something else - before they acquired some form of Amiga company - and seemed like a process of making theory into reality. It was called something similar to Kronos or KAOS or something? I'm sure I can locate the name somewhere...


On planet Kronus they were. I remember something called KMOS. Migh as well had been KAOS. LOL. KIll Amiga OS. Or.
Kill Morph OS.

Quote:
Everything was supposed to work with everything... Sheep, AmiObjects, etc...


Sounds very OOPs. They OOPed it up. OOP, they did it again.

Quote:
Extensions are a cheap way to identify a file type again born of current underlying paradigms.


They are but it is a useful indicator. Howeverr it isn't useful when you download an image without an extension and nothing will touch it without one.

Quote:
But they get very ugly very quick. There are a zoo of file extensions out there with many clashes.


I'm aware of one on Linux. GRUB mod files get confused as Amiga modules on the desktop. Though GRUB is common the desktop doesn't know what GRUB modules are. But proper mod files have a reverse extension, or pretension, the mod is at the front.

Quote:
All I want to know is how much compression I can get and whether its lossy and how badly.


So do I! I like it when I can get basic details from an info window, but don't like it when a program makes it hard to find some basic information.

Quote:
I haven't studied the AFC hard, which I should, but I can't see at a glance what its benefit is?


Looks like some kind of classes in a set.

Quote:
It was drifting back into my memory afterwards. I see what you mean. I agree.


Glad someone can see what I mean.

Quote:
The Taos models use direct calls of course.


Should look more understandable that way.

Quote:
My object model uses direct calls as well except I'm hoping to be able to incorporate cross-CPU calling. That would require proper messages with mailboxes but I want to make that only occur automatically when necessary and not be the central method. I was looking at it recently and had no clue. Hopefully I can work it out next time I look at it.


Sounds like a good one and rather advanced as well.

Quote:
I think I've pondered many of these things over time too and wondered why they didn't do alternate things. I have pondered if they could have just use varargs for tags? I think I figured that the dynamic nature of some of the things they were trying to do disallowed it? Could that be the case?


Depending on the function, they did in fact use var args and use them for tags, even if tags needed to be in pairs. Such as OpenScreenTags() or OpenScreenTagList(). Or SetGadgetAttrs() and SetGadgetAttrsA(). Essentially for doing the same thing. Given a tag list pointer was an array I would have thought varargs are just an array as well. I suppose tags can be built separately while varargs are stacked parameters. But it seemed strange there were two function calls for what internally looked like exactly the same thing.

Quote:
I think C++ has runtime objects now as well as compile time ones. Does it?


It would yes because of the dynamic nature. It also means there are lots of calls allocating memory for these objects. Likely why modern programs are CPU and resource hungry.

Quote:
Compile time ones are always easier because everything is available and easy to optimise.
Runtime objects are more unpredictable and require more complex handling.
Just like shared librariers vs standard libraries.


It is easier to have some static structures ready at the go. In later years we were warned against this. Such as with needing to allocate a FIB from DOS.

Quote:
I always wondered if that was partly the reason for BOOPSI?


Well, it could be, as all these objects were all linked together in a kind of family tree. Which allowed for more possibilities.

This is a good guide on the subject:
https://wiki.amigaos.net/wiki/BOOPSI_-_Object_Oriented_Intuition

Last edited by Hypex on 24-May-2020 at 06:22 PM.

 Status: Offline
Profile     Report this post  
Trixie 
Re: Amiga Nowhere
Posted on 24-May-2020 19:03:32
#65 ]
Amiga Developer Team
Joined: 1-Sep-2003
Posts: 1921
From: Czech Republic

@gonegahgah

Quote:
Fleecy had some rather interesting ideas and even more interesting thing was looking at how to try and make some of them actually work. His object model had factories and blueprints and other bizarre stuff. It looked like they were trying to jam ideas together. It started as something else - before they acquired some form of Amiga company - and seemed like a process of making theory into reality. It was called something similar to Kronos or KAOS or something?

You probably mean KOSH - standing for "Kommunity Operating System and Hardware". Which in its time sounded nice but in fact was nothing but a pipe-dream in Fleecy's head.

_________________
Smoke me a kipper, I'll be back for breakfast!

AmigaOne X5000/020 @ 2GHz / 4GB RAM / Radeon RX 560 / ESI Juli@ / AmigaOS 4.1 Final Edition
SAM440ep-flex @ 667MHz / 1GB RAM / Radeon 9250 / AmigaOS 4.1 Final Edition

 Status: Offline
Profile     Report this post  
gonegahgah 
Re: Amiga Nowhere
Posted on 24-May-2020 22:52:04
#66 ]
Regular Member
Joined: 5-Dec-2008
Posts: 124
From: Australia

@Trixie

Quote:
You probably mean KOSH - standing for "Kommunity Operating System and Hardware".

That's it. Thanks Trixie.

I was looking through my old printouts and also came across the moniker OASYS which seems to have followed on from KOSH when Fleecy and Bill joined together.
At least they came up with cool names! I guess that meant Object Amiga System or something?

I found a link mentioning KOSH: Amiga History - Part 11

 Status: Offline
Profile     Report this post  
DiscreetFX 
Re: Amiga Nowhere
Posted on 24-May-2020 23:32:13
#67 ]
Super Member
Joined: 12-Feb-2003
Posts: 1862
From: Chicago, IL

@gonegahgah

KOSH was just a Fleecy brain fart and a temp website that quickly disappeared, nothing more nothing less. And nothing to see here since not even one line of code was written.

_________________
Sent from my Quantum Computer.

 Status: Offline
Profile     Report this post  
gonegahgah 
Re: Amiga Nowhere
Posted on 25-May-2020 0:56:52
#68 ]
Regular Member
Joined: 5-Dec-2008
Posts: 124
From: Australia

@Hypex

Quote:
Usually it would but it would want to calculate what's inside them as one parameter to pass.

That's my worry. I wonder if it can be dealt with without creating semantic inconsistency?
I'm working on a new programming language so I'm hoping it will allow me to find out...

Programming semantics are important to me.
The VP language cobbles on some C features like defines.
But I'm looking to give them more universality in VP.
So the # which puts quotes around things I want to allow to be used anywhere in the code.
And the ## which concaternates I also want to allow to be used anywhere.
So for example:
.print He said, #{Hello world}. ; Outputs: He said, "Hello World".
.print Today is year##month##day. ; Outputs: Today is 20200525.

I do find the ## a bit clunky for joining so maybe I'll also swap these around in VP?
That would make the code look nicer.
eg. If def1 is foo and foobar is hello then: .print %{%def1#bar} ; Outputs: hello.
Which is nicer than .print %{%def1##3}.

I don't like things that are used in only one place and for me this is handy to use elsewhere.
Though there is some semantic disconnect as this operates immediately in code but when used in a define it has to be delayed (but only for the args which is perhaps the distinction).

That was a lot of answer for an answer! But I just wanted to explore code semantics.

Quote:
I remember something called KMOS. Migh as well had been KAOS. LOL. KIll Amiga OS. Or. Kill Morph OS.



Quote:
Sounds very OOPs. They OOPed it up. OOP, they did it again.

I'm not sure how they would have made everything so seemlessly and logically work?

Quote:
They are but it is a useful indicator. Howeverr it isn't useful when you download an image without an extension and nothing will touch it without one.

I paid for Total Video Audio Converter on the PC which has been a godsend.
Works even if you remove the extension.

Quote:
So do I! I like it when I can get basic details from an info window, but don't like it when a program makes it hard to find some basic information.

Absolutely. That is one of those legacy problems.

Quote:
Looks like some kind of classes in a set.

Hopefully AFC gets microscoped one day and explained a little better by somebody.
Then we could assess it better.

Quote:
Sounds like a good one and rather advanced as well.

It's made me understand why there are probably so many versions of .NET as there is probably always some improvement that makes the new version significantly different to the last version.
It's made it difficult to be incremental.
I'm a big believer in small model objects and extensive reuseability.
The current paradigms (including probably .NET) have made that difficult and objects have had to try to do everything often breaking that dream of reusability.

Quote:
Depending on the function, they did in fact use var args and use them for tags, even if tags needed to be in pairs. Such as OpenScreenTags() or OpenScreenTagList(). Or SetGadgetAttrs() and SetGadgetAttrsA(). Essentially for doing the same thing. Given a tag list pointer was an array I would have thought varargs are just an array as well. I suppose tags can be built separately while varargs are stacked parameters. But it seemed strange there were two function calls for what internally looked like exactly the same thing.

That's right, yeah. It did seem a bit yucky with duplicate names, and some with the 'Tag' or 'Tags' or 'TagsList' suffix and others with an 'A' suffix for basically the same duplication.

Quote:
It would yes because of the dynamic nature. It also means there are lots of calls allocating memory for these objects. Likely why modern programs are CPU and resource hungry.

Probably part of the reason. I think PC programs are probably also laden with everything having to happen through the Window. That is one of the cool things with the Amiga where so many more things can happen without the application even being involved until it needs to be.

Quote:
It is easier to have some static structures ready at the go. In later years we were warned against this. Such as with needing to allocate a FIB from DOS.

I must admit I don't know what a FIB is? [And that's no lie ka-ching]

Quote:
Well, it could be, as all these objects were all linked together in a kind of family tree. Which allowed for more possibilities.

Good chance. I wonder if there has ever been an explanation or examination of this?
That's probably the best guide of BOOPSI I've ever seen. Thanks Hypex.

Last edited by gonegahgah on 25-May-2020 at 01:16 AM.

 Status: Offline
Profile     Report this post  
gonegahgah 
Re: Amiga Nowhere
Posted on 25-May-2020 1:14:43
#69 ]
Regular Member
Joined: 5-Dec-2008
Posts: 124
From: Australia

@DiscreetFX

Quote:
KOSH was just a Fleecy brain fart and a temp website that quickly disappeared, nothing more nothing less. And nothing to see here since not even one line of code was written.

That was sad wasn't it.
The object stuff I saw back when - which didn't look runnable to me - did seem a little rudimentary and theoretical. I wasn't able to see how it would tie to things sadly... (That's all from memory).

Last edited by gonegahgah on 25-May-2020 at 01:17 AM.

 Status: Offline
Profile     Report this post  
Hypex 
Re: Amiga Nowhere
Posted on 25-May-2020 17:29:15
#70 ]
Elite Member
Joined: 6-May-2007
Posts: 9855
From: Greensborough, Australia

@NutsAboutAmiga

Quote:
es sure they also changed a few names for timeval, there is a define for that?and there new features only available in AmigaOS4.1, for true colors, and for large files, and so on.


I forgot about the TimeVal. Got caught on that myself. Off the top of my head GetCC() is broken, AllocVec() gives you warnings, and it doesn't like FileInfoBlocks anymore.

Quote:
Not really a hack but you need a header file somewhere, to set this up.


Okay I can how that would work. But it looks more annoying than anything. To produce portable code.

 Status: Offline
Profile     Report this post  
DBAlex 
Re: Amiga Nowhere
Posted on 26-May-2020 13:21:13
#71 ]
Cult Member
Joined: 23-Jul-2006
Posts: 759
From: UK

@All

Does anyone know if any "AmigaAnywhere", "AmigaDE" or whatever you want to call it actually got used anywhere?

I watched a video last night of Bill McEwen at ACE Expo in Australia saying "the first product out the door will be from meternet (sp?) this will be out at christmas time":

Link: https://youtu.be/KG4i4rYEIbk?t=1983

Did this thing ever actually get released? Anyone ever actually seen a device with a boing ball and "powered by Amiga" on it?

_________________
A1200, 68060/64MB/1.2GB/WiFi/AGAtoCRT/OS3.9 Pegasos I, G3 600Mhz/512/9200SE/80GB WinUAE, Ryzen 5 2400G/Vega11, 8GB DDR4, 256GB SSD,Win 10 Pro x64 Amiga Forever !

 Status: Offline
Profile     Report this post  
gonegahgah 
Re: Amiga Nowhere
Posted on 26-May-2020 19:37:19
#72 ]
Regular Member
Joined: 5-Dec-2008
Posts: 124
From: Australia

@DBAlex

Thanks for that video. I hadn't seen that.
Sadly, I don't know if they got used anywhere?

There did seem to be another follow up company called Antix Labs.
But this was run by Tao...

I'm not sure how much cross-over there was and it didn't seem to be trying to be an OS anyway.

Antix - Francis Charig
PocketGamer.biz
They've done a good job of removing any evidence of the company's website off the internet

I can't remember if they ever had any downloadable content.
If they did I should have bought something for historical purposes. Damn!
If they didn't I wouldn't have been able to anyway

 Status: Offline
Profile     Report this post  
Rob 
Re: Amiga Nowhere
Posted on 26-May-2020 22:03:49
#73 ]
Elite Member
Joined: 20-Mar-2003
Posts: 5903
From: S.Wales

@DiscreetFX

Quote:
Not sure which was worse AmigaDE or CUSA.


While there was much to criticise about CUSA Barry did at least fund it out of his own pocket and the C64 replica case was cerrtainly something that appealed to a great number of current and formers Commodore users.

 Status: Offline
Profile     Report this post  
Hypex 
Re: Amiga Nowhere
Posted on 31-May-2020 17:41:31
#74 ]
Elite Member
Joined: 6-May-2007
Posts: 9855
From: Greensborough, Australia

@gonegahgah

Quote:
That's my worry. I wonder if it can be dealt with without creating semantic inconsistency?


I don't know if it can. Logically it would be a "x,y=function(a,b);" but that is unacceptable. C is a very stackish language. It likes to stack parameters. Therefore, it makes sense to also stack the return values.

It's possible a function could keep a static struct containing return values so call would go like:
p=function(a,b);
x=p.x;
y=p.y;

Not only is the above an assignment, but x and y can be used as p.x and p.y. Or simply pass the pointers to each variable:
function(a,b,&x,&y);

Quote:
I'm working on a new programming language so I'm hoping it will allow me to find out...


Then you can dump C!

Quote:
So for example:.print He said, #{Hello world}. ; Outputs: He said, "Hello World"..
print Today is year##month##day. ; Outputs: Today is 20200525.


I haven't seen hashes used that way before. So year doesn't need to be ##year?

Quote:
I do find the ## a bit clunky for joining so maybe I'll also swap these around in VP?


Does look clunky. Also it's confusing I think, to use hash for one thing and two hashes for another.

Quote:
eg. If def1 is foo and foobar is hello then: .print %{%def1#bar} ; Outputs: hello.
Which is nicer than .print %{%def1##3}.


You almost lost me there. I understand the first line now but not the second. So it can join together variable names and then reference it? This is unheard of from what I know.

Quote:
That was a lot of answer for an answer! But I just wanted to explore code semantics.




Quote:
I'm not sure how they would have made everything so seemlessly and logically work?


Using Obj-C seems logical. But apart from that there could be defines to make it look cleaner. Using var args in objects message sends. Or even return a struct with function pointers. The last has a problem in that the object needs sending as well but that was the nature of the OOP method they were simulating.

Quote:
Works even if you remove the extension.


Confuses Android.

Quote:
It's made me understand why there are probably so many versions of .NET as there is probably always some improvement that makes the new version significantly different to the last version.


When I got used to the internet and found out about this ".NET" I thought it sounded confusing and that they had chosen an unfortunate name. Almost like making an Alt Del combo popular despite a similar Ctrl Alt Del which was dangerous and ignoring any confusion.

Quote:
That's right, yeah. It did seem a bit yucky with duplicate names, and some with the 'Tag' or 'Tags' or 'TagsList' suffix and others with an 'A' suffix for basically the same duplication.


Yes, at least three, making it even worse.

Quote:
Probably part of the reason. I think PC programs are probably also laden with everything having to happen through the Window. That is one of the cool things with the Amiga where so many more things can happen without the application even being involved until it needs to be.


The OS should handle these things. That's what it's there for. I remember asking someone who had programmed Windows how it was done. It if had a similar OpenWindow() routine. It was called Windows so surely it had a similar core function. I was told it doesn't exactly have an open window function like that and everything goes through the MFC or Microsoft Foundation Class. This answer confused me more than when I had started! At the time I didn't know about OOP so didn't understand the answer at all. Also why was an API named after Microsoft, why wouldn't they call it Windows? Microsoft is the company, not the product, that's just wierd. But most of all, this Microsoft Foundation Class sounds like a Microsoft charity school! Huh?

Quote:
I must admit I don't know what a FIB is? [And that's no lie ka-ching]


Haha! Well I can answer that one. It's a FileInfoBlock. :--D

Used to be in:
#include "dos/dos.h"

Quote:
Good chance. I wonder if there has ever been an explanation or examination of this?


Just that guide I know of.

Quote:
That's probably the best guide of BOOPSI I've ever seen. Thanks Hypex.


No problem. I thought it was good as well .

Last edited by Hypex on 31-May-2020 at 05:52 PM.

 Status: Offline
Profile     Report this post  
gonegahgah 
Re: Amiga Nowhere
Posted on 1-Jun-2020 13:02:45
#75 ]
Regular Member
Joined: 5-Dec-2008
Posts: 124
From: Australia

@Hypex

Quote:
I don't know if it can. Logically it would be a "x,y=function(a,b);" but that is unacceptable. C is a very stackish language. It likes to stack parameters. Therefore, it makes sense to also stack the return values.

Yeah, I would have to explore it more. I think I recall that C returns a single register after a call (was it d0 on Motorola) hence the single return value. So it must dump the stack allocation straight away when returning; killing that as a way to return args.
VP keeps a record of which registers will be passed and returned and they’re passed in strict order.
So it knows what registers to save on the stack and what will be used and returned.
The translator changes some of these to a stack allocation only if necessary at runtime.
It would, I imagine, transfer return values out of the stack before deallocating the arguments that had to be stacked.

I’ll have to think about if that could be changed with C sometime…
Tao didn’t do that and had a different approach. I’m not really fond of their approach.

I wonder if anyone has compared the pros/cons of register passing vs stack passing?

Quote:
It's possible a function could keep a static struct containing return values so call would go like: p=function(a,b); x=p.x; y=p.y;

That's looks pretty good.
Or I guess the compiler could force &p to be an invisible arg possibly?
Food for thought.

Quote:
Not only is the above an assignment, but x and y can be used as p.x and p.y. Or simply pass the pointers to each variable: function(a,b,&x,&y);

Could you have: function(a,b,p); or conversely function(a,b,p.x,p.y);
Could the first automatically break the structure into two args?

Quote:
Then you can dump C!

I'm not a big fan of C but its better than some things and a mainstay.
I'm thinking of calling my new language Amorphous (nothing to do with MorphOS).

The first thing I want to do with Amorphous when done is recreate the VP language (VP2).
And then I want to modify that to what I want and create a new version (VP3).

Quote:
I haven't seen hashes used that way before. So year doesn't need to be ##year?

The #'s won't be representing define indicators but instead concaternation and stringification like they do in C defines.
In VP3 I'll be using the % (not #) to represent defines that have to be expanded when first encountered.
VP2 defines don't use % to expand; just the label. But VP2 has expanders (eg. %e - expands to an evaluated value, %L – expands to current macro instance, %3 expands to third argument, etc.)
So I’m looking to universalise that idea in VP3.
I plan to use both expansion of ordinary labels and expansion of %labels. ie.
.define name Neil
.print name is %name ; Outputs: Neil is Neil
.print %!name is %name ; Outputs: name is Neil
.noexpand name ; Turns off unspecified expansion of name.
.print name is %name ; Outputs: name is Neil
(.print is a compile time command so that you can make your own compiler messages).

In VP3 I plan to make both ways useable (with or without %) but it can mean different things.
But back to the #.
So year # month # day would concaternate the defines together.
I could also write it as year%month%day using my new syntax.
But there are instances where one is better than the other at different times.

Quote:
Does look clunky. Also it's confusing I think, to use hash for one thing and two hashes for another.

I would prefer to use # to concaternate two things ie. car # rot becomes carrot.
Stringification is handy but less often used so I'm more comportable with it being ##.
I thought maybe I could use one for both but I'm worried they may clash.
ie. printf "Hello " ##name "\n" would print out at run time: Hello Neil
but, printf "Hello " #name "\n" would generate a compile time error.
There may be better examples but I can't think of one off the top of my head?

Quote:
You almost lost me there. I understand the first line now but not the second. So it can join together variable names and then reference it? This is unheard of from what I know.

I can see my explanation above was moot and you got the idea. Cool.
Sorry, I remember putting the 3 there but I don’t know why?
I think that should probably have been: .print %{%def1##bar} (but %def1#bar preferred).

Quote:
The OS should handle these things. That's what it's there for. I remember asking someone who had programmed Windows how it was done. It if had a similar OpenWindow() routine. It was called Windows so surely it had a similar core function. I was told it doesn't exactly have an open window function like that and everything goes through the MFC or Microsoft Foundation Class. This answer confused me more than when I had started! At the time I didn't know about OOP so didn't understand the answer at all. Also why was an API named after Microsoft, why wouldn't they call it Windows? Microsoft is the company, not the product, that's just wierd. But most of all, this Microsoft Foundation Class sounds like a Microsoft charity school! Huh?

Self-promotion? I don't like the Microsoft Windows' approach.
Yeah all that stuff happened in the intuition context but I also liked the idea of spinning of new processes as well.

Quote:
Haha! Well I can answer that one. It's a FileInfoBlock. :--D
Used to be in:
#include "dos/dos.h"

Cool.

 Status: Offline
Profile     Report this post  
bison 
Re: Amiga Nowhere
Posted on 1-Jun-2020 15:11:15
#76 ]
Super Member
Joined: 18-Dec-2007
Posts: 1577
From: N-Space

@gonegahgah

You can get a little closer in C using C99 structure literals. It's ugly, but it works.

#include <stdio.h>

struct s {
  char c;
  int n;
};

struct s f(char c, int n)
{
  return (struct s){c, n};
}

int main()
{
  struct s s = f('a', 42);
  printf("%c %d\n", s.c, s.n);
}

Update: Fiddling with the formatting. If the forum software had been designed in the 21st century it would be better.

Last edited by bison on 01-Jun-2020 at 03:16 PM.
Last edited by bison on 01-Jun-2020 at 03:14 PM.
Last edited by bison on 01-Jun-2020 at 03:13 PM.
Last edited by bison on 01-Jun-2020 at 03:11 PM.

_________________
"Unix is supposed to fix that." -- Jay Miner

 Status: Offline
Profile     Report this post  
Goto page ( Previous Page 1 | 2 | 3 | 4 )

[ home ][ about us ][ privacy ] [ forums ][ classifieds ] [ links ][ news archive ] [ link to us ][ user account ]
Copyright (C) 2000 - 2019 Amigaworld.net.
Amigaworld.net was originally founded by David Doyle