Our server costs ~$56 per month to run. Please consider donating or becoming a Patron to help keep the site running. Help us gain new members by following us on Twitter and liking our page on Facebook!
Current time: November 19, 2024, 12:24 am

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help me with my new website!
RE: Help me with my new website!
(February 11, 2018 at 8:40 am)Grandizer Wrote:
(February 3, 2018 at 9:27 pm)KevinM1 Wrote: There are various PHP template engines that do something similar.  Templates can inherit from one another, so you'll generally have a master layout template, and then templates for various things (blog side bar, interactive map, repeating items, etc.).  It's a lot like ASP.NET Web Form masterpages.

If you're interesting in taking a look, I use Twig because it comes as a part of Symfony (a lot like how Razer is the default for ASP.NET MVC): https://twig.symfony.com/

Are you a lecturer in a computer-related course, by any chance? You write like an academic uni professor when explaining this stuff.

Haha, no, I'm just a freelance developer who's spent far too much time on various forums and Stack Overflow.  I've also dabbled in a lot of stuff:

C
C++
C#
PHP
ASP.NET Web Forms
ASP.NET MVC
Ruby
Perl
JavaScript

While syntax changes between languages and platforms, there's a lot of connective tissue between languages.  Like, there's a clear lineage from Rails (a Ruby web framework) to ASP.NET MVC and Symfony (a PHP web framework), and likely Django (a Python web framework).  PHP is written in C, so its syntax is very similar.  It also has built-in Perl-like functions (especially regarding string manipulation).  And so on.

If there's one thing I want the OP to learn, it's that unless you're writing OS code, or something where speed is paramount (like, say, the code that handles SpaceX rocket internal sensors and/or control surfaces), there's multiple ways to solve any given problem, and that human-related concerns (readability, extensibility, etc.) need to be a part of the final calculus.  Because, as much as code is written for computers, it's also written for humans, even if that human is just you months/years down the line.
Reply
RE: Help me with my new website!
(February 11, 2018 at 7:18 am)LastPoet Wrote: I explained myself poorly. No way I would be using C or C++ to do webdesign. What I meant was that there could be a tool that in webdesign gave you the range of using templated stuff, but allowed a lot of customization to advanced webdesign. It is not my thing as you might figure, but in native programming both C/C++ are very versatile.

Ofc I wouldn't allow direct memory acess either. You should pardon my lousy ability to express myself

Hmmm.

It sounds like ASP.NET to me-- I have access to pretty much the entire .NET library-- all the math functions, file functions, string handling, and so on, and all of this can be utilized in pumping out web pages.

If you have access to the server's OS (i.e. if you are running the server, and especially if you have a GUI remote to it), there really are no limits to what you can do. I'm running an Azure Virtual Machine (i.e. an online device as opposed to a particular box with "Benjamin" written on a piece of white tape on the front), and I have complete access to the OS. I could definitely write code in C, have .NET helper apps running in the background monitoring files and folders and doing neat stuff. For example, if I were writing code to process large video files that people had uploaded, I might very well decide it was worth going to C++ for that lower-level access to the RAM.
Reply
RE: Help me with my new website!
And, not to continue to harp on it, but this is an example of automated unit testing.  The main section of my editor has my test class code (ProductTest), which grabs a test Product from my database, and then runs tests on it.  Each method of ProductTest is a single test.  The bottom pane is where the test results appear once I click the little play button at the top next to the 'Diva' label (the e-commerce site is for a local quilt shop named The Sewing Diva).

As I go, I'm going to run a myriad of these automated tests on my code.  This helps eliminate bugs/errors because it forces me to run a test for everything I want to do. It's a bit more tedious than just writing code and hoping it works right off, but it ensures my code is rock solid from the ground up. And, really, in the long run it does save time because errors are caught early, and are up front rather than buried in code.

[Image: xpuPMey.png]
Reply
RE: Help me with my new website!
So, guys, what do you think about this type of GUI design?
http://flatassembler.000webhostapp.com/compiler.html
It looks relatively good, it's relatively easy to make and it works even in Internet Explorer 6. It makes me think JavaScript was designed with such applications in mind. It would take an eternity to make something like that in C++ or even Objective-C (both the algorithm and the GUI).
Reply
RE: Help me with my new website!
I'm not sure the words "GUI design" apply.

I was interested in seeing floating point in assembly code, though. When I did assembly way back in the day, you had to do all the encoding for fractional values on your own.
Reply
RE: Help me with my new website!
I mean, I've added some fonts, colors and background colors.

As far as I know, most of the modern compilers, using the assemblers such as GAS or MASM, convert the floating-point expressions to hexadecimal representation of the IEEE 754 representations of those numbers. Assemblers such as TASM or FASM will do it for you. Other assemblers, such as NASM or MASM, also will, but not in all instructions (certainly not in "mov", and my algorithm relies on moving floating-point numbers to general purpose registers or to memory being trivial). Or did you have to write assembly for processors without floating-point instructions?
Reply
RE: Help me with my new website!
There are literally none of the things you mentioned.  I cannot see any fonts, colors or background colors.

Are you missing a .css file in your online site that you have on your dev environment maybe?

(May 5, 2018 at 12:09 am)FlatAssembler Wrote: I mean, I've added some fonts, colors and background colors.

As far as I know, most of the modern compilers, using the assemblers such as GAS or MASM, convert the floating-point expressions to hexadecimal representation of the IEEE 754 representations of those numbers. Assemblers such as TASM or FASM will do it for you. Other assemblers, such as NASM or MASM, also will, but not in all instructions (certainly not in "mov", and my algorithm relies on moving floating-point numbers to general purpose registers or to memory being trivial). Or did you have to write assembly for processors without floating-point instructions?

I can tell you the exact chip I learned on: 68B09E.  It was 8 bits, with no built-in floating-point functionality at all.  You had to learn about the floating-point format and do it all yourself.
[Image: 6809registers.png]

You could probably buy one of these for about $5 now and hook it up to an Arduino or something on a breadboard.
Reply
RE: Help me with my new website!
Quote:I cannot see any fonts, colors or background colors.
OK, so, you are saying my syntax highlighting algorithm, as well as the CSS rules embedded in the HTML file, don't work in the browser you are using? Which one? Because they work in Internet Explorer 6. To be honest, I haven't bothered to install Chrome and test them in it.
Quote:You had to learn about the floating-point format and do it all yourself.
Yeah, that's terrible. A few years ago, I tried to make a decimal number to IEEE 754 binary representation converter in i386-compatible assembly (which is a 32-bit CISC processor, but without floating-point instructions). The program basically worked by allocating an array of 256 bytes (each representing one bit in the binary number that can be represented with the 32-bit IEEE 754) every time it had to add or subtract two numbers (and multiplying and division was done by repeated addition or subtraction). That's probably the simplest way (and not efficient at all, it took so much time for it to convert a six-digit decimal number that I lost patience waiting) to do it in assembly, and yet it was 780 lines of code. 780 lines just to load a decimal number into the memory!
I often wonder how it was possible to do anything back in those days.
Reply
RE: Help me with my new website!
Oh, okay. The compiled assembly code is nicely color-formatted. For sure, I'm not seeing any other formatting than that though. As for multiplication, I believe it was all done in binary with bitwise << and >> operators or the assembly equivalent. That was a very long time ago, though.

At that time, I was just a kid, so I was mainly working on sprite graphics and simple games, and didn't have to do much math. I never actually DID the floating-point stuff-- at that time, the OS rom was actually copied to the RAM and you could hack it, so I just cheated and used the OS' built-in math functionality.
Reply
RE: Help me with my new website!
I guess you don't see the formatting because I wasn't using web safe fonts.

By the way, do you have an idea how to make popups in a relatively positioned container without using inline CSS and inline JavaScript? I have made them here, the code doesn't look nice, the popups aren't correctly positioned after you refresh the page in Firefox (I don't know why, they apparently are before you refresh the page), and they aren't correctly positioned at all in Internet Explorer 6 (I don't know why, it otherwise appears to support the directives I was using):
http://flatassembler.000webhostapp.com/I...esian.html
Code:
<span onmouseenter="this.children[1].style.display='block';this.children[1].style.top=this.getBoundingClientRect().top-45;" onmouseleave="this.children[1].style.display='none'">
                    <span>*romk</span>
                    <span style="display:none;position:absolute;background:black;color:#EEEEEE;width:120px;text-align:center;font-size:12px;font-family:Verdana;opacity:0.9;">Compare Lithuanian "ranka" (hand).</span>
                </span>
                (hand)-*lima (hand/five)<br/>
Reply



Possibly Related Threads...
Thread Author Replies Views Last Post
  Please give me link voting english website A-g-n-o-s-t-i-c 4 1730 December 24, 2013 at 2:29 am
Last Post: A-g-n-o-s-t-i-c
  Website shows bad automated translations: a hoot! Anymouse 3 2191 June 30, 2011 at 9:59 pm
Last Post: Anymouse
  Answers in Genesis website hijacks web history! Tiberius 31 11854 December 13, 2010 at 3:32 am
Last Post: Minimalist
  Porn Website Sued For Spying On Users Tiberius 15 8997 December 10, 2010 at 5:42 pm
Last Post: Violet



Users browsing this thread: 3 Guest(s)