Home liberachat/#haskell: Logs Calendar

Logs: liberachat/#haskell

←Prev  Next→
Page 1 .. 139 140 141 142 143 144 145 146 147 148 149 .. 17904
1,790,378 events total
2021-05-28 09:56:38 <int-e> I don't know why they're called that
2021-05-28 09:56:56 ski . o O ( `@karma- @karma' )
2021-05-28 09:57:28 <int-e> ski: you should see the actual state file
2021-05-28 09:58:17 <int-e> it has gems like https://paste.debian.net/1199164/
2021-05-28 09:58:47 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:9d49:4665:d75d:fdb)
2021-05-28 09:58:57 <int-e> also a ton of brainfuck programs for some reason :)
2021-05-28 09:59:21 <dminuoso> Question, if I have a package candidate, can I upload haddock to it without publishing to the index beforehand?
2021-05-28 10:00:14 × sondre quits (~sondrelun@eduroam-193-157-188-96.wlan.uio.no) (Ping timeout: 264 seconds)
2021-05-28 10:00:28 v01d4lph4 joins (~v01d4lph4@user/v01d4lph4)
2021-05-28 10:00:41 <ski> int-e :)
2021-05-28 10:00:45 Sinbad joins (~petrus@catv-86-101-33-147.catv.broadband.hu)
2021-05-28 10:02:07 Sinbad parts (~petrus@catv-86-101-33-147.catv.broadband.hu) (WeeChat 3.1)
2021-05-28 10:03:04 <int-e> @quote
2021-05-28 10:03:04 <lambdabot> monochrom� says: Real programmers speak very focusedly to the CPU
2021-05-28 10:03:05 a6a45081-2b83 joins (~aditya@106.212.79.20)
2021-05-28 10:03:49 sondre joins (~sondrelun@eduroam-193-157-188-96.wlan.uio.no)
2021-05-28 10:04:05 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:9d49:4665:d75d:fdb) (Ping timeout: 252 seconds)
2021-05-28 10:04:14 tomsmeding wonders about the missing unicode character?
2021-05-28 10:04:29 aez joins (~aez@zoo-zarebski.zoo.ox.ac.uk)
2021-05-28 10:04:40 aez is now known as zarebski
2021-05-28 10:05:01 <tomsmeding> @tell geekosaur I removed freenode#xmonad from ircbrowse because the channel's been closed; if I should start logging freenode##xmonad or something, please say so :)
2021-05-28 10:05:01 <lambdabot> Consider it noted.
2021-05-28 10:05:02 × lu quits (~lu@user/lu) (Ping timeout: 264 seconds)
2021-05-28 10:05:23 Robin_Jadoul joins (~Robin_Jad@152.67.64.160)
2021-05-28 10:05:42 <liskin> tomsmeding: we moved #xmonad here so I don't think logging ##xmonad@freenode will be necessary
2021-05-28 10:05:53 <tomsmeding> liskin: cool :)
2021-05-28 10:06:22 lurker100 joins (~lurker@147.161.167.84)
2021-05-28 10:06:51 × lurker100 quits (~lurker@147.161.167.84) (Client Quit)
2021-05-28 10:07:11 × vicfred quits (~vicfred@user/vicfred) (Quit: Leaving)
2021-05-28 10:10:08 <dminuoso> liskin: Oh now, almost didnt recognize you with a lower l in the nickname.
2021-05-28 10:10:13 <dminuoso> Sneaky
2021-05-28 10:10:54 haskman joins (~haskman@106.201.28.184)
2021-05-28 10:11:06 <liskin> dminuoso: I decided that it's a perfect opportunity to drop the old nick that makes no sense now that I'm not 15 years old
2021-05-28 10:13:22 × Robin_Jadoul quits (~Robin_Jad@152.67.64.160) (Ping timeout: 264 seconds)
2021-05-28 10:13:59 × sondre quits (~sondrelun@eduroam-193-157-188-96.wlan.uio.no) (Ping timeout: 252 seconds)
2021-05-28 10:15:50 anonPerformIO joins (~anonPerfo@broadband-188-255-16-173.ip.moscow.rt.ru)
2021-05-28 10:15:54 <opqdonut> I'm writing a short section about phantom types for my course. I'm trying to think of a nice and simple "real world" example. I'm using currency conversions as an introductory example, with functions like `convert :: Rate from to -> Money from -> Money to`, but that's not really something I can see myself writing in a real program
2021-05-28 10:16:25 <opqdonut> I'd like to keep it to simple tagging, so not `Expr a` or `Vector nat`
2021-05-28 10:17:07 <dminuoso> opqdonut: My favourite example is `newtype Input (s :: SanitizationState) = Input Text`
2021-05-28 10:17:10 <opqdonut> Any ideas? I've been toying with ideas like sanitation of input before passing it to the database, or preventing logging of secrets, but those can be easily accomplished with just a simple newtype...
2021-05-28 10:17:13 sondre joins (~sondrelun@eduroam-193-157-188-96.wlan.uio.no)
2021-05-28 10:17:24 <opqdonut> dminuoso: hmm yeah the wikibook has that one, I think
2021-05-28 10:17:45 <dminuoso> opqdonut: The thing you cant simply solve with newtypes, is that you could write code polymorphic over SanState
2021-05-28 10:18:00 <opqdonut> yeah that's the nice thing about `Money a` as well
2021-05-28 10:18:04 smr joins (~smn@91-114-144-112.adsl.highway.telekom.at)
2021-05-28 10:18:12 <dminuoso> Though I think, the main problem is that phantom types themselves are rarely useful
2021-05-28 10:18:26 <opqdonut> yeah, that's my impression as well
2021-05-28 10:18:27 <dminuoso> The desire for phantom types rather quickly leads you to singletons..
2021-05-28 10:18:48 <opqdonut> but they're a nice thing to teach, to introduce students to their first type-level programming
2021-05-28 10:18:59 <opqdonut> yeah, you end up in singletons, type families, and dependent haskell... :)
2021-05-28 10:19:56 <Taneb> newtype Money (currency :: Currency) = Money Centi
2021-05-28 10:20:13 <opqdonut> yeah that's my first example
2021-05-28 10:20:51 <dminuoso> For type level programming, perhaps something like servant might be more motivating.
2021-05-28 10:21:00 <opqdonut> but I can't really think of a program that would a) work with multiple currencies b) know the currencies at compile-time
2021-05-28 10:21:00 <dminuoso> (Not full blown servant, but perhaps something more simple)
2021-05-28 10:21:02 <Taneb> Mmm, I was thinking about servant
2021-05-28 10:21:11 × holy_ quits (~h01y_b4z0@2400:adc1:178:c800:9e45:76a9:57f2:1665) (Remote host closed the connection)
2021-05-28 10:21:22 <opqdonut> yeah that's a good idea, I'll skim the API and try to lift an example
2021-05-28 10:21:33 holy_ joins (~h01y_b4z0@2400:adc1:178:c800:9e45:76a9:57f2:1665)
2021-05-28 10:22:01 snan joins (~snan@89-253-122-95.customers.ownit.se)
2021-05-28 10:22:35 × anonPerformIO quits (~anonPerfo@broadband-188-255-16-173.ip.moscow.rt.ru) (Quit: Connection closed)
2021-05-28 10:23:13 python476 joins (~user@88.160.31.174)
2021-05-28 10:23:23 <dminuoso> opqdonut: You could also look at typed-protocols, perhaps.
2021-05-28 10:23:31 <dminuoso> I've been dying to use that library. :)
2021-05-28 10:23:56 × mrufrufin quits (~dxk@108.235.170.90) (Quit: leaving)
2021-05-28 10:24:59 <dminuoso> https://github.com/input-output-hk/ouroboros-network/tree/master/typed-protocols
2021-05-28 10:25:00 <snan> Hi what does >>> mean? Or more specifically, what does hylo' f g = f >>> map (hylo' f g) >>> g mean? I know that a hylo is a fold on an unfold and I am familiar with folds and unfolds. I'm just trying to figure out how this implementation works
2021-05-28 10:25:08 <dminuoso> % :t (>>>)
2021-05-28 10:25:09 <yahb> dminuoso: forall {k} {cat :: k -> k -> *} {a :: k} {b :: k} {c :: k}. Category cat => cat a b -> cat b c -> cat a c
2021-05-28 10:25:15 <dminuoso> snan: It's just a more general form of flipped (.)
2021-05-28 10:25:30 <dminuoso> Set `cat ~ (->)` and it should be obvious
2021-05-28 10:25:47 <opqdonut> dminuoso: thanks
2021-05-28 10:25:52 × rusua quits (uid124537@highgate.irccloud.com) (Quit: Connection closed for inactivity)
2021-05-28 10:26:25 <dminuoso> opqdonut: If this is interesting to you, ask dcoutts if he still has slides of material. I know he presented it on Haskell eXchange a few years ago
2021-05-28 10:26:47 <river> hello
2021-05-28 10:27:11 chddr joins (~Thunderbi@31.148.23.125)
2021-05-28 10:29:08 <snan> Thank you, dminuoso. I don't know what (.) is either, I basically don't know any of the operators outside of things like +, -, and ->>
2021-05-28 10:29:35 <dminuoso> snan: so you can just write this as `hylo' f g = g . map (hylo' f g) . f` - or as an optimization `hylo' f g = h where h = f . fmap h . g`
2021-05-28 10:29:46 <snan> Is . function composition?
2021-05-28 10:29:48 <dminuoso> Yes
2021-05-28 10:30:05 raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
2021-05-28 10:30:57 <snan> Thank you so much, dminuoso. I'm a Lisp programmer normally
2021-05-28 10:31:11 <ski> @src (.)
2021-05-28 10:31:11 <lambdabot> (f . g) x = f (g x)
2021-05-28 10:31:20 <snan> Thank you ski
2021-05-28 10:31:31 <ski> @botsnack
2021-05-28 10:31:32 <lambdabot> :)
2021-05-28 10:32:31 <dminuoso> snan: If you're not familiar with Haskell, then recursion schemes might be quite an extreme introduction to haskell though.
2021-05-28 10:32:49 <ski> hej, snan. how come you got interested in recursion schemes, this early ?
2021-05-28 10:33:02 <snan> I'm working on implementing hylo for another language
2021-05-28 10:33:07 <ski> ah
2021-05-28 10:33:33 ski . o O ( Riastradh's foof-loop )
2021-05-28 10:35:00 ddellacosta joins (~ddellacos@89.46.62.69)
2021-05-28 10:35:02 <dminuoso> snan: keep in mind that this optimization trick I mentioned is relevant to the performance.
2021-05-28 10:35:14 × holy_ quits (~h01y_b4z0@2400:adc1:178:c800:9e45:76a9:57f2:1665) (Remote host closed the connection)
2021-05-28 10:35:31 <dminuoso> And the language you implement recursion schemes in might not support that trick, or have a different evaluation strategy. Just something to consider.
2021-05-28 10:35:36 holy_ joins (~h01y_b4z0@2400:adc1:178:c800:9e45:76a9:57f2:1665)
2021-05-28 10:35:56 <snan> dminuoso: yes, that's much appreciated. It's trivial to make a poorly performant hylo by just folding an unfolded structure. The point is to make something that's tight & nice
2021-05-28 10:36:04 <dminuoso> (Without it, depending on your language this can quickly consume your stack space)
2021-05-28 10:37:10 <snan> Right

All times are in UTC.