Author here, but one piece I didn't dive into is CEF vs CDP. Things like Browserbase use Chrome Devtools Protocol, which is useful for manipulating the browser for some use cases, but it's also detectable in a variety of ways. Wick Pro uses Chrome Embedded Framework with tie-ins at the C++ layer. So it is actual Chrome, not a detectable protocol manipulating Chrome. Some details at https://getwick.dev/blog/cef-vs-cdp, but I'm curious if other folks have experience in this area or thoughts in general.
Wick is also local-first. So it's designed for local agents crawling successfully vs larger scale crawls simply because we haven't built out the infra.
Python programmers! Complete the interpreter for me!
THIS IS WHAT THE SOURCE CODE LOOKS LIKE: --------------------------------------------------------------------- "ladder - interpreted programming language" "this is a set (S) {1, 2, 3, 4, 5} "" "this is an amount (A) of the set (S) with an interval (I) [0;5) Ai S[i] "" "this is the product (P) of the sum of the "elements of the set (S) and an amount (A) of the set (S) "with an interval (I) I Pi S[i] + A ------------------------------------------------------------ HERE IS A PIECE OF THE INTERPRETER: ------------------------------------------------------------ import sys
SET = []; INTERVAL = []; SUMMA = 0; PRODUCT = 1;
def set_(line): global SET SET = list(map(int, line[1:-1].split(', '))) print(SET)
def interval_(line): global INTERVAL, SUMMA, PRODUCT interval, iterator, expression = line.split(' ') match interval[0]: case '(': l = int(interval[1])+1 case '[': l = int(interval[1]) match interval[-1]: case ')': r = int(interval[-2]) case ']': r = int(interval[-2])+1 INTERVAL = list(range(l, r)) if iterator: match iterator[0]: case 'A': for i in INTERVAL: SUMMA += SET[i] print(SUMMA) case 'P': for i in INTERVAL: PRODUCT = SET[i] print(PRODUCT)
def comment_(line): if line != '""': print(line) if line[-1] == '"': print()
def parse(line): match line[0]: case '"': comment_(line) case '{': set_(line) case '(' | '[': interval_(line) case 'I': print(sum([s*s for s in [e+sum(SET) for e in SET]])) # :-( case _: print(f'ERROR {line}')
def scan(f): for line in f: line = line.strip() if line: parse(line)
if __name__ == '__main__': f = open(sys.argv[1]); scan(f) f.close() ---------------------------------------------------- RESULT -------------------------------------------------- python ladder.py program.l "ladder - interpreted programming language" "this is a set (S) 1 2 3 4 5 "this is an amount (A) of the set (S) with an interval (I) 15 "this is the product (P) of the sum of the "elements of the set (S) and an amount (A) of the set (S) "with an interval (I) 1630
Author here, but one piece I didn't dive into is CEF vs CDP. Things like Browserbase use Chrome Devtools Protocol, which is useful for manipulating the browser for some use cases, but it's also detectable in a variety of ways. Wick Pro uses Chrome Embedded Framework with tie-ins at the C++ layer. So it is actual Chrome, not a detectable protocol manipulating Chrome. Some details at https://getwick.dev/blog/cef-vs-cdp, but I'm curious if other folks have experience in this area or thoughts in general.
Wick is also local-first. So it's designed for local agents crawling successfully vs larger scale crawls simply because we haven't built out the infra.
Python programmers! Complete the interpreter for me! THIS IS WHAT THE SOURCE CODE LOOKS LIKE: --------------------------------------------------------------------- "ladder - interpreted programming language" "this is a set (S) {1, 2, 3, 4, 5} "" "this is an amount (A) of the set (S) with an interval (I) [0;5) Ai S[i] "" "this is the product (P) of the sum of the "elements of the set (S) and an amount (A) of the set (S) "with an interval (I) I Pi S[i] + A ------------------------------------------------------------ HERE IS A PIECE OF THE INTERPRETER: ------------------------------------------------------------ import sys
SET = []; INTERVAL = []; SUMMA = 0; PRODUCT = 1;
def set_(line): global SET SET = list(map(int, line[1:-1].split(', '))) print(SET)
def interval_(line): global INTERVAL, SUMMA, PRODUCT interval, iterator, expression = line.split(' ') match interval[0]: case '(': l = int(interval[1])+1 case '[': l = int(interval[1]) match interval[-1]: case ')': r = int(interval[-2]) case ']': r = int(interval[-2])+1 INTERVAL = list(range(l, r)) if iterator: match iterator[0]: case 'A': for i in INTERVAL: SUMMA += SET[i] print(SUMMA) case 'P': for i in INTERVAL: PRODUCT = SET[i] print(PRODUCT)
def comment_(line): if line != '""': print(line) if line[-1] == '"': print()
def parse(line): match line[0]: case '"': comment_(line) case '{': set_(line) case '(' | '[': interval_(line) case 'I': print(sum([s*s for s in [e+sum(SET) for e in SET]])) # :-( case _: print(f'ERROR {line}')
def scan(f): for line in f: line = line.strip() if line: parse(line)
if __name__ == '__main__': f = open(sys.argv[1]); scan(f) f.close() ---------------------------------------------------- RESULT -------------------------------------------------- python ladder.py program.l "ladder - interpreted programming language" "this is a set (S) 1 2 3 4 5 "this is an amount (A) of the set (S) with an interval (I) 15 "this is the product (P) of the sum of the "elements of the set (S) and an amount (A) of the set (S) "with an interval (I) 1630