Assembly used to be all the rage. At Uni I couldn't afford a C compiler (and there were no free versions for my platform, RISC OS) so I ended up writing a whole IRC Client, GUI and scripting language all in ARM assembler.
Last time I looked, the canonical manuals for the ARM architecture were quite expensive. If anyone has advice on piecing the basics together please let me know. I don't know much assembly, am currently playing with 6502 assembly, and have been writing a 32-bit VM just by working it out as I go.
I do have a set of reference manuals, opportunity purchase, for acorn-era ARM systems. What sort of consistency would I find between historic ARM instruction set and the latest 32 and 64 bit versions?
"ARM Architecture Reference Manual" yields quite a few hits for various ARM systems, including ARMv8; the Raspberry Pi's ARMv6 instruction set is also available.
One big change is that modern ARM processors tend to run mostly in Thumb (16-bit instruction) mode. It's faster, but you lose all the fun condition codes. High-performance code should take advantage of NEON.
If the above does not answer your question, please ask a more specific one. ;-)
I see more good asm examples are being devoloped. This is a good, cool start for connecting to IRC, but it would be even more cool to see the bot do something beyond looking for a single line. What do you plan to do with it, if I might ask? Your motivation is listed as "lol" ...
I love that I'm seeing more of these little apps written in Assembly on HN.
One request though: would someone be so kind as to take the time to annotate them so noobs like me can know what's going on? I think these are great ways to learn Assembly--something I've wanted to do for awhile. I've long felt that understanding coding at that level would only strengthen my skills in higher-level languages.
Question. Does this run in Linux on arm? Or does it run on the CPU (be it hardware or emulated)?
Bonus question: How can I answer that question for myself in the future when looking at similar source? Said differently: What am I looking at here? :)
It runs on an OS (POSIX compliant). If you look at connect.s you can see that he uses syscalls (connect()/socket()).
It's roughly what would produce a simple compiler targeting linux.
Otherwise, it would have had to write a TCP stack, drivers, ...
He uses Linux sys calls, which means the kernel needs to be there (and a libc of some sorts)... but that's all that's needed. So, with the RPi, you could essentially "boot" this code with pretty much a bare-metal system otherwise.
The license the author of the BrainFuck example has chosen (or made up) actually is pretty restrictive, if not immature.
Software licensing is not a joke.
The author's account on Github seems to have many projects were a license has been either made up, or adapted. Perhaps out of lack of understanding current licensing and available licenses.
If the author intends to allow anyone to use the codebase for anything, they should choose an existing license that permits this... such as the MIT, Apache, BSD licenses, etc. Making one up is not an acceptable replacement and would not hold up in court should it ever come to that. "But judge, the author said I could do 'WHAT THE FUCK I WANT'!". :(
I am the author of bfb. It started as a joke with coworkers. I still consider it a joke but I'm proud of it!
I like to use the wtfpl for simple code I wrote (like ptyproxy, a code I wrote on a sunday afternoon that I use to debug Terminology (under 2-clause BSD)). I don't expect much contributions on these projects anyway.
If you're really concerned about the license and want to use my code in one of your projects, just send me an email and we'll talk about it. Since I'm the sole author of most of that code, I am still able to put it under a 2-clause BSD license.
I do hope you're not restraining yourself from contributing to bfb because of the software license ☺
Could you please point me which licenses were made up or adapted on my repositories?
The only repository I could change is photoalbum because it might useful to someone else.
I'm not discussing your repos, but rather the license choice.
You appear to have forgotten to add the "No Warranty" clause to the repo's you use the WTFPL on. This implicitly means your code is fit for use, and if it crashes my system, you are liable (and, more importantly, you accept liability).
I wouldn't need you to re-license under BSD since the WTFPL allows me to do this already... without your knowledge nor permission.
The WTFPL allows me to re-assign copyright to myself, effectively stealing your work. I might even be able to pursue you after claiming the codebase as my own work (and re-licensing it under a proprietary license).
In any event, the WTFPL provides you with almost no protections against much of anything. As a fellow developer, I don't want anyone to get screwed. I agree with the spirit and intent of your license choice (I use Apache 2.0 for my projects specifically to allow others to do whatever they want, except claim copyright or re-license). However, I feel this license is more of a joke and could do more harm than good.
This implicitly means your code is fit for use, and if it crashes my system, you are liable (and, more importantly, you accept liability).
I'm glad you mention this. I work at an investment bank programming high frequency trading algorithms and we've been evaluating BrainFuck Bot as a way of performing tens of thousands of stock transactions per second for a mission critical enterprise application.
Since I now know the author of BrainFuck Bot did not checkmark the "No Warranty" clause thereby assuring me of perfect code and his infinite liability thereof, I feel more confident in betting the future of my bank on this code.
You appear to have forgotten to add the "No Warranty" clause to the repo's you use the WTFPL on. This implicitly means your code is fit for use, and if it crashes my system, you are liable (and, more importantly, you accept liability).
Can you point to some legal sources which agree with this claim? That is, the claim that if you put up source code but don't explicitly disclaim liability, you are liable?
It's actually the reverse when it comes to licensing (or contracts for the matter). If you don't explicitly state it, then it can be interpreted to be implicit. When dealing with licensing or contracts, you want as little legal wiggle room as possible. Part of the reason even the most basic of contacts/licensing are pretty verbose.
There is no sale here. Do you have an example of someone being held liable for code they gave way, or some analysis by a lawyer or judge saying someone in such a situation could be held liable?
The terms and conditions apply to copying, distribution and modification, wherein you can do what the fuck you want to.
So the WTFPL states that the copy, the distribution or the modification are subject to whatever you want to do to them. Therefore you can relicense or possibly† transfer copyright of your copy. The original is still owned by the author and is still licensed under the WTFPL. Yes, those are the same bits, even possibly traceable to the same origin. Only their Color changed[0].
† barring lawful statements that mandate copyright transfer to be explicit.
Copyright is something the comes with ownership and is what author of a work normally has; and copyright is what gives him exclusive rights with regards to copying, distributing, modifying, performing, etc. Note that copyright itself is not one of these exclusive rights granted by copyright! That would be circular.
So when you place a license on your work, you are just granting people these rights which would normally be exclusive to you as the owner, granted to her by copyright. Again: copyright is not one of these exclusive rights, copyright is property the author owns. When people receive a copy, they do not receive ownership or copyright.[2] They receive a physical copy of a work but the "intellectual property" is still held by the author. At no point was it transferred. And you cannot on your own claim and transfer the author's ownership of the property any more than you can take his home or car or wife. What you can do (as the license permits) is to practice these rights such as copying, performance, etc. which are normally exclusive to the owner.
Re-assigning or transferring copyright (in the sense that you become the owner and can sue the original author as Alupis intended) quite literally means transferring one's property to someone else. If the author of a work transfers his copyright, he no longer owns the work. It gets a new owner, just like your car would do if you gave it to someone else. Transfer of copyright is not at all the same as granting other people the same rights you have. In the US, such exclusive transfer of copyright cannot happen without black-on-white and the signature of the owner:
[1]
Any or all of the copyright owner’s exclusive rights or any subdivision of those rights may be transferred, but the transfer of exclusive rights is not valid unless that transfer is in writing and signed by the owner of the rights conveyed or such owner’s duly authorized agent.
[2]
Mere ownership of a book, manuscript, painting, or any
other copy or phonorecord does not give the possessor
the copyright. The law provides that transfer of ownership
of any material object that embodies a protected work
does not of itself convey any rights in the copyright.
EDIT: Furthermore, under the Berne Convention, original authors have the moral right to be known as the author. This right is inalienable: you can't give it away, and it cannot be taken away; you have that right even after everything else (i.e. the economic rights) is exclusively transferred to someone else. I think that makes Alupis' idea of claiming someone's code as his own work illegal.
So, in short, no, you can't re-assign copyright to yourself and then sue the original author for copyright infringement. No, you cannot claim to be the original author and to own the work. No, you do not become the owner of the work when you receive a copy along with a license that allows you to further copy, modify, distribute, perform, etc.
>> Can’t you change the wording? It’s inappropriate / childish / not corporate-compliant.
>
> The WTFPL lets you relicense the work under any other license.
What stops me from re-licencing under my company's proprietary license, then suing the original author for copyright? (It appears this "license" allows implicit re-assignment of copyright).
Not to mention, this "license" was not written by a lawyer, but rather a software developer. I'm no lawyer, and I'm confident any license I can make up would be shredded by real lawyers.
Furthermore -- the codebase in question above, does not include the optional "No Warranty" clause, which means his software implicitly must be fit for use... and if it breaks something, he can be held liable.
While I agree with the spirit and intent of this license, it really isn't a real license and is easily mis-used by even those who do wish to treat it as real.
So, this license appears to be really a joke-license... not a serious one... and I still maintain the codebase's author should pick a real license if the intentions are to allow universal use.
Relicensing is a weird term and easily leads to confusion. I guess you can write your own terms and distribute copies under these new terms. But you cannot revoke the rights the original license has granted to people who have received the work under that license. Nor can you revoke the original author's exclusive rights. The license text (which is about the copying and performing of the covered work) does not grant you such powers.
A license is a permission granted by the author, and an extension of the authors wishes.
This is why relicensing as a term indeed leads to confusion. People think the license is inherently a part of the work, and thus can be as readily changed as the software source itself. It is however not part of the work, but part of the author. If you want to change the license, you need to get the author to change his mind.
Some licenses allow people to add new licenses on-top of existing licenses. That is not re-licensing, but simply the addition of more requirements. If you remove the original license, you loose the permission needed to use/copy the work created by the original author.
Thanks for expressing it so clearly. I'll quote you when the time comes.
The SFLC had a chance to set this straight in the aftermath of the inflammatory 2007 episode around the Atheros driver. Instead they dodged the entire relicensing question and released a set of guidelines which focus on where and how to preserve the copyright notice, and that rather seems to only have reinforced the idea that the permissive BSD style licenses are nothing more than a decorative text you must lug around. So we still have a huge number of people who think they can do anything (e.g. "relicense") as long as the decoration is kept in place. It really is a shame.
With respect to relicensing, I assume that depends on a country's specific copyright laws. Ordinarily this license is as close to the public domain as you can be while still still having a license. So the protections against re-licensing are similar to protections for works placed in the public domain. For example you can't relicense Bach's works and then sue people for playing those works. So the burden is on the relicensor to show that their license supercedes the WTFPL. Unfortunately, the specifics of how this burden is handled in a court as well as treatment of the public domain in general are per-country (and sometimes subject to international agreements). Likewise with warranty, different countries will have different treatments.
What I don't quite get is why at this point you wouldn't simply place a work into the public domain or use creative commons or whatever. Maybe that is because different countries have different interpretations of "public domain."
> It appears this "license" allows implicit re-assignment of copyright
US copyright law does not recognize implicit transfers of copyright. And we're unusually liberal in what can and cannot be done with copyright. And I don't believe for a moment that any judge in any country would recognize WTFPL as providing for any such thing in the first place.
I get that you care, but you don't seem to have a dog in this fight, so why care so much? More specifically, its always useful to say
"Hey while that license is really creative, you realize that its also not doing you any favors. Three things that you might want to watch for are warranty issues, the ability to reassign to any license means you can be barred from using your own code, and someone can reassign the copyright to themselves and then take down your site with a DMCA. That is a lot of risk to carry just to be clever with the license."
The author seems to like it the way it is and you've shined your light on the risk, hope it doesn't show up as another HN post on how evil lawyers did evil things.
I'll go ahead and feed the troll: please back up your statement that the license won't hold up in court. The site you link to has an entry for the "do what the fuck you want license v2" and there is literally no warning, and the only restriction mentioned is that a change to the license text requires a change to the license name.
So again: exactly what is the problem (beyond hand-wavy unevidenced claims about judges)?
Can we please refrain from calling people trying to make a bona fide argument as "trolls"? You may disagree -- that's fine. But can we please keep the discussion focused on the issues and not the person making the argument?
I agree with Alupis that WTF is an unfortunate license choice for many projects, since it introduces a lot of legal uncertainty. But I also agree with most commenters in this thread that for this particular project, it doesn't matter. Cool though it is, no one is going to use this code in a commercial project, or as the basis for another OS project.
So it really doesn't matter in this case.
On the other hand, if someone writes a TCP stack in ARM assembly and licenses it under WTF with the intention of letting other people use it in their projects, there's a potential problem. It's not just corporations who will avoid a non-standard license, it's many established open source projects as well (for the same reason: legal uncertainty).
There are several. And no, just because a license appears on the site I linked to does not make it "solid".
* The codebase in question neglected to include the "No Warranty" clause, which implicitly means his code is fit for use. So, if I run it on my machine and my machine crashes, he is liable.
* Just because a license has yet to be challenged, does not make it solid. That would be rather dangerous in a corporate environment.
* This license does not forbid me from re-assigning copyright to myself, then pursuing the original author.
As I said before, licensing is serious business. There is a reason most licenses are pretty long, even the "do what you want" licensing like MIT or BSD.
The entire situation is context sensitive. Hobby projects with no practical value don't need serious licensing because they aren't serious projects. Things that other people might actually use are a different story, one that the author of the codebase in mention seems to be aware of.
A few tattered notes of it at: http://xania.org/200711/irbasic but sadly most is lost to time.