00:02:10 <kmc> shachaf: did you know about SMEP?
00:02:51 <kmc> prevents the CPU from executing user-accessible memory in kernel mode
00:03:34 <shachaf> Yes, you mentioned it in here a few days ago, I think.
00:03:41 -!- augur has quit (Remote host closed the connection).
00:04:04 <kmc> this will result in kernel exploits being more interesting :)
00:05:15 <kmc> i think it does not actually provide much security, because userspace NX exploitation is already such a well-developed field
00:07:34 <shachaf> I wonder how much overhead all these things have.
00:07:45 <kmc> SMEP should have basically no overhead
00:07:54 <kmc> if you're talking about processor performance
00:08:09 <shachaf> Yes, but things like -fstack-protector do have some.
00:08:18 <shachaf> I mean overall compared to "if we didn't have to worry about security".
00:08:21 <kmc> i did some measurements for the mosh hardening project
00:08:28 <kmc> results vary
00:08:32 <shachaf> Alternatively "if we had better ways to deal with security issues than things like -fstack-protector".
00:08:49 <shachaf> (Which we do, of course. But anyway.)
00:08:59 <kmc> well, yes and no
00:09:01 <kmc> defense in depth :)
00:10:54 <kmc> i had this argument with ezyang when he suggested that SafeHaskell provides browser-quality sandboxing "for free"
00:11:18 <kmc> theoretically, sure
00:11:24 * shachaf is very suspicious of things like SafeHaskell.
00:11:30 <shachaf> And SecureECMAScript and all those.
00:11:37 <kmc> but how much do you trust the GHC runtime system, a 50,000 line 20 year old concurrent C program?
00:11:54 <kmc> not to mention the implementation of SafeHaskell itself, which is very new
00:15:51 <kmc> of course we all know that writing secure C code is easy if you are not an idiot
00:16:00 <kmc> (an idiot is anyone who ever makes a mistake)
00:16:57 <kmc> that's why i write all my C code using randomly generated identifier names and no whitespace
00:17:06 <kmc> if you can't understand it, you have no business programming in C to begin with
00:17:25 <Sgeo> Isn't the JVM supposed to be a secure sandbox, in theory?
00:17:30 <Sgeo> At least for usages such as applets?
00:17:38 <shachaf> > (ord 'l' - ord 'h') * 26
00:17:41 <kmc> omg clojure
00:18:05 <shachaf> kmc: Don't disclojure, man.
00:18:45 -!- Vorpal has quit (Ping timeout: 260 seconds).
00:19:15 <Sgeo> And, well, "supposed tp" doesn't always seem to work out :(
00:19:26 <kmc> sure, in theory JVM is secure, but it might have a bug, and anything which might have a bug is no better than nothing at all
00:19:36 <kmc> that's why i run all my programs in ring 0
00:19:47 <kmc> i mean, linux might have a privilege escalation bug, so there is no point to even running any code in userspace
00:19:53 <kmc> ok troll mode disengage
00:20:13 * kmc pushes harder
00:20:41 <shachaf> http://www.youtube.com/watch?v=14xcsz43Kuw#t=16s
00:21:29 <lambdabot> "trolololololololololololololololololololololololololololololololololololol...
00:21:55 <kmc> i think a trollcycle is a bicycle where the brakes don't work
00:22:08 <shachaf> kmc: That's just a rollcycle
00:22:34 <shachaf> I hope y'all're watching that video!!!!!!
00:22:36 <Sgeo> `run java -jar clojure-1.4.0.jar "(str [1 2 3])"
00:22:45 -!- oerjan has quit (Quit: Good night).
00:22:57 <HackEgo> Exception in thread "main" java.io.FileNotFoundException: (str [1 2 3]) (No such file or directory) \.at java.io.FileInputStream.open(Native Method) \.at java.io.FileInputStream.<init>(FileInputStream.java:137) \.at java.io.FileInputStream.<init>(FileInputStream.java:96) \.at clojure.lang.Compiler.loadFile(Compiler.java:6909) \..at clojure.main$load_script.invoke(main.clj:283) \.at
00:23:15 <HackEgo> bin \ canary \ clojure-1.4.0.jar \ foo \ karma \ lib \ paste \ quotes \ share \ wisdom \ zalgo.hs
00:23:28 <shachaf> `run mv clojure-1.4.0.jar /tmp/junk
00:23:33 -!- augur has joined.
00:23:44 <Sgeo> `run mv /tmp/junk/clojure-1.4.0.jar ~
00:23:47 <HackEgo> mv: cannot stat `/tmp/junk/clojure-1.4.0.jar': No such file or directory
00:24:18 <HackEgo> bin \ canary \ foo \ karma \ lib \ paste \ quotes \ share \ wisdom \ zalgo.hs
00:24:30 <HackEgo> ls: cannot access /tmp/junk: No such file or directory
00:24:33 <shachaf> This channel doesn't need a Clojurebot.
00:24:50 <Sgeo> It's a better clojurebot than clojurebot
00:24:55 -!- zzo38 has joined.
00:25:53 <Sgeo> I don't entirely get what happened with /tmp/junk
00:41:31 -!- TeruFSX has joined.
01:13:14 -!- copumpkin has quit (Ping timeout: 240 seconds).
01:13:49 -!- copumpkin has joined.
01:18:15 -!- benuphoenix has left.
01:29:50 -!- Phantom_Hoover has quit (Quit: Leaving).
01:36:12 -!- DHeadshot has quit (Read error: Connection reset by peer).
01:36:18 -!- DH____ has joined.
01:39:38 -!- augur has quit (Remote host closed the connection).
01:42:55 -!- augur_ has joined.
01:51:48 -!- Phantom_Hoover has joined.
01:54:28 -!- augur_ has quit (Remote host closed the connection).
01:57:12 -!- augur_ has joined.
02:00:22 -!- augur_ has quit (Remote host closed the connection).
02:22:49 -!- carado has joined.
02:26:03 -!- augur has joined.
02:37:01 -!- Phantom_Hoover has quit (Quit: Leaving).
02:38:46 -!- carado has quit (Quit: Leaving).
02:40:48 -!- segorev has quit (Quit: This computer has gone to sleep).
02:44:45 -!- itidus20 has changed nick to itidus21.
02:57:34 -!- Arc_Koen has joined.
03:08:40 <zzo38> Do you know the call/cc yin yang?
03:23:02 -!- DH____ has quit (Read error: Connection reset by peer).
03:23:07 -!- DHeadshot has joined.
03:27:12 -!- DHeadshot has quit (Read error: Connection reset by peer).
03:27:17 -!- DH____ has joined.
03:38:18 <shachaf> kmc: getcc :: MonadCont m => m (m a) is a fun Cont thing.
03:43:19 <shachaf> You need fix to implement it, though.
03:43:39 <shachaf> (Since you can use it to make infinite loops, of course.)
03:43:58 <Sgeo> I wonder if the delimited continuations library that currently exists for Clojure allows for the continuations to be passed to untransformed code
03:44:02 <Sgeo> Because that would be cool
03:44:27 <Sgeo> And for some bizarre reason I'm under the impression that it should be theoretically possible
03:44:53 <shachaf> What's the most unclojury topic in the world?
03:45:03 <shachaf> I bet Sgeo could relate it to Clojure.
03:45:37 -!- Arc_Koen has quit (Quit: Arc_Koen).
03:49:46 <kmc> "In C, a compound literal designates an unnamed object with static or automatic storage duration. In C++, a compound literal designates a temporary object, which only lives until the end of its full-expression. As a result, well-defined C code that takes the address of a subobject of a compound literal can be undefined in C++."
03:50:30 <kmc> (compound literal is something like (struct foo) { 1, 2, 3 } )
03:50:49 <shachaf> Does that work with arrays?
03:51:19 <Sgeo> Didn't C++ used to just compile to C?
03:51:19 <kmc> according to GCC manual
03:51:38 <kmc> Sgeo: C++ is a language not an implementation
03:51:51 <kmc> you're right that some C++ implementations work this way, including the first implementations
03:52:02 <kmc> 'Cfront was the original compiler for C++ (then known as "C with Classes") from around 1983, which converted C++ to C'
03:52:32 <kmc> Comeau C++ works this way too
03:53:14 <kmc> compound literals weren't in C until C99
03:53:20 <kmc> presumably if a C++
03:53:51 <kmc> presumably a C++-to-C compiler translates C++ compound literals to something else in C
03:54:09 <kmc> oh, but compound literals aren't in C++ either -- supporting them in C++ mode is a GNU extension
03:54:30 <kmc> will there eventually be a version of C++ based on C99? is C++11 based on C99?
04:03:13 -!- DH____ has quit (Read error: Connection reset by peer).
04:03:58 -!- segorev has joined.
04:11:58 -!- segorev has quit (Quit: Leaving).
04:13:16 -!- ogrom has joined.
04:16:22 <Sgeo> kmc, what do you think about emacs?
04:26:16 <itidus21> i know the question was addressed to kmc, but, emacs is a substandard nes emulator
04:28:37 <ion> GNU GRUB 2 is a much better bootloader than Emacs.
04:32:10 <Sgeo> When I was in 6th grade, I thought my book saying that some people consider emacs to be almost like an OS meant that I could literally boot into it from the CD.
04:32:22 <Sgeo> I was hoping that that would help me fix my inability to boot my computer.
04:33:10 * shachaf waits for the Clojure tie-in.
04:33:35 <Sgeo> Clojure is currently my main motivation to learn Emacs... so that's a sort of tie-in.
04:34:03 <Sgeo> You asked for it!
04:34:09 <monqy> shachaf professional clairvoyant???
04:34:29 <ion> When i was in 6th grade i hadn’t ever seen a CD in real life.
04:34:45 <shachaf> monqy: not professional :'(
04:34:50 <shachaf> monqy: will you pay me for it?????????
04:34:52 <monqy> could've fooled me!
04:34:55 <monqy> I would give you my money
04:35:02 <shachaf> monqy: do you have a money
04:35:03 <monqy> if you can turn it into future telling
04:35:14 <monqy> I don't have money though
04:35:53 <shachaf> monqy::;what if i giv emo you moa a money?
04:37:14 <monqy> give money to yourself and then maybe you will be able to tell the future for yourself
04:37:18 <monqy> what is the future like
04:37:47 <shachaf> in the future i havea as much amoney as the present :'(
04:39:56 <itidus21> in the future there will be flying cars and public holograms
05:12:59 <zzo38> The MMC5 Famicom mapper can use ExRAM as an extra nametable or attribute table, but when used in this mode, it is write-only, and if the PPU is not rendering, it will write zero instead of the value you are trying to write. Do you know what logic causes this to happen?
05:27:38 -!- kinoSi has quit (Read error: Connection reset by peer).
05:28:06 -!- kinoSi has joined.
05:31:42 -!- TeruFSX has quit (Ping timeout: 244 seconds).
05:51:46 <zzo38> What does a RAM chip normally do if some of the address lines are not connected?
05:52:55 -!- ztirf has joined.
05:55:46 -!- ztirf has quit (Client Quit).
06:05:58 -!- zzo38 has quit (Remote host closed the connection).
06:53:24 -!- Slereah has quit (*.net *.split).
06:53:24 -!- lahwran has quit (*.net *.split).
06:53:24 -!- constant has quit (*.net *.split).
06:53:25 -!- Sanqui has quit (*.net *.split).
06:53:25 -!- comex has quit (Read error: Operation timed out).
06:53:40 -!- atriq has joined.
06:56:07 -!- comex has joined.
07:04:39 <atriq> Is newtype CList a = CList ((a -> CList a -> a) -> a) a Functor?
07:04:46 -!- nvt has quit (Ping timeout: 256 seconds).
07:05:33 <shachaf> atriq: Doesn't look like a Functor, since it's invariant (?).
07:06:03 <atriq> It's meant to be a homogenous church list
07:06:36 <shachaf> Typed Church lists are generally homogeneous, aren't they?
07:06:45 <lambdabot> forall a b. (a -> b -> b) -> b -> [a] -> b
07:06:57 -!- Jafet has joined.
07:06:59 <shachaf> type ChurchList a = forall b. (a -> b -> b) -> b -> b
07:07:42 <atriq> Or rather, an infinite church list, apparently
07:08:15 <atriq> (a -> CList a -> a) -> a
07:08:24 <atriq> I've just woken up
07:08:34 <atriq> I shouldn't read edwardk when I'm half asleep
07:08:40 <shachaf> Are you trying for a Scott list instead of a Church list?
07:08:40 <atriq> And I shouldn't follow my dreams
07:09:19 <shachaf> Or "Boehm-Berarducci", as Oleg apparently pointed out?
07:09:42 <shachaf> http://comments.gmane.org/gmane.comp.lang.haskell.cafe/100508
07:10:12 -!- Slereah has joined.
07:10:12 -!- Sanqui has joined.
07:10:12 -!- lahwran has joined.
07:10:12 -!- constant has joined.
07:13:18 <atriq> My attempts to do a church list without making a new type result in infinite types
07:13:58 <shachaf> You're probably trying for a Scott list instead of a Churchy list.
07:14:43 <shachaf> Such that clist (:) [] == actualList
07:14:53 <atriq> fix (pair 1 . unsafeCoerce) seems to work
07:15:26 <atriq> I'm not doing a Church list
07:15:37 <atriq> I'm doing something which until now I thought was called a church list
07:15:50 <shachaf> OK -- you need recursive types for a recursive Scott encoding.
07:25:58 <atriq> Thank you, shachaf
07:26:02 <atriq> You've been a real help
07:27:14 <atriq> With my SECOND HASKELL OBFUSCATION
07:30:48 <atriq> :t \h t c n -> c h (t c n)
07:30:49 <lambdabot> forall t t1 t2 t3. t -> ((t -> t2 -> t3) -> t1 -> t2) -> (t -> t2 -> t3) -> t1 -> t3
07:31:03 <atriq> :t ap (const ap) (ap (const (ap (const ap))) (ap (const (ap (const const))) (ap (const (ap id)) const)))
07:31:04 <lambdabot> forall b a b1 b2. b -> ((b -> a -> b1) -> b2 -> a) -> (b -> a -> b1) -> b2 -> b1
07:33:27 -!- nvt has joined.
07:44:40 -!- nooga has joined.
07:45:05 <atriq> I'm gonna need unsafeCoerce anyway
07:57:21 <monqy> what did you do and why did you do it
07:57:53 <monqy> more questions: why didn't you not do it
07:58:10 <monqy> guilt and shame: you could have avoided it
07:58:31 <shachaf> monqy: Could I have avoided guilt and shame?
07:58:43 <monqy> are you guilty of something shameful
07:59:00 <atriq> monqy, I used to many unsafeCoerces, for fun, because MY MIND COMMANDED TO ME, yes and I did
07:59:28 <monqy> shachaf: you may or may not have already avoided it
08:03:10 -!- mig22 has joined.
08:04:13 <atriq> > Identity 1 >> Identity 'a'
08:04:21 <atriq> > runIdentity (Identity 1 >> Identity 'a')
08:10:21 -!- MoALTz has joined.
08:15:38 -!- ais523 has quit.
08:35:40 -!- oerjan has joined.
08:38:29 <oerjan> 00:25:53: <Sgeo> I don't entirely get what happened with /tmp/junk
08:38:29 <oerjan> 00:26:50: <shachaf> I don't either.
08:39:32 <oerjan> i am guessing that it disappeared when HackEgo's chroot was wiped out; only the HackEgo directory is kept in the repository.
08:40:14 <HackEgo> bin \ dev \ etc \ hackenv \ home \ lib \ lib64 \ opt \ proc \ sbin \ sys \ tmp \ usr \ var
08:40:28 <oerjan> `run echo test >/tmp/test123
08:40:47 <oerjan> `run echo test >/tmp/test123; ls /tmp
08:41:21 <oerjan> everything you want kept needs to be put in there
08:42:26 <Sgeo> `run echo test >/blah
08:42:30 <HackEgo> bash: /blah: Permission denied
08:52:09 <oerjan> <atriq> Is newtype CList a = CList ((a -> CList a -> a) -> a) a Functor?
08:53:07 <oerjan> that scott thing aside, i think that should be newtype CList a = CList (forall b. (a -> CList a -> b) -> b)
08:53:28 <oerjan> in which case it might be a functor
08:55:37 <oerjan> fmap f (CList l) = CList $ \p -> l (\a as -> p (f a) (fmap f as)) or so
08:56:47 <oerjan> not sure if that lambda needs to be extracted to get an explicit type annotation
08:57:37 <oerjan> probably not, since that's similar to legal stuff with runST
09:12:25 -!- atriq has quit (Remote host closed the connection).
09:13:53 <shachaf> kmc: Your FAQ is at the top of the Google results for «haskell faq» now!
09:27:24 -!- Phantom_Hoover has joined.
09:39:35 -!- monqy has quit (Quit: hello).
10:11:55 -!- carado has joined.
10:23:05 -!- AnotherTest has joined.
10:44:57 <oerjan> > (0 :+ 1) ** (0 :+ 1)
10:58:32 -!- xzy has joined.
10:59:00 <HackEgo> xzy: Welcome to the international hub for esoteric programming language design and deployment! For more information, check out our wiki: http://esolangs.org/wiki/Main_Page. (For the other kind of esoterica, try #esoteric on irc.dal.net.)
11:00:13 <oerjan> although it's very quiet this time of week/day
11:17:14 -!- augur has quit (Remote host closed the connection).
11:24:59 -!- asiekierka_ has joined.
11:25:40 <fizzie> oerjan: A time of week/day that's not a weekday.
11:27:35 <oerjan> well basically _both_ the time of week and time of day are about pessimal now
11:32:39 <fizzie> I'm pretty sure I had a week-wrapped graph too, but http://xn--nxa.zem.fi/~fis/test7h.png says 9-10am Finnish time (it's now about 14:32) is more pessimal.
11:32:56 <fizzie> Not that this is much better.
11:33:10 <fizzie> (That's also slightly old.)
11:34:04 <fizzie> Okay, http://xn--nxa.zem.fi/~fis/test12.png seems to suggest the difference is smaller; that's IIRC a newer plot.
11:34:37 -!- augur has joined.
11:35:23 -!- augur has quit (Remote host closed the connection).
11:35:31 -!- mig22 has quit (Quit: mig22).
11:35:36 <oerjan> it had cpressey and alise in it :P
11:36:04 <fizzie> The one before had ehird and AnMaster, so...
11:42:57 -!- Nisstyre has quit (Ping timeout: 245 seconds).
11:51:15 <oerjan> no, and if it did, that wouldn't be the right syntax
11:51:42 <AnotherTest> sorry my haskell knowledge is virtually zero
11:51:58 <oerjan> it has the three operators above
11:52:35 <oerjan> because it is more useful for it to be 1.
11:52:49 <lambdabot> No instance for (GHC.Real.Fractional GHC.Bool.Bool)
11:53:23 <lambdabot> No instance for (GHC.Num.Num GHC.Bool.Bool)
11:54:21 <oerjan> for ^ and ^^, presumably it makes no sense to waste time checking the first argument for equality to 0
11:54:37 <oerjan> for **, you have to ask the IEEE floating point standard
11:55:03 <oerjan> also for ^ , because it makes polynomials work naturally
11:57:21 <oerjan> > [sum [a*x^n | (a,n) <- zip [0..] [1,2,3]] | x <- [0..5]]
11:58:28 -!- Nisstyre has joined.
12:03:54 <lambdabot> 179769313486231590772930519078902473361797697894230657273430081157732675805...
12:05:00 <oerjan> > length . show $ round (1/0)
12:05:26 <oerjan> round always gives an integral result
12:05:30 <lambdabot> forall a b. (RealFrac a, Integral b) => a -> b
12:06:19 <oerjan> i recall that round(1/0) thing from before...
12:06:20 <lambdabot> forall a. (RealFloat a) => a -> Bool
12:06:25 <lambdabot> 100000000000000000000000000000000000000000000000000000000000000000000000000...
12:07:14 <oerjan> > 1.79769e308 :: Double
12:07:20 <oerjan> > 1.7977e308 :: Double
12:07:44 <oerjan> it's basically converting the largest possible Double to Integer
12:08:25 <lambdabot> http://www.spellingcenter.com/fininity
12:08:26 <lambdabot> Title: fininity. Suggestions for fininity provided by Spelling Center of the the Free O ...
12:08:31 <lambdabot> Ambiguous type variable `t' in the constraints:
12:08:36 <oerjan> the round thing is probably an accident
12:10:33 <lambdabot> http://twitter.com/pyyvaara/statuses/200636046323617795
12:10:33 <lambdabot> Title: Twitter / Pyyvaara: Just met a Finn! She was jamming ...
12:11:05 <oerjan> > floatDigits (undefined :: Double) -- no accident
12:11:15 <lambdabot> 182012343000035853826900847249801744536541097171706064167428854069310344820...
12:12:16 <lambdabot> No instance for (GHC.Float.RealFloat
12:12:30 <oerjan> isInfinite isn't definite for integrals
12:12:55 <oerjan> or tuples, for that matter
12:13:13 <AnotherTest> let inf = decodeFloat (1/0 - 1 ) in isInfinite (first inf ^ second inf)
12:13:25 <AnotherTest> > let inf = decodeFloat (1/0 - 1 ) in isInfinite (first inf ^ second inf)
12:13:26 <lambdabot> No instance for (Control.Arrow.Arrow (,))
12:13:33 <oerjan> you realize that's not what decodeFloat does, right?
12:14:19 <oerjan> If decodeFloat x yields (m,n), then x is equal in value to m*b^^n, where b is the floating-point radix, [...]
12:14:52 <oerjan> > 4503599627370495 * 2^972
12:14:53 <lambdabot> 179769313486231550856124328384506240234343437157459335924404872448581845754...
12:17:29 <oerjan> > 4503599627370495 * 2^972 :: Double
12:19:29 -!- bastien_ has joined.
12:22:34 -!- oerjan has quit (Quit: Later).
12:25:38 -!- bastien_ has left ("Leaving").
12:28:21 -!- FireFly has quit (Ping timeout: 245 seconds).
12:34:58 -!- nys has joined.
12:38:30 -!- Phantom_Hoover has quit (Ping timeout: 264 seconds).
12:45:30 -!- ztirf has joined.
12:53:28 -!- hagb4rd has quit (Ping timeout: 245 seconds).
13:04:17 -!- FireFly has joined.
13:13:35 -!- epicmonkey has joined.
13:28:08 -!- kinoSi has quit (Read error: Connection reset by peer).
13:28:36 -!- kinoSi has joined.
13:39:03 -!- ogrom has quit (Quit: Left).
13:47:32 -!- hagb4rd has joined.
13:48:57 -!- ztirf has quit (Ping timeout: 252 seconds).
14:23:14 -!- FireFly has quit (Ping timeout: 240 seconds).
14:42:47 -!- Effilry has joined.
14:45:35 -!- Effilry has quit (Changing host).
14:45:35 -!- Effilry has joined.
14:45:45 -!- Effilry has changed nick to FireFly.
14:53:39 -!- Jafet has quit (Quit: Leaving.).
14:53:55 -!- FireFly has quit (Ping timeout: 246 seconds).
15:00:31 -!- TeruFSX has joined.
15:10:46 -!- FireFly has joined.
15:11:29 -!- asiekierka_ has quit (Ping timeout: 260 seconds).
15:27:41 -!- ogrom has joined.
15:32:40 -!- xiaoding has joined.
15:32:59 -!- xiaoding has left.
15:38:48 -!- xiaoding has joined.
15:39:15 -!- xiaoding has left.
15:45:26 -!- xiaoding has joined.
15:46:48 -!- xiaoding has left.
15:48:07 -!- FireFly has quit (Changing host).
15:48:07 -!- FireFly has joined.
16:18:00 -!- Phantom_Hoover has joined.
16:38:18 <kmc> shachaf: did you know about gcc -finstrument-functions
16:38:46 -!- ogrom has quit (Quit: Left).
17:09:27 -!- chicken1 has changed nick to chickenzilla.
17:23:43 -!- hagb4rd has quit (Ping timeout: 246 seconds).
17:33:50 -!- SHUPFS has joined.
18:14:21 -!- Vorpal has joined.
18:23:22 -!- ogrom has joined.
18:28:22 -!- atriq has joined.
18:28:49 <atriq> Can anyone recommend some software for using a desktop recorder thingy as a webcam?
18:32:25 -!- AnotherTest has quit (Quit: Leaving.).
18:44:33 <shachaf> I can't say that I recommend such software, atriq
18:44:56 -!- Nisstyre-laptop has quit (Remote host closed the connection).
18:47:22 -!- Phantom_Hoover has quit (Ping timeout: 246 seconds).
18:51:12 -!- Phantom_Hoover has joined.
18:52:47 -!- ogrom has quit (Quit: Left).
19:09:39 <kmc> shachaf: do you know of a tool which is like strace or ltrace but traces regular userspace function calls?
19:09:47 <kmc> it should be possible to build such a thing with Valgrind or Pin
19:10:01 <kmc> but i have not yet found a premade strace-like solution
19:11:18 <shachaf> kmc: As in every call(/jump) instruction?
19:12:13 <kmc> probably only calls
19:12:30 <shachaf> But, like, tail calls, man!
19:12:35 <shachaf> Anyway, nothing comes to mind.
19:12:53 <kmc> maybe you would log calls and jumps, but ignore them when the target is in the middle of a function
19:12:57 <shachaf> gdb might be able to do it by single-stepping?
19:13:04 <kmc> (defined according to the placement of symbols in .text)
19:13:10 <kmc> yeah, that will be hellaciously slow though
19:13:15 <kmc> plus again, not a ready-made solution
19:13:49 <kmc> even a breakpoint at every function entry will be very slow
19:14:06 <shachaf> To be fair, valgrind is also very slow.
19:14:23 <shachaf> strace would be very slow if it did its stracey thing at every function call, too.
19:14:56 <kmc> depends what you mean by the "stracey thing"
19:15:10 <kmc> it involves context switching to the strace process, and then some additional ptrace system calls
19:15:22 <kmc> none of which should be necessary for userspace call tracing
19:15:34 <kmc> or for system call tracing for that matter -- but system calls are slow either way
19:15:49 <shachaf> Yes, but they're the equivalent of what gdb would do. :-)
19:15:55 * shachaf is aware that's not a very good argument.
19:19:05 <kmc> is valgrind actually that slow even with the null tool?
19:19:20 <kmc> the default memcheck tool is slow because it has to do a bunch of memory accounting
19:20:46 <shachaf> "Callgrind will not be able to collect any information, including calls, but it will have at most a slowdown of around 4, which is the minimum Valgrind overhead"
19:23:15 <kmc> i am on this train of thought because i realized that I find strace to be much more useful than GDB, as a debugging tool
19:25:30 -!- atriq has quit (Quit: Leaving).
19:32:45 -!- atriq has joined.
19:34:22 -!- oerjan has joined.
19:34:41 -!- epicmonkey has quit (Ping timeout: 260 seconds).
19:51:18 -!- xzy has left ("Leaving").
20:02:30 <atriq> https://fbcdn-sphotos-c-a.akamaihd.net/hphotos-ak-ash3/557161_435025123200414_1140631525_n.jpg
20:02:33 <atriq> Do I count as sane?
20:03:44 <oerjan> insane, and very very hungry. stay away from that guy.
20:03:56 <shachaf> kmc: Depends on the type of debugging.
20:06:33 <shachaf> It's at a different abstraction level, and the kernel-userspace boundary happens to be really nice for "what is this program really doing, in the end?"
20:07:12 <kmc> if i attach userspace tracing to some random program, i won't know what the functions are anyway
20:07:36 <kmc> but also, i like that strace immediately gives you some probably useful output, which you can then post-process in ad-hoc ways, search in vim, etc
20:07:57 <kmc> you don't particularly have to decide what 'experiment' you're going to run
20:08:55 <kmc> by the way I just tested how slow 'ls' gets if you put a breakpoint on every function
20:09:02 <kmc> it took almost 2 minutes to list a small directory
20:09:45 <shachaf> What sbout gdb in recotd mofe?
20:09:57 <kmc> what's that
20:10:19 <shachaf> The reverse-debugging thing.
20:10:39 <shachaf> Doesn't it have all the same information?
20:11:09 <kmc> the function call history?
20:11:10 <kmc> yeah, i guess so
20:11:13 <kmc> i have no idea how it works
20:14:19 -!- monqy has joined.
20:14:51 -!- JaBoJa has joined.
20:24:17 -!- zzo38 has joined.
20:31:13 <zzo38> Is there such thing as discrete logic hardware optimizer?
20:41:56 -!- MoALTz has quit (Ping timeout: 248 seconds).
20:42:53 -!- Arc_Koen has joined.
20:45:21 <zzo38> I managed to make the call/cc yin yang with Haskell, yesterday.
20:48:08 <nortti> surprisngly many people don't seem to notice away message
20:53:06 <nortti> my friend semt me messages for 10 hours while I was /away IRL
20:57:51 -!- JaBoJa has quit (Read error: Connection reset by peer).
20:58:39 -!- JaBoJa has joined.
20:59:05 -!- JaBoJa has quit (Read error: Connection reset by peer).
21:00:05 -!- JaBoJa has joined.
21:04:09 -!- JaBoJa has quit (Read error: Connection reset by peer).
21:04:14 -!- atriq has quit (Ping timeout: 240 seconds).
21:05:19 -!- JaBoJa has joined.
21:07:57 -!- nooga has quit (Ping timeout: 246 seconds).
21:13:40 <kmc> a 10x programmer isn't cool
21:13:45 <kmc> you know what's cool? a 10,000x programmer
21:14:36 -!- nooga has joined.
21:17:24 -!- sivoais has quit (Ping timeout: 246 seconds).
21:17:25 -!- JaBoJa has quit (Read error: Connection reset by peer).
21:18:30 -!- JaBoJa has joined.
21:18:30 -!- JaBoJa has quit (Read error: Connection reset by peer).
21:19:53 -!- nooga has quit (Ping timeout: 268 seconds).
21:23:21 -!- sivoais has joined.
22:04:59 <coppro> if the GIL weren't going to screw me over
22:46:05 -!- FreeFull has quit.
22:48:16 -!- ais523 has joined.
23:00:24 <Arc_Koen> my town organizes a game that ends tomorrow where you have to find a way to write 2012 as the result of a calculation using only consecutive numbers 1, 2, 3, ... in growing order (starting with 1) and operations +, -, *, /, ^, sqrt, factorial, and parentheses
23:00:50 <Arc_Koen> and they provide an example of such a calculation, with result 2011.
23:01:36 <Arc_Koen> the example uses only 1, 2, 3, 4, 5, so it trivially gives a solution for 2012 in 7 (using the same calculation, -6 + 7)
23:01:59 <Arc_Koen> finding a solution in 6 is easy - actually there seem to be a lot of them
23:02:51 <Arc_Koen> but I couldn't find one in 5... so since it's the last day I decided to make a program to compute all possible calculations; for 6 it found many solutions, but for 5 it terminated without any.
23:05:34 <Arc_Koen> in case of a tie for the shortest answer, they will randomly select one of the tying players... finding in 6 was way to easy to avoid that :(
23:06:38 <coppro> so basically if you can write 2012 as some of those operations using each number from 1 to 5 only once, you'll win?
23:07:02 <Arc_Koen> only once, and in the right order
23:07:49 <Arc_Koen> I found ((1+2)!)!*3-(4+6!/5) in one minute but the 6 comes before the 5 so it doesn't work
23:07:54 <coppro> oh, in the right order
23:08:47 <Arc_Koen> the question is somehow ambiguous though - for instance they list "- (subtraction)" as a valid operation but not "unary negation", yet I'm not sure they'd refuse a solution starting with -1
23:09:32 <Arc_Koen> also it all works with integers, and they don't say if ": (division)" is integer division or real division
23:11:19 <Arc_Koen> I can give you the 2011 example to help
23:11:33 <Arc_Koen> if you do find a solution in 5 though, please don't tell me
23:11:56 <oerjan> i know what i'd do if they'd included logarithms too :P
23:25:00 <zzo38> Is it possible to make circuits described using discrete logic to be compiled into a native code which can emulate this circuit?
23:29:02 <oerjan> ais523: i guess you know the answer to that
23:34:51 -!- hagb4rd has joined.
23:47:24 <Arc_Koen> coppro: all my solutions start from 2016 = 6! + 6^4, with 6 being either 6 or 2*3 or 3! or (1+2)! etc., and the other numbers making - 4.
23:50:39 -!- Vorpal has quit (Ping timeout: 244 seconds).