Make a quick html data extractor with REBOL (video)

July 19th, 2008

image from wiki en: Summary:Carl Sassenrath, 2...Image via WikipediaI will soon need to make some sort of web-spider. It seems to me that a very good choice for making one is REBOL. I was programming in REBOL years ago so I forgot most of things. REBOL recently released a very much awaited version 3 (I was a little afraid it is more of a “vaporware” ), and after few years showed that Carl Sassenrath still “means business” with it. So my interest in this interesting language is renoved too. Another big plus is that 3.0 greatly solves some issues that I had with the original REBOL (general closeness, artif. limits in Core version, async stuff). I decided to make a quick video of the procedure so that I get you interested in this excellent language too. Yes you, who did you think I was talking about ;)

I do the following in the video: I load a webpage of a “last 100 motorbike ads” thru HTTP, I parse the unnecesarry html away first then I parse the table that holds the ads into separate rows first and then each row into concrete data.

Interesting tidbits: do you see how I don’t enquote http address (REBOL has many datatypes and URL is one of them) or XML tags (the same reason). Most of the time I just use the parse word which moves me into parse DIALECT. Most languages have functions, classes but rebol also has dialects. parse dialect is just one of them and you can create your own as you can create your own functions for example.

I used only the most basic features of parse dialect here. It’s an unbelievably powerfull feture.

Zemanta Pixie

Good video about web-app security

July 18th, 2008

Yes, the usual web-app security themes, SQL Injections, XSRF and XSSI but very well presented, with practical examples. And I admit learned some new details about all 3 topics.



Schobbia Battles (the cards game)

July 14th, 2008

tree mannimalJust to inform you there is a new project going on here. It’s a project where no programming is needed (at least for now). It’s a card battle game, but not the trading cards battle kind. I tried to make it easy to learn and hard to master. We learned my wife yesterday in few minutes and next thing she beat us because we weren’t careful. So the rules I think are still very minimal while allowing enough combinatorial complexity that the thing is interesting. My sister is drawing the cards images now and once that is done we will start making it more public. I made a very simple website where I will update info about the game.

Schobbia Battles

There are 3 elements in the game, each element has element creatures and magics. Next to that are Extras which are some sort of special case cards and weapons not bound to the elements. The game has two strategical parts, one is picking the cards - the other is battle. Picking of cards is made in a way I haven’t seen anywhere (but I don’t know many cards games). You also need a dice to play. OK, that’s it for now.. more updates will follow.


Not the most utterly nice thing from kiberpipa, but meh

July 13th, 2008

Osho („Rajneesh“ Chandra Mohan Jain)Image via WikipediaI said I have one more of these “bullcrap” post to write before I go to a cleaner version of posts. I wanted this guy to come from vacation before I write it because I don’t want to ruin a fraction of his time or good feeling over there, because all in all, it’s not a big thing.

Ok. I have made some chat server which I wanted to use as a basis for making more interesting apps. I got some idea some day that could be used at cultural and other events.. that would make them more of a dual (real + online) events. The idea was basically simple and not something groundbreaking and also didn’t require any massive coding besides using my chat + some streaming video stuff + other ready available stuff.

it goes like this:
1) Event is happening .. for example a kiberpipa lecture
2) Video is streamed and available on a webpage in realtime
3) Besides the video, chat would also be embedded on that webpage so people who watch the video can chat one to another
4) Chat is projected on a wall in the room where the real event is happening
5) Near is a computer or two with chat loaded so that people from event can also chat back
6) Chat application could have some special funcionalities like voting for questions to ask the lecturer .. etc

So I proposed this to one guy from kiberpipa, I said I can do the chat part for free (they already do stream video). My reason was that I want my (open sourced) chat server to be used and progress somewhere and it would be a cool reference. The guy didn’t reply back, which is no problem to me, the idea can not sound so good to him, or whatever..

But a week or two later kiberpipa was organizing a big Firefox 3 Release Event, with talks, lectures and a party, etc… and I got a newsletter from them saying also (if I translate) “if you can’t join you can watch a video stream of the event here”, “you can join us in our IRC chatroom”, “chat will be projected on the wall, so we won’t miss a thing”.

So, WTH, I don’t care.. nice to see my ideas roughly in action without having to move an finger. Yes, maybe they got the same idea at the same time totally independently of what I wrote, or maybe I “inspired” them (as it’s often called in indie game community). In each case they could of written me at least a line back if they intended to use something like it. This post is just so it’s known that I know and the story can be closed to me here. If something is troubling me with someone I usually write him/she directly not post it publicly, but I would feel stupid writing an email to a person again if he didn’t reply the first one anyway.

Otherwise, this doesn’t change anything to me. I love and am utterly happy with what Kiberpipa does and that it exists. They are the great and one of rare voices and meeting points of young, innovative tech crowd in Slovenia. And they have lectures, meetings, various stuff multiple time per week, so a lot of good will must go into running the thing. I will of course still visit it when I have time. Good thing I was reading too many Osho books once and totally dissolved my Ego by accident (joking).

Zemanta Pixie

My dear diary

July 10th, 2008

I noticed that my blog lately was more of a a mix between “my dear diary, I saw the blonde chick again today and I have to tell you how I feel right now” and “I have this opinion you know, and I am so smart and all that you are all dying to hear it.”. I will try to revert back to exotic languages code samples and announcement about my “numerous” products which is why I started this blog more or less.

I have a little problem writing any cool language examples lately, because… I went into ultra-practical and business wise mode, or to say it in more direct way “what the fuck - stop playing around - earn some fucking money and get a life”.

So I am making new web-project in PHP (I planned to do it in Factor in my “young idealistic” days (2 weeks back)). I am not working on Ask Robi right now which was one source of some interesting code.

I am programming a semi-casual game in BlitzMax which is… well a Basic (I hate Basics, but this is the only reasonable choice besides c++ that gets the job done well because at (casual) indie games, distribution and compatibitilty the most important thing (I ditched c++ because I hated all the compiler options that was more complex to me than the code)).

So no time an Ocaml game, or even Java or Clojure game :| … and no time to make progress with waterisk game, because frankly I know it’s not a game you make to earn something.

So the conclusion is that I will be hopefully writing a little less posts now. Well I have just one such post to write when I find time.

Zemanta Pixie

Technological singularity here and now

July 10th, 2008

Moore's Law, The Fifth Paradigm.Image via WikipediaI worry about many things but I don’t worry about technological singularity thing. I discovered just recently on twitter that this term even exists. My response on twitter sums it ok:

@someperson - meh, until people think AIML is about AI you have to fear squirrels surpassing human intellect more than computros :)

Not that good example but if you want to see how stupid computers can be watch this video (this guy tries to write a small pearl script using vista voice recognition.. MEGA FAIL):


But I admit they are almost surpassing the humans ability to make me laugh.

And another thought. Did you ever hear the quote.

"These next-gen games... they keep improving graphics but AI in this [insert latest FPS] is as dumb as few years back. Why the hell don’t they work on AI at least 30% as on graphics”.

I can try to answer (but don’t take this for granted if you have some I).

Because they can't, because we don't know how to make a better functional AI yet. And most of what you see in these advanced games is not much of "AI" anyway, it's just smoke and mirrors that gives an impression of some intelligent behaviour.

Zemanta Pixie

Moje sožalje vsem v Sevnici

July 9th, 2008

Vsi vemo kaj se je zgodilo prejšnji teden zato tega ne bom ponavljal. Ne živim več v Sevnici, kjer sem živel in rastu gor vendar bom po srcu vedno Sevničan in ponosen na to. Moje sožalje vsem svojcem!


From Russia with Code

June 27th, 2008

At some web-project, where I was main coder for 2-3 years, we were seeking additional local coders few times. But we had no real long term luck. It just seems hard finding good committed and professional programmers here. You know, the ones who go, think and then DO it. Not the ones who say, but we should use X templating engine or Y framework or Z something in the middle.

Well but things are looking a little better now… we used oDesk and we found a company from Ukraine which offers programming services. And so far, they DID it. They have a “manager” to which you talk to and who manages a bunch of programmers. You ask him “Do you prefer any of the web frameworks specially, can you code without it?” and he answers “We can code in any of them or without”. He asks “What are your coding guidelines, what structure you like?” and stuff. That is professional attitude, you accommodate to the project.

You can’t come to a 40.000 LOC project, that has been online for 2 years, to do some well rounded simple thing and say, “but I like smarty templating engine, let’s change all this to smarty first”. I hate big frameworks/systems and it doesn’t get much bigger than Typo3 CMS, but when it was needed, I did code a big app in it and I did code it the Typo3 style. Contract programming is not about your personal likes and dislikes, “and my framework has bigger MVC pattern than yours” shit… It’s about doing it..

We are starting with a bigger and quite complex part of applications with coders from Ukraine next week. I hope it will go well.

Just to be clear, when I wrote “say” upthere, I am not against saying, having ideas, proposing things, any-things. Contrary to that, I am the one who thinks that not being afraid of being “wrong” or “stupid” is one of the greatest personal features. By “say” I mean, “let’s use X. No? Then, byebye.”

And btw, anyone who is using Typo3 (I think our government uses it) is, well.. a little crazy (to be polite).
Zemanta Pixie

Why not reverse it?

June 25th, 2008

Profit (TV series)Image via WikipediaIt is quite common that an Economist/Marketing/Managing person gets a concept, then finds programmer(s) to build it and pays them per share or hour/project.

Well I will try to do it the other way around. I will build the thing and try to find Economists/Marketers/Managers to sell and manage it. I am prepared to pay in profit share or per hour/project (it depends on what we come up with).

I value marketing and managing efforts a lot and know that making the thing is only one part of the process. But where do I try to find such people/companies?? Any ideas?

Anyone interested? If you thing you could be in general interested in such deal let me know, I will show you the projects and you can see if you see any good chances in any of them.

Zemanta Pixie

Forth brain injections for free

June 22nd, 2008

The X Factor album coverImage via WikipediaForth is “a little” different than you everyday programming language. Basically it’s different on so many levels. If you ever wondered what it’s like, but didn’t have time or a reason to invest to get/learn/do-enought-to-get-the-feel it — now internets offer you a free ticket to get a taste of it.

Samuel from Falvotech made a video where he coded a HTML parser in gForth, he seems a very fluent Forth programmer and it’s a joy to watch him code (to me at least):

Click here for article and here for the video

I do some coding in Factor which is one of incarnations of Forth but it’s still different in many ways and was always interested how his raw-metal father Forth is. This video was super interesting to me. The core rules are very known to me as it’s the same as in Factor so I could easily follow it, I hope it will be approximately the same for you.

I hope you won’t focus only on “uh how low level is this” and “what crazy stuff is he doing with return stack?” (in few positions of the video) and so miss some things that are pure beauty of the concepts here (like what concatenation brings you). Well, your loss if you do..

— HIGHLY OT —

Hehe, this is above AI, this is AT (Artificial Transcendence).. I just installed the new Zemanta plugin, I am listening to Iron Maiden while writing this article and mentioned it no-where in it and it proposed me picture of Iron Maiden (that you see upthere) in suggestions.

Well it’s even worse, this is future look-up and self inducing prophecy by the plug-in. I was listening to the iron maiden and not mentioning them, it proposed the pic to me, now I did mention them so the picture has a logical place to be in this article and global order is restored once again. I am impressed by the new version guys ;)

Zemanta Pixie

No-login user authentication

June 17th, 2008

I am making some portal. It is a sort of the portal where people will need to register and fill in some info. They have to have an option to login at any later date and modify their info but this will not be like everyday or even every month thing. It seems stupid to me that people have to create and remember a new username/password for every utility that they need limited access to very rarely then.

So I am making some variant of user authentication system for them that doesn’t use usernames or password. The point is that it’s much more minimal to make and use than the standard hog of stuff you have to do to make a usable user authentication system.

So what elements does normal system need:

  • verification email with a link and functionality to accept verification
  • login (username/password) form and functionality
  • forgot password link, form and functionality
  • change password form and functionality
  • logout link

This no-login system is basically like a one-time-password system where it is not limited to one-time, because it would be impractical and it has no reason to be.

So how does it work: When you register to the web-app you receive an email. In it there is a link, you click it and you are “logined” into the web-app. When you need that web-app user area again you open the email and click it again (or you bookmark it, or whatever). But you can delete (loose) the email at any time and when you need access again you go to web-app and fill in your email into “get me a new key” form and you receive another link on email that you can use as long as you want and then delete too (if you want).

So what elements does this system need:

  • sending out email with the link - 80% the same for the first time (registration) and for all “get me new key” times
  • “get me new key” form and functionality
  • logout link

you don’t need verification via email - because the email with the key link is also a verification of their email
you don’t need login form and functionality - obviously
you don’t need forgot password link, form and functionality - because you are meant to forget it and you use “get me new key” anyway
you don’t need change password form and functionality - because there is no password

So it has some pluses, but I will see how it performs in real. If you see any weaknesses go ahead and tell me!


Re-confused with Seaside a little

June 15th, 2008

After I thought I have web-development all figured out, I got a little confused about my state of mind about it today. I watched some videos and played with Seaside a little more than before and now I don’t know. Things there are much different than my style is, but I can’t decide…

..is that really good and cool or not? Are my theories still solid? Do I code on too low level without the need to do so? what is really the right level of abstraction??? I thought I knew…


Inflatable Sunny days to come

June 9th, 2008

Me and my wife had a hard-shell canoe once, we drove it on few lakes and rivers around Slovenia. It was nice, amongst other things my sister and her b-f discovered the Bohinj monster in it and the legend now passes to younger generations.

Then 3 guys, drunk, took it to for the ride on Sava damn at HE Breg (near Sevnica) without asking anyone. They lost balance in the middle of the dam, fell in and almost drowned. The canoe sunk and was never found again.

Now I decided not to take my whitewater kayak with us on a Switzerland trip, but we bought an inflatable mini raft/canoe from Gumotex (Sunny) to deliver ourselves some family friendly adventures on lakes, seas and rivers in the future. While the hard-shell canoe was huge to put on a car and a project to get with it anywhere this thing is even more durable, doesn’t sink, weights just 16kg and I can pack it into just a special backpack. It can also totally accomodate to paddling in solo or duo.


gumotex sunny
Image is from this page, good info about IK-s

Can’t wait to try it on a water… Although ultra practical I still have some prejudice about inflatable stuff on water.

I found out that Euro football something is happening right now in Austria and Switzerland where we intended to go. So we are switching to Italy - South Switzerland instead.

Tripping for little earthlings

June 6th, 2008

Me and my then-GF-now-wife went to a 1 month trip through the side roads of Italy, France and Spain when-we-were-young and beautiful (and both had long hair). We drove an old yellow diesel VW golf (Mk 1). It marked us and it was sort of trip of a lifetime.

Well, hopefully not. We two + our 2y. son Miha bought a smallest used Adria’s camping trailer last week, and now are going for a shor trip through Austria to Switzerland next week. The idea is to be even more mobile than with a tent, and dryer in this monsume summer we seem to have. You stop, pull the handbrake and go to sleep :) - at least that’s the idea.. too bad even smaller trailers don’t exist here.

Buying the trailer, fixing up the pulling hook to the car and all the bureaucracy attached to it has stopped all my work except contract jobs for last week or two, but what can you do?

Too bad pics from the trip to Spain are all in non-digital formats.


FotoLOAD midi is done, tested and stabile

June 1st, 2008

After some kicking and biting FotoLOAD - midi finally works nicely and stable on all 5 test servers. It was tested with photos up to 6MB and with 100 pics to upload at once and it finally works as it should. And even if server fails on some image or you internet connection blinks you can nicely continue where you dropped off. This week it will be used for real at first photo studio.

The last problem was that resampling of >3MB photo to a thumbnail crossed the RAM usage limit at some shared hosting providers but after we found out what was the problem for upload failing at the end quite simple solution was found. In short.. now we do imagecopyresized from (for example) 2000 X 2000 px to 350 X 350 px and then do imagecopyresampled to 100 X 100 px . If you look at the docs you will see why this uses A LOT less resources and gives the same quality at the end.