Recent Posts

Pages: [1] 2 3 ... 10
1
General Discussion / Re: Upcoming changes to crypto support
« Last post by ron on Today at 07:26:55 »
17.04 is going to be released this week.  The list of changes is quite long and, I hope, useful to many users.

Please bear with me while I continue the development and testing.
2
Problems / Re: drop don't throw an exception when there is no items in TOS
« Last post by ron on April 25, 2017, 04:57:05 »
Fixed in 17.04
3
Problems / drop don't throw an exception when there is no items in TOS
« Last post by chengjianwen on April 24, 2017, 21:37:20 »
Code: [Select]
reset drop
no errors occured.
4
General Discussion / Re: Upcoming changes to crypto support
« Last post by djouniot on April 24, 2017, 19:48:49 »
Thank you Ron. Good thing
5
General Discussion / Re: Upcoming changes to crypto support
« Last post by ron on April 24, 2017, 17:33:32 »
Added 'SSSS' in two words: 'cr:shard' and 'cr:unshard'.  The secret is sharded into K pieces, any N of which may be used to restore the secret.  K is up to 256, N must be between 2 and K.
6
Sample code / Simple "Caesar cipher", anyone?
« Last post by ron on April 24, 2017, 05:50:17 »
From RosettaCode:
Code: [Select]
\ A "Caesar cipher" sample taken from RosettaCode:  http://rosettacode.org/wiki/Caesar_cipher#8th

\ Ensure the output char is in the correct range:
: modulate \ char base -- char
  tuck n:- 26 n:+ 26 n:mod n:+ ;

\ Symmetric Caesar cipher.  Input is text and number of characters to advance
\ (or retreat, if negative).  That value should be in the range 1..26
: caesar \ intext key -- outext
  >r
  (
    \ Ignore anything below '.' as punctuation:
    dup '. n:> if
      \ Do the conversion
      dup r@ n:+ swap
      \ Wrap appropriately
      'A 'Z between if 'A else 'a then modulate
    then
  ) s:map rdrop ;

"The five boxing wizards jump quickly!"
dup . cr
1  caesar dup . cr
-1 caesar . cr
bye

The output is:
The five boxing wizards jump quickly!
Uif gjwf cpyjoh xjabset kvnq rvjdlmz!
The five boxing wizards jump quickly!
7
Feature requests / Re: Add word q:poke
« Last post by ron on April 23, 2017, 14:26:03 »
Well.

There turned out to be a number of issues, and they're fixed for 17.04.  Thank you for reporting this!
8
Feature requests / Re: Add word q:poke
« Last post by ron on April 22, 2017, 18:21:55 »
OK, so that is a bug: please do make a bug report for it.

I think the cloned queue doesn't have the 'throw exception' flag from the original.
9
General Discussion / Re: what means s:utf-8?
« Last post by ron on April 22, 2017, 18:04:33 »
It will almost always be true.  But if you create a string from a buffer, for instance, or from iconv, then it may not be true.
10
Feature requests / Re: Add word q:poke
« Last post by sukoi on April 21, 2017, 19:06:53 »
better,  one thing ,
if  b is a clone queue of a wit 2 items
after 2 b  queue pop i receive null items
on  a queue an error empty queue
Code: [Select]
ok> null var, a
ok> null var, b
ok> 10 q:new a !
ok> a @ 10 q:push
ok> a @ 11 q:push . cr
2 items
ok> a @  clone  b !
ok> b @ .
2 items
ok> b @ q:pop . cr
10
ok> b @ q:pop . cr
11
ok> b @ q:pop . cr
null
ok> b @ q:pop . cr
null
ok> a  @ q:pop . cr
10
ok> a  @ q:pop . cr
11
ok> a  @ q:pop . cr
Exception: queue empty: at offset 11 in console: pop (G:;;; +000001a8)
0 items
ok>
Pages: [1] 2 3 ... 10