Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Oct 20 22:59
    @dockimbel banned @SmackMacDougal
  • Dec 03 2017 05:53
    @PeterWAWood banned @matrixbot
  • Sep 28 2016 12:19
    @PeterWAWood banned @TimeSeriesLord
  • Aug 13 2016 03:23
    @PeterWAWood banned @Vexercizer
amreus
@amreus
@spTorin Sure you don't just want find? find word "eri"
spTorin
@spTorin
before and after "eri" need consonant
Boleslav Březovský
@rebolek
hm, I'm not sure what exactly are you trying to achive. Do you want to just check if there's eri? Then [thru "eri" to end] should be enough.
Ah, I see. Let me think about it...
It's not perfect, but what about this:
>> match: [consonant "eri" consonant (passed?: true)]
== [consonant "eri" consonant (passed?: true)]
>> parse "asdfg" [(passed?: false) some [not match skip | match to end] if (passed?)]
== false
>> parse "zooperist" [(passed?: false) some [not match skip | match to end] if (passed?)]
== true
spTorin
@spTorin
Looks right. Hard to understand for first glance, but worked.
Boleslav Březovský
@rebolek

I've added a switch to indicate, if there was consonant "eri" consonant. Then in the end I check for that switch.

It's bit hacky, there is probably a way to do it with parse rules only, but I don't have time right now to investigate it deeply

spTorin
@spTorin
It's ok. Thanks you!
Boleslav Březovský
@rebolek
You're welcome
spTorin
@spTorin
"eri" - just example. In Russian there is a TороT construct, where T is a consonant letter. And in the Slavic languages there are similar words with the TraT or TroT token (ворона - vrána - wrona). Try to find this via regexp aaaand can't. Thought it would be better in parse, but also not so easy...
Boleslav Březovský
@rebolek
It should be relatively easy, it's the eripart that is bit problematic, because it could be matched by previous rules.
spTorin
@spTorin
The same thing and here. Before the token can be any letters from alphabet.
Toomas Vooglaid
@toomasv
@spTorin Here is another rule:
rule: [some [consonant "eri" consonant thru end | skip [end reject | none]]]
spTorin
@spTorin
@toomasv Yes, your rule work nice! Tnx for help. This rule a bit more understandable for me :)
nedzadarek
@nedzadarek

@Ungaretti After first try I am impressed by your Reditor. It is smaller and faster than the Atom (7 MB vs hundreds of MB). I am not sure how this will work with full projects by I think it will be my go-to for smaller things. Thank you.

I suggest you tick on Settings/Preferences.../Hide menu bar to make it look even cleaner, like the screenshot above. You can toggle the menu bar back by pressing the alt key or F10. I don't make the hidden menu default because it might be confusing

In my opinion it is good that it is not hidden by default (above note is ok). I like to keep open multiple files at the same time so having tab visible is good.

ps. you are missing an icon for preferences.

Toomas Vooglaid
@toomasv
@spTorin You are welcome!
nedzadarek
@nedzadarek
@Ungaretti and I have question: I keep my Red*.exe files in some folder. Can I somehow link or set some options in the setting instead of coping it into the Reditor folder?
Vladimir Vasilyev
@9214
@spTorin unless I misunderstood something, you just want to check for presense of [consonant "eri" consonant]?
>> consonant: exclude charset [#"a" - #"z"] charset "aeiouy"
== make bitset! #{0000000000000000000000003BBEFBA0}
>> rule: [thru [consonant "eri" consonant] to end]
== [thru [consonant "eri" consonant] to end]
>> tests: ["american" "verify" "ordering" "zooperist"]
== ["american" "verify" "ordering" "zooperist"]
>> collect [forall tests [keep parse tests/1 rule]]
== [true true true true]
Toomas Vooglaid
@toomasv
@9214 Of course :flushed:
Boleslav Březovský
@rebolek
I believe the rules are bit more complicated.
viayuve
@viayuve
how to do something similar to \n in c++ with red
Boleslav Březovský
@rebolek
^/
viayuve
@viayuve
looks like cat emoji lol
Ungaretti
@Ungaretti
image.png
Toomas Vooglaid
@toomasv
@viayuve
escaped-chars: 
    "null" (value: #"^@") 
    "back" (value: #"^H") 
    "tab" (value: #"^-") 
    "line" (value: #"^/") 
    "page" (value: #"^L") 
    "esc" (value: #"^[") 
    "del" (value: #"^~")
viayuve
@viayuve
@toomasv Thanks man saved it.
Ungaretti
@Ungaretti
@nedzadarek Thank you for the feedback!
Hiding the menu bar is just an aesthetic detail, never mind that, but it has nothing to do with the number of script tabs open.
To set the default location of your files, you have to change the correspondent NppExec scripts. I give a hint of how to do that in helpin.red's Rededitor page, but I'll be glad to discuss that with you in private, since it's not related to Red itself.
Boleslav Březovský
@rebolek
@viayuve it's control ascii char + 40h
viayuve
@viayuve
one more question let's say I have file in /usr/bin/banana.txt and I have app that will get config from banana.txt. I allow user to pick there own banana.txt with different path. When user open app again it must load last config file that was selected. How to do that?
@rebolek thanks man
Vladimir Vasilyev
@9214
@viayuve your app should have a default config file in specific location, from which you can point to user config, which can be located anywhere.
viayuve
@viayuve
like .ini file??@9214
Vladimir Vasilyev
@9214
That is, if you want to preserve user config between sessions. Otherwise you can store path in environment variable.
viayuve
@viayuve
list-env right? what is to create new one.
Vladimir Vasilyev
@9214
? env
viayuve
@viayuve
set-env thanks @9214
viayuve
@viayuve
size? shows file size and folder size right? but why they show different size
I mean I have one file in one folder it should show same size right?
Boleslav Březovský
@rebolek
@viayuve it does not return folder size
that's just inode size
viayuve
@viayuve
what does shows folder size and sub-dir count in main folder
Boleslav Březovský
@rebolek
you need to write a loop and count sizes of all files together
Semseddin Moldibi
@endo64
@viayuve @toomasv
>> ? char!
    null             #"^@"
    newline          #"^/"
    slash            #"/"
    dbl-quote        #"^""
    space            #" "
    lf               #"^/"
    tab              #"^-"
    CR               #"^M"
    dot              #"."
    escape           #"^["
    sp               #" "
    comma            #","
Toomas Vooglaid
@toomasv
Oops! I took it from wrong place and didn't check! Again! Sorry :flushed:
Semseddin Moldibi
@endo64
@toomasv No problem!
Toomas Vooglaid
@toomasv
As a compensation, here is the list of keys, key-nums and chars as returned in view on-key (W10; keys wo angle brackets are returned as words):
key            num char
-----------------------
<back>          8  #"^H"
<tab>           9  #"^-"
<ctrl-enter>   10  #"^/"
<enter>        13  #"^M"
<esc>          27  #"^["
caps-lock      20  #"^T"
page-up        33  #"!"
page-down      34  #"^""
end            35  #"#"
home           36  #"$"
left           37  #"%"
up             38  #"&"
right          39  #"'"
down           40  #"("
insert         45  #"-"
delete         46  #"."
F1            112  #"p"
F2            113  #"q"
F3            114  #"r"
F4            115  #"s"
F5            116  #"t"
F6            117  #"u"
F7            118  #"v"
F8            119  #"w"
F9            120  #"x"
spTorin
@spTorin
@9214 Perfect rule for consonant "eri" consonant, tnx. I always tried to do it in a more complicated way. Like @rebolek's method.
Greg T
@gltewalt
Need to clarify feeding a binary value to make image!
Using pair and tuple with the Alpha channel included it returns:
>> make image! [1x1 255.210.0.120]
== make image! [1x1 #{FFD200} #{
78}]