DM’s Esoteric Programming Languages – BIT
- Extend the ease of string processing in C to other, more basic, data types such as integers.
- Extend the terseness of COBOL to more fundamental code constructs, such as numeric literals.
In Chef geschriebene Programme sind auch als Kochrezepte verwendbar.
Nichtdeterministisches Java.
Java2K is not a deterministic programming language, but a probabilistic one. Even for built-in functions, there is only a certain probability the function will do whatever you intend it to do. All Functions have two different implementations. At runtime, based on a pseudo-RNG, the actual implementation is choosen. This is in line with common physicalist assumptions about the nature of the universe - there is never absolute security, there is always only probability.
Kostenlose Plugins fürs Mac OS X Dictionary.
Mauszeiger über ein Wort, Cmd + Ctrl + D -> kleines Dictionary-Fenster öffnet sich. Aber nur in Cocoa-Programmen, also z.B. nicht im Firefox.
>+++++++++[>+++++++++<-]>+.+++++++++++++++++++++++++++++.-------------.+++++++++++++++++.----------.+++++++++++ .---------------.>++++[>+++++++++++<-]>.------------.>++++++++++[>++++++++++<-]>++.+++++++++++++++.------------ ------.++++++++.>++++[>++++++++<-]>.>+++++++++++[>+++++++++++<-]>.--------------------.----.+++++++.>++++[>++++ ++++<-]>+.-.++++++++++.>++++++++[>++++++++++++<-]>+.++++++++.+++++++++.>++++[>++++++++<-]>.>++++++++++[>+++++++ +++<-]>+++.++++++++++++++.------------.+++++++++++.-------------------.+++++++++++++++++.>++++++[>+++++++<-]>.
Mit Brainfuck-Code für Fibonacci-Zahlen. Oh Jubel.
# brainfuck Interpreter class Array def rtrim empty = 0 (self.length-1).downto(0) do |a| return self[0..a] if self[a] != empty end [] end end class Brainfuck attr_accessor :code, :ascii, :debug def initialize(code = "", memsize = 30000) @code = code.gsub(/[^.,+-<>[]]/, "") @mem = Array.new(memsize, 0) @ascii = true # In/Output als ASCII oder mit puren Zellwerten arbeiten? @debug = false end def run p = 0 cp = 0 brackets = [] while cp < @code.length c = @code[cp].chr case c when "+" @mem[p] += 1 when "-" @mem[p] -= 1 when ">" p += 1 when "<" p -= 1 when "[" brackets.push(cp) when "]" if @mem[p] != 0 cp = brackets.pop - 1 else brackets.pop end when "." if @debug print "p: #{p} cp: #{cp} " p @mem.rtrim end if @ascii print @mem[p].chr else puts @mem[p] end when "," input = gets if @ascii @mem[p] = input[0] else @mem[p] = input.to_i end end cp += 1 end end end # Die ersten 10 Fibonacci-Zahlen: +>++>>>++++++++++[<<<<.>[->+>+<<]>>[-<<+>>]<<<[->+>>+<<<]>>>[-<<<+>>>]<<<[-]>>[<<+>>-]>>-] # Die ersten n Fibonacci-Zahlen: +>++>>>,[<<<<.>[->+>+<<]>>[-<<+>>]<<<[->+>>+<<<]>>>[-<<<+>>>]<<<[-]>>[<<+>>-]>>-] code = <<END +>++>>>,[<<<<.>[->+>+<<]>>[-<<+>>]<<<[->+>>+<<<]>>>[-<<<+>>>]<<<[-]>>[<<+>>-]>>-] END bf = Brainfuck.new(code) bf.ascii = false bf.debug = false bf.run
“We’ve done a lot of work around how you manage the windows, how you launch programs and how you manage the windows of the programs that you’ve launched,”
We are noodle folk. Broth runs through our veins.
Elegantes In-Place Editor Plugin für Rails. Benutzt jQuery oder Prototype.
Sehr chique: Wenn der Controller schon RESTful aufgebaut ist und auf JavaScript-Anfragen XML zurückschickt, ist die (serverseitige) Arbeit erledigt und es funktioniert einfach.
Gibts Probleme mit jQuery und Rails' Forgery Protection (InvalidAuthenticityToken oder so), hilft es, das hier in den <head> von application.html.erb zu packen:
<%= javascript_tag "var AUTH_TOKEN = #{form_authenticity_token.inspect};" if protect_against_forgery? %>
Und dies hier
$.ajaxSetup({ beforeSend: function(xhr) {xhr.setRequestHeader("Accept", "text/javascript")} });
in application.js sorgt dafür, das jQuery die richtigen Header sendet und mit respond_to zusammenarbeitet.