Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!


Forgot your password?
DEAL: For $25 - Add A Second Phone Number To Your Smartphone for life! Use promo code SLASHDOT25. Also, Slashdot's Facebook page has a chat bot now. Message it for stories and more. Check out the new SourceForge HTML5 Internet speed test! ×
User Journal

Journal Journal: HiLexed 2.0 - an update

Look-ahead generation is now completely automated. That is, it is precompiled on the first run, but can still be re-generated dynamically if confronted with some language that adapts how certain segments are to be parsed, for example after a function or variable declaration..

HiLexed can now compile semantic actions at any time (I could even allow these to change between invokations) and invoke as needed. Currently, only java is supported for these actions, but I am keeping my options open by making the decision on compilation strategy in a configuration file. Individual user projects should be able to override the default, but initially I will just create a working system.

Recursion is probably the final big problem to solve for this version. That is, I have parts of the problem solved, but the many different forms do not fit well together. The plan is to emulate the results of LR-parsing by annotating recursive segments with information on its form of recursion and by keeping track of recursive insertion points into the resulting list. Yes, results will be serialized since different languages have different priority for the same operators. I believe Smalltalk and NewSpeak are strictly left-to-right, whilst the wast majority of languages use standard arithmetic priority.

Upon entering a recursive segment selection, some segments are allowed and some disallowed. Upon exiting a recursive segment there is a certain set of allowed follow segments and for some even an exit segment. What is allowed differ depending on the annotations made earlier. Some segments are multi-recursive, directly or indirectly so the different rules have to be combined. Very complex but I believe solvable for deterministic grammars.
User Journal

Journal Journal: HiLexed 2.0 comming along

HiLexed 2.0 may not be ready for the spotlight yet for a while, but I recently made a breakthough regarding the look-ahead. I can now predict very efficiently how HiLexed should parse segments and now have this baby doing left-recursion because of it. 10000 fully deterministic (and correct) predictions for java class body content in only 190ms. As most of the lower level parsing is deterministic to begin with, using reserved keywords = zero look-ahead, focus is on class-body and compound expressions. There is still one major and really complex algorithm that I need to get working in order for the 2.0 parser to run without having to send someone along each time a customer starts working on a new language.

The major problem is that as it stands now, the parser may have to go through a really large number of cases one time during "grammar-compilation" instead of as is common with other parsers, during each parse. Still, I feel (and have some ideas) that there must be a more efficient way of limiting the search without human intervention, and will be quite happy once found.
User Journal

Journal Journal: Open Source Parser and Compilers

I am currently working on the projects below. If you are doing any similar work I would love to hear about it:

HiLexed is a simple to use, yet powerful lexical analyser / parser. Low level regular expressions are combined to match higher order constructs. With HiLexed you will succeed with your projects without spending hours on parsing.

JLeech is a Meta Compiler, borrowing / leeching binary code from different precompiled meta classes. It simplifies moving languages to the java platform.

N.A.M.E. Basic is a BASIC compiler for the java virtual machine. The N.A.M.E. project will consist of more languages eventually, but currently consists of a BASIC compiler based on HiLexed and JLeech together with a BASIC grammar. The project is functional and produces java class files.

Please download to compile a BASIC source implementation of PONG into a java binary (JRE1.5 or higher. Note: JDK not needed)

Analytical Parsing Services is a business where I provide help in developing custom parsers to clients abroad. I mostly work on custom formats, config files, RSS feeds, logs etc. Language parsing, so far, is just a hobby of mine.

I have a few ideas on how to really strenghten HiLexed and once imlemented I will also implement at least an additional language on the N.A.M.E. platform. What is nice, is that HiLexed really works well and I have not found anything I could not parse (although some problems have been really hard). Hopefully the next version of HiLexed will accept a superset grammar, with additional tree building facilities. In addition a stronger matching algorithm to go with it.
User Journal

Journal Journal: Tax break? [Entire text in Swedish - for FRA refugees]

Skatteparadiset Campioni d'Italia

Livigno, Campione d'Italia och de italienska delarna av Luganosjön utgör undantag från den Europeiska gemenskapens mervärdesskatteområde. Campione påstås dessutom vara ett av världens minst kända och unika skatteparadis. Campione ligger i den schweiziska kantonen Ticino och är en italiensk enklav inom schweiziskt nationellt och ekonomiskt territorium. Campione är alltså helt omgivet av Schweiz men området är statsrättsligt en del av Italien. Det finns inga gränskontroller och Campione tillhör Schweiz i fråga om banker, valuta, trafik, telefon, post etcetera.

Till skillnad från i Schweiz kan utländska medborgare lätt få uppehållstillstånd eller skriva sig i Campione om vederbörande kan bevisa sig ha egendom i form av en lägenhet eller ett hus samt vistas under inte alltför kort tid i Campione. Campione lyder under italiensk skattelagstiftning men det finns specialregler för området. Det finns ingen inkomst- eller kommunalskatt eftersom Campione kan finansiera sig genom ett kasino. Campione har inga egna banker utan använder schweiziska. Till skillnad från utländska medborgare i Schweiz uppges den utländske medborgare som bosätter sig i Campione inte vara underkastad de skatteavtal som Schweiz har med USA, Kanada och EU-stater. Räntor och vinster från bankmedel, andelar, värdepapper, fast egendom och andra transaktioner på schweizisk eller internationell basis registreras inte för beskattning. Boende i Campione uppges vara skyddade från beskattning så länge som deras transaktioner går genom schweiziska banker.

Journal Journal: Swedish government goes after whistle blowers at FRA

One or more employees at the swedish FRA (The Defense Radio Facility) are under threat of prosecution after revealing to the media that the FRA had been illegally recording telephone and email communication for more than 10 years, according to the morning paper DN.

When this information first surfaced, shortly before the parliamentary vote on the new FRA-law, mr Max Andersson, a member of parliament asked what, if any steps would be taken to investigate this information. The Minster of Defence, mr Sten Tolgfors, then replied that he saw no reasons to go after the FRA.

Now, when the new law allowing the FRA to listen in on swedish communication has been passed, the FRA employees who blew the whistle may instead be facing charges if their identities are revealed. "Whistleblower protection is important", says the Chancellor of Justice (Justitiekanslern, JK), "but an exception can be made when it concerns national security".

The only reason for this investigation, and the only way for the prosecution to win using their argument that state secrets have been revealed, is if the swedish government and the FRA did in fact engage in illegal and unconstitutional activities (Foundation law, government form: civil rights Regeringsformen, chapter 2 - paragraph 2 and 6).

Journal Journal: McAfee VirusScan Dangerous on Linux

A fellow Gentoo Linux user and dev team member discovered and reported a very serious hole in McAfee VirusScan for Linux, a commercial antivirus solution. As the security issue is extremely critical with providing backdoor to the system, and since the package checks itself with checksums and cannot be easily patched for correction, gentoo linux dev team has already decided to drop the package from the portage tree. Perhaps other Linux distros users should consider what to do on their own.

User Journal

Journal Journal: Emperor's New Clothes 1

It's important for a corporate leader to know the difference between what is actually illegal, and what people assume should be illegal.
    -- Bill Gates, in interview for The Register, 19th June 2006

User Journal

Journal Journal: Slashdot is not what it used to be...

It seems Slashdot audience culture has shifted significantly during last year. Looking at the comments AND moderation scores, Slashdot is now infested with Microsoft marketing & public relations people, government agency specialists and military freaks. Real computer geeks community has weakened significantly.

Well, that's enough of my yearly journal entry.

User Journal

Journal Journal: Required, this subject is, verily.

Excellent /. karma for 2 years. Metamoderation two to three times per day. No mod points for more than a year.

Perhaps I have put too much of ideology in my posts?

So, let me state it clearly: I hate coercion.

False Order is enemy of Freedom.

True Freedom is in Chaos.

Chaos is primary force from which this Universe emerged.

In this Universe, it is impossible to hide anything.

Because of equivalence of energy and information.

To know something, you need focus.

Spirit of Man is the same as Spirit of God.

Suffering is caused by distraction.

You have been distracted intentionally.

Guess why.

User Journal

Journal Journal: Refreshing experience... on Slashdot?!

Incredible. But yes, it can be done.

I was always reluctant to moderate AC's posts as a waste of mod points, but now I browse at Anonymous Modifier -6.

And I must admit, it is a completely new, calm and refreshing experience. Try it.

User Journal

Journal Journal: Slashdot moderation algebra

Some examples of Slashdot moderation algebra

+5(Insightfull) -1(Troll) = 0 (Troll)
+5(Funny) -1(Overrated) = +1(Funny)


+4(Insightfull) = +4(Insightfull)
+4(Insightfull) +1(Funny) +2(Interesting) = +4(Insightfull)
+4(Insightfull) +1(Funny) +2(Interesting) -1(Troll) = 0(Troll)
+4(Insightfull) +1(Funny) +2(Interesting) -2(Troll) = -1(Troll)

How in the hell one is supposed to keep his karma up?

- With the current moderation valuation biased to prefer negative moderation it does not make sense to post positive content targeting up moderation. It is so easy to be spoiled with bad moderation.

- It seems to me Overrated and Flamebait moderation is a pure tool for editor censorship. I suspect michael is misusing mostly Overrated, while CmdrTaco prefers Troll and Flamebait.

Also, there is no Reason Modifier for Overrated on the comment options to counter that censorship manually.

User Journal

Journal Journal: It happened just an hour ago

I did it. I wiped out Windows 2k from the last of my computers. So, those Dungeon Siege & StarWars Battlegrounds are history. I feel I'll have a little more time for linux kernel hacking now.

Slashdot Top Deals

For every complex problem, there is a solution that is simple, neat, and wrong. -- H. L. Mencken