Logs: liberachat/#haskell
| 2021-07-29 19:38:44 | <dsal> | @pl \x -> putStrLn $ " " <> x |
| 2021-07-29 19:38:44 | <lambdabot> | putStrLn . (" " <>) |
| 2021-07-29 19:38:54 | <lechner> | maybe putStr . (" - " ++) ? |
| 2021-07-29 19:39:06 | <dsal> | That's not the most egregious point freedom. |
| 2021-07-29 19:39:14 | <dsal> | But you need to understand what it's saying. |
| 2021-07-29 19:39:54 | <lechner> | i actually wrote that before seeing [exa]'s response |
| 2021-07-29 19:39:59 | <dsal> | > (" - " <>) "dash" |
| 2021-07-29 19:40:00 | <lambdabot> | " - dash" |
| 2021-07-29 19:40:24 | <[exa]> | lechner: np :] |
| 2021-07-29 19:40:40 | × | alx741 quits (~alx741@181.196.69.4) (Ping timeout: 256 seconds) |
| 2021-07-29 19:42:18 | → | chomwitt joins (~chomwitt@ppp-94-67-203-142.home.otenet.gr) |
| 2021-07-29 19:42:45 | <lechner> | so, perhaps to state the obvious: a lambda with one variable is a partially applied function with one degree of freedom remainig, right? (in beginner's parlance) |
| 2021-07-29 19:43:52 | <dsal> | I would say it doesn't make sense to call a function partially applied if it has one argument. |
| 2021-07-29 19:44:20 | <dsal> | If a function takes two arguments and you supply one, it's partially applied. |
| 2021-07-29 19:44:56 | <dsal> | Sections are a way of specifying that a function that takes two arguments is either partially applied in its first or second argument. |
| 2021-07-29 19:45:42 | <dsal> | > . ("¡¡¡" <>) . (<> "!!!") $ "It can do both. |
| 2021-07-29 19:45:44 | <lambdabot> | <hint>:1:1: error: parse error on input ‘.’ |
| 2021-07-29 19:45:45 | <dsal> | > . ("¡¡¡" <>) . (<> "!!!") $ "It can do both." |
| 2021-07-29 19:45:47 | <lambdabot> | <hint>:1:1: error: parse error on input ‘.’ |
| 2021-07-29 19:45:54 | <dsal> | > ("¡¡¡" <>) . (<> "!!!") $ "It can do both." |
| 2021-07-29 19:45:56 | <lambdabot> | "\161\161\161It can do both.!!!" |
| 2021-07-29 19:45:57 | <dsal> | Man, I'm not smart today. |
| 2021-07-29 19:46:00 | <dsal> | Also, boo. |
| 2021-07-29 19:46:06 | <Drew[m]> | <maerwald> "so how do I use this from..." <- I've never done this before so I'm just learning as I go and probably not telling you what you don't already know but according to stack overflow you can call Haskell from C# by just using Haskell's FFI as you would to make Haskell callable from C, and using C#'s FFI as you would to call a C function. I assume the same idea applies in reverse. |
| 2021-07-29 19:46:20 | × | vicfred quits (~vicfred@user/vicfred) (Ping timeout: 258 seconds) |
| 2021-07-29 19:47:10 | × | jpds quits (~jpds@gateway/tor-sasl/jpds) (Ping timeout: 244 seconds) |
| 2021-07-29 19:47:33 | <lechner> | wow, my little program is 18 megabytes! is haskell statically lihked like golang? |
| 2021-07-29 19:47:53 | <dminuoso> | lechner: Yes and no. |
| 2021-07-29 19:48:09 | <dminuoso> | The haskell object files get statically linked in, but native libraries are dynamically linked |
| 2021-07-29 19:48:43 | <dminuoso> | lechner: Try setting `split-sections: True` in your ~/.cabal/config, and then also enable executable stripping in the cabal invocation. |
| 2021-07-29 19:48:50 | <dsal> | lechner: You just have room to grow! |
| 2021-07-29 19:48:55 | <dminuoso> | Note that this will rebuild all transitive dependencies |
| 2021-07-29 19:49:00 | <dsal> | If it's 18MB, you should do 18MB worth of stuff in it. |
| 2021-07-29 19:49:08 | <dminuoso> | This can easily get the size down to say 1MiB |
| 2021-07-29 19:49:21 | <dsal> | Is it rust that prioritized tiny binaries? |
| 2021-07-29 19:50:07 | × | falafel quits (~falafel@pool-96-255-70-50.washdc.fios.verizon.net) (Ping timeout: 245 seconds) |
| 2021-07-29 19:52:28 | <delYsid> | Whats the "correct" way to use "at" from the Lens package with a Map where I know the key is present? at foo . to fromJust looks weird :-) |
| 2021-07-29 19:52:53 | → | finsternis joins (~X@23.226.237.192) |
| 2021-07-29 19:52:56 | <dminuoso> | delYsid: Hard to say what "correct" means without knowing your usage pattern. |
| 2021-07-29 19:53:02 | <delYsid> | and ^?! doesnt work. |
| 2021-07-29 19:53:10 | <dminuoso> | delYsid: But you can use: at foo . _Just |
| 2021-07-29 19:53:19 | <dminuoso> | Consider preview to consume this |
| 2021-07-29 19:53:21 | → | alx741 joins (~alx741@181.196.69.85) |
| 2021-07-29 19:53:43 | <dminuoso> | % import Data.Map qualified as M |
| 2021-07-29 19:53:43 | <yahb> | dminuoso: |
| 2021-07-29 19:54:49 | → | burnside_ joins (~burnsides@dhcp168-019.wadham.ox.ac.uk) |
| 2021-07-29 19:54:49 | × | burnsidesLlama quits (~burnsides@dhcp168-019.wadham.ox.ac.uk) (Read error: Connection reset by peer) |
| 2021-07-29 19:54:52 | → | cjay joins (cjay@nerdbox.nerd2nerd.org) |
| 2021-07-29 19:54:54 | <dminuoso> | % preview (at "foo" . _Just) (M.fromList [("foo", 1), ("bar", 2)]) |
| 2021-07-29 19:54:55 | <yahb> | dminuoso: Just 1 |
| 2021-07-29 19:55:01 | <dminuoso> | delYsid: If you can read what yahb just said. |
| 2021-07-29 19:55:35 | → | burnsidesLlama joins (~burnsides@dhcp168-019.wadham.ox.ac.uk) |
| 2021-07-29 19:55:35 | × | burnside_ quits (~burnsides@dhcp168-019.wadham.ox.ac.uk) (Read error: Connection reset by peer) |
| 2021-07-29 19:57:27 | × | fendor quits (~fendor@178.165.162.84.wireless.dyn.drei.com) (Remote host closed the connection) |
| 2021-07-29 19:57:31 | <lechner> | dminuoso: stripping is not on by default? https://cabal.readthedocs.io/en/3.4/cabal-project.html#cfg-field-executable-stripping |
| 2021-07-29 19:58:49 | → | jpds joins (~jpds@gateway/tor-sasl/jpds) |
| 2021-07-29 19:58:50 | <delYsid> | dminuosoBut now the result is a Just again :-) I was joping to get a pure result, since, I know the key must be present... |
| 2021-07-29 19:59:52 | <delYsid> | % view (at "foo" . to fromJust) (M.fromList [("foo", 1), ("bar", 2)]) |
| 2021-07-29 19:59:52 | <yahb> | delYsid: 1 |
| 2021-07-29 20:01:47 | × | qbt quits (~edun@user/edun) (Ping timeout: 245 seconds) |
| 2021-07-29 20:02:42 | → | fendor joins (~fendor@178.165.162.84.wireless.dyn.drei.com) |
| 2021-07-29 20:02:56 | → | Cajun joins (~Cajun@ip98-163-211-112.no.no.cox.net) |
| 2021-07-29 20:03:09 | <amesgen[m]> | % M.fromList [("foo", 1), ("bar", 2)] ^?! ix "foo" |
| 2021-07-29 20:03:09 | <yahb> | amesgen[m]: 1 |
| 2021-07-29 20:03:28 | × | burnsidesLlama quits (~burnsides@dhcp168-019.wadham.ox.ac.uk) (Remote host closed the connection) |
| 2021-07-29 20:03:42 | <amesgen[m]> | delYsid: ^ this should be about as succinct as it gets |
| 2021-07-29 20:07:17 | <lechner> | dsal [exa] dminuoso roboguy_: thanks so much for your help today! |
| 2021-07-29 20:08:52 | <roboguy_> | lechner: you're welcome! |
| 2021-07-29 20:09:46 | × | hyiltiz quits (~quassel@31.220.5.250) (Ping timeout: 240 seconds) |
| 2021-07-29 20:10:04 | <delYsid> | amesgen[m]: Thanks! This is a bit surprising, as I thought ix only worked for arrays and such... So it actually does work for maps! |
| 2021-07-29 20:10:56 | × | jpds quits (~jpds@gateway/tor-sasl/jpds) (Ping timeout: 244 seconds) |
| 2021-07-29 20:11:16 | → | hyiltiz joins (~quassel@31.220.5.250) |
| 2021-07-29 20:13:20 | <amesgen[m]> | delYsid: yeah, there are many instances, even for functions (by application): https://hackage.haskell.org/package/lens-5.0.1/docs/Control-Lens-At.html#t:Ixed |
| 2021-07-29 20:17:53 | → | jeslie0 joins (~user@135-23-172-182.cpe.pppoe.ca) |
| 2021-07-29 20:18:27 | → | jpds joins (~jpds@gateway/tor-sasl/jpds) |
| 2021-07-29 20:18:28 | <delYsid> | k, tnx |
| 2021-07-29 20:21:25 | × | jeslie0 quits (~user@135-23-172-182.cpe.pppoe.ca) (Remote host closed the connection) |
| 2021-07-29 20:24:26 | → | Guest90 joins (~Guest90@ip98-163-211-112.no.no.cox.net) |
| 2021-07-29 20:24:40 | × | Guest90 quits (~Guest90@ip98-163-211-112.no.no.cox.net) (Client Quit) |
| 2021-07-29 20:25:01 | × | Cajun quits (~Cajun@ip98-163-211-112.no.no.cox.net) (Changing host) |
| 2021-07-29 20:25:01 | → | Cajun joins (~Cajun@user/cajun) |
| 2021-07-29 20:25:21 | × | Vajb quits (~Vajb@hag-jnsbng11-58c3a1-224.dhcp.inet.fi) (Remote host closed the connection) |
| 2021-07-29 20:26:34 | → | Vajb joins (~Vajb@hag-jnsbng11-58c3a1-224.dhcp.inet.fi) |
| 2021-07-29 20:29:34 | × | raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Quit: WeeChat 3.2) |
| 2021-07-29 20:30:21 | → | raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 2021-07-29 20:30:54 | → | pfurla joins (~pfurla@ool-182ed2e2.dyn.optonline.net) |
| 2021-07-29 20:31:57 | → | acidjnk_new joins (~acidjnk@p200300d0c72b9507354aa6404eb54f37.dip0.t-ipconnect.de) |
| 2021-07-29 20:34:04 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 2021-07-29 20:40:30 | → | Null_A joins (~null_a@2601:645:8700:2290:44f7:81a6:341:7abe) |
| 2021-07-29 20:41:20 | <maerwald> | sm: following your advice, I updated the FAQ section of the README, so next time I can just link there |
| 2021-07-29 20:41:36 | × | Guest9 quits (~Guest9@103.240.170.208) (Quit: Connection closed) |
| 2021-07-29 20:42:55 | × | jao quits (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Remote host closed the connection) |
| 2021-07-29 20:47:47 | → | __monty__ joins (~toonn@user/toonn) |
| 2021-07-29 20:48:38 | → | jao joins (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) |
| 2021-07-29 20:50:26 | → | vicfred joins (~vicfred@user/vicfred) |
| 2021-07-29 20:50:27 | → | slowButPresent joins (~slowButPr@user/slowbutpresent) |
| 2021-07-29 20:56:45 | × | mjs2600 quits (~mjs2600@c-24-91-3-49.hsd1.vt.comcast.net) (Ping timeout: 276 seconds) |
| 2021-07-29 21:08:36 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 268 seconds) |
| 2021-07-29 21:08:46 | <sm> | maerwald: +1, that's a time saver. https://gitlab.haskell.org/haskell/ghcup-hs#faq |
| 2021-07-29 21:08:47 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Quit: Lost terminal) |
All times are in UTC.