Possibly a breakthrough programming language?

  • 96 Replies
  • 3461 Views
*

Hopefully Something

  • Trusty Member
  • *********
  • Terminator
  • *
  • 880
  • no seriously where are these cookies
Re: Possibly a breakthrough programming language?
« Reply #30 on: February 02, 2020, 10:17:30 PM »
Pictures are so helpful but get zero respect. Would be nice to take this from a picture book or training wheel perspective, to a textbook diagram or power steering sort of thing.

*

LOCKSUIT

  • Emerged from nothing
  • Trusty Member
  • ******************
  • Hal 4000
  • *
  • 4108
  • First it wiggles, then it is rewarded.
    • Main Project Thread
Re: Possibly a breakthrough programming language?
« Reply #31 on: February 02, 2020, 10:27:04 PM »
Unless I can as--quickly realize the code_2_myBlocks "relation", I should stay with just blocks. I don't want to learn a new language. So unless it's somehow super easy to understand the code it generates, I'll be keeping my eyes on the blocks :)
Emergent

*

LOCKSUIT

  • Emerged from nothing
  • Trusty Member
  • ******************
  • Hal 4000
  • *
  • 4108
  • First it wiggles, then it is rewarded.
    • Main Project Thread
Re: Possibly a breakthrough programming language?
« Reply #32 on: February 03, 2020, 04:40:04 AM »
So ya the code it generates is readable, small, and I probably can learn Python faster using the blocks. But I'll try to stay with blocks.
Emergent

*

LOCKSUIT

  • Emerged from nothing
  • Trusty Member
  • ******************
  • Hal 4000
  • *
  • 4108
  • First it wiggles, then it is rewarded.
    • Main Project Thread
Re: Possibly a breakthrough programming language?
« Reply #33 on: February 03, 2020, 06:06:19 PM »
I'm happy I can use Blocky with no training as I made a few algorithms in it already. Versus a year to learn Python, that's a relief it's gone. I did 3 years ago read the manual for EV3 Lego Mindstorm's block idea and was easy enough to use it instantly as well, which is simple to grasp, so possibly my brain is simply easily recognizing the variables, loops, etc. So I recommend anyone to read EV3 manual if Blockly looks confusing. I do have 4 years of experience studying AGI, but I did stay away from programming 93% of the time. Though what I study/build is a Theory Of All, intelligence, physics, evolution, so that could certainly be helping me in any domain remotely related lol. It doesn't make me perfect though, I'm just human.
Emergent

*

ivan.moony

  • Trusty Member
  • ***********
  • Eve
  • *
  • 1411
    • e-teoria
Re: Possibly a breakthrough programming language?
« Reply #34 on: February 03, 2020, 07:29:13 PM »
There exist some rules interwoven within this world. As much as it is a blessing, so much it is a curse.

*

LOCKSUIT

  • Emerged from nothing
  • Trusty Member
  • ******************
  • Hal 4000
  • *
  • 4108
  • First it wiggles, then it is rewarded.
    • Main Project Thread
Re: Possibly a breakthrough programming language?
« Reply #35 on: February 04, 2020, 01:28:42 AM »
The only other as good PL I found I thinkkkkk is this one, tryyyying to see it but their vids are scarce and crappy. And it costs 500$ a year so why even bother right. Ok back to coding in Blockly. Blockly probably has all we need and looks prettier too.

PDF:
http://www.ni.com/pdf/manuals/321296b.pdf

https://www.youtube.com/watch?v=SPraUAM1KvQ
Emergent

*

LOCKSUIT

  • Emerged from nothing
  • Trusty Member
  • ******************
  • Hal 4000
  • *
  • 4108
  • First it wiggles, then it is rewarded.
    • Main Project Thread
Re: Possibly a breakthrough programming language?
« Reply #36 on: February 04, 2020, 01:40:11 AM »
oops, wrong PDF, this one has the many many blocks:
Emergent

*

LOCKSUIT

  • Emerged from nothing
  • Trusty Member
  • ******************
  • Hal 4000
  • *
  • 4108
  • First it wiggles, then it is rewarded.
    • Main Project Thread
Re: Possibly a breakthrough programming language?
« Reply #37 on: February 04, 2020, 09:25:12 PM »
I easily solved the remaining issues I came to. The open/write to desktop, the convert float to string to int. The bits to bytes or vice versa I didn't solve yet but should be easy.

solutions for the 2 above:

a = None
b = None
a = 0.0036474577
b = str(a)[2 : 6]
print(b)

with open('input.txt','r',encoding='utf-8') as f:
    text = f.read()

just change your variable in other places to open to ex. text if you have text = f.read() as in the above
Emergent

*

LOCKSUIT

  • Emerged from nothing
  • Trusty Member
  • ******************
  • Hal 4000
  • *
  • 4108
  • First it wiggles, then it is rewarded.
    • Main Project Thread
Re: Possibly a breakthrough programming language?
« Reply #38 on: February 04, 2020, 10:23:54 PM »
Lol the Google creator PMed me from the group for Blockly saying:


"Please stop sending emails to the list before you have investigated your issues.  You are spamming a lot of people with these updates.

If you keep sending messages at this frequency I will have to lock the thread.

Rachel"


After I said

"Another update: Perhaps another issue solved, easily again. What gives? So easy but maybe I'm messing up the system Blockly follows? I pasted Blockly's Python code it generated into PyCharm and I changed the line "a = b[2 : 6]" to "a = str(b)[2 : 6]" so that it converts float to string finally:

a = None
b = None
a = 0.0036474577
b = str(a)[2 : 6]
print(b)

it outputs as I desired: 0036

It'd seem to me that adding that str() wouldn't harm anything else in the code. I just don't understand why Blockly after 9 years of development didn't make a solution for this. Maybe the 5 languages all don't allow type conversion. But they could add a switch for that to unlock these few missing blocks."
Emergent

*

LOCKSUIT

  • Emerged from nothing
  • Trusty Member
  • ******************
  • Hal 4000
  • *
  • 4108
  • First it wiggles, then it is rewarded.
    • Main Project Thread
Re: Possibly a breakthrough programming language?
« Reply #39 on: February 04, 2020, 10:30:49 PM »
Their poor docs and browser based system is the cause of my questions. They're just money hungry.
« Last Edit: February 04, 2020, 11:09:34 PM by LOCKSUIT »
Emergent

*

LOCKSUIT

  • Emerged from nothing
  • Trusty Member
  • ******************
  • Hal 4000
  • *
  • 4108
  • First it wiggles, then it is rewarded.
    • Main Project Thread
Re: Possibly a breakthrough programming language?
« Reply #40 on: February 06, 2020, 04:26:10 AM »
So far I did a lot of looking around and Blockly is really really good and very simply/free. The only workarounds needed so far are:


read/writes files ---- i can use the code below, and to open your block code paste/save the XML code btw.
split by each char ---- only 3 times slower if use blocks i.e. 40 seconds for 100MB and can use the code above if want too.
string<>integer<>float conversion ---- use code below
bits to bytes ---- I can do manually or by other means.
-------------------------------------------------------------------------
with open('input.txt','r',encoding='utf-8') as f:
    text = f.read()
//just change your variable in other places to open to ex. text if you have text = f.read() as in the above

def split(text):
    return list(text)
print(split(text))

a = None
b = None
a = 0.0036474577
b = str(a)[2 : 6]
print(b)
Emergent

*

LOCKSUIT

  • Emerged from nothing
  • Trusty Member
  • ******************
  • Hal 4000
  • *
  • 4108
  • First it wiggles, then it is rewarded.
    • Main Project Thread
Re: Possibly a breakthrough programming language?
« Reply #41 on: February 07, 2020, 09:04:07 PM »
Ok I looked at most pages (just not the non critical ones) in https://www.learncpp.com/ and it seems Blockly has everything you need to code, easily. Assuming you follow the below (I added 2 lines at bottom). PLs also seem more simpler than I thought.



with open('input.txt','r',encoding='utf-8') as f:
    text = f.read()
//just change your variable in other places to open to ex. text if you have text = f.read() as in the above

def split(text):
    return list(text)
print(split(text))

a = None
b = None
a = 0.0036474577
b = str(a)[2 : 6]
print(b)

So:
read/writes files ---- i can use the code above, and to open your block code paste/save the XML code btw.
split by each char ---- only 3 times slower if use blocks i.e. 40 seconds for 100MB and can use the code above if want too.
string<>integer<>float conversion ---- use code above
bits to bytes ---- I can do manually or by other means.
+
lets make sure Blockly's Python doesn't pass (copy) a list when use it!.....use Call Function holding the array if can't
and apparently using a reference saves on memory i.e. don't assign a long array or variable to x or copy it, just do so to a pointer representing it
Emergent

*

LOCKSUIT

  • Emerged from nothing
  • Trusty Member
  • ******************
  • Hal 4000
  • *
  • 4108
  • First it wiggles, then it is rewarded.
    • Main Project Thread
Re: Possibly a breakthrough programming language?
« Reply #42 on: February 08, 2020, 07:35:45 AM »
almost done!!
https://blockly-demo.appspot.com/static/demos/code/index.html#mzd28f
And I didn't even refactor yet.
how u like my list-tree?
Emergent

*

LOCKSUIT

  • Emerged from nothing
  • Trusty Member
  • ******************
  • Hal 4000
  • *
  • 4108
  • First it wiggles, then it is rewarded.
    • Main Project Thread
Re: Possibly a breakthrough programming language?
« Reply #43 on: February 10, 2020, 07:54:36 PM »
Had to restart. My code wasn't readable. Is this tree below small enough code? It takes 3 mins on 10MB input at 17-letter tree branches but uses 13GB RAM.

edited link sorry
https://blockly-demo.appspot.com/static/demos/code/index.html#f6wbqn

code is below after removing useless code

tree = ['']
window_start = 1
window_end = 4
for count2 in range(25):
  window = 'abbacbccacbbbababcabccacabcbcb'[window_start - 1 : window_end]
  window_start = window_start + 1
  window_end = window_end + 1
  char_location = 1
  node = 1
  test = 1
  for count in range(4):
    char_in_window = window[char_location - 1]
    char_location = char_location + 1
    print(tree)
    if tree[node - 1].find(char_in_window) + 1 == 0:
      tree[node - 1] = str(tree[node - 1]) + str(char_in_window)
      if char_location != 5:
        if node == len(tree):
          tree.append([])
        tree[(node + 1 - 1)].append(len(tree) + 1)
        tree.append('')
      node = len(tree)
    else:
      if test == 4:
        goto = node + 0
      else:
        goto = node + 1
      node = tree[node - 1].find(char_in_window) + 1
      node = tree[goto - 1][node - 1]
      test = test + 1
Emergent

*

LOCKSUIT

  • Emerged from nothing
  • Trusty Member
  • ******************
  • Hal 4000
  • *
  • 4108
  • First it wiggles, then it is rewarded.
    • Main Project Thread
Re: Possibly a breakthrough programming language?
« Reply #44 on: February 10, 2020, 10:00:37 PM »
Emergent

 


Users Online

107 Guests, 2 Users
Users active in past 15 minutes:
LOCKSUIT, ivan.moony
[Trusty Member]

Most Online Today: 117. Most Online Ever: 340 (March 26, 2019, 09:47:57 PM)

Articles