POV-Ray : Newsgroups : povray.off-topic : Invisible: PureData Server Time
3 Sep 2024 15:12:06 EDT (-0400)
  Invisible: PureData (Message 40 to 49 of 49)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Invisible
Subject: Re: Invisible: PureData
Date: 18 Feb 2011 09:56:10
Message: <4d5e888a@news.povray.org>
>> This only matters if you're interested in performance.
>
> Why else would you use assembly?

Perhaps because you need to perform specific hardware-level operations 
that C doesn't support. (E.g., selecting a different processor mode or 
something.) There's usually a few bits of the OS written in assembly 
because they do very low-level stuff.

> There are plenty of languages that allow better maintainability.
>
> Assembly isn't portable by its very nature ;)

...which leads us back to my "there are *reasons* why nobody uses 
assembler any more". ;-)


Post a reply to this message

From: Mike Raiford
Subject: Re: Invisible: PureData
Date: 18 Feb 2011 10:55:31
Message: <4d5e9673@news.povray.org>
On 2/18/2011 8:22 AM, Invisible wrote:

> Mathematica doesn't work this way. The core implements a transformation
> engine, and arbitrary precision math. Beyond that, the parser, the
> printer, the simplification rules, *everything* is Mathematica source
> code, which can be altered at will (if you're so-inclined).
>
> I have no idea about the architecture of Maxima, but it wouldn't
> surprise me. There are advantages to doing it this way. (The main
> disadvantage is performance...)

Yep :) pretty much how Maxima works. You can define your own operators, 
their associativity (if any), precedence, and a number of other things. 
Rules are defined in much the way you described. They're all written in 
Maxima's language. There are a few intrinsic things: assignment, 
function calls, and some other syntax glue.... But just about anything 
can be defined as just about anything else.

-- 
~Mike


Post a reply to this message

From: Mike Raiford
Subject: Re: Invisible: PureData
Date: 18 Feb 2011 10:57:21
Message: <4d5e96e1$1@news.povray.org>
On 2/18/2011 8:56 AM, Invisible wrote:
>>> This only matters if you're interested in performance.
>>
>> Why else would you use assembly?
>
> Perhaps because you need to perform specific hardware-level operations
> that C doesn't support. (E.g., selecting a different processor mode or
> something.) There's usually a few bits of the OS written in assembly
> because they do very low-level stuff.
>

Oh, right ... I forgot about that.

> ...which leads us back to my "there are *reasons* why nobody uses
> assembler any more". ;-)

Well, if you don't want to write portable code... then go for it.

-- 
~Mike


Post a reply to this message

From: Invisible
Subject: Re: Invisible: PureData
Date: 18 Feb 2011 10:59:09
Message: <4d5e974d$1@news.povray.org>
>> Mathematica doesn't work this way. The core implements a transformation
>> engine, and arbitrary precision math. Beyond that, the parser, the
>> printer, the simplification rules, *everything* is Mathematica source
>> code, which can be altered at will (if you're so-inclined).
>
> Yep :) pretty much how Maxima works. You can define your own operators,
> their associativity (if any), precedence, and a number of other things.
> Rules are defined in much the way you described. They're all written in
> Maxima's language. There are a few intrinsic things: assignment,
> function calls, and some other syntax glue.... But just about anything
> can be defined as just about anything else.

I haven't tried this, but I understand that the actual input parser for 
Mathematica is user-defined. You can make it parse, e.g., chemical 
formulas rather than algebra. You can change what function-call syntax 
looks like. And so on.

Then again, you don't buy a £7,000 CAS system in order to modify it into 
something that doesn't do math. ;-)


Post a reply to this message

From: Invisible
Subject: Re: Invisible: PureData
Date: 18 Feb 2011 11:03:28
Message: <4d5e9850$1@news.povray.org>
>>>> This only matters if you're interested in performance.
>>>
>>> Why else would you use assembly?
>>
>> Perhaps because you need to perform specific hardware-level operations
>> that C doesn't support.
>
> Oh, right ... I forgot about that.

Never forget. ;-)

>> ...which leads us back to my "there are *reasons* why nobody uses
>> assembler any more". ;-)
>
> Well, if you don't want to write portable code... then go for it.

I'm sure if you're trying to program a toaster, it might actually be 
worth it. (How complex can it possibly be?)

It's surprising how many Project Euler problems have solutions (plural) 
in assembly...


Post a reply to this message

From: Orchid XP v8
Subject: Re: Invisible: PureData
Date: 19 Feb 2011 09:56:33
Message: <4d5fda21$1@news.povray.org>
On 17/02/2011 01:48 PM, Mike the Elder wrote:

> Opinions are like anthills?

Everybody makes mountains out of them?

No, wait, that's molehills...

-- 
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*


Post a reply to this message

From: Warp
Subject: Re: Invisible: PureData
Date: 20 Feb 2011 11:28:37
Message: <4d614135@news.povray.org>
Invisible <voi### [at] devnull> wrote:
> >> This only matters if you're interested in performance.
> >
> > Why else would you use assembly?

> Perhaps because you need to perform specific hardware-level operations 
> that C doesn't support. (E.g., selecting a different processor mode or 
> something.) There's usually a few bits of the OS written in assembly 
> because they do very low-level stuff.

  It's not like you need to write the entire program in assembly just
because you need to execute one asm instruction not supported by the
language. They invented inline asm for a reason.

-- 
                                                          - Warp


Post a reply to this message

From: Invisible
Subject: Re: Invisible: PureData
Date: 21 Feb 2011 04:14:29
Message: <4d622cf5$1@news.povray.org>
On 20/02/2011 04:28 PM, Warp wrote:
> Invisible<voi### [at] devnull>  wrote:
>>>> This only matters if you're interested in performance.
>>>
>>> Why else would you use assembly?
>
>> Perhaps because you need to perform specific hardware-level operations
>> that C doesn't support. (E.g., selecting a different processor mode or
>> something.) There's usually a few bits of the OS written in assembly
>> because they do very low-level stuff.
>
>    It's not like you need to write the entire program in assembly just
> because you need to execute one asm instruction not supported by the
> language. They invented inline asm for a reason.

Sure. I was just pointing out that "performance" isn't the only possible 
reason for writing assembly. My original point was that "nobody writes 
assembly any more"...


Post a reply to this message

From: Mike Raiford
Subject: Re: Invisible: PureData
Date: 25 Feb 2011 22:56:47
Message: <4d6879ff$1@news.povray.org>
On 2/18/2011 9:59 AM, Invisible wrote:
>>> Mathematica doesn't work this way. The core implements a transformation
>>> engine, and arbitrary precision math. Beyond that, the parser, the
>>> printer, the simplification rules, *everything* is Mathematica source
>>> code, which can be altered at will (if you're so-inclined).
>>
>> Yep :) pretty much how Maxima works. You can define your own operators,
>> their associativity (if any), precedence, and a number of other things.
>> Rules are defined in much the way you described. They're all written in
>> Maxima's language. There are a few intrinsic things: assignment,
>> function calls, and some other syntax glue.... But just about anything
>> can be defined as just about anything else.
>
> I haven't tried this, but I understand that the actual input parser for
> Mathematica is user-defined. You can make it parse, e.g., chemical
> formulas rather than algebra. You can change what function-call syntax
> looks like. And so on.

It can be done with Maxima. It really depends on how far you want to 
push it. What probably cannot be done is really low-level changes to the 
way it handles input. e.g. altering the basic syntax of the system 
without lifting the hood and tweaking the underlying lisp (Though, you 
can do this from inside the workbook.

What you can do within Maxima's language is define new operators, set 
that operator as postfix, infix, prefix, or nofix, and have fine-grained 
control over precedence and associativity. I suppose technically you 
could redefine how a function is called within its language.

I'm actually fooling with getting it to simplify boolean algebra by 
messing with pattern matching and such, but I haven't wrapped my head 
completely around how the matching works, and how to get it to do some 
of the more interesting stuff. It's there, they have packages for all 
kinds of things, including simplifying inequalities, etc all written in 
Maxima's language.

I guess, technically you could do the same thing  (have it manipulate 
chemical equations instead of mathematical equations, it doesn't seem 
like that big of a leap, given the simplifier engine) inside of Maxima.

> Then again, you don't buy a £7,000 CAS system in order to modify it into
> something that doesn't do math. ;-)

Yeah, well ;) Its like someone using 3D-Studio MAX to produce blueprints 
of a mechanical part.


Post a reply to this message

From: Mike Raiford
Subject: Re: Invisible: PureData
Date: 25 Feb 2011 23:03:00
Message: <4d687b74$1@news.povray.org>
On 2/20/2011 10:28 AM, Warp wrote:

>
>    It's not like you need to write the entire program in assembly just
> because you need to execute one asm instruction not supported by the
> language. They invented inline asm for a reason.
>

Heh. Or that rare time when you're using an API that requires the 
callbacks be naked functions and do ALL of their own handling of the 
stack and everything. (Seriously, this is a requirement of the CLR 
profiling API) Not only that, but the compiler will not form calls to 
either CDECL or STDCall functions from a naked function properly. You 
either have to modify the stack frame to work within the context of the 
function, or know darn good and well how the function you're calling is 
handled. How are arguments passed? who cleans the stack?

Fun stuff. :) Haven't had to break down to pure asm in ages. :D But, 
then it's only a couple of functions to call a stub that delegates the 
real work. it's not like I had to write pages and pages of assembly.


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.