Author Topic: High level languages are vexing  (Read 9796 times)

0 Members and 3 Guests are viewing this topic.

Offline Xeda112358

  • they/them
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: High level languages are vexing
« Reply #15 on: February 18, 2013, 09:55:25 pm »
I am not talking about complexity but about calculating in calculations. You will never be able to write this in basic:
Line(8,+1→A,,*2)
In Basic, you'll have to write:
9→A
Line(8,A,A,A*2)
Psh, in BASIC you just do:
Code: [Select]
9
Line(8,Ans,Ans,Ans+Ans

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: High level languages are vexing
« Reply #16 on: February 19, 2013, 01:07:55 am »
I am not talking about complexity but about calculating in calculations. You will never be able to write this in basic:
Line(8,+1→A,,*2)
In Basic, you'll have to write:
9→A
Line(8,A,A,A*2)
Psh, in BASIC you just do:
Code: [Select]
9
Line(8,Ans,Ans,Ans+Ans
True, but then, you didn't store 9 to A :P (even thhough that would only recquire one more line).
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

click here to know where you got your last +1s

Offline willrandship

  • Omnimagus of the Multi-Base.
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2953
  • Rating: +98/-13
  • Insert sugar to begin programming subroutine.
    • View Profile
Re: High level languages are vexing
« Reply #17 on: February 19, 2013, 06:05:03 am »
As far as Language levels are concerned:

*Axe is as low as you get without BEING assembly. It barely has function support.
*C is one of the lowest level languages you will see on the computer. Most compilers even allow inlined assembly.
*C++ is stupid for this list. It's C with Java attached, and it shows.
*TI-Basic is interpreted. Badly. It also doesn't have enough features for me to give it a decent "Level", as it has no Object oriented anything, no functions, nothing a programmer would WANT in a High Level Language. However, it also abstracts ridiculously from the assembly it takes to run it.

Not that I don't agree with you on your points. The best part: These problems are perfect examples of where that horrible quote "You can't beat the compiler" is completely false. The compiler will NOT optimize anything like this, for the same reason Hayleia pointed out: It can't read your mind. It doesn't know if you want that 9 in Ans or not, so it has to assume the safer answer. An optimization that's not guaranteed to work is a bug, and people don't like bugs.

One idea I had, actually, sort of regarding to that specific type of problem: A program that goes through compiled code and determines where it CAN go. It follows through all branch instructions, tracing every line of code it runs, keeping track of which stored values are read from, and reports the results. This would also be useful for reverse-engineering binaries to identify data structures.

Offline jwalker

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 660
  • Rating: +13/-0
  • Almost everything I have released includes a 'WZ'
    • View Profile
Re: High level languages are vexing
« Reply #18 on: February 19, 2013, 09:30:24 am »
C++ came before java, and you can do inline asm with it on most compilers.
<a href="http://www.nerdtests.com/ft_cg.php?im">
<img src="http://www.nerdtests.com/images/ft/cg.php?val=9612" alt="My computer geek score is greater than 41% of all people in the world! How do you compare? Click here to find out!"> </a>

Support Casio-Scene against the attacks of matt @ matpac.co.uk ! For more information: Casio-Scene shuts down & Matt actions threads

Offline harold

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 226
  • Rating: +41/-3
    • View Profile
Re: High level languages are vexing
« Reply #19 on: February 19, 2013, 09:43:18 am »
No offense, but I think some of you are not getting the point: the things I listed are harder to do in high level languages (not just less efficient), which is completely the opposite of the idea behind those languages - they're supposed to make things easier than if you were working in assembly.
You either need some hack like inline asm or compiler-specific intrinsics (that is still harder than it would have been, or at the very least not easier), or you can't even use either (C#? Java - to a point. at least it has some interesting stuff in the Integer class).
« Last Edit: February 19, 2013, 09:43:45 am by harold »
Blog about bitmath: bitmath.blogspot.nl
Check the haroldbot thread for the supported commands and syntax.
You can use haroldbot from this website.

Offline jwalker

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 660
  • Rating: +13/-0
  • Almost everything I have released includes a 'WZ'
    • View Profile
Re: High level languages are vexing
« Reply #20 on: February 19, 2013, 10:00:40 am »
Some things are harder, but the point is to make the language look closer to English, making it easier to learn. Once you learn ASM, it is easy to use, but it is much easier to learn C# or java initially. You have to sacrifice some of the low level things in order to simplify programming.
<a href="http://www.nerdtests.com/ft_cg.php?im">
<img src="http://www.nerdtests.com/images/ft/cg.php?val=9612" alt="My computer geek score is greater than 41% of all people in the world! How do you compare? Click here to find out!"> </a>

Support Casio-Scene against the attacks of matt @ matpac.co.uk ! For more information: Casio-Scene shuts down & Matt actions threads

Offline harold

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 226
  • Rating: +41/-3
    • View Profile
Re: High level languages are vexing
« Reply #21 on: February 19, 2013, 10:03:28 am »
I would agree, but all the problems I named are easily solvable by just providing the relevant functions in the standard library. That doesn't make the language any harder to learn.
Blog about bitmath: bitmath.blogspot.nl
Check the haroldbot thread for the supported commands and syntax.
You can use haroldbot from this website.

Offline chickendude

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 817
  • Rating: +90/-1
  • Pro-Riot Squad
    • View Profile
Re: High level languages are vexing
« Reply #22 on: February 19, 2013, 11:58:58 am »
I'm probably also not quite hitting what you're getting at, but i've tried many many times to get into high-level languages but i just can't. I get bored, lost, don't understand concepts, or just find that the code looks super ugly (pretty silly excuse, i know ;)). With a new assembly language (z80, m68k, SH3/4, ARM) i can usually spend a couple days rummaging through the manual and things just click together. I really enjoy learning what the processor can actually do. Maybe it just seems easier when i know exactly what's going on? I generally prefer to write my own code as i dunno why but i don't like using libraries. I hate feeling dependent on libraries, i'd rather just write the routine myself or pull it from a routine i've already written(/can modify if i want to be more efficient in my program). I guess high-level languages just seem much bigger and much more complicated/confusing to me... And besides, i think the way assembly addresses memory is generally much simpler (and C code seems to super abuse the stack). I love finding my way around an assembly program, even in assembly languages i've never used before like old SNES (65816) and (especially) NES (6502) code, but i hate trying to read C code :P Assembly just makes more sense to me...

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: High level languages are vexing
« Reply #23 on: February 19, 2013, 12:31:26 pm »
As far as Language levels are concerned:

*Axe is as low as you get without BEING assembly. It barely has function support.
*C is one of the lowest level languages you will see on the computer. Most compilers even allow inlined assembly.
*C++ is stupid for this list. It's C with Java attached, and it shows.
*TI-Basic is interpreted. Badly. It also doesn't have enough features for me to give it a decent "Level", as it has no Object oriented anything, no functions, nothing a programmer would WANT in a High Level Language. However, it also abstracts ridiculously from the assembly it takes to run it.
I agree with Axe and don't know the other languages :P
But that post is still interesting for me to know which language I am most likely to choose if I ever want to program for other things than calculators :)
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

click here to know where you got your last +1s

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: High level languages are vexing
« Reply #24 on: February 19, 2013, 02:39:10 pm »
I would agree, but all the problems I named are easily solvable by just providing the relevant functions in the standard library. That doesn't make the language any harder to learn.
I think jwalker's point is that assembly commands are just 2 characters long, followed with registers and/or digits and absolutely no english, making the language look like gibberish to anybody who's used to seeing languages like C, Java, TI-BASIC. Just this alone is enough to make the examples you specified harder to do in ASM for some people.

Also I think to debate languages everyone should put their ASM fanboyism/elitism stuff away (or any other language for that matter). Because someone loves a programming language or is experienced with it doesn't mean that language is flawless/superior in every way possible nor that it's factually easier/harder to use.
« Last Edit: February 19, 2013, 02:42:56 pm by DJ_O »

Offline harold

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 226
  • Rating: +41/-3
    • View Profile
Re: High level languages are vexing
« Reply #25 on: February 19, 2013, 04:46:26 pm »
Also I think to debate languages everyone should put their ASM fanboyism/elitism stuff away (or any other language for that matter). Because someone loves a programming language or is experienced with it doesn't mean that language is flawless/superior in every way possible nor that it's factually easier/harder to use.
Harsh :)

You know I never said that, right.

I like C#, I think it's a nice language with a clean syntax and I work with it much more than I work with assembly, it (and it's not alone in this) just has this problem that some things are made harder than they should be, even though it would have been trivial to fix many of the problems in a way that in no way compromises the language. And I gave specific examples of cases that are particularly vexing. No generalizations.
Blog about bitmath: bitmath.blogspot.nl
Check the haroldbot thread for the supported commands and syntax.
You can use haroldbot from this website.

Offline willrandship

  • Omnimagus of the Multi-Base.
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2953
  • Rating: +98/-13
  • Insert sugar to begin programming subroutine.
    • View Profile
Re: High level languages are vexing
« Reply #26 on: February 19, 2013, 05:53:08 pm »
I know that C++ came before Java :P I'm just trying to make an analogy.

Offline jwalker

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 660
  • Rating: +13/-0
  • Almost everything I have released includes a 'WZ'
    • View Profile
Re: High level languages are vexing
« Reply #27 on: February 19, 2013, 06:11:18 pm »
I would agree, but all the problems I named are easily solvable by just providing the relevant functions in the standard library. That doesn't make the language any harder to learn.
I think jwalker's point is that assembly commands are just 2 characters long, followed with registers and/or digits and absolutely no english, making the language look like gibberish to anybody who's used to seeing languages like C, Java, TI-BASIC. Just this alone is enough to make the examples you specified harder to do in ASM for some people.

Also I think to debate languages everyone should put their ASM fanboyism/elitism stuff away (or any other language for that matter). Because someone loves a programming language or is experienced with it doesn't mean that language is flawless/superior in every way possible nor that it's factually easier/harder to use.

Exactly what I am saying. Also I think some of the reasons that those things aren't in the languages is, they are great on a low level basis, but how much do you actually need them in a high level language?
<a href="http://www.nerdtests.com/ft_cg.php?im">
<img src="http://www.nerdtests.com/images/ft/cg.php?val=9612" alt="My computer geek score is greater than 41% of all people in the world! How do you compare? Click here to find out!"> </a>

Support Casio-Scene against the attacks of matt @ matpac.co.uk ! For more information: Casio-Scene shuts down & Matt actions threads

Offline lkj

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 485
  • Rating: +58/-1
    • View Profile
Re: High level languages are vexing
« Reply #28 on: February 19, 2013, 07:13:21 pm »
Also I think some of the reasons that those things aren't in the languages is, they are great on a low level basis, but how much do you actually need them in a high level language?
Exactly. I don't fully understand how you'd want high level languages improved. Full low-level access? Or implementations of everything you could do with those low-level things in the standard library? You'd still find missing things. Some languages are by concept just not well suited for solving some problems, and there's often a reason why.

Offline harold

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 226
  • Rating: +41/-3
    • View Profile
Re: High level languages are vexing
« Reply #29 on: February 19, 2013, 07:21:43 pm »
Exactly. I don't fully understand how you'd want high level languages improved. Full low-level access? Or implementations of everything you could do with those low-level things in the standard library? You'd still find missing things.
A bunch of the ones that are take the most effort to implement. Just because it won't be complete doesn't mean it can't be better.

You need that modular multiplication to implement Miller Rabin. Do you want to argue that C# is not well suited to testing whether a number is prime? It's not some scripting language.. you're supposed to be able to do real things with it.

But anyway none of this is really to the point. The point is, it's vexing.

Also, this is derailing completely.
« Last Edit: February 19, 2013, 07:22:17 pm by harold »
Blog about bitmath: bitmath.blogspot.nl
Check the haroldbot thread for the supported commands and syntax.
You can use haroldbot from this website.