• Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

AltME groups: search

Help · search scripts · search articles · search mailing list

results summary

worldhits
r4wp4382
r3wp44224
total:48606

results window for this page: [start: 13201 end: 13300]

world-name: r3wp

Group: Parse ... Discussion of PARSE dialect [web-public]
Rebolek:
8-Jun-2007
I tried to enclose parse in loop 1 [] and it seems to handle break. 
I guess you'll probably prove me wrong, Brian :)

parall: func [
	'word body
	/loc data
][
	loop 1 [
		data: get :word
		parse data compose/deep [
			some [(to set-word! word) skip (to paren! [do body])]
		]
	]
]

re: continue - this is not r3 ;)


>> n: [1 2 3 4 5] parall n [if n/1 = 4 [break/return "break"] if 
n/1 > 4 [print "bad"]]
== "break"
Gabriele:
8-Jun-2007
you need to add [throw] for example, and return the last return value 
of the body
Gabriele:
8-Jun-2007
and actually... i'd call parse directly in that case ;)
Steeve:
27-Jun-2007
parse [a: 1 b: 2] [all ['a: integer! | 'b: integer!]] would be true 
only if it exists successivly [a: integer!] and [b: integer! ] whatever 
their order
Steeve:
27-Jun-2007
but if the entry is more complex like [a: 1 huge tight  b: 1] and 
that i want parse all this values in any order ?
Steeve:
27-Jun-2007
and in your example , you don't test that we must encounter 'a and 
'b
btiffin:
27-Jun-2007
Again, I'm not a parser, but parse's support of alternates with some 
and any covers these cases no?
Steeve:
27-Jun-2007
and what is your mater ? ;-)
btiffin:
27-Jun-2007
His works.  I tried it without the terminating  | none  and it spun 
out, so I didn't mention it  :)
Steeve:
27-Jun-2007
(should increment a b and c instead using boolean)
Steeve:
27-Jun-2007
and it works too with the serie "AAA"
Steeve:
27-Jun-2007
yeah it's possible but it's like hanging counters, you need to have 
some code to check the result and allowing the parser to continue 
further
Steeve:
27-Jun-2007
as i said , it was just an example , in fact in my case: "A" "B" 
and "C" are complex subrules, so unique don't apply
Brock:
27-Jun-2007
Will there be more than three rules possible?  You indicate "A" "B" 
and  "C", but could another instance of this also have a fourth character?
Brock:
27-Jun-2007
;very basic example - 
unique: func [str][
	compare-set: "ABC"

 either "" = difference str compare-set [return true][return false]
]

;;;; and yes, that is very ugly
Brock:
27-Jun-2007
... and of course 'unique shouldn't be used as a name due to Rebol 
already having a unique function.
Steeve:
27-Jun-2007
parse data [all [rule1 | rule2 | rule3 | rule4]] 

all rules must apply 1 time and 1 time only  in any order, don't 
focus on what is inside rules (it contains sub-rules which contains 
sub-rules).
btiffin:
27-Jun-2007
Ok, this is convulted and probably wrong


rule: [copy res subrule (remove/part find subrule compse [| (res)] 
2)]
subrule: ["filler" | "a" | "b" | "c"]
parse "fillerabc" [4 [rule] end]


Remove the alternatives from the rule as you find them...the filler 
is to allow | "a" to be found.
btiffin:
27-Jun-2007
Yep...convoluted and hard to verify all the cases to boot.  :)  I 
wouldn't use it to be honest, but it was teasing my brain too much...
btiffin:
27-Jun-2007
Now, I'll slowly back out of the room...ducking and dodging...  :)
btiffin:
27-Jun-2007
Yeah, this problem needs to allow alternatives and then remove them 
(or Steeve's counter)
Steeve:
27-Jun-2007
and i have such rules like this
Brock:
27-Jun-2007
well, I'm stumped.  Tried many variations on the theme and couldn't 
get any to work.  Good luck.
btiffin:
28-Jun-2007
I think Steeve just left...but yep he wants a once and once only 
in any order
Steeve:
28-Jun-2007
assuming "A" "B" and "C" could be more complex rules
Steeve:
28-Jun-2007
i give another one example: imagine you have a dialect which describes 
a rectangle with coordinates length and color.

You could write [rectangle 10x20 300 red] but [rectangle 30 red 10x20] 
should be correct too (and other combinations).
So a parser should handle this with not too much complication.
Gabriele:
28-Jun-2007
steve, we do that all the time, and we just take the last value when 
it is put more than once.
Steeve:
28-Jun-2007
and it's become huge if i have lot of rules to combinate
Steeve:
28-Jun-2007
Once (again)

Rebol is amazing, i think i found a simple and elegant dialect

Currently, it's not allowing recursive once usage, but it's obvious 
to do with a stack.


take: func [r] [n: 0 once/1: (length? r) + 1 / 3 once/2/2: r replace/all 
r '.. '.]
.: [(n: n + 1)]
..: [(n: n + 1) end skip]
once: [0 [(if n > 0 [poke once/2/2 n - 1 * 3 + 1  '..] n: 0) []]]


rule: [. "a" | . "b" | . "c"]
parse "CBA" [ (take rule) once]
== true
parse  "BAC" [ (take rule) once]
== true
parse  "CBA" [ (take rule) once]
== true
parse  "BBC" [ (take rule) once]
== true
parse  "CA" [ (take rule) once]
== false
parse  "CABA"[ (take rule) once]
== false
rule2: [. "a" | . "a" | . "b" | . "c"]
parse "CABA"[ (take rule2) once]
== true
Steeve:
28-Jun-2007
and that works for any type of sub-rule, no only for constants
Tomc:
30-Jun-2007
and use pases by itself aith the none rule
[unknown: 9]:
30-Jun-2007
We so need a Wiki for Rebol, and shove every word and example into 
it.  Just Parse needs 100 pages of examples and descriptions.
ICarii:
30-Jun-2007
and a new book.. Dialects for The Rest of Us (forget the Dummies 
version..)
[unknown: 9]:
30-Jun-2007
There is always another trick, and another level to Rebol, the docs 
NEED to be in a Wiki, where we can add to them, let them live, breath...
ICarii:
30-Jun-2007
playing with their new iphones and parsing text messages internally 
:)
Steeve:
30-Jun-2007
REBOL is cool, and free
Tomc:
1-Jul-2007
>> ; insufficent pattern
>> data: "first rule second rule third "
== "first rule second rule third "
>> erode: [a | b | c]
== [a | b | c]
>> parse/all data rule
== false
>>
>> ;;; unused rule before pattern is consumed
>> data: "first rule second rule third rule "
== "first rule second rule third rule "
>> erode: [a | b | c | a]
== [a | b | c | a]
>> parse/all data rule
== false
>>
>> ;;; patterns and rules allowed in any order
>> data: "first rule second rule third rule "
== "first rule second rule third rule "
>> erode: [c | b | a]
== [c | b | a]
>> parse/all data rule
== true
>>
>> ;;; multiple (duplicate) rules allowed
>> data: "first rule first rule second rule third rule "
== "first rule first rule second rule third rule "
>> erode: [a | b | c | a]
== [a | b | c | a]
>> parse/all data rule
== true
>>
Steeve:
1-Jul-2007
a crazy simple alternative from DocKimbel (non repetitive pattern 
and limited to rules with single char)

>> rule: [(c: charset "ABC") 3 [copy v c (remove/part c v)]]

>> parse "ABC" rule
== true
>> parse "BAC" rule
== true
>> parse "CBA" rule
== true
>> parse "ABA" rule
== false
>> parse "ABCA" rule
== false
btiffin:
7-Jul-2007
Thanks gentlemen.  I've struggled with that one on and off for...well 
forever.
BrianH:
17-Jul-2007
One of those proposals, brought up in the comments of one of Carl's 
blogs, is to unify the block and string parsing dialects.
Gabriele:
17-Jul-2007
doc, integer! works for strings for some reason. it's the only one 
that works, and seems to match a sequence of digits (not sure if 
it does anything more than that). it's been there since a long time 
(probably from the beginning ;) but not documented.
Dockimbel:
17-Jul-2007
It looks to me more as a bug than as an intended feature (maybe a 
side effect of the block! parsing addition?). Anyway matching REBOL 
datatypes in string! parsing mode could be a useful feature and would 
make a lot of parsing rules shorter.
Tomc:
19-Jul-2007
I asked Carl at the first devcon for the rest of the datatypes when 
string parsing and he agreed at the time that if integer! was in 
there others should be as well.
Rebolek:
26-Jul-2007
Is it possible to parse exact integer! value? something like parse 
[1.0][1.0] but with integer!. And something more "elegant" than parse 
[1][set val integer! (equal? val 1)] :)
Geomol:
26-Jul-2007
Think, the last alternative only works, because both integer and 
decimal are categories of number. It doesn't seem to work with other 
'number'-like datatypes, like money or tuple.
[unknown: 5]:
5-Aug-2007
Anyone know how to parse a string such that the newlines and tabs 
are parsed?  I'm not getting the results I'm expecting.
Group: Games ... talk about using REBOL for games [web-public]
ICarii:
4-Jul-2007
a brief explanation is inside the rebtower.r file at the moment - 
im working on a pretty help file and preferences at the moment ;)
Terry:
4-Jul-2007
The rules seem to go like this.. 
you get the lousy cards, and the machine pwns ;)
Terry:
4-Jul-2007
I think it's bugged out.. use a few cards and no changes.. like +1 
to forest, and exactly the same next turn?
Terry:
4-Jul-2007
I used a +10 to tower, it used a 4 damage, and my tower only went 
up +1 ?
Terry:
4-Jul-2007
Then a +5 damage, and nothing happens??
Terry:
4-Jul-2007
Then a trebuchet and still nothing ??
Terry:
4-Jul-2007
I now have 40 tower, 12 wall... . it has 40 tower, 20 wall?.. and 
Im down 5 wood as well..
ICarii:
4-Jul-2007
RebTower 0.0.9 - bugfix for infinite loop when ending game on an 
extra turn card.
http://rebol.mustard.co.nz/rebtower-0.0.9.zip(for full - 657kb)

or http://rebol.mustard.co.nz/rebtower.r(for update from versions 
0.0.7 and higher - 24kb)
ICarii:
4-Jul-2007
RebTower 0.1.0 - added spacebar toggle to turn mode after accidentally 
turning it off on 0.0.9 ;-)

From now on the latest versions will always be found below (its relatively 
stable now).
http://rebol.mustard.co.nz/rebtower.zip(for full - 657kb)

or http://rebol.mustard.co.nz/rebtower.r(for update from versions 
0.0.7 and higher - 24kb)
ICarii:
4-Jul-2007
re mouse interface - the problem here is there are 3 distinct operations 
needed: Zoom, Play and Discard.  Seeing as double-click under rebol 
also activates click i wasnt able to use that without messy workarounds 
and I'm not too fond of using keyboard unless totally necessary. 
 The current Left click to select then right click to play (or left 
click again to shrink) was chosen because it is a natural thing for 
us to want to inspect something before using it - using right click 
to do the actual playing was probably a little confusing for people 
at first but it quickly catches on.  The only gotchya is perhaps 
I really should add a warning on discard option so people dont willy-nilly 
throw away cards while thinking they are playing them :)
[unknown: 9]:
4-Jul-2007
Good to understand your logic.

OK, then may I suggest then:


-	Left click - plays card (you should put this to a vote)

-	Right click examines card (since this is how every OS is designed).

But also:

Leave about 20 pixels below the cards.

When you move your mouse over a card, that space shows the word "Details" 
or "more"

You can discard from the details view of the card.


Unless the game is a trigger game, or speed is required, sticking 
to just simple left button to do most things is the best way to go.


Of course, until I learn the actual point of this game (the rules) 
and "feel" the cadence of the game, it is hard to tell.
Chris:
4-Jul-2007
An example, the card reveals a semi-transparent black halo as it 
zooms with window-like controls on the top-right  --> a down arrow 
(unzoom, though right-click on the card can do this too) and an X 
(discard).
yeksoon:
5-Jul-2007
nice game...

though..in one of the game ...it hanged. (not sure why)
- last card to win and it just hanged.
yeksoon:
6-Jul-2007
yes, it is version 0.1.2


I suspect that I was clicking too many times as I deal my last card...and 
the system (or game) may be trying to pop up the 'Victorious' screen
ICarii:
6-Jul-2007
ahh - if it happens again let me know and ill try to track it down 
- theres a check on zooming cards that only lets it happen at certain 
time
ICarii:
6-Jul-2007
Still to come is a stats mode and Reichart's help file ;-)
ICarii:
6-Jul-2007
.. and the inevitable bugfix for playback mode.. 0.1.4 adds a fix 
for resetting playback mode after a win..
Dockimbel:
11-Jul-2007
Btw, your games reminds me a lot this other online card game : http://www.maganicwars.com
(very good and addictive!)
Ashley:
11-Jul-2007
Looking very good. Possible to have a setup option for larger screen 
res? (the card text is very hard to read on a 1920x1200 display). 
Perhaps just offer a couple of standard 4:3 ratio options like 800x600, 
1024x768 and 1600x1200.
ICarii:
14-Jul-2007
heh - the object is to play your cards (left click to enlarge - right 
click when enlarged to play) and balance attack with resource management 
and castle defence to win :)
ICarii:
15-Jul-2007
The first part of the rebtower.r file containst help instructions 
on how to play and what the different parts mean :)  The numbers 
indicate a resource cost that has to be met in order to play the 
card.
ICarii:
23-Jul-2007
once i get XWings, XYChains and Swordfish coded ill release the GUI 
etc ;)
ICarii:
24-Jul-2007
solver updated to 0.1.1 - fixed quads implementation and pruned dead 
code :)  Puzzle now  set to mensa by default as im working on X / 
Y / XY Wings and Swordfishes atm :)
ICarii:
25-Jul-2007
sudoku-solver 0.1.2 released - this successfully solves the mensa 
puzzle.
http://rebol.mustard.co.nz/sudoku-solver.r

notes: added some even harder puzzles to test upcoming XY-Chains 
and Swordfish
Geomol:
31-Jan-2008
Fun little single-multi-player game, where you play multi-player 
with yourself: http://www.nekogames.jp/mt/2008/01/cursor10.html

It shouldn't be too hard to make a REBOL version, and it's a good 
idea, I think. My hi-score is 186.
Reichart:
31-Jan-2008
I would like them to change the "No. 1" to just "1"
And it would be very nice in at least shaded colour.
Geomol:
31-Jan-2008
Or rob a bank and make the aircraft crash? ;)
[unknown: 5]:
31-Jan-2008
Where do I find REBTOWER.  I got what I think is an older version 
and I'm getting hooked on this game and want to see if it is updated.
btiffin:
31-Jan-2008
Grrr...  :)  I have no desire for millions, but ... I wrote and published 
a fantasy card game back in the early 80s; an entire decade before 
Magic the Gathering.  They made enough money to buy TSR.   Rassafrassa. 
 :)  Not to say my Monster Romp (tm) game competes with Magic;  I 
paid an artist a whole $3 for each picture, but had I flogged it 
I could be independently wealthy now instead of umm, not.  I have 
about 800 decks of the original 1000 run.  Sold 60 decks the one 
day I set up a booth to sell it, then gave away the rest.  From those 
days forward I promised myself to never pursue an idea.  Best to 
let them die on the operating table and skip the what if crap.  That 
is until I bump into a greedy partner.  Success requires greed imho, 
or at least a state of mind somewhere above "communist".  :)


Paul;  I'm not sure, but I posted this to the calendat back in July. 
 http://rebol/mustard.co.nz/rebtower-0.0.4.zip
Geomol:
1-Feb-2008
:) btiffin, maybe open source and GPL together with a commercial 
license is the answer, at least for us software developers?
[unknown: 5]:
1-Feb-2008
Sorry to hear that btiffin, but I find once you grasp the idea behind 
rebtower it is a hoot.  I wish the other player could be a person 
instead of the computer and if I were you I would approach offering 
it to one of those online sites or somewhere they offer internet 
based games and adapt it for such.
ICarii:
11-Feb-2008
and re multiplayer version of Rebtower - its under development atm.
Geomol:
17-Mar-2008
LOL :-)

I had some good sleeps this week-end, as I had a fever and a bad 
throat. I also had time to play Assassins Creed and the old Outcast 
some, so I do other things than coding. :-) I've been working on 
many of the things, I post here in REBOL3, for some time, before 
I post it.
Chris:
14-May-2008
I'm thinking of adapting Rebtris for a very basic network-based competitive 
play.  The idea is several people log in (to a minimal CGI server), 
everyone starts at the same time and scores and game-over times of 
all players are constantly refreshed and displayed.  Ultimately determining 
who a) had the highest score and b) lasted the longest.  The game 
would be capped so that no one could realistically survive past 15-20mins 
(I have my reasons).
Gabriele:
6-Nov-2008
Oldes, one solution that is easy though a bit ugly, is to make the 
standalone version Windows only (ie. DirectX etc) but make sure it 
works perfectly in Wine. Then you automatically get a version that 
runs on Windows, Linux and Mac (intel). Anyone else can use the flash 
version. (Mac users would need crossover, or manually installing 
wine; but if you think you'll have enough users, you could license 
the transgaming engine and bundle it with the game so that it "looks" 
like a mac game to users - eg. just like Spore is doing)
Oldes:
6-Nov-2008
One of the demands was to port it to WII. I think I can downgrade 
it to Flash 7  or something like that (not using some effects like 
blurs etc.), which is the last working Flash Player version on it 
but still you need also Opera to run flash content on such a machines 
which eats resources as well. I think I will wait. Maybe there will 
come someone who has the know how and I will prepare what's needed 
(as I have it in bits level as I'm using my dialect:)
Reichart:
6-Nov-2008
Why not use OpenGL?  It seems your game primitives are just that...primitive. 
 A little physics, collision, sound, etc.   Nothing difficult.  IF 
you make it OpenGL, it can work on Mac, and even many Cell phones.


You might be able to write an abstraction layer so you can keep a 
lot of your Flash code in place.
Gabriele:
7-Nov-2008
this guy has a game for windows, mac, linux and wii: http://2dboy.com/games.php
Gabriele:
7-Nov-2008
maybe you can email him and ask :)
Oldes:
19-Dec-2008
I know.. we will see... but it looks it's an interesting product. 
And has a nice page.
Reichart:
19-Dec-2008
...and these are great times to cut a deal!
NickA:
31-Dec-2008
Does anyone know if Ryan Cole's raycasting games are still available 
anywhere? ( previously at http://www.sonic.net/~gaia/games/wanderer/wanderer.r
 and ../see.r )  I've also just begun to look at cyphre's raycasting 
example - is anyone familiar with it?  (in it's default state, it 
crashes).
Janko:
2-Jan-2009
yes, I completely agree with NickA... python's lua's haxe's very 
important strenghts were always that you got a easyer "scripting 
/ dynamic lang" access to various c/c++ apis ranging from databases, 
 openssl, libevent..  to wxwidgets to 3d and 2d engines (pyogre, 
pycap, pyglet) ... These bindings aren't all "perfect" fit to the 
language, for example coding xwPython app feels a LOT more low level 
than java swing app as you are dealing with direct c++ api, but they 
give you full world of choices that you otherwise just couldn't have, 
and you can always build wrap core api-s in more in this case rebolish 
shape.
Janko:
2-Jan-2009
There is also other side of this equation that is also very good 
to have IMHO. Easy binding to c libraries, and the reverse, possibility 
to embed REBOL vm/interpreter into c++. Lua (and nekoVM) for example 
allows both these things very nicely, python seems to be much worse 
at embedding and it's generally discouraged for example. To give 
just 2 quick examples, when I was making BKSJOS game (still in the 
making) I could very simply embed lua into the otherwise BlitzMax 
game and I used just lua instead of something like XML to "define" 
the individual levels, so they could also include "dynamic" logic 
(via events) and special behaviours with no complex coding in the 
blitzmax side.  If I could use REBOL for something like this it would 
be great.
Janko:
2-Jan-2009
Second example is direct game engines. I was making some games in 
PTK (it's a c++ library for mac and win) in the past. I wanted to 
use PTK with a higher level language and making a binding to it feels 
like a major pain to me, so after the BlitzMax+Lua experience I simply 
made a simple "engine" with it and embeded enkovm/haxe in it . I 
exposed some functions from c++ side like loadSprite, drawSprite 
and make some call-ins into the nekovm like "draw" and I could already 
code a simple game with it.  So embedding if possible at all of course 
would mean a great strength for rebol in my eyes! I think I once 
noticed that this will be possible in R3 but I couldn't find it later 
and I remember it only vaguely.
Janko:
2-Jan-2009
rebol would be very interesting  choice for this because it can "do" 
and process it's own code at runtime and it would make for a *dream 
combination* of making games that you can code and edit at runtime 
without restarting!
Oldes:
5-Feb-2009
but.. it seems to be especially for 3D.There is no info how to import 
or use vector animations. And the price is quite high:
    *  Retail: $30,000 per title
    * WiiWare: $15,000 per title
Oldes:
5-Feb-2009
Also: You must be a an Authorized Developer for the Wii console and 
obtain a Wii development kit
Janko:
3-Jun-2009
can anyone recommend a good MMO game to try... I long had some ideas 
for more lightweight MMO and would like to see how a good mmo works/plays 
but whatever I try it's pretty boring and bland, but I am not very 
knowledgable in gameplaying :)
Oldes:
15-Nov-2009
I don't know exactly, but probably not bad.. We were also contacted 
by some people who believe that they are able to port it to consoles 
and even to iPhone.. we will see.
Gabriele:
23-Dec-2009
yep, and i think this was second time (i've seen it when it was released, 
maybe not first position that time though.)
Oldes:
18-Jan-2010
It has been a difficult decision for us because we are big fans of 
Machinarium but we have decided that we will not be moving forward 
with the XBLA version of the game.  One of the main objectives for 
our team as a 1st party publisher is to publish great games that 
are exclusive to Microsoft platforms (Xbox, Games for Windows).  
Currently, there is a significant emphasis on investing our resources 
in games that will be exclusive to Microsoft platforms.  Since Machinarium 
has already is out on other distribution sites it falls out scope 
for what we are trying to do.   
 

I think there is a great potential for us to work together on a future 
title that is exclusive to Microsoft (Xbox Live Arcade and Games 
for Windows).  If you are working on a new concept, please let me 
know and let's see if there is something that we can do together.
Geomol:
22-Jan-2010
You can find old posts from me about GooBall in the groups "OSX" 
and "Advocacy".
Janko:
22-Jan-2010
what do you mean by it being clumsy? Did you have exp. with any other 
3d engines at the time? (I was so far only making 2d games, but I 
wasted a lot of time looking and trying various 3d engines)
13201 / 4860612345...131132[133] 134135...483484485486487