Def [Con Red] in Q1. Let me clear a few things off my plate this next week, then we can hit your wiki notes and plan._:gitter.im _:gitter.im in a huge heading, in their doc stuff#_:gitter.im in a huge heading, in their doc stuff[insert select change remove]) but could also have advanced features to allow analysis. The user then has a control panel where they can grant access to data with a key feature being by tag. e.g. you grant Gitter access, which automatically tags all API calls from Gitter with gitter. And Gitter can only access data tagged as such. Mashup services can be granted broader access. My local social agent app can write and tag and remove anything, but if it tags something twitter because I checked a box to post there, Twitter still only has read access to that entry.xxx with your windows usermap! is not the best type for something like JSON, because it requires hash tables.. and as JSON file is usually transferred to map of maps, there is wasted quite a lot of memory and computation to build hashtable for each map.map! could internally use a block and not hashes for small maps with just few keys.LOADed it. It takes 4 seconds vs. 80.LOADing to a MAP I imagine the hash tables are recalculated.map!. But as I said... it's easy to use pure parse just to get info you need without ballast which is in this file.01:20 minutes is bad.>> save/as %bmarks.redbin b 'redbin *** Internal Error: internal limit reached: 20000 *** Where: encode *** Stack: save
map! is required as JSON have also block values. EXPERT SYSTEM (ES): Is your H2+ problem with (1) Hardware or (2) Software? USER (U): 1 ES: Is the hardware issue (1) No display (2) Power-related (3) Other U: 1 ES: Is the red LED on the H2+ solid (not flashing)? (1) Yes or (2) No U: 1 ES: Are the 2 blue LEDs next to the red LED solid (not flashing)? (1) Yes or (2) No U: 2 ES: The problem appears to be that the H2+ cannot read your boot media. Here are some steps to try...
;Server port-number: 55552 listen: open/direct/lines probe to-url rejoin ["tcp://:" port-number] connection: first listen wait connection x: 0 forever [ x: x + 1 insert connection zz: rejoin [x "-Server-"] if integer? x / 100 [probe zz] ]
;Client port-number: 55552 server-address: "localhost" connection: open/direct/lines probe to-url rejoin ["tcp://" server-address ":" port-number] insert connection "Hi" y: 0 forever [ wait connection y: y + 1 zz: first connection if integer? y / 100 [probe rejoin [y "-Client-" zz] ] ]
COPY) from the server after closing it, could be truncated. I don't understand how to discover, from the client side, that this event has happened. I have no error, it is a legitimate string with less characters than those I have sent.Red [] 2-2.5M JSON files. .75-.9s to load via the codec. .03-.06s to save as redbin, .0007-.025s to load redbin. split research; every language just copied what other langs had. But we *don't* just use someone else's, or think about having other use it. This is your task focus at play. We want to do our own thing, thinking our version will be better, but so very rarely think in terms of empathy for others or the goal of the greater good. Is it the biological competitive wiring that makes us "fight" in this way? Is that also why nobody like to do maintenance? Old bushes are picked clean and we want to move on to greener pastures.left-pad (I hope) taught the world some lessons, but someone had to be first in this global mess. I have many thoughts on this. Right now, though, I'll try to change one small thing in the world and see if I can save a few lemmings.111111 a 1.1.1.111 or 1.1.11.11 or 1.1.111.1 or ... one of many other variants?2 wks from today Lt G.S. Irwin #123-456-7899 rather than selecting from a calendar, drop down of ranks, name...does it want full first and middle or just initials?, and 3 fields that eventually tell you there are too many chars in one of them... parse-trace, that's a good place to start. A parse IDE will wrap that, allow step tracing, etc.generate-gui-panel creates code that has next-row list-id context and data is retrieved and bound to context something like set-list get-list query destination-gui-element. I don't know if such a structure has the API readiness you are talking about. query-data provider data-id/auth refinement for all of my functions that can be used remotely? Or it's is better an authorized version? Or...???user@email ######## does not have a deterministic solution? Since the user can alter the caret location by arrow keys or mouse, it turns a non-deterministic problem. That does no imply it can't be solved, but it needs a non-deterministic solution/language IMHO. Maybe it's what your programmer is telling you @BaronRK rate ... On-time to parse the field data and do the work while the user is typing. Easy but laborious.milgrd + reckoning = Mildred, but that's fun too.Milgrd gets more precise the more info you add to the coordinate. In practical use, a system could infer the major grid numbers, or pre-fill them from your location. So you give your friends just the next part, with as much precision as you want. The most precise is the cafe table you're sitting at. Social distancing makes this easy, so we should keep it. But maybe you're at a faire and you know you'll be wandering in a section of it. Now your local motion tracker can note [+1E -2N +4E ...]without talking to GPS (need elevation too), and your friend can see where you were, then the waypoints you meandered through, so they can dead reckon how to intercept you. Then people can annotate grid elements, like on a game map that uses A* path finding, and live data can be used to track traffic so you don't see just a red bang! noting a road is slow, but how it narrows to 2 lanes, and each lane is red/green/yellow. Then you crash because you were looking at your phone.statd to graphite, but want to aggregate N values or wait T (time) before pushing. That number becomes a decal, a time refinement becomes a clock decal, etc.Yes 3 times, without reading the first prompt to make sure they were deleting the right thing.func and function, but in the context of a page. When authoring a page, the author decides whether any defined words are part of the local (to the page) or global (to the browser) context. That way, a single author can have multiple pages interact with each other without jumping through hoops. Also, multiple authors can work with other pages to pull in state.secure dialect that works in conjunction with capabilities (in the E lang sense, much like phone apps work). So your "page" can't poke its nose out into the browser context and sniff around *unless* you specifically give it rights to. It can't access the net unless you say it's OK. It can't access your file system outside its own area, get your contact info, or use all the CPU or memory.units [
;Recipe
Americana-for-two: entity [flour-00: 625g water: 375g salt: 15g yeast: 0.67g sugar: 10g oil: 50g]
prices: entity [flour-00: 20.0EUR/kg salt: 5.53EUR/kg yeast: 2.8EUR/kg sugar: 0.56EUR/kg oil: 1.29EUR/kg water: 0.002EUR/kg]
Americana-for-200: 100 * Americana-for-two
price: Americana-for-200 * prices
]>> units [probe form-entity price]
make object! [
flour-00: "EUR$1250.00"
water: "EUR$0.08"
salt: "EUR$8.30"
yeast: "EUR$0.19"
sugar: "EUR$0.56"
oil: "EUR$6.45"
]units [form-unit total-dim price 'currency] ;== "EUR$1265.57"
node!, I think this could be an important foundational element. The key question is whether to do it at the user level, as you have, with system/lexer/preload or if a unit!/quantity! type makes sense as a lexical form. It's fantastic work that will let us play and think about it @toomasv.make/copy and how to unify merge/combine/join/extend/append/overlay functionality in a consistent and predictable way.##"..." for base64, ''...'' for long/multiline strings, @false etc. I'm also missing a specification for making comments inside the _data/code_. Better to wait for making any comments. As was already mentioned in the main Red chat room.. it may be years before something else bubble up from it.{"element": "something"} with double quotes around the key?{element: "something"} and also the parser would be not so complicated.transcode values, etc.make raises other questions and imposes limitations. We have both maps and objects, which have different behaviors and use cases, but there is also a lot of overlap. The design choice is where you want to make compromises and shift effort.--cli compiles only CLI console exe, not any other programcall/show "notepad"), will child window be visible?view [..] will show up?call wasn't buggy through and through .. :(/show I don't see a console (W10).Red [needs: view]
unless empty? cmd: system/script/args [
vbs: rejoin [
{Set objShell = CreateObject("WScript.Shell")
cmd = "} cmd {"
objShell.Run cmd, 0, false}
]
path: to-red-file as file! any [get-env 'TEMP get-env 'TMP "."]
write file: clean-path rejoin [path %/$launch$.vbs] vbs
call rejoin [{start "" "} to-local-file file {"}]
]call.-t Windows%PATH%ftype rebol3=C:\OS-WINDOWS\PROGRAMMEREN\REBOL3\PROGRAMMA\r3-32-view.exe "%1" %* assoc .r3=rebol3
filetypes.Red.conf but haven't updated. highlighting and themes in geany is too complicated for sure! https://gist.github.com/ne1unolauncher cmd /c notepad test.txt works thoughsystem/script/argslauncher then yes%TEMP%\$launch$.vbs that can exist on your PC?--gui, it could popup an ask for options window% is a good sigil. If it's code, maybe parens. If templates, curly braces or raw-string form.NEW_DEVELOPER: MAKE RED-DEVELOPER! [ skills: [RED Red-System] level: 'expert wage: 'just-a-smile-every-now-and-then ]
not hereparse is so limited, things like not, if and tons of other useful stuff isn’t there and needs to be emulated with some arcane constructs. Wow!load/as %in.ason 'ason soon™ <3 <3people.seniors is indeed safe, has to be external value, as it is not present in the snippet.load %in.ason, but I don't believe there will be any public altscript version anytime _soon_. IO branch of Red. If you want to try it, just let me know, I can help with a setup.Rest.r script."*hello*" to [em "hello"]. The other function parses these blocks to HTML, [em "hello"] to hello. I guess you now see what the stack is needed for :-)block-dialect will call markdown which would call block-dialect again and that’s the problem.context [ data: [] f: function [x /reuse] [ unless reuse [ return make self [ data: copy [] return f/reuse x ] ] ..init.. ..parse.. call f/reuse when needed ... ..return.. ] ]
/reuse it just returns copy of the context and then I would need to call it again, right?do %mm.red would run both needed functions.markdown "*test*" would turn markdown text into a Red dialect which is in turn translated with lest function into html[em "test"] (there’s outside <p> but let’s ignore it for now)lest ["*test*"] having same output as markdown "*test*" (lest calls markdown which calls lest)git clone it anymoreCloning into 'problem'... fatal: unable to update url base from redirection: asked for: https://gitlab.com/rebolek/castr/-/tree/problem/info/refs?service=git-upload-pack redirect: https://gitlab.com/rebolek/castr/-/tree/problem
/-/tree suffixproblem branch, not in the main onegit pull origin problem>> lest ["*test*"] == "emtest"
"<em>test</em>"
output: clear ""
output': output ;) save the initial index (should be /local) output: tail output <code here> output: output' ;) restoration
markdown parser returns block rules for lest, there’s no need to run lest again, I just insert the result into the input and parse it again. Problem solved.repeat n 100 [print n wait 0.2]
forever [print 1]
5 Kilo Domates
"kaç lira?" { yaz }
5 kilo domates "10₺" olsun...
5 kilo domates kaç lira?
kapat5 Kg Tomatoes
"how many dollars?" {print}
5 kg tomatoes is "10$"
5 kg tomatoes is how many dollars?
quit{}, <> is written in Red., olsun is written in Cozcoz> repeat n 100 [print n wait 0.2] >
repeat n 25 [prin n loop 3 [prin #"^H"] wait 0.3]>> n: 1000 == 1000 >> repeat i n [prin i case [x: log-10 n [loop x + 1 [prin #"^H"] wait 0.05]]]
.0. :^)n: 10 / 3 ... loop n [...]Math error: near SQUARE-ROOT (a / b)
Math error: cannot divide 45.973464664 by 0
./rebol: error while loading shared libraries: libXaw.so.7: cannot open shared object file: No such file or directory./rebol: error while loading shared libraries: libXaw.so.7: wrong ELF class: ELFCLASS64ldd rebol results in:... libXt.so.6 => /usr/lib32/libXt.so.6 (0xf7d90000) libXaw.so.7 => not found libXmu.so.6 => /usr/lib32/libXmu.so.6 (0xf7d73000) ...
$ file libXaw7.so.7.0.0 libXaw7.so.7.0.0: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=1a03385e9d6ba6b2996e58b7feacfc5c0c2de5d3, with debug_info, not stripped
pacman -Ss lib32 doesn't show anything even close to "libxaw" in the list of available libraries, unfortunately.pacman -Qs will just show the file that's not correct make and make install that I've forgotten how to doyay and then I believe it needed another library but I can’t remeber the name. But Red was complaining it’s missing, so it wasn’t hard to locate it. After installing both libraries Red was working fine. I may try in VM and let you know. But it wasn’t hard.user and host) and return an email address from them, or all funcs that take a block! and a function! as args to find HOFs. If the results are part of a package system, people can rate them, comment, etc. It's similar in ways, such as being able to use keywords that match in doc strings or func names.//var fucking_note;
bnf={...SDCV keys lose their lettering (same keys, 3 different keyboards, which I can only attribute to a heavy left hand for S and D, and extra use for C and V (copy/paste)), 2) the space bar became harder to push on one. It was a pain to try and fix and ultimately had to be scrapped. I keep buying them since their shape is what helped my hands most. That's the top priority for me. 10 keyboards is better than hand surgery.[up forward left right down]. It was really cool.draw?tradewinds @greggirwin base faces, or using images and hit testing as I believe @planetsizecpu does. It will be a great learning experience in any case.overlap? word, easy in theory, but things go complex as the game grow.VID, but i even don't know how to control a mouse click or keyboard.on-click or on-over etc.
view/options YourLayout [actors: context [on-key: func [face event][YourKeyFunction face event/key]]]YourKeyFunction: function [face key][
switch key [
left [LeftFunc args...]
right [RightFunc args...]
]
]
VID? I didn't see any example for this.draw, sorryRed program (haha)>> help swap
USAGE:
SWAP series1 series2
DESCRIPTION:
Swaps elements between two series or the same series.
SWAP is an action! value.
ARGUMENTS:
series1 [series! port!]
series2 [series! port!]
RETURNS:
[series! port!]what occasionally to see if there are new ones.also alter as decode-url ellipsize-at exists-thru? extract flip-exe-flag help-string immediate? read-thru scan swap transcode
swap first elements on current indices, not just head elements.>> a: [2 + 2 = 4] b: [x * y = z] swap next a next b probe a b [2 * 2 = 4] == [x + y = z]
move. But let's alter the scenario -- e.g. you mark one element and then swap places with another element selected on screen... or something like that.cast to mold one type into another.url! values don't just have accessors. It's because URLs are not fully parse according to their RFC. For efficiency's sake, they are only lexed enough to classify them by the characters they can contain.help today, but I think it's more generally useful than that.*-thru funcs came from the Rebol idea of a basic, user-controlled cache. It existed mainly for use with the Rebol desktop, which is another tool we don't have yet. thru needs some thinking, because Rebol only had one, and Red uses system/options for it today. That means it's shared "per system" (not per OS setup), so different sets of Red apps can each have their own cache. That's great, but also means a module and package system will be duplicated, and that's where caching could be the most useful.index to be a name rather than an offset. This also ties somewhat to reflection, which is always a [fun discussion](https://github.com/red/REP/issues/68)./fast isn't used.swap and move, I have old shift and rotate funcs, which operate on series, which were very handy in some cases. For rotate you can do it now with move to be more efficient than take+insert . e.g.rotate: function [ "Rotate values in a series." series [series!] /left "Rotate left (default)" /right "Rotate right" /part count [number!] "Rotate this many positions" ][ if empty? series [return series] ; modulo the count against the series size count: any [all [count count // length? series] 1] ;if zero? count [return series] ; MOVE handles a zero /part correctly head either right [ move/part (skip tail series negate count) series count ][ move/part series tail series count ] ]
shift, but now that Red has a native one for bitsets, it will be more work to do in R/S.unless to your list as well. When we start collecting more than reference docs and basic examples (as red-by-example does, falling under ref's IMO), we'll have a lot of rich language discussions.alteruser and lover, it is a useful and time saving func, any improvement will be welcome, same on sort. I think these funcs make Red more friendly & human oriented.alter, and has its design caused you problems or bugs?alter GameData/CaveFace/pane (GameData/PlayerFace/extra/getobject)
alter use /same for object args, which makes sense. The downside being that there's no good way to work around that. Otherwise we need to add /same to alter. alter also doesn't have /only:>> b: [1 2 3 4] == [1 2 3 4] >> alter b [2 3] b == [1 3 4] >> alter b [2 3] b == [1 3 4 2 3]
alter2: function [series check][
either found: find series check [
either series? check [
remove/part found length? check
][remove found]
][append series check]
not to-logic found
]/same support (and keeping the name the name, rather than calling it toggle.Red :info: function [text [string!]] [
return rejoin [{<p>(} text {)</p>}]
]a-an is also a peculiar one to provide as an out-of-the-box functionhelp currently. There's a comment in the code about that.PROBE , which you aspect to be printed but it does not print and you ask to yourself that you could have encountered an interpreter bug!context could have saved you?LOAD on the top of a script, but I have forgotten that just after I had a local copy of the same function, setting the same word. So you change the external one but you have no results.publish: func [][ be funk?properties used? It looks like a schema of [bit-offset name type] but I don't know how the keys are used. Seems like they have to all match because of dupe keys.Htmx extends and generalizes the core idea of HTML as a hypertext, opening up many more possibilities directly within the language: - Now any element, not just anchors and forms, can issue an HTTP request - Now any event, not just clicks or form submissions, can trigger requests - Now any HTTP verb, not just GET and POST, can be used - Now any element, not just the entire window, can be the target for update by the request
call. I think, while not being ideal, it still could kind of work. Because, and in my opinion - the exchange interface is not going to be a bottleneck. Most of the heavy lifting is going to be done on SQL server side anyway.needs 'dbconn . db: DB_conn/mysql ["orders" "passwd" 3306] if none? db [alert "DB Error" quit] . result_set: [] append result_set db/select [cus_name, cus_last_name from "customers" where cus_last_name like "Smith"] either empty? result_set [ print "No records" ][ print result_set ]
;- prepare resusable sql statement for getting list of customers... customers-with-last-name!: prepare db "SELECT cus_name, cus_last_name FROM customers WHERE cus_last_name LIKE ?" ;-- use it in custom function... all-customers-with-last-name: func[name [string!]][ ; step collects all rows if not specified limit step/with db customers-with-last-name! reduce [name] ; I should probably allow single value and not require `reduce` above ] ; list all customers with the last name Smith probe all-customers-with-last-name "Smith" ; or who has last name starting with S probe all-customers-with-last-name "S%"
procedures in PostgreSQL -> https://www.postgresql.org/docs/11/sql-createprocedure.htmlall-customers-with-last-namemysql-protocol down in 2012, when working as programmer on big mart company, and they worked very well IIRC, but sadly I did'n preserve any doc about it. The company bankrupted in 2014 and the buildings where sold with all the remaining equipment inside, the main branch building where shot down and now it is a Kia car distribuitor big building on place. 😬find/reverse/last. Now I don't see it anywhere ? system/tools
SYSTEM/TOOLS is an object! with the following words and values:
fun-stk block! length: 0 []
expr-stk block! length: 0 []
watching block! length: 0 []
profiling block! length: 0 []
indent integer! 0
hist-length none! none
options object! [debug trace profile]
calc-max function! [used [integer!] return: [integer!]]
show-context function! [ctx [function! object!] /local w out]
show-parents function! [event [word!] /local list w pos]
show-stack function! [/local indent frame]
show-watching function! [/local w out]
do-command function! [event [word!] /local cmd mode? list w]
debugger function! [event [word!] code [block! paren! none!] offset [integer!] value [any-type!] ref [any-type!] frame [pair!] /local out pos ...
dumper function! [event [word!] code [block! paren! none!] offset [integer!] value [any-type!] ref [any-type!] frame [pair!]]
tracer function! [event [word!] code [block! paren! none!] offset [integer!] value [any-type!] ref [any-type!] frame [pair!] /local out]
profiler function! [event [word!] code [block! paren! none!] offset [integer!] value [any-type!] ref [any-type!] frame [pair!] /local anon tim...
do-handler function! [code [any-type!] handler [function!]]>> about Red 0.6.4 for Windows built 8-Dec-2021/9:00:14+01:00 commit #07516c4 >> >> ? cave *** Internal Error: not enough memory *** Where: mold *** Stack: ? help-string form-value
cave is a large face object with a lot of other faces at his pane so I may consider normal not been able to display data.help/probe issue, but stashed it when more chat took place and I wasn't sure it would be acceptable. gcd: routine [
a [integer!]
b [integer!]
return: [integer!]
/local t [integer!]
][
while [b <> 0][
t: b
b: a % b
a: t
]
a
]vulnerabilities (0).<Bad to the Bone guitar riff begins> In the day of stores mortared The geeks went for a hike 'long came a profess-or I wasn't sure that I liked It was clear he's from Cambridge From his twaddle and pomp When I said it I meant it As we took our last clomp Glad to be gone Glad to be gone G-G-G-G-G-Glad G-G-G-G-G-Glad G-G-G-G-G-Glad Glad to be gone
parse, using a charset. Or maybe @ne1uno is on track and I don't understand the problem. Do you only need to mod A-Z, or produce results that contain *only* A-Z?The key is an integer from 1 to 25. This cipher rotates (either towards left or right) the letters of the alphabet (A to Z). The encoding replaces each letter with the 1st to 25th next letter in the alphabet (wrapping Z to A). So key 2 encrypts "HI" to "JK", but key 20 encrypts "HI" to "BC".
key: modulo absolute key 26 + key - 26 if key > 26 decipherrot: func [
char [char!]
key [number!]
ofs [char!]
][
to-char key + char - ofs // 26 + ofs
]
caesar: function [
src [string!]
key [integer!]
][
lower: charset [#"a" - #"z"]
upper: charset [#"A" - #"Z"]
parse src [
any [
change s: [lower (o: #"a") | upper (o: #"A")] (rot s/1 key o)
| skip
]
]
src
]
encrypt: :caesar
decrypt: func spec-of :caesar [caesar src negate key]
print encrypt "Ceasar Cipher" 4
print decrypt "Giewev Gmtliv" 4s: "abcdefghijklmnopqrstuvwxyz"
encipher: func [txt [string!] key [integer!] /local temp][
temp: copy ""
foreach i trim/all txt [append temp s/((index? find s i) + key % 26)]
]caesar: function [s k] [ a: charset [#"a" - #"z" #"A" - #"Z"] forall s [if find a s/1 [s/1: (x: s/1 % 32) + 25 + k % 26 + 1 + (s/1 - x)]] s ]
>> caesar "Abc Zyx" 25 == "Zab Yxw" >> caesar caesar "Abc Zyx" 25 -25 ;) round trips == "Abc Zyx"
buggy-caesar: function [s k] [ a: charset [#"a" - #"z" #"A" - #"Z"] forall s [if find a s/1 [s/1: (x: s/1 % 32) + k + 25 % 26 + 1 + (s/1 - x)]] s ]
buggy-caesar "x" -25 scenario:>> buggy-caesar "x" -25 *** Math Error: math or number overflow *** Where: + *** Stack: buggy-caesar
>> trace/deep/all [buggy-caesar "x" -25]
a: charset [#"a" - #"z" #"... => make bitset! #{00000000000000007...
a => make bitset! #{00000000000000007...
s => "x"
find a s/1 => true
s => "x"
x: % s/1 32 => #"^X"
k => -25
+ (x: s/1 % 32) k => make error! [code: 401 type: 'm...]
*** Math Error: math or number overflow
*** Where: +
*** Stack: buggy-caesar(x: s/1 % 32) is #"^"X:>> to 1 #"^X" == 24
k = -25 to it, which overflows it before we reach + 25 part. So what if I put + 25 before + k?>> trace/deep/all [caesar "x" -25]
a: charset [#"a" - #"z" #"... => make bitset! #{00000000000000007...
a => make bitset! #{00000000000000007...
s => "x"
find a s/1 => true
s => "x"
x: % s/1 32 => #"^X"
+ (x: s/1 % 32) 25 => #"1"
k => -25
+ #"1" k => #"^X"
% #"^X" 26 => #"^X"
+ #"^X" 1 => #"^Y"
s => "x"
x => #"^X"
- s/1 x => #"`"
+ #"^Y" (s/1 - x) => #"y"
s => "x"
if true [s/1: (x: s/1 % ... => #"y"
forall [if find a s/1 [s/1... => #"y"
s => "y"
caesar "x" -25 => "y"