jeffr_tech's Friends
[Most Recent Entries]
[Calendar View]
[Friends View]
Below are the most recent 16 friends' journal entries.
| Saturday, May 25th, 2013 |
poige
|
2:22a |
Портировал bcache на 3.8.13-rt
— Литр пива выпит не зря. А если бы вы знали зачем я это сделал… впрочем, всему своё время. Если время покажет — расскажу. :) |
| Tuesday, May 21st, 2013 |
w00dy
|
5:58p |
Чудеса маршалинга
0.499999970 в native превращается в 0.5 в Managed C++. Вроде бы и мелочь, но это компонент кватерниона, из-за чего его разрывает в лоскуты и получается не то вращение которое ожидалось. |
| Monday, May 20th, 2013 |
poige
|
1:17a |
|
| Saturday, May 18th, 2013 | |
nibot
|
6:07p |
|
| Friday, May 17th, 2013 |
w00dy
|
2:33p |
|
poige
|
10:27a |
ubuntu 12.04 → 13.04
В пр-цпе, практически без головняков — поставил на отдельный раздел, доставил софта, подключил прежний /home и всё. Печалька: ыяснилось, что какие-то поттеринги зачем-то переделали /usr/bin/top — прежний .toprc не подошёл, некоторые шорткаты более не работают, обрезается argv[0] и по-моему, что-то ещё. Улучшатели, поноса им лучей потолще… |
| Thursday, May 16th, 2013 |
dp_maxime
|
9:28a |
|
fanf
|
12:25a |
Mixfix parsing / chain-associative operators
Earlier this evening I was reading about parsing
user-defined mixfix operators in Agda.
Mixfix operators are actually quite common though they are usually
called something else. The Danielsson and Norell paper describes
operators using a notation in which underscores are placeholders for
the operands, so (using examples from C) we have
- postfix operators
- prefix operators
- infix operators
There are also circumfix operators, of which the most common example
is (_) which boringly does nothing. Mathematical notation has some
more fun examples, such as ceiling ⎡_⎤ and floor ⎣_⎦.
Mixfix operators have a combination of fixities. C has a few examples:
You can also regard function call syntax as a variable-arity mixfix
operator :-)
The clever part of the paper is how it handles precedence in a way
that is reasonably easy for a programmer to understand when defining
operators, and which allows for composing libraries which might have
overlapping sets of operator definitions.
One thing that their mixfix parser does not get funky about is
associativity: it supports the usual left-, right-, and
non-associative operators. One of my favourite syntactic features is
chained relational operators, as found in BCPL and Python. (For fun I
added the feature to Lua -
see this and
the following two patches.) You can write an expression like
a OP b OP c OP d
which is equivalent to
a OP b && b OP c && c OP d
except that each operand is evaluated at most once. (Though
unfortunately BCPL may evaluate inner operands twice.) This is not
just short-cutting variable-arity comparison because the operators can
differ.
So I wonder, are there other examples of chain-associative
operators? They might have a different underlying reduction operator
instead of &&, perhaps, which would imply different short-cut behaviour.
Perhaps an answer would come to mind if I understood more of the
category-theory algebraic functional programming stuff like bananas
and lenses and what have you... |
| Tuesday, May 14th, 2013 |
sanmai
|
7:48a |
Тень под фото  Никак не могу понять: хорошо с тенью/отражением или нет? Получается что или будет тень, или снизу появляется противный блик. С угловатыми темными вещами убрать тень и блик в постобработке проще простого, а с такими, круглыми, проще или оставить тень, или снимать сразу без тени. Понять бы, что ищут дизайнеры: фото с тенью или фото без тени, но с неизбежным бликом? ( Ещё примерыCollapse ) |
| Monday, May 13th, 2013 | |
nibot
|
11:37p |
|
dp_maxime
|
6:01a |
|
| Sunday, May 12th, 2013 |
sanmai
|
11:16a |
|
w00dy
|
12:53a |
коньяк
Армянский Арарат Отборный (7-и летний) мягче чем грузинский Старый Кахети (тоже 7-и лет). Надо было брать 10-и летний, стоил он всего на 50грн дороже. А вообще, может набраться смелости и взять 20-и летний на пробу, интересно что там такое. |
| Saturday, May 11th, 2013 | |
nibot
|
5:02p |
SF
Jason Evanish on San Francisco: It gets cold at 4pm. Neighborhoods define you. Rent is insane. Cost of living overall is sky high. There are crazy and cool things always going on. Costumes are a way of life. Lots of homeless, beggars and crackheads. PBR is the official beverage of San Francisco. An extremely pro-dog city. The Divisadero is the fog line. Palo Alto and Mountain View are farther away than you think. The 3 things you need to know about MUNI. There are tons of amazing views. Startup Central is in SoMa. SF is a super fit city. If you’re a foodie, welcome to heaven. The 3 hour time zone difference is a big deal. Watching sports matters a lot less. Everything is taken to the extreme. You’ll turn into an early adopter even if you weren’t one before. All the best tech startups are at their best here. Working in tech is the norm, not the exception. People love novelty and new experiences. Tons of awesome lies just beyond SF’s borders. Come with an explorer’s attitude. source: " 25 Things I wish I knew before moving to San Francisco" |
dp_maxime
|
10:44a |
A great flashmob.
Классный флэшмоб. A great flashmob. Классный флэшмоб.
SolistInnen, Chor, Orchester der Volksoper Wien boten im April Fahrgästen und Passanten eine besond
Popularity: unranked Originally published at СоНоты. You can comment here or there. |
| Friday, May 10th, 2013 | |
pinterface
|
10:42p |
Upgrading the Linux Kernel when Using a USB Boot Disk In order to protect any sensitive data on my work laptop, I use full-drive encryption. To aid recovery in case of theft, it normally boots to a honeypot installation of Windows with Prey installed. To boot into Linux, one must use a USB boot disk[1] which contains the contents of /boot.
Once in a while, it is necessary to upgrade the kernel. I don't do this very often, so it seems like the sort of process which should be documented.
- Mount /boot read-write:
`mount -o rw /boot`
I generally have /boot mounted read-only, in part because I don't usually
have the thumbdrive plugged in (I don't boot very often, after all), and
to ensure I don't accidentally make changes to it without being prepared
to undergo this full process.
- Install kernel updates:
`sudo aptitude full-upgrade`
- Reboot. Pray it works.
- Insert backup boot disk. (Just in case the thumbdrive on my keychain goes bad or gets lost.)
- Copy files from the updated boot disk to the backup:
`rsync -av /boot /media/usb2`
- Remove the original boot disk. This will help prevent unfortunate mistakes.
- Alter grub.cfg of backup boot disk to refer to the proper UUID:
`sudo sed -i s/$UUID_OF_BOOT/$UUID_OF_BACKUP/ grub/grub.cfg`
`blkid` comes in handy for finding the relevant UUIDs.
- Reboot. Pray it works.
Assuming both boot disks successfully boot the machine with the updated kernel, congratulations! You have successfully updated the kernel!
[1] It's not quite as much a waste of a thumbdrive as you might think. The sticks have a FAT partition of ~90% or so of the advertised capacity, so they can still be used to transfer files between computers or for data storage.
New year, new job, new blog. I'd 301 redirect you if I could, but since I can't you'll have to click through to read comments or leave your own. |
|