1. Web Programming
- Posted by Lone_EverGreen_Ranger Oct 21, 2010
- 1513 views
Hello,
I recentley read that youtube was programmed mostly in Python along with HTML and Javascript. I was wondering if Euphoria was capable of making a web program/site like youtube? I'm sure it is, but I want to make sure.
2. Re: Web Programming
- Posted by useless Oct 21, 2010
- 1456 views
Hello,
I recentley read that youtube was programmed mostly in Python along with HTML and Javascript. I was wondering if Euphoria was capable of making a web program/site like youtube? I'm sure it is, but I want to make sure.
I seriously doubt the site was programmed in html or javascript. Both of those languages are run in your browser (if you allow such things), not on the website.
Programming languages tell the computer what to do, and how. Like Python, or PHP, or the 100's of other languages (including Commodore 64 Basic), Euphoria can do that.
useless
3. Re: Web Programming
- Posted by Lone_EverGreen_Ranger Oct 21, 2010
- 1434 views
Yes I know Youtube couldn't be coded in HTML and Javascript by themselves, but it does use those things. Though with HTML and Javascript you could like a simple youtube site like going, perhaps. Anyways, I just wanted to know if Euphoria was capable of creating a youtube like site. Which it does, now that I know. However does anyone know of any good tools or libraries for the job that work with Euphoria?
4. Re: Web Programming
- Posted by jaygade Oct 21, 2010
- 1413 views
Well, HTML isn't really a programming language, but Javascript definitely is.
One of the better ones, in fact. It can run both in the browser and on the server side.
Now, I don't know about "like Youtube", but I believe that this website is run a large portion by Euphoria. I think that CK Lester/euphoric's website is too.
5. Re: Web Programming
- Posted by useless Oct 21, 2010
- 1438 views
Now, I don't know about "like Youtube", but I believe that this website is run a large portion by Euphoria. I think that CK Lester/euphoric's website is too.
Mine was too, and Tiggr served webpages made in Euphoria. I trashed and deleted all that code when i became useless a few years ago.
In my scheme, maybe 10 years ago, back when server storage was exorbitantly priced, a small php script relayed the client request to me at home, where Eu code built a reply, sent it back to the php script on the server, which then sent it to the client.
useless
6. Re: Web Programming
- Posted by Lone_EverGreen_Ranger Oct 21, 2010
- 1390 views
Ah, that's good, I can use Euphoria for my server side stuff.
7. Re: Web Programming
- Posted by irv Oct 22, 2010
- 1355 views
Euphoria works fine for cgi. If you are renting space on someone else's server, they may refuse to let you run Euphoria - or any other language or code they aren't familiar with.
8. Re: Web Programming
- Posted by AndySerpa Oct 22, 2010
- 1250 views
I have a commercial t-shirt site that's been running on Eu for years, although it is about to get replaced with Python/Django in a few weeks. Originally I even used the eu database for my backend (database needs were lightweight), but I found it too slow, not so much in the serving of pages but in the db update stage, so I now I use Sqlite which is a good fit for Euphoria cause it doesn't adhere to strict types (plus queries are much easier). Euphoria's main weakness has always been not enough people use it. Other open-source languages have libraries of books about them, etc. Also it is bit behind the times in terms of multi-threading, object-oriented features, and now it needs a 64-bit version...
9. Re: Web Programming
- Posted by jeremy (admin) Oct 22, 2010
- 1287 views
I have a commercial t-shirt site that's been running on Eu for years, although it is about to get replaced with Python/Django in a few weeks. Originally I even used the eu database for my backend (database needs were lightweight), but I found it too slow, not so much in the serving of pages but in the db update stage, so I now I use Sqlite which is a good fit for Euphoria cause it doesn't adhere to strict types (plus queries are much easier). Euphoria's main weakness has always been not enough people use it. Other open-source languages have libraries of books about them, etc. Also it is bit behind the times in terms of multi-threading, object-oriented features, and now it needs a 64-bit version...
64-bit is all but done, Matt can comment on that. As for being slow... I have sample web apps that dish out about 2,000 requests a second in Euphoria using the same web framework that powers this site here. Euphoria translates into C code and creates some very fast web applications. I don't use CGI as that's too slow, I use SCGI. This also removes the thread issue that you are speaking about because there will be, say, 10 Euphoria apps just waiting for a web hit to come across to it. Apache serves up the static HTML, images and JavaScript and then when something dynamic is queried, it passes it off to an already running, already connected to the database application written in Euphoria via mod_scgi.
If you're running a high-load server, it's the way to go.
Jeremy
10. Re: Web Programming
- Posted by euphoric (admin) Oct 22, 2010
- 1317 views
I have a commercial t-shirt site that's been running on Eu for years...
This one? :)
...although it is about to get replaced with Python/Django in a few weeks.
Why? What's going on?
Originally I even used the eu database for my backend (database needs were lightweight), but I found it too slow, not so much in the serving of pages but in the db update stage, so I now I use Sqlite which is a good fit for Euphoria cause it doesn't adhere to strict types (plus queries are much easier).
Do you have any custom code to help you work with SQLite?
Euphoria's main weakness has always been not enough people use it.
That's only a weakness for n00bs. Or you don't have a lot of time. Because then those resources (the books and web sites, etc.) come in real handy. :)
11. Re: Web Programming
- Posted by AndySerpa Oct 22, 2010
- 1269 views
I was referring to the other one (OHS, which you see linked there. I'd rather not have google pick up this thread for that name if you don't mind so I'm not going to type it), which is much bigger. The one you posted was a spin-off was has now been demoted and folded back into the main site. The first OHS was php and perl based on someone else's code, but I got sick of hacking it and so I made the fortune cookie site in pure Eu, including db just to see if it would work. It did, but when I went back to replace OHS with Eu I switched out the db for sqlite. It also relies on the pcre regex library. Our site isn't particularly high-traffic, and it has always worked fine. It does create dynamic pages on the fly (using the Kanarie library, slightly modified) but also has a caching system because the data doesn't change very often. And so even though the main script always invokes Euphoria for any page, most of the time it is just reflecting a cached static page. I do notice that it is slightly faster if I compile the Eu code, but most of the time I don't bother. It doesn't do any multi-threading (have waiting processes or anything). When I used the Eu db I did create a db server for that so the db was open and ready all the time with a process that stayed running. Then requests would all come through that single process to take care of any locking issues with the db. But sqlite is so much faster it was just easier and I could be a little lazier in the design. (Plus I gave up the idea of updating the live db because I didn't really need to for our site. I just replace the entire db when there is an update.)
As far as:
A weakness of Eu being not enough people use it => It is still a weakness if you are experienced. Although I'm not so clever in other languages as many here (I am completely useless as an Eu developer, for instance. I learned Eu to avoid learning things like C.), in Euphoria I probably qualify as an expert by now. I pretty much make my living programming in Euphoria (by doing tasks and building the programs I need to get them done in Eu, not so much in delivering Eu code or programs to others). Anyway, in the big-time languages, there are a million other developers and the library you could really use right now has probably been made already (like Django for Python). There are some pretty good libraries for Eu, but not nearly as many and not nearly as well-supported as with other languages. And although Eu can make wrappers for some .dlls easily (I use pcre and curl for practically everything I do), others are not so easy. (I made a wrapper for the Berkeley DB library, which is C++ based and had to manually search to find these offset amounts for each function so Eu could find them, and they would change when they upgraded the library, what a nightmare.) I think Matt Lewis and others have made some tools to make that kind of thing easier, but I have so little understanding of COM objects, etc that I'm just lost. And of course you can't just link to some random python library or whatever. (Not that you can with other languages either, but the point is you don't need to because someone has already made a native library to accomplish whatever function you desire.) Every time I tell some other programmer I'm using Euphoria, I still haven't run into anyone that has actually heard of it. So great as it is, the market penetration just isn't there.
Switching the site to Django => We are switching companies (that print the t-shirts), and the whole site needs to be re-done. And Django is awesome. And its made already. No such fast development framework in Eu. You can dream up a new site and deploy it within *hours* using Django. I plan to roll out several new sites in the coming months, and I needed to learn Python for other reasons.
Sqlite => I started with sqlite using Ray's eu wrapper, but it wasn't quite right so I just made my own simple wrapper. I don't use any of the fancy (i.e. faster) functions in sqlite, I just use the single basic query function for everything, which I believe compiles queries on-the-fly etc. The other thing sqlite has that Eu db doesn't (easily) is transactions, which come in handy. I just store serialized Eu sequences of undefined length. Easy, works good.
I am not up-to-date on what's going on with Eu 4.x. Still using 3.1. Last time I tried it, it was still way too raw to do much with for my purposes. I would play with much more if I had time, but I haven't had any free lately. I'm not sure how I'm gonna transition -- I have mountains of code that will probably become incompatible or at least redundant with all the new built-in stuff and standard libraries. (For instance, like I said, I use pcre regex for EVERYTHING -- I'd probably have to make a wrapper for the new built-in support to match up with the one I've been using the last few years.)
Anyway...Eu works fine for web programming, but you are "on your own" as it were just as you are with most things Euphoric.