Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Apr 04 22:00
    hiiamboris commented #4381
  • Apr 04 21:54
    endo64 opened #4381
  • Apr 04 20:29
    hiiamboris opened #4380
  • Apr 04 17:28
    greggirwin commented #4379
  • Apr 04 16:10

    dockimbel on money

    FIX: truncates integral part of… (compare)

  • Apr 04 15:45
    hiiamboris commented #4356
  • Apr 04 15:44
    hiiamboris commented #4379
  • Apr 04 15:11

    dockimbel on money

    FIX: "+$.1" literal causes runt… (compare)

  • Apr 04 14:08
    endo64 commented #4356
  • Apr 04 11:12
    qtxie commented #4379
  • Apr 04 11:05
    qtxie commented #4275
  • Apr 04 11:02
    qtxie commented #4275
  • Apr 04 10:58
    qtxie assigned #4275
  • Apr 04 09:08
    hiiamboris edited #4379
  • Apr 04 09:08
    hiiamboris opened #4379
  • Apr 04 00:24
    qtxie commented #3243
  • Apr 03 21:13
    hiiamboris commented #3243
  • Apr 03 20:27
    hiiamboris commented #3243
  • Apr 03 16:46
    hiiamboris commented #4356
  • Apr 03 15:52
    9214 commented #4378
Petr Krenzelok
@pekr
I wonder if any language has such an arrow notation :-)
Gabriele Santilli
@giesse
well, if you use | then it looks a lot like unix pipes...
so, again... this is nothing new... just a different kind of syntactic sugar... but it's interesting to me that it seems to click better with people?
Petr Krenzelok
@pekr
I suggested pipes and it was accepted by Ren-C .... but it got useful only for the separation of expression in terms of one line, hence readability. Not useful for chained expressions
x: 10 | append series x.... |basically means noop
I found it nicely readable ....
Gabriele Santilli
@giesse
in the style above it would be more like series | append 10
in Java / Javascript / C++ etc. it would be like series.append(10)
Petr Krenzelok
@pekr
I know, a different purpose. In my case it was a simple separator, when you want to have more stuff in terms of one line.
series <- append 10might be even more clearly understandable, though more difficult to read
Gabriele Santilli
@giesse
well, but if you have multiple operations it looks strange.
ixcor <- copy/part 1 <- enbase 2
Petr Krenzelok
@pekr
But in both cases can't see much advantage to append series 10.... with more complicated code, as was mentioned above (intermediary results), might be more useful, yes ....
Doesn' it stems down to ppl not wanting to introduce new words for the intermediary assignments?
Gabriele Santilli
@giesse

well, ultimately, something like:

first-char: copy/part ixcor 1
enbased: enbase first-char 2

is going to be more readable, but it's verbose and people are lazy when writing, not to mention all the locals (which sometimes you have to keep track of)

Petr Krenzelok
@pekr
I like pipes more than dots. Dots mostly suggest objects. And beware, some ppl even use dots in words, might be confusing
GiuseppeChillemi
@GiuseppeChillemi
In the past months an idea has came to my mind: a context is basically an object so when you bind a word to a context the companion symbols and their values are there but not accessible via path notation. In other words we have an hidden object. Do you think it would be easy to have a way to access them as path elements using the current word as head of the path? Something like myword//contextword? Then, if the element is a function you could write myword//contextword myword to execute a "method" of the word in that context on the word value or just get a value of another word in that context. I have called it "reverse object" where you retain set-word/get-word notation but you also have object functionality.
Boleslav Březovský
@rebolek
I'm late to the discussion, but if there's a movement for removing /base from *base, count me in!
Semseddin Moldibi
@endo64
I'm for removing /base but not changing the order.
Gregg Irwin
@greggirwin
No naysayers for removing /base yet, but @dockimbel has veto power.
@GiuseppeChillemi mock it up at the mezz level, without requiring a new lexical form. Play and let others do the same to get feedback.
Gregg Irwin
@greggirwin
On the .<-| pipe/thread/forward model...a dialected func is the way to experiment IMO. They aren't a "win", just different. We should encourage writing readable code, and terse ops and dialects may be more readable in some cases. Just keep in mind that Redbol langs are very much word oriented by design. In some domains, those words may be short symbols.
Gabriele Santilli
@giesse
My general issue is that as much as implied arguments are a nice way to improve write-ability and reduce repetition, I'm not convinced about readability. But, perhaps, this specific case works well with humans and that's why it's common in other languages (ie. object.method() rather than method(object)). I'd still just write a Forth dialect, but I have to conclude that's just because I'm weird.
Vladimir Vasilyev
@9214

Forth is a bit more than tacit programming and stack shuffling though. I would be extremely interested to see how concatenative and homoiconic properties can be aligned (see e.g. Om language) and what the Joy (pun intended) of concatenative combinators can bring to the HOF table (@giesse you're not the only weirdo here).

Thinking aloud, one can define an operator that accepts a data stack (block!) and a program (also a block!) which then can be combined together; that would be weaving (two threads), and .-style would be threading (evaluator's IP needle thru the eyelet of .).

GiuseppeChillemi
@GiuseppeChillemi
@greggirwin >>mock it up at the mezz level, without requiring a new lexical form
I have never worked at mezzanine level. I need some help. Could you please give some starter advice for this task on red/help?
Boleslav Březovský
@rebolek

@GiuseppeChillemi

I have never worked at mezzanine level.

Have you ever written a function that you used in another function? Then you worked at mezzanine level :-)

It's usually used as a group name for Red functions that are not native, like rejoin for example.
So what @greggirwin suggested is to write a function that would do what you proposed without requiring new syntax.
yc
@cloutiy
in F# and Elixir the "pipe" operator is |>. The . example which I had submitted (which I think it seems this discussion is still going on!) was my attempt to replicate a similar behavior. When working withthose anguages I found it very readable since it allowed me to express a sequence of steps or transformations from left to right, or top down. As an alternative to the . I thought -> was also nice.
hiiamboris
@hiiamboris
Why is complement not allowed on tuples?
Gregg Irwin
@greggirwin
Maybe just not done yet. R2 supports it.
Rudolf Meijer
@meijeru
A comprehensive set of requests for extending operations to as many types as feasible is REP # 10. This exists since 30 April 2018. Speaking about not done yet...
Gregg Irwin
@greggirwin
:+1: Priorities are always hard. Until someone needs a feature, they're "nice to have", and we have to also focus on survival aspects.
Rudolf Meijer
@meijeru
Am I the only one who finds that the latest Windows .exe (commit 84d5ccb0a) does not compile the console??
Semseddin Moldibi
@endo64
@meijeru It works for me, same commit ID, do you get any errors?
GiuseppeChillemi
@GiuseppeChillemi
@greggirwin @rebolek to my knowledge, at this level the idea is only doable in a function which accepts a block of Red code to be parsed. This because you have variable arity of functions in the context, and also you have to "manually" decode those paths. I'll try!
Charles Tse
@realTopXeQ_twitter
Have read the documents, but I cannot find out how to convert a string to another encoding (utf-8 to iso-8859-1, or gbk to utf-8 and vice versa),
Thanks
Charles Tse
@realTopXeQ_twitter
thanks,hope the encoding convertion library to be released
Rebol2Red
@Rebol2Red
I hope too. No more using a slow poor's man converter.
GiuseppeChillemi
@GiuseppeChillemi
I think that the comments to document the code are somehow limiting. I would like to add other data like extra tables, diagrams, rich notes. Is there any tool which is able to integrate with the code, either in place, or using an external file for such purpose?
419928194516
@419928194516
So I saw mod and modulo mentioned in the March 20th blog post, and I opened red/red#2997 years ago, and still see that source mod returns the same incorrect implementation. Is there a branch where it isn't busted?
If nothing else, the type signature should be altered: a [number! char! pair! tuple! vector! time!] is a lie
hiiamboris
@hiiamboris
@419928194516 only https://gitlab.com/snippets/1901617 so far
419928194516
@419928194516
Interesting, is mod intended to be the 'kitchen sink' impl? I feel like I'd still just end up using a % b for most of my use cases if I know the types ahead of time
hiiamboris
@hiiamboris
% is the fastest
You can coin your thoughts here red/red#2433 if you wish
419928194516
@419928194516
Ty, I need to think about it some more, there's a lot of cases to consider that I'm sure you've thought about more deeply