Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jul 01 2018 17:34
    @greggirwin banned @BIjeuca_twitter
  • Dec 03 2017 05:53
    @PeterWAWood banned @matrixbot
  • Sep 28 2016 12:20
    @PeterWAWood banned @TimeSeriesLord
Abdullah Yiğiterol
@abdllhygt
@greggirwin i look this, but i want index number
Gregg Irwin
@greggirwin
view [
    text-list linen 250x350 font-size 16  data ["A" "B" "C"] [
        ;bilgi/text: pick face/data face/selected
        print face/selected
   ]
]
face/selected returns in the index number.
Abdullah Yiğiterol
@abdllhygt
oh thank you so much :)
Alan
@virtualAlan
Just a congrats to Mike Parr and Arie Wingerden for their work on 'Red-By-Example' - Nice Work ....
Nenad Rakocevic
@dockimbel
@virtualAlan @Arie-vw @mikeparr Congrats indeed, your work does help Red reach new highs. There should be an announcement next month regarding that (crossing fingers), stay tuned. ;-)
sptorin
@sptorin_twitter

Trying fill block of blocks with data from external source, but final structure have all equal blocks. Skip some copy command in declaration of variables?

people-template: copy [[name-t: "" phone-t "" mail-t ""]]
db: [Tom 123 qwe@qwe.org Bob 456 asd@asd.com]
people: copy [[]]
index: 1

foreach [name phone mail] db [
    append people people-template
    people/:index/name-t: name
    people/:index/phone-t: phone
    people/:index/mail-t: mail
    index: index + 1
]

probe people

answer: [[name-t: Bob phone-t: 456 mail-t: asd@asd.com] [name-t: Bob phone-t: 456 mail-t: asd@asd.com]]

wrong copy-paste, must be:
```
Broke chat...
Boleslav Březovský
@rebolek
@sptorin_twitter There's no need for people-template to be block in block. Just use append/only. And the copy function should be in the append line: append/only people copy people-template
sptorin
@sptorin_twitter
yes, it previous variant, can't paste normal
people-template: copy [[name-t: "" phone-t: "" mail-t: ""]]
db: [Tom 123 qwe@qwe.org Bob 456 asd@asd.com]
people: copy []
Result must be block of blocks
Boleslav Březovský
@rebolek
Red[]

people-template: [name-t: "" phone-t "" mail-t ""]
db: [Tom 123 qwe@qwe.org Bob 456 asd@asd.com]
people: []
index: 1

foreach [name phone mail] db [
    append/only people copy people-template
    people/:index/name-t: name
    people/:index/phone-t: phone
    people/:index/mail-t: mail
    index: index + 1
]

probe people
sptorin
@sptorin_twitter
And both blocks in result is equal
Both with "Bob"
Boleslav Březovský
@rebolek
Oh, sorry, I forgot copy there :smile:
Code fixed
sptorin
@sptorin_twitter
Yes, now right! Tnx!
Maxim Velesyuk
@maximvl
if you update people directly you wouldn't need this circus with index :)
sptorin
@sptorin_twitter
Yes, but in original my incoming data is multiply lines with Tom where name equal, but info different (first line with phone, second line with mail, third line with work phone). And multiply lines with other people.
Vulnz
@vulnz
hello guys! is it any socket realization on red ?
and if yes, how to create web site on red ;) ?
Calloway Sutton
@callowaysutton
http://www.red-lang.org/p/roadmap.html I believe Network I/O is still being worked on
Boleslav Březovský
@rebolek
@vulnz @oldes just wrote socket implementation for Red/System - https://github.com/Oldes/code/tree/master/Library/Sockets
How to create web site - do you mean using Red as web server? That will come with full IO. If you want to use Red as CGI, that's possible even now.
BeardPower
@BeardPower
@rebolek Nice! Will this be merged with the official Repo?
Boleslav Březovský
@rebolek
@BeardPower I don't think so, Red will implement full I/O in 0.7.0 and probably won’t use third party code for it. That is question for @dockimbel
BeardPower
@BeardPower
I see. But isn't implementing the same feature twice a waste of precious resources?
Don't get me wrong, I appreciate all your efforts :)
I'm just thinking, that it would speed up the project, if existing code would be merged. As I don't have insights into the project, I can, of course, be totally wrong.
Petr Krenzelok
@pekr
If random existing code would be merged, we would soon end-up in the multiple megabyte territory along with messy architecture :-) OTOH, noone is preventing us to use such code in terms of libraries or simply special solutions ...
BeardPower
@BeardPower
Sure, but I think that would only be a problem, if the code would not be following the project and architectural guidelines.
Nenad Rakocevic
@dockimbel

@BeardPower

I see. But isn't implementing the same feature twice a waste of precious resources?
As I don't have insights into the project, I can, of course, be totally wrong.

Your last assertion is correct. ;-) Red "full I/O" will rely on an async I/O engine.

BeardPower
@BeardPower
@dockimbel :+1:
geekyi
@geekyi
@BeardPower existing code helps, because we'd then have something to compare and improve upon! And we'd learn from the mistakes and know what to use. SO in the end, the code that gets merged would be pretty high quality..
Gregg Irwin
@greggirwin
All code and examples are helpful, even if they don't directly make it into the official mainline. As @geekyi said, and also because people can learn from them and build things they need which may not match what Red makes standard. e.g., @Oldes' code may be extremely useful to some people, and even end up as an extension, for some circumstances.
They can also save Team Red research time. As long as Team Red knows they exist, they can leverage them as well.
BeardPower
@BeardPower
@geekyi A very good point :)
@greggirwin Yeah, having all these resources available is really great for learning Red. Thanks to everyone for providing them :+1:
Abdullah Yiğiterol
@abdllhygt
Hİ!
How to convert integer to string?
Boleslav Březovský
@rebolek
>> form 123
== "123"
Abdullah Yiğiterol
@abdllhygt
thank you!
Boleslav Březovský
@rebolek
You're welcome! There are other ways, like to string!, but I prefer form.
dimsum
@KimRoach143_twitter
@rebolek hello I am still learning red code just wondering how can I lock the file or folder and open it only with system or administrator in read only mode
any file related documentation might help
Abdullah Yiğiterol
@abdllhygt
@rebolek this doesn't work on gui :/
Boleslav Březovský
@rebolek
@KimRoach143_twitter Hi! Red currently supports only basic file operations, full I/O will come with 0.7.0, but if it will include file locking is something I honestly can’t answer.
@abdllhygt Do you have an example of non-working code?