↑back Search ←Prev date Next date→ Show only urls | (Click on time to select a line by its url) |
Who | What | When | |
---|---|---|---|
mike-burns | I've been running The Classical Code Reading Group of Stockholm, which has increased the number of people who have learned C in Stockholm.
http://www.meetup.com/The-Classical-Code-Reading-Group-of-Stockholm/ - we just read env(1). | [01:35] | |
.... (idle for 18mn) | |||
brycec | Dangit HE, get your act together and quit breaking your sea1 end tunnel routing! | [01:54] | |
...... (idle for 27mn) | |||
CaZe | mike-burns: I'm surprised you don't read the POSIX specification itself. | [02:21] | |
mike-burns | Well then it'd be a spec reading group.
And then we'd miss out on the beauty that is FreeBSD's env(1). (Highly recommended reading for "holy shit why did they do that?!" reasons.) | [02:22] | |
CaZe | mike-burns: Reading an implementation is sort of pointless unless you read the spec that tells what the implementation is supposed to do.
mike-burns: Also, it's useful to see how different systems break from the spec. | [02:23] | |
mike-burns | Reading an implementation is a great way to see how code is used in the real world. | [02:23] | |
CaZe | Plus, the spec isn't very long. | [02:24] | |
BryceBot | That's what she said!! | [02:24] | |
CaZe | http://pubs.opengroup.org/onlinepubs/9699919799/ | [02:24] | |
mike-burns | The spec and manpages come up.
In fact, the getenv(3) and environ(3) specs and manpages also came up. | [02:24] | |
CaZe | Well, the manpage should be what documents how the system is breaking from POSIX. | [02:25] | |
mike-burns | Sure. I suspect the OpenBSD manpage might actually do that, too.
The GNU one obviously just chastizes the reader for daring to use man(1) instead of info(1). | [02:25] | |
CaZe | So you should really start by reading the POSIX spec, then reading the man page for each system, to see how each system is intentionally breaking the spec (if at all), and then reading the implementation to see how it's doing it. | [02:26] | |
mike-burns | Attendees are welcome to understand the code in any manner they want. Most of them do what you said -- it's what I do, too.
Picture it more like a book club; people show up having read the material, and then we discuss it, citing the material. | [02:26] | |
CaZe | The danger in just reading the implementation without looking at the spec first is that you might start to assume the spec specifies something that you see in the code, when it does not.
I mean, you get a lot of backwards reasoning. | [02:27] | |
mike-burns | Sure yeah. | [02:28] | |
CaZe | For instance, someone once was explaining that the reason that global variables are automatically initialized to 0 for you is because they're placed in the BSS section. | [02:29] | |
mike-burns | Though since we read four (or more) implementations, we get a feeling for what people expect the program to do. | [02:29] | |
CaZe | Totally backwards. | [02:30] | |
mike-burns | Typically it is totally backwards! We discuss that every time, since the spec seems to be ignored by most implementors.
It's a fun event; you should pop by if you're ever in Stockholm while one is happening. (Or in NYC, which now has its own version.) | [02:41] | |
*** | mnathani_ has quit IRC (Ping timeout: 244 seconds) | [02:51] | |
CaZe | mike-burns: This literally just happened in ##c:
04:30:50 <twkm> p->m is syntactic sugar for (*p).m 04:32:01 <Sergio965> It's not. 04:32:21 <Sergio965> It's syntactic sugar for something like *(p + offsetof(m)) 04:47:42 <twkm> Sergio965: you are gravely mistaken. 04:48:04 <Sergio965> (*p).m would mean that the entire p struct is put on the stack. 05:25:48 <pragma-> p->m is indeed (*p).m 05:27:47 <Sergio965> Hmm, okay. 05:28:04 <Sergio965> (*p).m doesn't make a lot of sense in most architectures. 05:29:33 <Sergio965> How would I do (*p).m on, say, X86? Where would the *p go? 05:43:40 <Sergio965> Linux, for example, calculates the offset of a struct member and passes it around. 05:43:43 <Sergio965> Is that incorrect? | [02:52] | |
Literally divining the spec from an implementation.
And getting it wrong, of course. | [03:00] | ||
................. (idle for 1h21mn) | |||
*** | jcv has joined #arpnetworks | [04:24] | |
..... (idle for 24mn) | |||
mike-burns | Ha. Happens all the time. | [04:48] | |
....................................................................................... (idle for 7h14mn) | |||
mercutio | global variables are automatically initialised to 0?
that doesn't seem right to me. | [12:02] | |
brycec | Not in C
Not unless your compiler is cleaning up after you anyways | [12:05] | |
mercutio | it may work on linux.
doesn't ilnux zero pages before giving them to users now? | [12:05] | |
brycec | brycec doesn't know | [12:06] | |
mercutio | but yeah i wouldn't want to rely on it | [12:06] | |
brycec | (But I'd bet "not.") | [12:06] | |
mercutio | especially seeing those kinds of issues can be annoying to debug and there's no real performance improvement by doing such | [12:07] | |
brycec | But it's not about performance, of course | [12:07] | |
mercutio | it's harder to google for than i would have liked.
someone was asking why linux doesn't do zero-copy for network yet. which is what i want well zero-copy receive | [12:07] | |
brycec | Wikipedia had more info than I expected it to. "The Linux kernel supports zero-copy through various system calls, such as sys/socket.h's sendfile, sendfile64, and splice. Some of them are specified in POSIX and thus also present in the BSD kernels or IBM AIX, some are unique to the Linux kernel API."
Granted that only mentions sendfile* I imagine receiving to be a bit tricker | [12:09] | |
mercutio | splice can't even do a write to disk based upon a descriptor you're reading from. | [12:09] | |
brycec | (It's easy to offload sending - toss it away and forget. Receiving requires monitoring the receipt) | [12:10] | |
mercutio | i hate the 16k read/write loop
or whatever size people decide to do it just feels dirty. | [12:10] | |
BryceBot | That's what she said!! | [12:10] | |
brycec | BryceBot: ++ | [12:10] | |
mercutio | and it means a lot more context switches
it's especially bad with network sockets as you often get dribs and drabs, and if you don't read from the socket then linux doesn't know to make the tcp window bigger. so you can't easily just delay all your reading it's a non issue on isdn/modems etc i reckon but with adsl, vdsl, ethernet etc now days you get like one packet a msec or so. with ethernet it's a little better as you can coalesce a little with adsl/vdsl you can't really even coalesce. so 1.5 mb/sec = roughly 1 packet a msec. and the network side, and the program and the file system all have to deal with that | [12:11] | |
brycec | interesting | [12:16] | |
mercutio | i was playing with it for quite a while :)
i was actually mostly trying to see how little cpu i could get infiniband to use. but i was testing on other speed connections at the same time. | [12:17] | |
brycec | Ahh, makes even more sense. | [12:22] | |
mercutio | and adsl used more cpu than i thought it should.
i am 50% of cpu compared to curl for a 10mb file over vdsl though :) the strangest thing i found is that haswell is way faster than sandybridge for dumb downloading programs. err than ivy bridge. i7-3770 vs i7-4770 | [12:22] | |
brycec | interesting. | [12:24] | |
mercutio | there's hardly any benchmarks which would show it around
people are mostly testing more complex programs etc. and mostly windows but i think it's from faster cache/ipc most benchmarks at least use ram i'm actually pretty curious how things ilke php compared from ivy to haswell and perl | [12:25] | |
m0unds | ipc improvement benchmarks i've seen showed it to be ~5-10%
typically less than 10% in singlethreaded loads | [12:43] | |
mercutio | that's average/overall | [12:43] | |
m0unds | yep, because that's what tends to be tested | [12:44] | |
mercutio | well yeah it surprised me
there's hardly any linux benchmarks around | [12:44] | |
m0unds | there's not a lot of market for it | [12:44] | |
mercutio | there's phoronix, but they still test lame things | [12:44] | |
m0unds | esp w/desktop cpus
servers, maybe | [12:45] | |
mercutio | deskto/server cpus are the same
basically | [12:45] | |
m0unds | different sockets, chipsets, cache amounts, etc | [12:45] | |
mercutio | it's not really a lot different other than the numa complciations
which only happens with dual cpu well dual or more numa is difficult to deal with though. that's why intel did really fast interconnects -- to minimise performance deficits. when numa comes to desktops then i bet games wont' deal right :) | [12:45] | |
m0unds | i don't think i've ever seen server testing w/e3 stuff since that's more of "workstation" cpu | [12:46] | |
mercutio | yeah i'd ilke a recent e5 to compare
but they're really expensive really slow too well e5-2620 is expensive and slow i should say. | [12:47] | |
m0unds | well, i'd assume you'd buy one if your workload benefits from higher cache and higher core count
and smp and more ram support | [12:49] | |
mercutio | you usually buy one because you need the ram
e5-2620 is 6 core 2 ghz so it's worse than 4 core 3 ghz but costs like twice as much as e3 then youu have the mbd cost.. | [12:49] | |
m0unds | compare it to a similar generation hexacore i7 then | [12:50] | |
mercutio | e5 does add some stuff | [12:50] | |
m0unds | that was my point, it's not apples/apples | [12:50] | |
mercutio | direct i/o or something
yeh a lot of the improvements go hand in hand for server/desktop though and desktop is usually quicker to market than server that said, software can improve performance more than generational steps normally | [12:50] | |
like it should be possible to half the cpu usage of curl | [13:00] | ||
..... (idle for 22mn) | |||
dne | mercutio, brycec: https://en.wikipedia.org/wiki/.bss#BSS_in_C | [13:22] | |
BryceBot | .bss :: In computer programming, the name .bss or bss is used by many compilers and linkers for a part of the data segment containing statically-allocated variables represented solely by zero-valued bits initially (i.e., when execution begins). It is often referred to as the "bss section" or "bss segment". Typically only the length of the bss section, but no data, is stored in the object file. The program loader allocates and... | [13:22] | |
mercutio | interesting
more and more people just zero data just in case i think like i wouldn't be surprised if malloc came back with zeros it may be different when you're freeing and allocating again though did anyone hear about how i think it was rackspace didn't zero their users data so when people brought up a new vm they could read the filesystem data still on file system from previous user | [13:27] | |
dne | wasn't it digitalocean? | [13:29] | |
mercutio | it was rackspace or linode
but digitalocean may have had the same issue damn i'm struggling on my google yeah can't find it | [13:29] | |
dne | https://github.com/fog/fog/issues/2525 | [13:33] | |
mercutio | i expect it's actually quite common
i wonder if solusvm does that looks like an api issue, this was with normal provisioning/deprovisioning. | [13:33] | |
dne | yeah the api had a stupid default | [13:35] | |
......................... (idle for 2h2mn) | |||
*** | _Zodiac has joined #arpnetworks
_Zodiac has left | [15:37] | |
acf_ | found out rtlwifi handles DHCP and ARP strangely
it always sends them at the lowest TX rate does that seems strange to anyone else? it has code that checks the port number in UDP packets for 67 / 68 | [15:47] | |
....... (idle for 30mn) | |||
mercutio | oh weird, do a lookup on google.
with the . acf: maybe it's trying to make sure they get through or maybe it just scales transmit speed up as you do more data probably trying to maximise the chance of it working i hacked arping to do flood arp requests once. to check arp performance it was years ago, arp used to be really unoptimised. if possible change wifi cards though you can get ac7260s pretty cheap you can get stuff like 4965agn even cheaper http://www.ebay.com/itm/4965-4965AGN-wireless-WiFi-Mini-PCI-E-card-802-11N-AGN-N-for-Intel-/261318790911?pt=LH_DefaultDomain_0&hash=item3cd7d04eff like $5.60 usd :) there's an inbetween that's like $10 too i think http://www.ebay.com/itm/Intel-7260-HMWG-WiFi-Wireless-AC-7260-Dual-Band-AC-Bluetooth-BT-mini-pcie-card-/251591164998?pt=LH_DefaultDomain_0&hash=item3a94008446 looks like $32.90 usd for 7260. but that'll do ac. that said hp laptops blacklist, maybe some other things do too | [16:19] | |
................... (idle for 1h32mn) | |||
m0unds | i picked up a doxie scanner for digitizing important records. it's pretty snazzy. | [17:57] | |
.... (idle for 15mn) | |||
mnathani | what's a doxie scanner?
@google doxie scanner | [18:12] | |
BryceBot | 15,200 total results returned for 'doxie scanner', here's 3
Doxie Go - Rechargeable Mobile Document Scanner: Office Products (http://www.amazon.com/Doxie-Go-Rechargeable-Document-Scanner/dp/B0053TRH2M) Doxie Go delivers smart and simple scanning you can take anywhere - no computer required; Doxie's tiny size makes it easy to scan documents at your desk or ... Doxie Go Plus & Doxie Go Wi-Fi - Rechargeable Wireless Portable ... (http://www.getdoxie.com/product/doxie-go/) Doxie is a new kind of scanner you can take with you, with a built-in battery, memory, and Wi-Fi. No computer required – scan anywhere, then sync to Mac, PC, ... | [18:12] | |
m0unds | ^
little portable ADF scanner i got the go wi-fi version, has built in wireless and onboard storage can run without a wall wart, stores scans locally and you grab them from the device either via usb or wifi | [18:12] | |
mnathani | Neat | [18:14] | |
brycec | m0unds: Used any of their apps? Decent? | [18:15] | |
m0unds | my wife scanned something to her ipad and it worked pretty effortlessly
the desktop app on windows is pretty functional. shows scans in a gallery sort of thing, has a slider for zoom level. you click import after connecting to the scanner or plugging it in via usb and it just grabs all the scans from it automatically | [18:15] | |
brycec | (my mother keeps insisting she "needs" a Neat-o or similar, except apparently they suck so I keep shooting her down) | [18:16] | |
m0unds | the base model doxie is like $80 on amazon i think
it can do OCR via some third party library built into the software if you want that sort of thing doesn't have any filing support or anything built in (not sure if the neato stuff does that) | [18:16] | |
brycec | brycec still isn't so sure his mom needs one, but at least this isn't terrible | [18:17] | |
BryceBot | That's what she said!! | [18:17] | |
m0unds | haha
if you have a .edu email, they offer a 30%-ish discount if you buy direct, anyway i really wish we would have gotten this thing when my wife was finishing up her MSN. i had to scan so much crap w/a flatbed canon w/flaky TWAIN drivers OH? YOU HAVE MORE PAGES TO SCAN? I BELIEVE THE SCANNER HAS DISCONNECTED SO I'LL GO AHEAD AND CRASH, LOL. | [18:17] | |
brycec | LOL
Also, MSN? (in this context) | [18:20] | |
m0unds | oh, nursing
she's a nurse practitioner finished in may of last year, took 6 mos to credential her and she works as a provider in an emergency dept now worked there as an RN since 2005 when she was finishing up school, she had tons of clinical hour logs and other stuff that had to be scanned in (probably 150pp of stuff) | [18:20] | |
brycec | @wiki Master of Science in Nursing | [18:23] | |
BryceBot | Master of Science in Nursing :: A Master of Science in Nursing (MSN) is an advanced-level postgraduate degree for registered nurses and is considered an entry-level degree for nurse educators and managers. The degree also may prepare a nurse to seek a career as a nurse administrator, health policy expert, or clinical nurse leader. The MSN may be used as a prerequisite for... http://en.wikipedia.org/wiki/Master%20of%20Science%20in%20Nursing | [18:23] | |
brycec | Ahh | [18:23] | |
m0unds | The MSN may be used as a prerequisite for doctorate-level nursing education, and previously was required to become an advanced practice registered nurse such as a nurse practitioner, clinical nurse specialist, nurse anesthetist, or nurse midwife. | [18:23] | |
BryceBot | That's what she said!! | [18:23] | |
m0unds | ..."previously" is sort of erroneous, since it's still a requisite, haha | [18:24] | |
...... (idle for 29mn) | |||
acf_ | mercutio: I think most laptops in the US have a card whitelist
it might even be a legal requirement I tried several different cards in the box but the Linux Realtek drivers suck /*sleep after linked 10s, to let DHCP and 4-way handshake ok enough!!! */ | [18:53] | |
brycec | Supposedly it's a requirement for FCC certification. Mass-produced systems must stick to the tested specifications, hence the whitelist. However build-to-order systems typically don't have that stipulation and lack the whitelist.
(At least that's what I've heard from solid sources talking about Lenovos) | [19:00] | |
acf_ | I use exclusively Thinkpads
afaict, they all have a whitelist but some have a handful of cards in the whitelist I recently got a Thinkpad X130e | [19:01] | |
brycec | ^ I have one! :D
It's sitting right beside me | [19:02] | |
acf_ | use Linux on it? | [19:02] | |
brycec | Yes | [19:02] | |
acf_ | is it the AMD variant? | [19:02] | |
brycec | No, Intel | [19:02] | |
acf_ | well that's why | [19:02] | |
brycec | (I thought the 120e was AMD)
what's why? | [19:02] | |
acf_ | it works :P
the X130e came in Intel and AMD | [19:02] | |
brycec | Are you saying that yours doesn't work at all? (did I miss something?)
Mine has a whitelist too :( | [19:03] | |
acf_ | all of the devices have suckey Linux support
it has a Realtek wlan and a Connexant sound card the AMD-E300 CPU can't play 720p videos in Chromium | [19:03] | |
brycec | Intel sound and Realtek RTL8188CE here, and no performance issues :) | [19:04] | |
acf_ | that's the same wlan card I have
are you using the stock driver in your kernel? | [19:04] | |
brycec | Yep
It frankly "just worked" | [19:05] | |
acf_ | hmm.. mine likes to drop packets marked as "special" by the driver | [19:05] | |
brycec | Currently 3.18.6, but I've been using it for awhile | [19:05] | |
acf_ | I was testing on 3.16 and 3.19
3.19 treats all IPv6 packets as special and sends them at the lowest data rate or in my case, drops them | [19:05] | |
staticsafe | o_O | [19:07] | |
acf_ | interesting to know that it works on some hardware | [19:08] | |
brycec | fwiw from my dmesg, "ieee80211 phy0: Selected rate control algorithm 'rtl_rc'" | [19:08] | |
acf_ | same here | [19:09] | |
mercutio | my hp is really old and has intel 4965agn
which is really early n but it sitll does 300 megabit 5 ghz and 150 megabit 2.4 ghz or 144 megabit 2.4 i think | [19:16] | |
m0unds | 20:02:58 ⤷ | the AMD-E300 CPU can't play 720p videos in Chromium ---- is HW acceleration not working or something?
i have an amd NEO based netbook (even wimpier than the E300) and it can handle 720p video via HTML5 or flash just fine, so long as that's all i do on it | [19:24] | |
acf_ | hmm
I forced chromium to enable hardware acceleration even though it didn't want to that works kind of, as long as I don't have too many tabs open it's terrible without hardware acceleration it just kind of bothers me that my X61s is way faster | [19:26] | |
mercutio | i find chrome works better withoutu hardware acceleration
it seems to leak memory on hardware acceleration | [19:35] | |
acf_ | it crashes my graphics driver on my X61s | [19:35] | |
mercutio | oh you have a really weak cpu | [19:35] | |
BryceBot | That's what she said!! | [19:35] | |
acf_ | if hardware acceleration is enabled | [19:35] | |
mercutio | oh m0unds has a really weak cpu | [19:35] | |
acf_ | opengl things won't work anymore if I try to play a video in chromium | [19:36] | |
mercutio | i just play videos in mplayer | [19:36] | |
m0unds | mercutio: yep, that thing was awful. | [19:36] | |
mercutio | i've never found video playing on web browsers to work well in linux.
youtube-dl is handy if you want to dl youtube videos | [19:36] | |
m0unds | i only used it as a disposable toolkit laptop. i ended up nuking arch and just ran some bsd on it with no gui | [19:36] | |
mercutio | my chromebook seems to go okish with web
except scrolling is a bit jerky | [19:37] | |
m0unds | video bios had a bug that the windows drivers worked around, but all linux stuff would cause display corruption unless i disabled hw acceleration
then it just ran dog-ass slow | [19:37] | |
mercutio | eek | [19:37] | |
m0unds | so it was pointless to run anything but cli or windows on it | [19:37] | |
acf_ | what model laptop was it? | [19:37] | |
m0unds | i think it has netbsd on it atm
some acer thing that i paid like $100 for on sale 11.6" display, it was tiny and i only bought it to have it instead of my work laptop which was way too big because some idiot thought a 17" notebook was the best idea ever for a portable machine to take outside and stuff weighed like 11lbs without a battery | [19:37] | |
mercutio | m0unds: that's why i like my chromebook
it's nice being so tiny lugging my laptop around is a pita i think my laptop is 15" it's also damn noisy though. fans clog up on laptops and it's a pita to clean | [19:40] | |
staticsafe | i have a T530 | [19:41] | |
mercutio | http://www.muamat.com/adpics/4ef5ba55105df6bbb1a537927.jpg
i h ave something that looks kind of like that http://www.cnet.com/products/hp-elitebook-8530p/specs/ think it's eotmhing like that 1680x1050. cheap laptops are always 1366x768 now hmm this suggest it's 14" so maybe i'd find a 13" large too actually it's fat as well as big | [19:41] | |
...... (idle for 26mn) | |||
acf_ | brycec: I assume you use IPv6 over that RTL8188?
IPv4 seems to work okay under the 3.18 driver but not IPv6 (for me) | [20:10] | |
..... (idle for 21mn) | |||
brycec | Yes I do. | [20:32] | |
acf_ | have you done any IPv4 vs IPv6 TX speed testing? | [20:33] | |
*** | mnathani_ has joined #arpnetworks | [20:35] | |
brycec | Have not, no.
I frankly don't expect "blazing speeds" from wifi not with 40+ other networks around me | [20:36] | |
acf_ | ah, got it
thanks for the info though | [20:38] | |
brycec | yep, np | [20:38] | |
.... (idle for 16mn) | |||
mercutio | combined upload/download wireless can easily struggle :(
if using as ethernet replacement | [20:54] | |
....................... (idle for 1h52mn) | |||
*** | mister has joined #arpnetworks
mister has left | [22:46] |
↑back Search ←Prev date Next date→ Show only urls | (Click on time to select a line by its url) |