Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 11:23

    dockimbel on fast-lexer-date

    FEAT: exploratory work on rewri… (compare)

  • Nov 13 19:36

    dockimbel on fast-lexer

    FIX: do not eat the LF ending c… (compare)

  • Nov 13 19:32

    dockimbel on fast-lexer

    FIX: loading a time! value from… (compare)

  • Nov 13 19:24

    dockimbel on fast-lexer

    FEAT: removes scan-time depende… (compare)

  • Nov 13 19:05

    dockimbel on fast-lexer

    TESTS: remove exponents in time… (compare)

  • Nov 13 19:03

    dockimbel on fast-lexer

    FEAT: more accurate handling of… (compare)

  • Nov 13 18:43

    dockimbel on fast-lexer

    FEAT: rewrites scan-time to fix… (compare)

  • Nov 13 00:06

    dockimbel on fast-lexer

    FIX: negative time! values hand… (compare)

  • Nov 12 20:25

    dockimbel on fast-lexer

    FEAT: minor code improvement. (compare)

  • Nov 12 20:17

    dockimbel on fast-lexer

    TESTS: invalid syntax in checks… (compare)

  • Nov 12 20:14

    dockimbel on fast-lexer

    FIX: allows C_EQUAL class in ur… (compare)

  • Nov 12 20:04

    dockimbel on fast-lexer

    FIX: extra characters not shown… FIX: more compliant escaped cha… FIX: some compliant email! form… (compare)

  • Nov 12 19:05

    dockimbel on fast-lexer

    FIX: various fixes for scanning… (compare)

  • Nov 12 18:42

    dockimbel on fast-lexer

    FIX: non-accurate decoding of e… (compare)

  • Nov 12 09:07

    qtxie on GTK

    FIX: no need to grap focus twic… FIX: refactor change-para FIX: better group radio and 3 more (compare)

  • Nov 12 09:07
    qtxie closed #4130
  • Nov 12 08:21
    bitbegin opened #4130
  • Nov 11 19:12
    hiiamboris commented #4078
  • Nov 11 18:53
    greggirwin commented #4078
  • Nov 11 18:38

    dockimbel on fast-lexer

    FIX: accepts / and + in binary!… FIX: invalid Red values in file… (compare)

hiiamboris
@hiiamboris

Oh, almost forgot.
(4) Equality.
I propose:
same? a b is true when a and b are of the same buffer and same index (as currently is)
strict-equal? a b is true when for every i >= 1: true = strict-equal? pick a i pick b i (thus past-the-end series are treated as at-an-end)
equal? a b is true when for every i >= 1: true = equal? copy/part at a i 1 copy/part at b i 1 (thus past-the-end series are treated as at-an-end again) (tip: copy/part trick is for strings where false = equal? #"A" #"a" yet true = equal? "A" "a")

Like, consider remove/part head b: tail a: "1234" 4:
no = same? a b
yes = strict-equal? a b
yes = equal? a b
Even though a and b are of different index and both have an empty buffer

Luis
@luis-rj
L
Ron Hochsprung
@RonHochsprung
When is the support for 64-bit MacOS (Catalina) likely to be available?
Nenad Rakocevic
@dockimbel
@RonHochsprung Hi Ron, it will take a few more months to get there, we aim at Q1 of next year, though we still have many other tasks to complete before opening the 64-bit branch. We will likely first provide a cross-compiler allowing to produce 64-bit executables from a 32-bit platform so that the Red console can be available asap on 64-bit.
Alvydas Vitkauskas
@avitkauskas
Oh, that would be a nice first step!
Petr Krenzelok
@pekr
Sounds good!
hiiamboris
@hiiamboris

☻ More funny things in the current build, regarding :point_up: October 16, 2019 12:30 AM, that clause (1) may elegantly solve:

>> remove/part head a: skip "12345678" 6 4
== "5678"
>> index? a
== 7
>> index? tail a
== 5
>> index? back a
== 6
>> index? back back a    ;) decreases
== 5
>> index? next a
== 7
>> index? next next a    ;) does not increase
== 7
>> index? skip a -1    ;) <> back a
== 5
>> index? skip a -2
== 5
>> index? skip a -3
== 4
>> index? skip a 0     ;) <> index? a
== 5
>> index? skip a 1    ;) <> next a
== 5
>> index? skip a 2    ;) ditto
== 5
>> index? at a 0
== 5
>> index? at a 1    ;) <> index? a
== 5
>> index? at a 2    ;) <> next a
== 5
>> index? at a -1    ;) <> back a
== 5
>> index? at a -2
== 5
>> index? at a -3
== 4

This is where invariants IMO are truly important.

Eddy Parkinson
@eddyparkinson

Hi, I am new here. I want to know about the early adopter market for Red/Eve/Lighttable etc. I have been working on: https://i.imgur.com/YxytmAr.gif ... i.e. making programming more accessible.
Other Examples: https://sheet.cellmaster.com.au/examples

Where would I find out more about the early adopter market? Typical uses cases of early users of Red/Eve/Lighttable? ... This looks to have good use cases: https://www.spreadsheetweb.com ... But I see Eve is table focused, so I assume different use cases exist.

Gregg Irwin
@greggirwin
Welcome @eddyparkinson! Red is a general purpose high level language, like Python or Ruby. Red/System it its low level dialect, like C. Those are the target users (devs) for Red the language. Building tools on top of Red, higher level, low/no-code, is where others come in, as well as the commercial arms of the Red project. They will create consumer products and services with Red.
Jonathan Edwards is another person to follow in the table oriented programming space.
Eddy Parkinson
@eddyparkinson
I saw some of Jonathan Edwards work about 5 years ago. I will take another look, has been a while.
I understand eve shut down - Just trying to understand what they learned along the way about the demand side. Gregg Irwin sent me
https://www.red-lang.org/2016/07/native-reactive-spreadsheet-in-17-loc.html
Ron Hochsprung
@RonHochsprung
@dockimbel That sounds like the obvious first step, and I'd love to have it ASAP. I've been using Rebol for many years.
Qingtian
@qtxie

We are going to add back the pretty printing for float to cover this case. Then another issue red/red#3243 has to be reopened. I'm not sure which one is the better choice. What do you think?

Now form float will try (best) to give a user friendly output and mold floatwill do the precise output. Also you'll get the pretty result in the Red console.

@hiiamboris Great thought about the indexing problem. We should save it in a wiki page or some other places (REP, issue, etc). Otherwise it will be lost in gitter.
hiiamboris
@hiiamboris
I'll save it, don't worry :) I was just trying to get any feedback
Regarding the form float thing, @qtxie. I think we should output time! in %.Nf format rather than %.Ng, or it becomes unloadable.
Qingtian
@qtxie
Also we really need a better place to do those discussions. It really took me some time to find the discuss conversasion about float. I don't remember in which room and gitter search is unusable.
@hiiamboris Why is it unloadable?
hiiamboris
@hiiamboris
@qtxie Just updated ☺
>> load mold 0:0:1 / 1e6
== [0:00:01 e-6]
>> length? load mold 0:0:1 / 1e6
== 2
hiiamboris
@hiiamboris
It's actually a regression from the previous build. Worth having a test for it.
hiiamboris
@hiiamboris
Here's another regression - some weird precision loss:
>> t: make time! [1 2 3e-12]
== 1:02:00
>> t/second 
== 3.183231456205249e-12
hiiamboris
@hiiamboris
OK this last one isn't a regression, but something more complex. I have only two debug builds which output it as 3e-12. Will have to investigate further.
Dave Andersen
@dander
@qtxie It's possible to download the entire chat using https://github.com/rebolek/gritter/blob/master/gitter-tools.red, and then it's a bit easier to search through the plain text, but still requires a bit of work piecing some parts together. I've had some success finding old things with it.
Boleslav Březovský
@rebolek

I've just pushed new version of http-tools to my red-tools repo. It shouldn't break anything, but if you use it there some new features that should make your life easier. And there's one bug fixed also. So here's the list of changes:

Bugs fixed:

  • fixed a bug, where send-request always expect that the reply has content-type field in the header. That's not always the case.

New features:

There's one. The handling of /data refinement was totally revamped (thanks to a suggestion by @BeardPower). content value for that refinement now accepts other types than string! and works for GET method too:

  • with GET method, content (expected to be block!) is translated to url-encoded string and appended to the link, e.g.: send-request/data link 'GET [x: 1 y: 2] results in link?x=1&y=2.

  • with other methods, content is treaded based on type: block! is also translated to url-encoded string passed as data and Content-Type field in the header is set to application/x-www-form-urlencoded (with one small exception useful only for a very small niche).

  • map! is treated as JSON and Content-Type is set accordingly. So you don't have to care about sending JSON requests, it's handled automatically.

  • string! is passed as it was before you have to set Content-Type manually, no change here.

Gregg Irwin
@greggirwin
:+1:
Semseddin Moldibi
@endo64
@rebolek Would be nice to put these onto the repo, in readme.md or a change.log file, or description for a release tag.
Great work by the way!
Boleslav Březovský
@rebolek
@endo64 right, that would be nice :smile: I wanted to put it there, but due to time constraints put it just here, but I'll update it ASAP.
Jose Luis
@planetsizecpu
👌
GiuseppeChillemi
@GiuseppeChillemi

I have created my first intermediate code.
A for loop running iterating on data tables rows and mapping each column name on a word (as object) .

Here is the code with a simple example:

fordata: function [
    "Purpose: iterate a block of code on data block making columns data accessible using column name"
    'data-name
    "The object name"
    data-block
    "the source with headings on top"
    code-block
    "The code to execute"
] 
[
    headings: copy first data-block
    data-block: next data-block
    row-obj-specs: copy []
    forall data-block [
        forall  headings [
            append row-obj-specs to-set-word first headings 
            append row-obj-specs data-block/1/(index? headings)
        ]
        do reduce [to-set-word data-name make object! row-obj-specs]
        do code-block

    ]

]

----------- Basic usage ------------

dataset: [
    [CUSTOMER_CD Name Contact Role Personal-Number Interest]
    [001 "Amazon" "Jeff Bezos" "President" "0012666999" "BOOK: How to keep you money safe from world taxation"]
    [002 "Microsoft" "Bill Gates" "Programmer" "0019852029" "BOOK: How to code in Basic" ]
    [003 "Apple" "Steeve Wozniac" "President " "001196868FREE" "COURSE: How to make money with free software"]    
]

fordata row dataset [
    print ["Person: " row/contact "-- Interested in: " row/interest]
]

Here is the output:

Person:  Jeff Bezos -- Interested in:  BOOK: How to keep you money safe from world taxation
Person:  Bill Gates -- Interested in:  BOOK: How to code in Basic
Person:  Steeve Wozniac -- Interested in:  COURSE: How to make money with free software

You can use it for composing and executing code based on data tables or building strings/blocks

Here are other examples:

----------- Composing and running ------------

code: copy []

fordata row dataset [
    append code compose/deep [print ["Person: " (row/contact) "-- Interested in: " (row/interest)]]
]

do code

-- Result --

Person:  Jeff Bezos -- Interested in:  BOOK: How to keep you money safe from world taxation
Person:  Bill Gates -- Interested in:  BOOK: How to code in Basic
Person:  Steeve Wozniac -- Interested in:  COURSE: How to make money with free software

----------- Composing String ------------

dialer-text: copy ""

fordata row dataset [append dialer-text rejoin [
    "Customer: Mr. " row/contact " Phone#: " row/personal-number " Interested in: " row/interest " "lf ]
]

print dialer-text

-- Result --

Customer: Mr. Jeff Bezos Phone#: 0012666999 Interested in: BOOK: How to keep you money safe from world taxation 
Customer: Mr. Bill Gates Phone#: 0019852029 Interested in: BOOK: How to code in Basic 
Customer: Mr. Steeve Wozniac Phone#: 001196868FREE Interested in: COURSE: How to make money with free software

----------- Composing a query ------------

query-text: copy ""
fordata row dataset [append query-text rejoin [
    "insert into Persons (Contact, personal-number) values ( '" row/contact "' , '" row/personal-number "' );"lf]
]

print query-text

-- Result --

insert into Persons (Contact, personal-number) values ( 'Jeff Bezos' , '0012666999' );
insert into Persons (Contact, personal-number) values ( 'Bill Gates' , '0019852029' );
insert into Persons (Contact, personal-number) values ( 'Steeve Wozniac' , '001196868FREE' );

Hope you will find it useful.

I will later adapt it on dataset handled by CSV codec.

Hope there are no errors but if you spot them please send me a message.

GiuseppeChillemi
@GiuseppeChillemi
(I forgot a small modification to use strings as headings, I'll make this it tomorrow and publish the code on github)
Senenmut
@Senenmut
hello, i have a programmers joke. wanna hear ?
nedzadarek
@nedzadarek
@Senenmut got to the chit-chat for that kind of things.
Senenmut
@Senenmut
oh. i don't kmow that. thank you.
Petr Krenzelok
@pekr
There seem to be first numbers for Fast-lexer branch posted on the Red Twitter channel ... and those .... look impressive :-)
Posted by Lucinda, so to give her a credit: The numbers so far: Loading 100'000 words (5 to 15 characters, 1MB file): Red (master): 19000ms; Red (fast-lexer): 150ms. And it's with no small amount of surprise & pride that we observe words load a bit faster than even #R3: 1M words (5-15 chars, 10MB file): Red fast-lexer: 850ms; R3: 940ms.
I hope this makes for a Blog article too, as it seems to be kind of a great achievement ;-)
FLuX LoOP
@x8x
Impressive! :thumbsup:
tkslattery050558
@tkslattery050558
So, I just downloaded red for windows, and clicked to compile... Norton is telling me there is a threat "Heur.AdvML.B". Is this something real, or a part of RED that just scares Norton??
Maciej Łoziński
@loziniak
@tkslattery050558 It probably just scares Norton. It's a known issue.
hiiamboris
@hiiamboris

@dockimbel Here's a bit of a complaint regarding current stack implementation (or usage?).

take works by allocating a new series, where into it moves the taken data.

If you add an assertion assert ser <> stack/top before this line https://github.com/red/red/blob/d7fd28291d7fcc38f1b5e0423c4130829b2ac5cf/runtime/datatypes/series.reds#L1009 , the assertion will crash before the console will even boot up.

Apparently take gets called on a stack cell. Without the assertion, newly allocated cell refers to the same memory as ser cell, ser/node gets overwritten with the following ser2/node: node line, later references to ser and it's node become invalid, and it happily goes into undefined behavior from there on.

And I can't imagine how many more mines like this are there in wait.

Qingtian
@qtxie
@hiiamboris Good catch! :+1:
Gregg Irwin
@greggirwin

Question 1: Is there a pattern we can use to search for more of these cases?

Question 2: What's the best way to make sure we avoid writing more of them, especially in the v2 rewrite?

hiiamboris
@hiiamboris

@greggirwin I'm asking myself the same questions ☺ But as of now my knowledge of Red runtime and compiler is just not enough to propose concrete solutions (otherwise I would've implemented that already). I'd usually go by making stack more declarative. It should know at what moment what cells are in use.

As for a pattern, every time I see some stack/something invocation I don't know if it's gonna work properly or not. I can only see the code that is in front of me. When this code calls another code, I can not tell anymore. Since it almost always calls something, I can never tell :) This is the core of the problem: Red stack is modified by almost every callee out there with no way of seeing those modifications in the context of the caller.

Gregg Irwin
@greggirwin
And why Forth programs were always, necessarily, small. ;^)
Gregg Irwin
@greggirwin
@ne1uno Is there an easy way to run https://gist.github.com/ne1uno/a5d79c0b7a8f9dac65f4737834b900b4 ? Looks cool, but doesn't work for me in a quick console-paste.
ne1uno
@ne1uno
do-events ;? I don't use console much
hiiamboris
@hiiamboris

What do you guys think of this?

>> ? pick
USAGE:
     PICK series index

DESCRIPTION: 
     Returns the series value at a given index. 
     PICK is an action! value.

ARGUMENTS:
     series       [series! port! bitset! pair! tuple! date! time!] 
     index        [scalar! any-string! any-word! block! logic! time!] 

RETURNS:
     [any-type!]

>> ? scalar!
SCALAR! is a typeset! value: make typeset! [char! integer! float! pair! percent! tuple! time! date!]

Note that time! is already in scalar! but is added into index types again.
I know of:

  • pick series integer
  • pick [1 0] logic
  • pick charset "abc" #"a" and pick charset "abc" "a" thing
  • pick image pair

    What the other index types are supposed to mean?

Gregg Irwin
@greggirwin
@ne1uno console just vanished for me so...