2024/11/09

Newest at the top

2024-11-09 17:54:24 +0100ash3en1ash3en
2024-11-09 17:53:52 +0100merijn(~merijn@128-137-045-062.dynamic.caiway.nl) merijn
2024-11-09 17:53:31 +0100famubu(~famubu@14.139.174.50)
2024-11-09 17:53:05 +0100euleritian(~euleritia@dynamic-176-006-137-058.176.6.pool.telefonica.de)
2024-11-09 17:52:30 +0100euleritian(~euleritia@77.22.252.56) (Ping timeout: 252 seconds)
2024-11-09 17:52:04 +0100ash3en1(~Thunderbi@2a03:7846:b6eb:101:93ac:a90a:da67:f207) ash3en
2024-11-09 17:51:57 +0100ash3en(~Thunderbi@2a03:7846:b6eb:101:93ac:a90a:da67:f207) (Read error: Connection reset by peer)
2024-11-09 17:51:54 +0100longlongdouble(~longlongd@2405:201:5c16:135:1989:242:cab1:419a)
2024-11-09 17:49:06 +0100ash3en1ash3en
2024-11-09 17:49:06 +0100ash3en(~Thunderbi@146.70.124.222) (Ping timeout: 252 seconds)
2024-11-09 17:48:43 +0100 <horm> https://www.cs.hmc.edu/~oneill/papers/Sieve-JFP.pdf this one specifically
2024-11-09 17:48:36 +0100 <horm> i got this function in the first place from a paper wherein this person shits on the common writing because it's a really bad sieve
2024-11-09 17:48:16 +0100 <horm> also i hear it's not a very good prime sieve
2024-11-09 17:48:10 +0100 <horm> mm, filter style, bowuigi?
2024-11-09 17:47:36 +0100ash3en1(~Thunderbi@2a03:7846:b6eb:101:93ac:a90a:da67:f207) ash3en
2024-11-09 17:44:24 +0100 <Leary> If I have a type of kind `forall k -> k -> Type`, is there no way to flip the order of the arguments, even in a type synonym?
2024-11-09 17:43:00 +0100hueso(~root@user/hueso) hueso
2024-11-09 17:42:52 +0100merijn(~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds)
2024-11-09 17:40:17 +0100hueso(~root@user/hueso) (Ping timeout: 248 seconds)
2024-11-09 17:40:09 +0100 <haskellbridge> <Bowuigi> If x modulo p is 0, then x is divisible by p and thus x is not prime. This function is a prime sieve
2024-11-09 17:38:52 +0100alexherbo2(~alexherbo@2a02-8440-330e-b682-1c3b-0fef-d1b9-b690.rev.sfr.net) (Remote host closed the connection)
2024-11-09 17:38:07 +0100ash3en(~Thunderbi@146.70.124.222) ash3en
2024-11-09 17:38:06 +0100merijn(~merijn@128-137-045-062.dynamic.caiway.nl) merijn
2024-11-09 17:37:42 +0100 <haskellbridge> <Bowuigi> The commas to the right of the bar work as an AND (AKA &&)
2024-11-09 17:37:07 +0100 <haskellbridge> <Bowuigi> The list comprehension that generates the argument sieve is called on is "[x | x <− xs, mod x p > 0]", this means "give me all the x" ("[ x |") ", such that x is in xs, " ("x <- xs") "and x modulo p is greater than 0" (", mod x p > 0")
2024-11-09 17:35:09 +0100hueso(~root@user/hueso) hueso
2024-11-09 17:34:58 +0100hueso(~root@user/hueso) (Quit: No Ping reply in 180 seconds.)
2024-11-09 17:33:51 +0100 <haskellbridge> <Bowuigi> horm After pattern matching, sieve proceeds to construct a list using : (AKA Cons). The first element being p and the rest being a recursive call
2024-11-09 17:31:24 +0100 <c_wraith> So now there are clean interfaces to the functionality they had to do the ugly way
2024-11-09 17:31:04 +0100 <c_wraith> I think a lot of the debian shootout entries have become more haskell-like because we've packaged up the primitive things they did into libraries
2024-11-09 17:30:56 +0100 <haskellbridge> <Bowuigi> Anyway, back to the sieve function
2024-11-09 17:29:47 +0100 <c_wraith> And now that you can add intrinsics in libraries, it's possible to *actually* put asm in your haskell library!
2024-11-09 17:29:39 +0100 <haskellbridge> <Bowuigi> Also compilers can't (yet) fix the data structures you are using (so they can't make you use arrays automagically) but it can eliminate entire passes on your data (see: how GHC optimizes merge sort)
2024-11-09 17:28:46 +0100 <geekosaur> that has taken some time to happen though; look at historiucal versions of the debian shootout entries, some of which now can be found in ghc's test suite
2024-11-09 17:28:22 +0100housemate(~housemate@146.70.66.228) housemate
2024-11-09 17:27:43 +0100merijn(~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 264 seconds)
2024-11-09 17:27:16 +0100 <haskellbridge> <Bowuigi> In particular, heavily optimized Haskell looks like actual Haskell and not like assembly, see: Kovacs's flatparse
2024-11-09 17:26:54 +0100 <c_wraith> If people had to actually understand how evaluation works, there would be so many fewer people writing bad code then complaining about space leaks
2024-11-09 17:26:14 +0100 <haskellbridge> <Bowuigi> Yes, pure functional languages have controlled environments that are way more amenable to optimization
2024-11-09 17:26:10 +0100 <c_wraith> Sometimes. And I wish they didn't. People should write the code they mean, instead of random garbage that sometimes the compiler fixes for them.
2024-11-09 17:25:41 +0100 <horm> Do the optimizations happen more automatically in langs like haskell, though, where it recognizes what you're doing and just fixes it for you?
2024-11-09 17:25:38 +0100hueso(~root@user/hueso) hueso
2024-11-09 17:25:26 +0100 <c_wraith> So [a] is now officially `List a', if you have the right things imported.
2024-11-09 17:25:06 +0100 <haskellbridge> <Bowuigi> Advanced imperative optimizations are also dark magic and both can be understood with quite a bit of knowledge of the area. You have some simple/shared stuff like inlining as well
2024-11-09 17:24:48 +0100 <c_wraith> geekosaur: Yeah, there's a bunch of stuff going on with removing type/constructor puns to make dependent types easier
2024-11-09 17:24:47 +0100hueso(~root@user/hueso) (Read error: Connection reset by peer)
2024-11-09 17:24:12 +0100 <haskellbridge> <Bowuigi> Functional optimization can be best described as "dark magic casted by researchers and enthusiasts", you do have functional arrays tho
2024-11-09 17:24:10 +0100 <geekosaur> or already have but it's optional?
2024-11-09 17:24:03 +0100 <geekosaur> also I think tuples are about to change anyway, at least at type level
2024-11-09 17:23:56 +0100 <c_wraith> It's not like there aren't arrays