AltME: Web

Messages

Maxim
Does anyone know if there is any problem with using a ":" within a http URL, for the *target* part of the path.  
as such, the URL doesn't have any relation to physical disk paths.
ex:
http://mydomain.com/stuff/group:resource
I have the above working on a server, and browsers I've tested do not seem to have any problem with the URL, but I'm wondering more at large, if there are issues with it, in general.
It will be used  from within applications (java, .net, php & rebol) much more than from users manually using it within a browser bar.
rebol doesn't url encode the character, so it seems like its a valid character, but I don't want to assume, if some standard toolset doesn't like the color in the target.
color == colon  :-)
Sunanda
rfc1738 says ":" is a reserved character for possible special meaning in some schemes. It does not seem to have any special  meaning in the schemes mentioned in that URL.
But its reserved status means that it does not have to be encoded in any URL.
That's the theory, anyway. Practice may show otherwise.
https://tools.ietf.org/html/rfc1738
Gregg
The iMatix guys use it for both zeromq stuff and wikidot.
Maxim
true, good references, so I won't panick about it then  :-)

MaxV
to-url is your friend
Oldes
Are you sure Max?
>> x: to-url "@@@"
== @@@
Maxim
all the string-based datatype convertion funcs are flawed in some un-expected ways.   for example, you can to-word a lot of strings which aren't valid words.  
this is why I asked.  Although R2 doesn't complain, it doesn't mean tis valid or expected.
R3 did some housecleaning in type convertion consistency, but it has some flaws left (and I expect we will keep finding new ones).

MaxV

Janko
Hi, I am looking into OAuth. I see (and thank you a lot for this!) that Chriss Ross Gill created OAuth client part in the twitter library: http://reb4.me/r/twitter.html , I am reading into it, but does he or anyone else know how much additional work would be needed to do the rebol OAuth server part ?

Chris
I don't think it'd be that difficult - most of the difficulty in the client was making sure all the hashing was correct, the rest is just storage and logic.
Chris
For the most part, authorisation is based the parameters of a request hashed with a private key.  The trickiest part I'd imagine is the initial authentication - providing a safe method for the end user to allow the client to obtain and use the key.
End user downloads X's app/uses your
Chris
End user X downloads Y's app/uses Y's web site; X tries to access a function that uses your site; Y requests a temp key from you; Y directs X to your site with temp key, X says Y is OK, you give X a PIN; X goes back to Y, enters PIN; Y requests the permanent key from you.  Y can now do anything on your site on behalf of X.
Nothing to it : )

Pekr
any tip for some session related function-set for REBOL CGI purposes? I am looking for the case, where Cheyenne is not an option, and need some simple stuff for sessions ....
Arnold
acgiss.r from rebol.org an option?

Robert
Do we have anyone here that is knowledgeable / an expert in online markting?
Janko
I am not an expert but I have a lot of experience and also theory about various aspects of it because of making my apps grow (and helping some others)
DocKimbel
"Is Nginx obsolete now that we have Amazon CloudFront?"
http://www.peterbe.com/plog/is-nginx-obsolete-amazon-cloudfront

GrahamC
Don't quite understand what is going on here .. have to read the cloud front docs
Arnold
Can you trust the cloud? Not in the sense of reliability.
Arnold
I trust the clouddate being watched over, and more I trust it a 100% being watched or even analysed.
Some things I just take as is without proof, like the earth to be a flat disc ;)
MaxV
Yes, it's obvius. Frankly it depends on what data you want to "share". I like google documents for storing files to edit when I travel ,not very important documents. For example: if you would plan a kamikaze attack or write a personal diary on your sexual orientation, I didn't suggest you to use google documents.

Gerard
It seems to me that under Red, one marvelous tool which could be created would be similar this new one - which I just discovered ... at least with my not too long vision  - based on the Cheyenne HTTP server, it seems it could be realized using a similar approach, to begin with ... http://www.wakanda.org/overview   - Also available on Github for those interested to look at the code (may be Topaz friends - sinc it is base entirely on Javascript).
Could not JS everywhere someday be replaced by Red everywhere - or some derived fork ?
Kaj
Yes; they have a good model, but it's all ugly web technologies

Gerard
I agree but what else could be used - something built aroud the JVM - may be ? It must be a bit like Carl's REBOL based vision, isn't it ? Entirely self contained to be deployed anywhere but written once ...
Now it could be Red based instead ;-)
Kaj
Yes, all true. I've long been working on a system with roughly that model, but we only use it internally so far
Gerard
Nice, do you use some GUI for the output, kind of VId I suppose ?
Or do you send the output to some esternal receiver using messages  protocols ?
But then how do you catch the input if it not already part of your own system ?
Kaj
It's a web system currently, but it's prepared to support other platforms. My Try REBOL site is made with it
REBOL 2 is no use to me because it would never run on Syllable, and REBOL 3 still only has a GUI for Windows and Amiga, so it hasn't been useful for me to make a VID frontend

Chris
(from #Red) - Arnold, which version of Make Doc are you using? I've many iterations of MD that I've hacked away at over the years, perhaps I'll have something that will be easier to hack?  Most recent version I put together for the 'Notes For the Road' site, has some nice features - currently hacking at it again for a more ambitious QM project...

Arnold
Chris, I am stil figuring this out. I want bold/italic/(underline)/(em) paragrapphs separated with a blank line (easier to understand and no need to delete a routinely typed 'return'-key) h1/h2/h3 img (inline/left right center aligned) and a-href, only 1 level of bullits, and I think I can come along without numbered sections. I was thinking about mark-up delimiters on the beginning of the line like === ==+ ==- ==* ==#   I kind of liked \note and /note or /code but everybody will forget if the first one will be fore or backslashed so I guess the indented version to produce code. Plus I want the markup to be from a css file. No need to make this within the script because the template/and a script can take care of where and which to link to. That's about it.
Chris
Doesn't sound too onerous - I'd say most of the changes could be made to the parser, then tweak the emitter to get the output you want. Do you have a sample document? Is this the version you're using? - http://reb4.me/r/xhtml
(or tried?)
Arnold
This is a new version to me. I was still busy figuring out most of the used parses.

Arnold
I tried some today, not satisfactory results yet.
Arnold
figured out the line write %mijndoc.htmlÊgen-doc read %mijndoc.txt
makedoc2 results on the other hand were nicer but that was not it either.

Chris
The structure of MD since v2 is a separation of scanner and emitter. 'scan-doc will break text into a block of [style content] pairs. 'gen-doc will take that block and turn it into something, most commonly HTML.
The features of your doc - using your ==+, ==#, etc. are in the spec of the parser. Loosely explained, the parser's rule 'resets' when it encounters a newline.  It defines a few paragraph types that copies chunks of text (including 'paragraph that consumes text AND single newlines).  The rest of the rule determines the paragraph style and expected paragraph type:
  "===" text-line (emit sect1 text)
Could just as easily be:
  "==+" paragraph (emit my-bold-paragraph para)
The way a document is presented is all in the emitter. Seems this is where you seem to be yearning for most control. My first motivation using MakeDoc was stripping it of any styles - I just wanted a minimum of HTML markup that could be embedded and properly moulded by CSS. In my script above, I iterate through the [style content] list and use 'switch to determine how to handle each, this should be sufficient for documents without any complexity. It's really then just a case of modifying the HTML that is emitted.
Example of script used in RSP (exposes [escape-html scan-doc gen-doc]):
  <link rel="stylesheet" href="http://ross-gill.com/styles/anywhere.css">
  <% do http://reb4.me/r/xhtml %>
  <pre><code><%= mold doc: scan-doc some-input-text %></code></pre>
  <%= gen-doc doc %>
How it looks depends on the stylesheet you use.
Chris
I really should update that script though - a succinct version of make-doc though it is, it could use a bit of a refresh.

Endo
Chris: I'm trying to use oauth with Salesforce, can you help me about it?
I have consumer-key and consumer-secret, but where do I set login_url?
I'm trying your Etsy with Salesforce. I thought that I at least should be able to login.
Endo
I get "** User Error: Handshake Response does not contain Login URL" when I try etsy/as "username"

Chris
http://www.salesforce.com/us/developer/docs/api_rest/Content/quickstart_oauth.htm
Is this the API you're trying to access?  Looks as if it uses OAuth 2.0 (Etsy and Twitter are 1.0) - I'm not fully aware what the differences are.  Note that even though Twitter and Etsy both use the same signing method (OAuth), they differ in how you get the user key - looks as if this one is different again...
Hmm, that came across as unreadable here : ) - here it is again:
http://www.salesforce.com/us/developer/docs/api_rest/Content/quickstart_oauth.htm
Is this the API you're trying to access?  Looks as if it uses OAuth 2.0 (Etsy and Twitter are 1.0) - I'm not fully aware what the differences are.  Note that even though Twitter and Etsy both use the same signing method (OAuth), they differ in how you get the user key - looks as if this one is different again...
Kaj
They're quite different
Chris
Ok, in an effort to disentangle some of the OAuth code from specific implementations, here is an *experimental*, *largely untested* port scheme that does just that.
test-site: http://192.168.0.60.xip.io:8080/
probe-lowercase: func [str [string!]][
    lowercase copy str
]
read [
    scheme: 'oauth
    target: 'get
    url: test-site
    user-data: context [a: "Foo"] ; params
    key: make key [
        consumer-key: consumer-secret: "Your Keys Here"
    ]
    user: make user [token: secret: "Your User Keys Here"]
    awake: :probe-lowercase ; result processor, like :load-json
]
(obviously you'll need to change the test-site to your own test service)
I'm pretty sure this is a grevious abuse of R2's port system, but it does mean there is no new global words.
Chris
Yey! Works with Twitter!!
tm: read [
    scheme: 'oauth
    url: https://api.twitter.com/1/statuses/home_timeline.json
    target: 'get
    user-data: context [count: 10]
    key: make key [
        Consumer-Key: #consumer_key
        Consumer-Secret: #consumer_secret
    ]
    user: make user [
        token: #user_key
        secret: #user_secret
    ]
    awake: :load-json
]
Endo, I don't think this will help you with Salesforce, but breaking the OAuth part out should make it easier to adapt to OAuth 2.0.
Endo
Wow thanks a lot Chris! Thanks for separating OAuth port scheme, unfortunately I'm not familiar with OAuth but I'll try it with Salesforce. Thanks a lot!
Gabriele
Endo
I know, I already read it. But SF uses OAuth 2. :(
Endo
Is GET supported in read/custom ?
print read/custom http://localhost/test.rsp [get "a=b&c=d"]
Or should I use Graham's custom http?
GrahamC
Read is GET
Endo
I tried to change the method without changing the URL when switching POST and GET. Didn't work. Anyway, not a problem.
GrahamC
not sure why you want read/custom for unless you're altering the header contents
read/custom http://localhost.rsp?a=b&c=d [ header [ Cookie: "authtoken=anotherfoo" ]]
Endo
There are different authentication methods on Salesforce, so I'm just testing.

Chris
I am new to Git. I'd like to use it (or something similar) to keep a distributed copy of a web app I am developing. I'd like copies on two local systems (laptop and desktop) with the possibility of sharing with another developer based far away and deploying the app on my web host.
I sort of get the concept (at least the part about commits, etc), but am not really sure how to keep everything in sync. Is it worth using a hosting service like GitHub or Bitbucket (I know that perhaps defeats the purpose) to assure availability or figuring out how to use the web host for this purpose?
Kaj
You may want to try Fossil. It's much easier to run your own server
Andreas
To "keep everything in sync" with Git, you have have to do pairwise syncs. Each pairwise sync can be initiated from either side, the respective commands being "fetch" (from remote to local) and "push" (from local to remote).
If you want to keep many separate sites in sync, mediating the sync via a central host makes sense (as it avoids the exponential explosion of pairwise syncs).
If you have SSH access to your web host, using your web host for a central Git repository is trivial (assuming you have - or can get - Git installed on the web host).
Chris
In this one case, the host has instructions to set up Git on a subdomain. I'd have to consider it as it doesn't appear to be private.
Thanks Kaj, will look it over...

Chris
I'm trying out BitBucket with Git for now, the control over who can update being for now the deciding factor.  I have the following setup in mind:
http://www.dropbox.com/s/hkptm400jksmoet/git-setup.jpg
(sorry, bit of a crude sketch)
It's entirely probable that I'm using it naively and/or inefficiently, but so far I have the ME and BITBUCKET parts working just as I would have hoped. I'm pretty sure there's a million intricate parts to learn, but feel this is a good start. Am I overlooking anything obvious?
If I set up the link to the web host from the ME area, does that become available to the collaborator? (don't want it to)
Andreas
Looks like a sensible setup.
No, if you link from ME to HOST, that doesn't become available to COLLABORATOR.

Oldes

NickA
Cool

Robert
Does anyone know how I can pre-process an Apache2 configuration and store it in a single file?
NickA
No, but don't try to use any GPL licenced tools to do it ... (ba dump bump)
(or something like that)
Gregg
Not sure exactly what you mean Robert. I've written tools to generate Apache configs, if that's along the lines of what you're doing.

Evgeniy Philippov
To start some new discussions, 1) I like Squeak/Pharo Smalltalk's AIDA/Seaside systems. Hope to to practice them in realworld soon (creating a community site)... 2) I'm coding a new Oberon system  which will be able to do one of the following at once: a) interpret oberon b) translate oberon to x86 machine code c) translate oberon to javascript. This is a very long-term project, but I get excellent support from the oberoncore.ru community, and am actually making good progress. Current oberon project status is c++ sourcecode-based ssystem interprets oberon, interpreter has many temporary stubs.
The license for oberon project is GPLv3 or later.

Janko
has anyone tried to "signup with google" at rebol based web-app?
Janko
they find vulnerabilities in various oauth(2)/openid implementations that are used by many people, so writing my own to use it in production doesn't sound so good. writing for the receiving end of openid is simpler, but still.

Robert
Does anyone has a tip for a cheap service like: chartbeat.com, gosquared.com etc.?
Josh
Robert, the only thing I've ever seen is https://www.kissmetrics.com/  not sure if it fits what your idea of cheap is
Wait, guess it's more expensive.  Misread the pricing
Trak.io is free during beta http://trak.io/pricing.html  Haven't used it

Josh
Does anyone know about Wordpress themes that display code nicely?

Janko
Robert: depending on which part of those services is important to you. I have WIP analytics software that I so far only use internally and is not a typical webpage analytics (but conversion focused analytics). So it would at least fill one condition you are looking for. Cheap as I would give it to you for free, if you wouldn't heavily burden my server, and just compensating for expenses otherwise. But as I said it's not a polished all-round product yet (but has some special things others don't in case that would be what you also needed).

Robert
Janko, thanks. I signed up for GoSquared now. Going to see how it works out. Even I think it's more for realtime analytics of campaigns which require high-traffic. That's defenetly not what our site is about :-) but anyway, has a nice interface and is easy to use.

DideC
Today I went on the Saphirion's Website.
There seems to be something wrong in the config of the webserver as the .shtml pages appear as plain text source file !?
Tested on IE and FF on Windows7
So this is good : http://development.saphirion.com/rebol/r3gui/
But this is wrong : http://development.saphirion.com/rebol/r3gui/getting-started/index.shtml
Endo
Confirmed, on Opera on XP/Pro.
Henrik
This is apparently still not fixed. It's in our bug database, but not solved.

amacleod
Getting strange characters when reading from an rss feed:
ex:     And Members watch today’s show on Youtube!
I assume its utf8 characters that r2 can't handle...
Using Chris's altxml.r to parse the feed.
When I have had this problem with some texts conversion before I was able to replace/all the offending letters with the appropiate ascii ones but it does not seem to work in this situation.
PeterWood
You can use the utf-8-to-win-1252 function in http://www.rebol.org/view-script.r?script=str-enc-utils.r to convert from UTF-8 encoding to Windows-1252 codepage.
amacleod
Will try it, thanks Peter. Did not know about it...it will come in handy...

Rebolek
I have trouble reading data from CGI using POST on R3. I try to upload an image using POST then on server I use data: read system/ports/input to get the POST data, but it seems that the data are truncated. There doesn't seem to be some specific boundary where the data are truncated, I'm uploading images in range from cca 15-200kB, the resulting data are few hundreds to few tens of kB long, so there's no artificial boundary like 32'000 bytes. Anyone has any experience with getting data from POST?
PeterWood
Is that with Rebol 2 or 3 Bolek?
Rebolek
Rebol3
The most frustrating is, that the same file will throw different results. Right now I'm testing with small 3,5kB PNG file, sometimes I get full file, sometimes just few hundred bytes...there's no pattern what the result will be.
Bo
Are you sure that the PNG file you are reading is complete and not being overwritten at the source (like from a webcam)?
Rebolek
No, it's complete. It's file on local computer I made just for testing.
Bo
I see you posted a question on SO and it looks like there's an answer.

Rebolek
Yes, I'm going to try it, I hope it would work, seems like it should.
Rebolek
So it doesn't work for me. Reading no data from system/ports/input does not throw an error but waits for data forever (at least it looks like forever, it has been five minutes already so it's useless as an image uploader).
Bo
Have you tried checking the system timeout for network reads?

sqlab
Where are bytes missing, only at the end or also middle in the image?
Bo
I'm pretty sure they are only missing at the end.

Rebolek
Yes, at the end. I will try putting some simple PHP uploader on the same server to make sure it's not Apache's fault and let you know about the results.

Cyphre
Just a note about the CGI/POST issue. I've checked with Reboek a bit  on that and it looks the CGI mode is not yet fully implemented in R3 nor tested  (there are some issues on  both Linux and Win platforms). Someone interested in that feature needs to fix that ;-)
Rebolek
To be precise, someone with interest in that feature AND C-knowledge :-)

Ladislav
https://en.wikipedia.org/wiki/Rebol is currently under attack by a disruptive editor
Gregg
Is anyone chatting with him to see why all the citation requests are being added?
GiuseppeC
Hi Ladislav, Is there any way I could help ?

Ladislav
He is a problematic editor, trying to delete large parts of articles he dislikes. In this case, the Rebol article is innocent. I think that he found out I edited the article and wanted to show me "who is the boss there".
Other than that, there are at least two editors needed to revert his edits when he makes undesirable changes.
Arnold
Can't he be flagged as destructive and blocked to edit (at least) the Rebol pages?
My login code still works.
https://en.wikipedia.org/wiki/Wikipedia:Contact_us_-_Readers
if it's clear vandalism and you can't fix it, please email email@withheld4.me and include the address or title of the article and a description of the issue.
Gregg
Interesting. Using wikipedia to make a personal attack. I don't remember if I have creds, but let me know if I can help.

Ladislav
He has been subject to many investigations, just I filled two, but that had no effect on him until now.
Arnold
Is it the same person as the vexercizer/timeseries guy?

Ladislav
Ladislav
Otherwise, people knowing just Perl, Lua and C++ will "improve" the article
Gregg
Thanks Ladislav. Is the watchlist the best way to keep an eye on things?
Gregg
Comments added.

Chris
Is anyone still around that understands ASYNC-MODES? I'm trying to put together a wee web server for local application use. My question: http://codereview.stackexchange.com/q/152718/46291

Gabriele
You may want to use an existing one instead, the amount of issues that need work arounds with async modes is pretty big.
Also IIRC either my async:// or Romano's atcp:// work in server mode so you may want to use that instead.

Chris
Gab, was hoping to understand the basic premise, even if the caveats are muddy. I'd like to at least be able to say (to myself)--'this is the general idea, you might have trouble here, there, etc.'. While I have specific short-term goals for which my code is sufficient, I would like to have a more general appreciation of design choices even if ASYNC-MODES aren't destined for the next generation.
Also, I know you some influence in R3 ports--how much does the Rebol 3 port model reflect your ATCP/ASYNC experience?
ASYNC-MODES: 'Here be dragons!' : )
Pekr
There were some nice materials in the rebol.net/wiki. Pity it is gone again. Maybe Bo could ask Carl, if he would be able to put it back online, so that we could w-get it to some different location?
Chris
Petr: if it was on the Wiki when it went down, then it'll be on this clone:
https://github.com/revault/rebol-wiki/wiki
My question is more about motivation and influence than details though.
Bo
Chris
The clone above is the last iteration of the wiki. It's missing some dynamic bits (like categories, cookbooks, etc), but is otherwise the same content.
It is definitely illuminating, but doesn't answer my question...

Gabriele
- as to how async-modes work, it was never documented. the only documentation are my async:// and Romano's atcp://
- as to why it works that way, it was probably a kludge; only Carl knows the details
- if you want to learn your best bet is to build something with it, it will then fail in a weird way, and you'll spend a few weeks trying to figure out why it failed (hopefully the existing code will give you hints and it won't be that bad...); iterate that a few times and you'll have a general idea
- I don't think I had much influence on the native side of R3, my contribution was mostly the HTTP scheme, which was incomplete because I was waiting for Carl to answer some questions and implement a couple things on the native side
Chris
Thanks Gab!

Last message posted 21 weeks ago.