I want to learn more about how CGI works internally. I am not looking for a library or documentation on how to use the library, but rather for documentation on how the server and the application will communicate, what data gets sent, in what order it gets sent...
nothing is better than a rfc :)
RFC3875
Related
I'm trying to find a pastie like webservice that do perform some kind of automatic language detection (in term of programming language) and does the syntax coloring accordingly.
Most pastie websites do not have this feature I'd really love to have and use.
Thanks !
Pygments has something close : http://pygments.org/docs/quickstart/#lexer-and-formatter-lookup
>>> from pygments.lexers import guess_lexer, guess_lexer_for_filename
>>> guess_lexer('#!/usr/bin/python\nprint "Hello World!"')
<pygments.lexers.PythonLexer>
Not perfect but quite useful already.
But yeah I share your frustration with paste service, had the same. In my opinion actually the coloration should be done client side.
https://github.com/alexgorbatchev/SyntaxHighlighter
http://code.google.com/p/google-code-prettify/
are pretty nice in that regard.
I've finished to develop my own tool to do that. It's called UU and performs automatic syntax recognition using highlight.js.
http://uu.zoy.org is free and encode locally what you paste in your browser before sending it to the server.
The API is WIP.
I've been strugling with WCF to do REST the way I want it to work. And apparently so has quite a few others. I've heard about the WCF Web Api project, but wrongly dismissed it without looking too closely at it. Sadly, now that I'm looking at it I find that the documentation is rather outdated. Like, this blog post has some nice information, but classes have changed, parameters have changed, in short, design has changed.
So I've been using an old example of how to plug in Json.NET (newtonsoft) as my serializier, only to realize that after I had it working, it wouldn't work for my IErrorHandler. Further I had a problem with how to Deserialize a string from the uri template to an operation Type parameter.
It appears however that I should be able to solve these two problems (and presumably many others that I haven't stumbled over yet) by using the media formatter extension point and what's referred to as Processor<..>s in outdated documentation, which is now HttpOperationHandler<..>s unless I've missunderstood.
My problem is rather basic, I can't figure out how to correctly configure my IIS-hosted app to use my operation handler, assuming I've implemented it correctly. Since it feels rather dumb to ask for instructions on such a basic thing, I'll rather ask where I can find some documentation on how to do this sort of thing? (Explanations are welcome of course.)
I'm not after seing which classes exist, or what their methods are named with what parameters. I can see all that in my object browser. I need documentation for the overall design, and/or examples implicitly describing things like:
How do the different classes in the API fit together?
How can I configure from web.config?
Must I rather do a custom HttpServiceHostFactory?
What and how are you meant to use the framework?
How should I extend to reach what sort of goals?
How should I configure to place the extensions in effect?
From the lack of answers I assume the documentation quite simply isn't ready.
I was looking for it on the codeplex site under the Documentation tab, and found outdated stuff.
However, after familiarizing myself a bit with Codeplex I found out that the good stuff was in this Discussion section. Searching a bit in there helped a lot to be honest.
Concerning config-file configuration, I didn't find anything, so I'm assuming this will be added as the last thing before official release. Meaning I'll use the HttpConfiguration in a custom HttpServiceHostFactory for now.
The trick about the HttpOperationHandlers was twofold: Firstly I was throwing an exception in my operation and hadn't implemented a global HttpErrorHandler yet. (Doh!) Secondly I didn't know that the parameter name of HttpOperationHandler<..>.OnHandle had to match the name of the operation parameter.
I have two Cocoa applications out of which one is a launchd daemon (Foundation tool). I need to call some of the methods in the main application from the daemon. How do I use Distributed Objects here? Can anybody suggest a complete tutorial (except Apple documentations) for this?
My (otherwise pretty out of date now) comp.lang.objective-c FAQ listing includes a question: How do I forward messages between remote objects? which explains how to do DO and includes a link to some GNUstep documentation on DO.
Much of the documentation on Distributed Objects on the web (in 2016) appears largely out of date and won't even compile on XCode 7.1. Also, #user23743 's answer had a broken link. Here's a more current (as of 2016) StackOverflow answer that shows you how to do it now.
i'm newbie in FTP connection programming in Cocoa. I found 2 library that i can choose for make my app, but i dont know what's the best between these libraries. The libraries are libcurl and chilkat . The problem is what benefit of each library? Did somebody compare it? or maybe can anyone tell me about your experience? Thank you
I don't have any experience with chilkat, but I can tell yout that libcurl is used in a lot of programming languages and is available on a lot of systems. In for example PHP or on a Mac curl is a great tool to use.
So I would advice libcurl if it's available on your platform. You will probably find more information about curl and it has proven itself on many other platforms.
Also interesting if you want to go with curl is curlhandle. It's a cocoa wrapper around the curl library. Probably very handy in your case, but I've no experience with it.
I can tell you that the difference between libcurl and chilkat is like this: (though you probably know by now)
Chilkat is like the chess game you buy at the store and libcurl is like the plastic in liquid form you buy that you can make any chess piece with.
Libcurl is a slightly abstracted sockets-connector and Chilkat handles everything you'd do, up to a certain amount, with that connection. You're either staring at bits or something "made those bits into an email". I'm about to buy Chilkat for some of the libs, I like the features, but at the same time I wish I had time to read the RFC's and play with the other stuff using libcurl. Anywho, hope that answer is worth something to someone.
Because this question is still ranking high on google i give you my experience.
I bought chilkat in 2015 and moved to libcurl later and my own implementation much later. Both are far from perfect. libcurl just shows it's age and some weak designs.
libCurl is an library that tries to implement all URL able protocols even if they are designed as stream protocol like FTP. Do yourself a favour and only use it with HTTP/HTTPS. It just does the transfer part. Which is not enough for handling. You would love to see at least mime and charset routines to use the downloaded files.
Chilkat is a toplevel library that tries to give you as much highlevel access as possible. It uses background threads in script languages where it is not easy to use. The problem is that the API is terrible, very little documented and total failure when you want to write a quality program. For example it returns requests as a string. There is no way for stream processing. Now imagine you download a large GB iso file, you wont be happy. It can return as a file but then you have to specify this at the begin of a request when you don't knwo the download size.
Also the code quality until proven otherwise is bad. There are a few chilkat source code snippets in the wild which you can find via google and they are pure madness. Ok we don't know how this old code has been refactored now. But it leaves a bad taste, remember this is closed source and there is not a single mention about corner cases, which protocol is implemented, which feature of protocols are implemented and so on. You are using a total black box.
Also it does not allow high performance and high value code. I used it to write a web crawler and it was much much slower then libcurl.
I later used the HTTP and SSH compoenents to automate some server/client management scripts and there it shines. You know both sides and can just test if they work together and don't get any surprises. Then it is indeed easy and better then using the broken python or ruby SSH.
But if you ever contact with another unknown server, Chilkat is not your library.
Is there a version of Smalltalk that allows distributed message passing, much as Erlang has? Could Smalltalk be an ideal language if it has this distributed message passing, as Smalltalk also implements its own VM if I am not mistaken?
Everything in Smalltalk is done through message passing. Almost all of it is local of course.
Richard Durr hints at it in his answer, but Croquet have a library called Islands, which is modelled on E's Vats.
Have a look at Croquet. Maybe their technology is what you want.
http://en.wikipedia.org/wiki/Croquet_project
There is SqueakElib
http://www.squeaksource.com/squeakelib.html
wiki.squeak.org/squeak/6011
In Cincom VisualWorks there is a library called OpenTalk. The basic idea is the same -- replace remote object with local proxy. Good thing about OpenTalk is that in many cases it just works, and in other cases you can customize it by replacing its components (marshaller, policies, network transport, etc).
Basically, OpenTalk message passing is synchronous (contrary to Erlang as far as I know). But you can implement (and some users have implemented) any required semantics in a rather straightforward way.
OpenTalk is a part of standard VisualWorks library.
VisualWorks page at Cincom:
http://www.cincomsmalltalk.com/main/products/visualworks