flat assembler
Message board for the users of flat assembler.
![]() Goto page Previous 1, 2 |
Author |
|
l_inc 04 Jan 2015, 18:04
Tomasz Grysztar
Okay. ![]() _________________ Faith is a superposition of knowledge and fallacy |
|||
![]() |
|
DOS386 06 Jan 2015, 07:18
Code: version 1.71.32 (Jan 04, 2015) [+] Brought back the "-d" switch for command line. version 1.71.31 (Dec 08, 2014) WOW: "-d" added (untested). Quote: The features like FORMAT do encourage to create self-sufficient sources. On the other hand, the removal of "-d" was an attempt at enforcing this, and in my opinion it was doomed to fail because by the same reasoning not only use of environment variables or time stamp, but even the INCLUDE directive in itself could be removed from language, and this never even crossed my mind Very good point. See also: https://gitian.org/ Quote: Gitian uses a deterministic build process to allow multiple builders to create identical binaries. By the way, I always deprecated INCLUDE (because it's much more evil than "-d"), linkers, and even "format PE". |
|||
![]() |
|
JohnFound 06 Jan 2015, 08:48
But how -D switch will affect FASMW (well and Fresh)?
Is it means that if there is a project that needs such definitions in the command line, it will not be possible to be compiled with FASMW? |
|||
![]() |
|
Tomasz Grysztar 06 Jan 2015, 10:24
JohnFound wrote: Is it means that if there is a project that needs such definitions in the command line, it will not be possible to be compiled with FASMW? |
|||
![]() |
|
JohnFound 06 Jan 2015, 10:45
Tomasz Grysztar wrote:
Yes, I understand that. But the fact is that now it is possible to have source that can't be compiled in FASMW without editing. (Of course with some editing, even MASM source can be compiled.) On the other hand, if I include these define statements at the beginning of the source file, they will always override these defined by -D command line option, making the later useless. Also, IMO, the loose definition of "source" is contradictory. Following it, we are coming to something that can be "source" for console FASM, but "not source" for GUI FASM versions. So, IMHO, -D option is very, very controversial feature. _________________ Tox ID: 48C0321ADDB2FE5F644BB5E3D58B0D58C35E5BCBC81D7CD333633FEDF1047914A534256478D9 |
|||
![]() |
|
revolution 06 Jan 2015, 10:54
JohnFound wrote: So, IMHO, -D option is very, very controversial feature. ![]() revolution wrote: It was [a] controversial feature ... |
|||
![]() |
|
revolution 06 Jan 2015, 10:57
More seriously, things like VS "solve" this with project definition files that contain all the extra things, like command line options, needed to get a successful build. Naturally these files tend to be unique to each IDE and not very portable. The common alternative to that is the makefile.
|
|||
![]() |
|
l_inc 06 Jan 2015, 14:25
JohnFound wrote: if I include these define statements at the beginning of the source file, they will always override these defined by -D command line option Btw. overriding is one more good thing to discuss with respect to its effect on the symbolic constant stacks. _________________ Faith is a superposition of knowledge and fallacy |
|||
![]() |
|
Tomasz Grysztar 06 Jan 2015, 15:48
JohnFound wrote: Also, IMO, the loose definition of "source" is contradictory. Following it, we are coming to something that can be "source" for console FASM, but "not source" for GUI FASM versions. |
|||
![]() |
|
JohnFound 06 Jan 2015, 17:58
IMO, whatever the definition of "source" is, it must be the same for all versions of FASM. But this is not the case with -D option.
Also, notice the point of l_inc about the symbolic constant stack. Generally speaking, I have a feeling that -D option introduces a big amount of chaos in the FASM behavior. Also, it has some architectural problems: The implementation of this option is not in the compiler itself, but in the interface code. This way, the OS dependent interface can influent the work of the compiler in a way that is not well specified and is different for the different implementations. (because the command line options are useful only for the CLI versions of FASM). For the GUI versions, equivalent feature will need handling of some project file format (as revolution said), containing these special constants definitions. And as a last (for now) argument: the Occam's razor and KISS principle: Everything that can be done with -D option can be done without it as well. So, -D option Considered Harmful ![]() |
|||
![]() |
|
l_inc 06 Jan 2015, 18:15
JohnFound
Quote: Also, notice the point of l_inc about the symbolic constant stack IMHO the "-d" option (if it's there) should work the same way as if there was a declaration of the corresponding constant at the very beginning of the source. I.e. the overriding is done in the normal way of adding the new value to the already existing stack instead of creating a new clean one. Otherwise the "-d" option introduces side effects otherwise not achievable (bad thing) instead of making the existing things simpler for some use cases. I didn't check the newest fasm version yet, but I'm quite sure, it's done the better way. Quote: Everything that can be done with -D option can be done without it as well Which is good. But a bare possibility of doing some things is normally not as good as simplicity of doing the same things. So maybe the "-d" option to the contrary allows to follow KISS/Occam by avoiding some additional aspects. Such as creating/modifying an additional file with options during automatic compilation process. P.S. However I'm completely against an architecture that allows to do a thousand slightly different things by providing a thousand separate ways for each of those similar things specifically. _________________ Faith is a superposition of knowledge and fallacy |
|||
![]() |
|
Tomasz Grysztar 06 Jan 2015, 19:09
JohnFound wrote: IMO, whatever the definition of "source" is, it must be the same for all versions of FASM. But this is not the case with -D option. l_inc wrote: IMHO the "-d" option (if it's there) should work the same way as if there was a declaration of the corresponding constant at the very beginning of the source. I.e. the overriding is done in the normal way of adding the new value to the already existing stack instead of creating a new clean one. |
|||
![]() |
|
Goto page Previous 1, 2 < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2023, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.