Alexander Nasonov's shared items
Wednesday, November 04, 2009
Tuesday, November 03, 2009
LuaJIT 2.0.0-beta1
New version of LuaJIT is very impressive. Take a deep breath ...
Mike Pall wrote: > As I've already said in a reddit comment: > > Heh, it beats Intel Fortran on two numeric benchmarks (mandelbrot > and spectralnorm). > > Only the hand-vectorized stuff in C and C++ is faster. Guess I > need to add auto-vectorization. Well, maybe next week ... > > --Mike
More technical details are available in Mike's message LuaJIT 2.0 intellectual property disclosure and research opportunities.
Saturday, October 10, 2009
mmap'ing to address 0x0
Date: Fri, 09 Oct 2009 22:01:07 -0600 From: Theo de Raadt <deraadt@cvs.openbsd.org> To: Luis Useche <useche@gmail.com> cc: misc <misc@openbsd.org> Subject: Re: mmap'ing to address 0x0 > I was reading some information that indicated that letting user > process to map to address 0x0 can exploit some kernel NULL-pointer > bugs. I checked how different operating systems mitigate this problem > and I found information about Linux and FreeBSD. I was trying to find > the same information for OpenBSD with no luck. Can anybody help me > with this one? We have been aware of the particular problem (which results from an architectural decision made by some machines) for many years, and it took us a long time to decide what to do. Eventually we decided to make userland suffer. Unfortunately we only fixed it in the middle of last year. Other platforms do not have this problem, since the kernel runs in an un-shared address space. CVSROOT: /cvs Module name: src Changes by: deraadt@cvs.openbsd.org 2008/06/24 15:24:03 Modified files: sys/arch/alpha/include: vmparam.h sys/arch/amd64/include: vmparam.h sys/arch/arm/include: vmparam.h sys/arch/i386/include: vmparam.h sys/arch/sh/include: vmparam.h sys/arch/sparc/include: vmparam.h sys/arch/vax/include: vmparam.h sys/arch/sh/sh : trap.c Log message: On user/kernel shared page table machines, do not let processes map their own page 0, as discussed with miod (and many others previously, including art and toby). On sparc, make this __LDPGSZ because PAGE_SIZE is non-constant ok miod tedu
Wednesday, October 07, 2009
Hello World from Lua
The lua program below prints 'Hello World from Lua'. Enjoy!
_={_=_G }for--[[--]]__ in(next),_["_"]do (_)[_]=(__)_[#_[_]] =_[_]_[_]="sub"end(_) [_]=_[_] [_[_]]_[_._]=#"_._"_[ _[_._]]=_[_](_[_[_._]*_ [_._]],_[_._],_[_._ ]).._[_](_[(_[_._]+_[_._]/_[_._ ])*_[_._]],_[_._]/ _[_._]+_[_._]/_[_._],_[_._]).._[_](_[_ [_._]*_[_._]],_ [_._]+_[_._]-_[_._]/_[_._],_[_._]+_[_._]-_[ _._]/_[_._] ).._[_](_[_[_._]*_[_._]],_[_._],_[_._]).._[_](_[ _ [_._]*_[_._]],_[_._]/_[_._]-_[_._] ,_[_._ ]/_[_._]-_[_._])_[_[_._]*_[_._]+_ [_._]- _[_._]/_[_._]]=(_)_[_[_._]*_[_._]+ _[_._ ]+_[_._]/_[_._]]=(_)_[#_+_[_._]/_[ _._]] =_._[_[#_-_[_._]-#_/#_]]_[_[#_]]=_[ #_](_[ _[_._]].."(".._[#_-#_/_[_._]].."('" .._[_[_ ._]]..[[("\\'..(...+#_*(_[_._]+_[_._] ))..'")') )()]])_[_[#_]]=_[_[_._]][_[_[#_]](_[_. _]*_[_._]) .._[_[#_]](#_-_[_._]/_[_._]).._[_[#_]](_ [_._]+_[_._] +_[_._]/_[_._]).._[_[#_]](_[_._]^_[_._]-_[_ ._])]_[_[_[#_]]( #_)]=#_*#_/_[_._]_[_[_[#_]](#_)]=_[_[_[#_]](#_)]+_[_[_[#_]](#_)]/_[( _._)]_._[_[ _[#_]](_[_[_[#_]](#_)]+#_-_[_._],_[_[_[#_]](#_)]+#_- #_/#_,_[_[_[ #_]](#_)]+#_/_[_._],_[_[_[#_]](#_)]+#_-#_/_[_._], _[ _[_[#_]](#_) ]+#_+#_/#_)](_[_[#_+_[_._]-_[_._]]](#_*#_/_[_._]-_[_. _],_[_[_[#_] ](#_)]+_[_._] /_[_. _],_[ _ [_[#_]](#_)]+#_ /_[_._]+_[_. _],_[_[_[#_]]( #_)]+ #_/ _[_. _]+_[_._],_[_[ _[#_]](#_)] +#_-_[_._]-_[_ ._]/_ [_._ ],#_ +#_+_[_._]-_[ _._]/_[_._] ,#_*(_[_._]+_[ _._]) -_[_. _ ],_[_[_[#_]]( #_)]+#_-_[ _._]-_[_._ ]/_ [_._] ,_[_ [_[ #_]](#_)]+#_ -#_/#_,_[ _[_[#_]]( #_) ]+#_/ _[_ ._]+ _[_._],_[_[ _[#_]]( #_)],# _+#_ +# _ /# _ + #_/#_,_[_ [_[#_ ]](#_) ]+_ [_._ ]-_ [_._]/_[_ ._],_[_[_[#_]](#_)]+#_-_[_._]/_[_._],(_[_._])^_[_._]*(_[ _._]+_[_._]/_[_._])+_[_._],_[_[_[#_]](#_)]+_[_._]*_[_ ._],#_+#_+#_/#_+#_/#_,#_*#_/_[_._]+_[_[_[#_]](#_)]/ _[_[_[#_]](#_)],_[_[_[#_]](#_)]+#_+_[_[_[#_]]( #_)]/_[_[_[#_]](#_)]+_[_[_[#_]](#_)]/_[_[ _[#_]](#_)],_[_[_[#_]](#_)]-_[_._])) _._=_[_[_._]][_[_[_[#_]](#_)] ]_[(#_)^#_-(#_)-#_]= _._Code from http://codepad.org/cmQIjdzI.
Friday, September 18, 2009
pkgsrc/lang/gcc44
We've been waiting for update for a long time, the previous version in pkgsrc is lang/gcc34 (wip/gcc42 doesn't count ;-)
Module Name: pkgsrc Committed By: dmcmahill Date: Fri Sep 18 11:24:50 UTC 2009 Update of /cvsroot/pkgsrc/lang/gcc44 In directory ivanova.netbsd.org:/tmp/cvs-serv5730 Log Message: Import gcc-4.4.1 as lang/gcc44. This is the latest branch of gcc. Of particular note is this package contains gfortran which is required for building some scientific software (recent versions of scilab for example). Package is prepared as a monolithic install of gcc since gcc is really not set up to build and install the core and then later add on different languages as their own packages. Status: Vendor Tag: TNF Release Tags: pkgsrc-base N pkgsrc/lang/gcc44/buildlink3.mk N pkgsrc/lang/gcc44/Makefile N pkgsrc/lang/gcc44/DESCR N pkgsrc/lang/gcc44/MESSAGE N pkgsrc/lang/gcc44/preconfigure.mk N pkgsrc/lang/gcc44/distinfo N pkgsrc/lang/gcc44/patches/patch-ad N pkgsrc/lang/gcc44/patches/patch-aa N pkgsrc/lang/gcc44/patches/patch-ab N pkgsrc/lang/gcc44/patches/patch-ae N pkgsrc/lang/gcc44/patches/patch-ac N pkgsrc/lang/gcc44/files/i386-dragonfly64.h N pkgsrc/lang/gcc44/files/dragonfly-spec.h N pkgsrc/lang/gcc44/files/dragonfly.h N pkgsrc/lang/gcc44/files/i386-dragonfly.h N pkgsrc/lang/gcc44/files/hello.f N pkgsrc/lang/gcc44/files/hello.m No conflicts created by this import
Wednesday, September 16, 2009
Multiline comments in shell with here-document
Did you know that you can use multiple lines in shell with the ":" command and a here-document? The following example is inspired by two scripts from SHELLdorado:
: <<! if ! file .; then wc `echo *`; fi ! df | tail wc $(echo *) !If '<<!' doesn't work, you can switch to '<<SOMETHING_UNIQUE'.
Tuesday, September 15, 2009
ZFS in FreeBSD
Author: pjd Date: Tue Sep 15 11:34:53 2009 New Revision: 197218 URL: http://svn.freebsd.org/changeset/base/197218 Log: We believe ZFS is ready for production use. Remove a warning about it being experimental. :) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Tue Sep 15 +11:23:59 2009 (r197217) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Tue Sep 15 +11:34:53 2009 (r197218) @@ -3072,8 +3072,6 @@ zfs_modevent(module_t mod, int type, voi switch (type) { case MOD_LOAD: zfs_root_token = root_mount_hold("ZFS"); - printf("WARNING: ZFS is considered to be an experimental " - "feature in FreeBSD.\n"); mutex_init(&zfs_share_lock, NULL, MUTEX_DEFAULT, NULL);
Sunday, September 13, 2009
Boost bugs
I spent few hours today and yesterday closing my bugs.
#2768 [any] Unique type_info
#2749 [any] multi method for boost::any and modified boost::any to fit multi method
#2748 [any] implement reset for direct constructing (adapt to noncopyable)
#2295 Inconsistent behavior when using 64 bit integer types
#754 boost::any - typeid comparison across shared boundaries
#922 Lexical cast and wide characters
#2045 lexical_cast of short unsigned produces warnigns with g++ and -Wsign-promo
#2558 Unnecessary conversion warning in lexical_cast
#3198 compiler warnings in VC9
#1847 Can't compile without header, boost::lexical_cast problem
#1791 fix warning on MSVC warning level 4
They are all now closed.
Saturday, September 12, 2009
Tetris to the rescue!
I never play games when I recover a computer but apparently some people do:
From apb@cequrux.com Mon Sep 7 20:50:54 2009 Return-Path:Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11]) by www.NetBSD.org (Postfix) with ESMTP id E6F8B63BCFB for ; Mon, 7 Sep 2009 20:50:54 +0000 (UTC) Message-Id: <20090907205043.3DDA0100AA4C@apb-laptoy.apb.alt.za> Date: Mon, 7 Sep 2009 20:50:43 +0000 (UTC) From: apb@cequrux.com Reply-To: apb@cequrux.com To: gnats-bugs@gnats.NetBSD.org Subject: /rescue/tetris should not use high scores file X-Send-Pr-Version: 3.95 >Number: 42009 >Category: bin >Synopsis: /rescue/tetris should not use high scores file >Confidential: no >Severity: non-critical >Priority: medium >Responsible: dholland >State: closed >Class: change-request >Submitter-Id: net >Arrival-Date: Mon Sep 07 20:55:00 +0000 2009 >Closed-Date: Tue Sep 08 13:49:23 +0000 2009 >Last-Modified: Tue Sep 08 13:49:23 +0000 2009 >Originator: Alan Barrett >Release: NetBSD 5.99.16 >Organization: Not much >Environment: System: NetBSD Architecture: i386 Machine: i386 >Description: /rescue/tetris tries to use /var/games/tetris.scores. If the system is in a bad state, possibly with corrupted file systems, it would be a bad idea to write anywhere without a deliberate decision by the sysadmin. Simply running a game does not count as as deliberate decision to write to the file system. >How-To-Repeat: /rescue/tetris press 'q' to quit. see this message: tetris: Cannot open /var/games/tetris.scores for read/write: Permission denied >Fix: Disable the high scores feature in the rescue version of tetris. >Release-Note: >Audit-Trail: Responsible-Changed-From-To: bin-bug-people->dholland Responsible-Changed-By: dholland@NetBSD.org Responsible-Changed-When: Mon, 07 Sep 2009 23:33:37 +0000 Responsible-Changed-Why: take. From: "David A. Holland" To: gnats-bugs@gnats.NetBSD.org Cc: Subject: PR/42009 CVS commit: src/games/tetris Date: Tue, 8 Sep 2009 13:38:01 +0000 Module Name: src Committed By: dholland Date: Tue Sep 8 13:38:01 UTC 2009 Modified Files: src/games/tetris: scores.c Log Message: Disable writing scores when built for /rescue. PR 42009 To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/games/tetris/scores.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. State-Changed-From-To: open->closed State-Changed-By: dholland@NetBSD.org State-Changed-When: Tue, 08 Sep 2009 13:49:23 +0000 State-Changed-Why: fixed, thanks >Unformatted:
Sunday, August 16, 2009
Sunday, March 15, 2009
United States Patent 6711562
I came across this patent when searching for a cache-friendly associative containers.
http://www.freepatentsonline.com/6711562.html
UPDATE: I found what I was searching for:
http://idlebox.net/2007/stx-btree/stx-btree-0.8.3/doxygen-html/speedtest.html
Subscribe to:
Posts (Atom)