Archive for July, 2008

Great talk about PTL-Scheme

Wednesday, July 30th, 2008

I mess a little with scheme (and some lisps) from time to time. Rebol is sort of similar thing too.. I found this excellent and very energetic/funny talk about PTL-Scheme today. Looking at the PDF and listening to the talk gives you great peek into the world of scheme which is one of those smart, beautiful languages where a very powerful thing is build on basis of very few rules (lisp, scheme, rebol, factor, erlang (also has very few rules I think), forth)

audio - slides - post

In November 2001 I gave an invited talk at the inaugural Lightweight Languages conference that has since become somewhat notorious (in netspace, it is said to be “kickassing genial”).

DrDobb’s Journal was kind enough to record the conference and professionally edit the tracks. They unfortunately misplaced the audio track, and said they were unable to locate the backups. In cyberspace, however, nothing is ever lost; as Linux Torvalds said, “Real Men don’t make backups. They upload it via ftp and let the world mirror it.”

Enjoy!

Zemanta Pixie

Simple send-to-all TCP server in LUA

Friday, July 25th, 2008

I did a lot of boring stuff yesterday so in the evening I felt I deserve a small treat. I decided to finally get more familiar with 2 of the C* words - coroutines and closures . I know partially what they are and used them here and there, but haven’t really gotten deeper in. Lua can do these without blinking so I decided to make a simple tcp server with it and see if I can use them on the way there.

click here to see the current Lua code

send-to-all server and clients

The code works but it’s not in any final state yet. The server accepts any number of TCP connections which it then keeps open and when it recieves a text from any of them it sends that text to all clients. If I would add nicknames you would have a simple chat server (but I made enough of those already). I also made quick GUI client for testing in REBOL, code here and a quick stress test script in REBOL too ( code here )

I did use a closure in a rather cool way (I think), and I implemented coroutines but in the current code they have no meaning to be there. They will get needed if I will extend the thing into something more interesting. I will write more about some interesting parts of the code next time.

Zemanta Pixie

Make a quick html data extractor with REBOL (code)

Monday, July 21st, 2008

This is the REBOL code from video in previous post. A nicer version can be seen here

page: read http://www.avto.net/2004/motornaKolesa/zadetki_zadnjih100.asp
ads: make block! 110
parse adspart [ some [ to <tr> copy ad to </tr> ( if find ad {<a HREF="oglas.asp?} [ append ads ad ] ) ] ]

ads-rule: [ thru </td> thru {<a href="} copy _link to {"} thru ">" copy _title to </a> thru <small> copy _descr to </small> ]
clean-html: func [ a ] [ replace/all a "&nbsp;" " " ]
foreach ad ads [
    parse ad ads-rule
    print clean-html _title
]

Make a quick html data extractor with REBOL (video)

Saturday, 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

Friday, 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)

Monday, 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

Sunday, 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 (A)got the same idea at the same time totally independently of what I wrote, or maybe (B) 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).


Update: The guy who I wrote to replied me and explained that my mail wasn’t seen by anybody else and that he wasn’t involved in organizing the FF3 release day. I believe him, so this seems to be just a case of 2 things happening at the time that made it look like it could be option B I mentioned upthere, but it’s A.

Zemanta Pixie

My dear diary

Thursday, 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

Thursday, 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

Wednesday, 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!