Home freenode/#haskell: Logs Calendar

Logs: freenode/#haskell

←Prev  Next→
Page 1 .. 18 19 20 21 22 23 24 25 26 27 28 .. 5022
502,152 events total
2020-09-17 11:27:59 akegalj_ joins (~akegalj@93-142-93-99.adsl.net.t-com.hr)
2020-09-17 11:28:59 ubert joins (~Thunderbi@178.165.131.132.wireless.dyn.drei.com)
2020-09-17 11:31:36 × akegalj quits (~akegalj@93-136-206-221.adsl.net.t-com.hr) (Ping timeout: 256 seconds)
2020-09-17 11:32:50 gestone joins (~gestone@c-73-97-137-216.hsd1.wa.comcast.net)
2020-09-17 11:33:20 TooDifficult joins (~TooDiffic@139.59.59.230)
2020-09-17 11:33:27 hackage niv 0.2.18 - Easy dependency management for Nix projects https://hackage.haskell.org/package/niv-0.2.18 (nmattia)
2020-09-17 11:34:42 gmt joins (~gmt@pool-71-105-108-44.nycmny.fios.verizon.net)
2020-09-17 11:34:59 × Stanley00 quits (~stanley00@unaffiliated/stanley00) (Remote host closed the connection)
2020-09-17 11:35:09 × cpressey quits (~cpressey@79-72-201-114.dynamic.dsl.as9105.com) (Quit: kwit)
2020-09-17 11:35:45 ALM49 joins (7bc007ac@123-192-7-172.dynamic.kbronet.com.tw)
2020-09-17 11:36:01 Dolly joins (585fd1fd@ti0203q160-5312.bb.online.no)
2020-09-17 11:36:21 <ALM49> Is it possible to qualify an infix operator?
2020-09-17 11:36:44 <lortabac> yes
2020-09-17 11:36:55 <opqdonut> > 1 Prelude.+ 2
2020-09-17 11:36:57 <lambdabot> 3
2020-09-17 11:36:59 × gestone quits (~gestone@c-73-97-137-216.hsd1.wa.comcast.net) (Ping timeout: 240 seconds)
2020-09-17 11:37:02 <ALM49> ie. If I want to use `List.(++)` instead of having to `import Data.List (++)`
2020-09-17 11:37:13 <dminuoso> ALM49: No, you have to explicitly add an import.
2020-09-17 11:37:23 <opqdonut> but it could be a qualified import
2020-09-17 11:37:37 <ALM49> Oh, so I just omit the parentheses?
2020-09-17 11:37:47 <dminuoso> ALM49: Add additional parentheses.
2020-09-17 11:38:02 <dminuoso> import Data.List ((++)), and if you want it qualified you can do `import qualified Data.List ((++))`
2020-09-17 11:38:20 <dminuoso> And, then you can give an alias as well, like `import qualified Data.List as L ((++))`
2020-09-17 11:38:56 × gmt quits (~gmt@pool-71-105-108-44.nycmny.fios.verizon.net) (Ping timeout: 246 seconds)
2020-09-17 11:39:47 george_____t joins (5c094cd5@host-92-9-76-213.as43234.net)
2020-09-17 11:40:17 × oxide quits (~lambda@unaffiliated/mclaren) (Read error: Connection reset by peer)
2020-09-17 11:40:30 <ALM49> oh, that's strange
2020-09-17 11:40:41 <ALM49> So I'd write something like
2020-09-17 11:40:44 <ALM49> `(List.++) "abc" "def"`
2020-09-17 11:41:54 <ALM49> Why do I need the parens there? What could that conflict with?
2020-09-17 11:43:14 <dminuoso> You're writing it in prefix position.
2020-09-17 11:43:30 AlterEgo- joins (~ladew@124-198-158-163.dynamic.caiway.nl)
2020-09-17 11:43:57 <dminuoso> You can write named functions in infix position by wrapping them in ``, and you can write operators in prefix position by wrapping them in parens
2020-09-17 11:44:12 <dminuoso> The maybe confusing part is to realize that List.++ is an operator
2020-09-17 11:44:15 <ALM49> Wow, it never occured to me that I could use a qualified operator in infix position
2020-09-17 11:44:18 × gxt quits (~gxt@gateway/tor-sasl/gxt) (Remote host closed the connection)
2020-09-17 11:44:22 <dminuoso> Well, it *is* and remains an operator. ;)
2020-09-17 11:44:59 gmt joins (~gmt@pool-71-105-108-44.nycmny.fios.verizon.net)
2020-09-17 11:45:03 <ALM49> Well, coming from OCaml, operators are basically just identifiers
2020-09-17 11:45:09 gxt joins (~gxt@gateway/tor-sasl/gxt)
2020-09-17 11:45:30 <ALM49> I didn't realise that Haskell has a distinction between them
2020-09-17 11:45:31 × gxt quits (~gxt@gateway/tor-sasl/gxt) (Remote host closed the connection)
2020-09-17 11:47:11 frdg` joins (~user@pool-71-184-143-249.bstnma.fios.verizon.net)
2020-09-17 11:48:21 gxt joins (~gxt@gateway/tor-sasl/gxt)
2020-09-17 11:49:19 × frdg quits (~user@pool-71-184-143-249.bstnma.fios.verizon.net) (Ping timeout: 272 seconds)
2020-09-17 11:49:52 <dminuoso> ALM49: There's even more going on. We have a 2x2 matrix of [["Variable identifier", "Constructor identifier"], ["Operator identifier", "Operator constructor"]]
2020-09-17 11:50:18 <dminuoso> A common example of operator constructors is (:) from list. :)
2020-09-17 11:50:56 <dminuoso> https://www.haskell.org/onlinereport/haskell2010/haskellch2.html#x7-180002.4 contains a very readable and concise definition
2020-09-17 11:51:56 × cosimone quits (~cosimone@2001:b07:ae5:db26:b248:7aff:feea:34b6) (Quit: Quit.)
2020-09-17 11:52:40 × lemmih quits (~lemmih@2406:3003:2072:44:251c:6ccc:226:e43d) (Remote host closed the connection)
2020-09-17 11:53:02 lemmih joins (~lemmih@2406:3003:2072:44:251c:6ccc:226:e43d)
2020-09-17 11:53:40 gestone joins (~gestone@c-73-97-137-216.hsd1.wa.comcast.net)
2020-09-17 11:53:56 frdg`` joins (~user@pool-71-184-143-249.bstnma.fios.verizon.net)
2020-09-17 11:54:25 takuan joins (~takuan@178-116-218-225.access.telenet.be)
2020-09-17 11:54:36 frdg`` parts (~user@pool-71-184-143-249.bstnma.fios.verizon.net) ()
2020-09-17 11:54:49 mmohammadi9812 joins (~mmohammad@5.238.164.128)
2020-09-17 11:54:56 arjaz joins (~user@91.218.15.22)
2020-09-17 11:55:00 arjaz parts (~user@91.218.15.22) ()
2020-09-17 11:55:13 × jonathanx quits (~jonathan@dyn-8-sc.cdg.chalmers.se) (Ping timeout: 260 seconds)
2020-09-17 11:56:26 sQVe joins (~sQVe@unaffiliated/sqve)
2020-09-17 11:58:22 <ALM49> thanks dminuoso
2020-09-17 11:58:25 × gestone quits (~gestone@c-73-97-137-216.hsd1.wa.comcast.net) (Ping timeout: 264 seconds)
2020-09-17 11:58:44 cosimone joins (~cosimone@2001:b07:ae5:db26:b248:7aff:feea:34b6)
2020-09-17 11:58:49 × frdg` quits (~user@pool-71-184-143-249.bstnma.fios.verizon.net) (Ping timeout: 272 seconds)
2020-09-17 11:58:52 × raehik quits (~raehik@cpc96984-rdng25-2-0-cust109.15-3.cable.virginm.net) (Ping timeout: 260 seconds)
2020-09-17 11:59:46 knupfer joins (~Thunderbi@dynamic-046-114-150-052.46.114.pool.telefonica.de)
2020-09-17 11:59:54 × toorevitimirp quits (~tooreviti@117.182.182.33) (Ping timeout: 260 seconds)
2020-09-17 12:00:01 × blardo quits (~blardo@185.244.214.216) ()
2020-09-17 12:00:45 tchouri is now known as hekkaidekapus
2020-09-17 12:02:44 × ericsagnes quits (~ericsagne@i153-145-14-232.s42.a013.ap.plala.or.jp) (Ping timeout: 246 seconds)
2020-09-17 12:03:22 × sQVe quits (~sQVe@unaffiliated/sqve) (Ping timeout: 272 seconds)
2020-09-17 12:03:26 <ski> kuribas : "perhaps if the return of (a -> a) is smaller than the input?" -- how about if it's larger ?
2020-09-17 12:03:37 <ski> kuribas : "is there a fix-like function that doesn't diverge?" -- maybe some variant of `loeb' ?
2020-09-17 12:03:43 raehik joins (~raehik@cpc96984-rdng25-2-0-cust109.15-3.cable.virginm.net)
2020-09-17 12:03:58 <kuribas> ski: never heard of loeb... I'll look it up
2020-09-17 12:04:32 <hekkaidekapus> ALM49: In ghci, you can use qualified identifiers without a prior module import.
2020-09-17 12:04:44 <hekkaidekapus> % 4 Data.List.NonEmpty.:| [5, 6]
2020-09-17 12:04:45 <yahb> hekkaidekapus: 4 :| [5,6]
2020-09-17 12:05:25 × cosimone quits (~cosimone@2001:b07:ae5:db26:b248:7aff:feea:34b6) (Quit: Quit.)
2020-09-17 12:05:27 fendor joins (~fendor@e237-037.eduroam.tuwien.ac.at)
2020-09-17 12:06:36 <ski> kuribas : the usual Haskell combinator with that name is
2020-09-17 12:06:40 × lemmih quits (~lemmih@2406:3003:2072:44:251c:6ccc:226:e43d) (Remote host closed the connection)
2020-09-17 12:06:59 lemmih joins (~lemmih@2406:3003:2072:44:251c:6ccc:226:e43d)
2020-09-17 12:07:46 <ski> @let loeb :: Functor f => f (f a -> a) -> f a; loeb fs = fa where fa = fmap ($ fa) ff
2020-09-17 12:07:48 <lambdabot> .L.hs:218:26: error:
2020-09-17 12:07:48 <lambdabot> • Variable not in scope: ff :: f1 (f1 b -> b)
2020-09-17 12:07:48 <lambdabot> • Perhaps you meant one of these:
2020-09-17 12:07:52 <ski> @let loeb :: Functor f => f (f a -> a) -> f a; loeb fs = fa where fa = fmap ($ fa) fs
2020-09-17 12:07:54 <lambdabot> Defined.
2020-09-17 12:08:01 sQVe joins (~sQVe@unaffiliated/sqve)
2020-09-17 12:08:24 × sQVe quits (~sQVe@unaffiliated/sqve) (Client Quit)
2020-09-17 12:09:04 <ski> > loeb [sum . tail,length,const 2,liftA2 (*) (!! 1) (!! 2)]
2020-09-17 12:09:07 <lambdabot> [14,4,2,8]
2020-09-17 12:11:20 × dmiles quits (dmiles@c-73-67-179-188.hsd1.wa.comcast.net) (Ping timeout: 265 seconds)
2020-09-17 12:12:57 pfurla joins (~pfurla@ool-182ed2e2.dyn.optonline.net)
2020-09-17 12:12:59 × knupfer quits (~Thunderbi@dynamic-046-114-150-052.46.114.pool.telefonica.de) (Read error: Connection reset by peer)
2020-09-17 12:13:25 <kuribas> what weird magic is this?
2020-09-17 12:13:35 × ajcerejeira quits (~ajcerejei@2001:8a0:ddee:700:efbc:7163:11a0:b83) (Quit: ajcerejeira)
2020-09-17 12:13:48 <yushyin> loeb magic
2020-09-17 12:14:35 gestone joins (~gestone@c-73-97-137-216.hsd1.wa.comcast.net)
←Prev  Next→
Page 1 .. 18 19 20 21 22 23 24 25 26 27 28 .. 5022

All times are in UTC.