Logs: freenode/#haskell
| 2021-03-09 03:12:04 | <Axman6> | > foldr (*) 1 [a,b,c] :: Expr |
| 2021-03-09 03:12:06 | <lambdabot> | a * (b * (c * 1)) |
| 2021-03-09 03:12:39 | × | dbmikus quits (~dbmikus@cpe-76-167-86-219.natsow.res.rr.com) (Ping timeout: 256 seconds) |
| 2021-03-09 03:13:08 | × | albethere quits (sid457088@gateway/web/irccloud.com/x-dbnctqivboqvftoe) () |
| 2021-03-09 03:13:49 | <Axman6> | this is a quite fundamental topic in functional programming in general, so it's worth spending some time on. like how to you use foldr to make [[a]] -> [a] where all the lists are concatenated, how do you append two lists using foldr ([a] -> [a] -> [a]) |
| 2021-03-09 03:14:03 | → | albethere joins (sid457088@gateway/web/irccloud.com/x-oicrocvqkpivxmgb) |
| 2021-03-09 03:15:08 | × | Guest27267 quits (~finn_elij@gateway/tor-sasl/finnelija/x-67402716) (Ping timeout: 268 seconds) |
| 2021-03-09 03:15:11 | <Axman6> | there's also very little relationship with zipWith, at least for inital understanding |
| 2021-03-09 03:15:39 | <heck-to-the-gnom> | zipWith is just what I'd seen before, so I used that as a reference point |
| 2021-03-09 03:19:47 | × | deviantfero quits (~deviantfe@190.150.27.58) (Quit: WeeChat 3.0.1) |
| 2021-03-09 03:22:05 | → | Jd007 joins (~Jd007@162.156.11.151) |
| 2021-03-09 03:22:27 | × | zebrag quits (~inkbottle@aaubervilliers-654-1-112-176.w86-198.abo.wanadoo.fr) (Quit: Konversation terminated!) |
| 2021-03-09 03:22:49 | → | zebrag joins (~inkbottle@aaubervilliers-654-1-112-176.w86-198.abo.wanadoo.fr) |
| 2021-03-09 03:24:30 | × | ep1ctetus quits (~epictetus@ip72-194-215-136.sb.sd.cox.net) (Read error: Connection reset by peer) |
| 2021-03-09 03:25:08 | × | notzmv quits (~zmv@unaffiliated/zmv) (Ping timeout: 265 seconds) |
| 2021-03-09 03:29:27 | <redmp> | I'm having a bit of trouble vith flake-compat |
| 2021-03-09 03:29:28 | → | waskell_ joins (~quassel@d66-183-124-203.bchsia.telus.net) |
| 2021-03-09 03:30:02 | <redmp> | can anybody here help out? here's my example repro: https://termbin.com/y2rj |
| 2021-03-09 03:30:19 | <redmp> | I'm getting the error "called without required argument 'nixpkgs'" |
| 2021-03-09 03:30:53 | <redmp> | nixpkgs is present in my inputs, and nixpkgs is an input to my outputs function |
| 2021-03-09 03:32:17 | × | urodna quits (~urodna@unaffiliated/urodna) (Quit: urodna) |
| 2021-03-09 03:33:05 | × | waskell quits (~quassel@d66-183-230-153.bchsia.telus.net) (Read error: Connection reset by peer) |
| 2021-03-09 03:33:58 | <monochrom> | I wonder if you accidentally used the wrong channel. |
| 2021-03-09 03:35:11 | <redmp> | oh, again.. i keep doing this recently! i'm sorry |
| 2021-03-09 03:35:33 | <Axman6> | back to millitary police school for you! |
| 2021-03-09 03:36:14 | <monochrom> | I just worried that in case of wrong channel you don't get the help you need. |
| 2021-03-09 03:37:08 | <heck-to-the-gnom> | To be fair, however, you weren't that far off as far as channels go. I learned of nix from this channel, actually. |
| 2021-03-09 03:38:43 | × | theDon quits (~td@94.134.91.237) (Ping timeout: 256 seconds) |
| 2021-03-09 03:38:49 | <redmp> | hah! yeah, the two places have a bit in common.. but the problem is this is maybe the 4th time i've done this between the two channels in the past week.. i seem to be losing my marbles |
| 2021-03-09 03:40:17 | → | theDon joins (~td@muedsl-82-207-238-174.citykom.de) |
| 2021-03-09 03:40:29 | × | howdoi quits (uid224@gateway/web/irccloud.com/x-pnwfbntchtcoqxxp) (Quit: Connection closed for inactivity) |
| 2021-03-09 03:40:42 | <monochrom> | Similarly, I have had student mistakenly emailed me "hi prof X, I have a timetable conflict with your MAT304 midterm, what can I do?", where I am not prof X and I don't tach MAT304. This is when I must reply "wrong address" because if the student doesn't realize it, much disaster will happen. |
| 2021-03-09 03:41:55 | <Axman6> | so what are you doing with LLVM anyway and why not do it in Haskell? guessing it's not just something that spits out LLVM IR? |
| 2021-03-09 03:42:40 | <monochrom> | It's a code optimization course, write your own analyses and/or transformation passes. |
| 2021-03-09 03:42:42 | <curiousgay> | https://wiki.haskell.org/How_to_work_on_lists I don't understand map ($ my_element) xs |
| 2021-03-09 03:43:16 | <Axman6> | curiousgay: ($ x) is the same as (\f -> f $ x), does that help at all? |
| 2021-03-09 03:43:21 | <monochrom> | And it has to be LLVM, using the LLVM API. |
| 2021-03-09 03:43:46 | <Axman6> | hoq doesa the pattern matching stuff in LLVM feel, coming from Haskell? |
| 2021-03-09 03:43:54 | <Axman6> | w* |
| 2021-03-09 03:44:08 | <monochrom> | What pattern matching? :) |
| 2021-03-09 03:44:26 | → | apache8080 joins (~rishi@wsip-70-168-153-252.oc.oc.cox.net) |
| 2021-03-09 03:44:56 | <Axman6> | I thought a lot of IR transfermations and optimisations were written by describing patterns to find in the IR and some funky, possibly template driven, pattern matching thing |
| 2021-03-09 03:45:36 | <monochrom> | It's just "isa<Instruction>(my_Value_pointer)" or "if ((x = dyn_cast<Instruction>(my_Value_pointer)) != 0)" |
| 2021-03-09 03:45:55 | <curiousgay> | Axman6: I thought $ is the operator that separates functions, not data |
| 2021-03-09 03:46:19 | → | dbmikus joins (~dbmikus@cpe-76-167-86-219.natsow.res.rr.com) |
| 2021-03-09 03:46:38 | <monochrom> | Perhaps gcc does use that declarative style because it can use some kind of Lisp. |
| 2021-03-09 03:47:04 | × | stree quits (~stree@68.36.8.116) (Ping timeout: 276 seconds) |
| 2021-03-09 03:47:13 | × | machinedgod quits (~machinedg@135-23-192-217.cpe.pppoe.ca) (Ping timeout: 256 seconds) |
| 2021-03-09 03:47:37 | <Axman6> | it's a function, just like any other. (+ 3) is a function which adds three to whatever it is applied to, it is equivalent to (\n -> n + 3). in the same way, ($ x) is a function which, when given a function, applies it to x, so is the same as (\f -> f $ x), a.k.a, (\f -> f x) |
| 2021-03-09 03:47:43 | <monochrom> | LLVM in C++? You feel like you are a Haskell compiler compiling pattern matching to if-then-else and isa and dyn_cast and "x.opcode == Add". |
| 2021-03-09 03:49:13 | <Axman6> | it's a function, just like any other. (+ 3) is a function which adds three to whatever it is applied to, it is equivalent to (\n -> n + 3). in the same way, ($ x) is a function which, when given a function, applies it to x, so is the same as (\f -> f $ x), a.k.a, (\f -> f x) |
| 2021-03-09 03:49:16 | <Axman6> | uh |
| 2021-03-09 03:49:22 | <Axman6> | haven't they even heard of catamorphisms? D: |
| 2021-03-09 03:49:41 | <curiousgay> | Axman6: but what's said there is about specific "my_element", that's confusing, I though that'll help to avoid if else pairs in map's argument |
| 2021-03-09 03:49:43 | <Axman6> | whoever build the keyboard (me) did a really dumb thing putting ' and up arrow near enter |
| 2021-03-09 03:49:48 | → | wroathe_ joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 2021-03-09 03:49:52 | → | supercoven joins (~Supercove@dsl-hkibng31-54fabd-233.dhcp.inet.fi) |
| 2021-03-09 03:49:57 | → | guest39` joins (~user@49.5.6.87) |
| 2021-03-09 03:50:01 | <Axman6> | curiousgay: I don't understand the question |
| 2021-03-09 03:50:02 | → | muzimuzhi joins (17ef15ef@23.239.21.239) |
| 2021-03-09 03:50:17 | → | poljar1 joins (~poljar@93-139-44-107.adsl.net.t-com.hr) |
| 2021-03-09 03:50:21 | × | muzimuzhi quits (17ef15ef@23.239.21.239) (Client Quit) |
| 2021-03-09 03:50:24 | → | sm2n_ joins (~sm2n@bras-base-hmtnon143hw-grc-15-70-54-78-219.dsl.bell.ca) |
| 2021-03-09 03:50:31 | → | travisb_ joins (~travisb@2600:1700:7990:24e0:1282:ff43:20c2:7b5f) |
| 2021-03-09 03:50:33 | <monochrom> | $ does not separate function. or data, for that matter. |
| 2021-03-09 03:50:34 | <curiousgay> | Axman6: search in that link "Apply a list of functions to a single element to get a list of results." |
| 2021-03-09 03:50:36 | → | Tesseraction_y joins (~Tesseract@unaffiliated/tesseraction) |
| 2021-03-09 03:50:42 | → | david__ joins (~david@234.109.45.217.dyn.plus.net) |
| 2021-03-09 03:50:45 | × | tabemann quits (~travisb@172-13-49-137.lightspeed.milwwi.sbcglobal.net) (Disconnected by services) |
| 2021-03-09 03:50:50 | → | ddellaco_ joins (ddellacost@gateway/vpn/mullvad/ddellacosta) |
| 2021-03-09 03:50:51 | → | gawen_ joins (~gawen@movzbl.root.sx) |
| 2021-03-09 03:50:51 | travisb_ | is now known as tabemann |
| 2021-03-09 03:50:53 | → | jonathanx__ joins (~jonathan@h-176-109.A357.priv.bahnhof.se) |
| 2021-03-09 03:50:56 | → | gothos_ joins (~gothos@antsy.jhz.name) |
| 2021-03-09 03:50:57 | → | bollu7 joins (~bollu@139.59.46.74) |
| 2021-03-09 03:51:01 | <Axman6> | curiousgay: are you happy with the fact that in that partticular example, xx :: [a -> b], a.k.a, a list of function all of the same type, a -> b? and that my_element :: a? |
| 2021-03-09 03:51:06 | → | nshepperd27 joins (~nshepperd@li364-218.members.linode.com) |
| 2021-03-09 03:51:08 | → | polux20015 joins (~polux@51.15.169.172) |
| 2021-03-09 03:51:08 | <Axman6> | uh, xx = xs |
| 2021-03-09 03:51:10 | → | DataComp_ joins (~lumeng@50.43.26.251) |
| 2021-03-09 03:51:23 | → | Katarushisu5 joins (~Katarushi@cpc152083-finc20-2-0-cust170.4-2.cable.virginm.net) |
| 2021-03-09 03:51:25 | <monochrom> | What I recommend is sleep on $'s type: (a->b) -> a -> b |
| 2021-03-09 03:51:27 | → | Athas_ joins (athas@2a01:7c8:aaac:1cf:5551:513a:128c:3291) |
| 2021-03-09 03:51:28 | → | [1]MrMobius joins (~MrMobius@208.58.206.154) |
| 2021-03-09 03:51:35 | → | caubert_ joins (~caubert@136.244.111.235) |
| 2021-03-09 03:51:37 | × | dbmikus quits (~dbmikus@cpe-76-167-86-219.natsow.res.rr.com) (Ping timeout: 276 seconds) |
| 2021-03-09 03:51:47 | → | drewolson3 joins (~drewolson@64.227.24.16) |
| 2021-03-09 03:51:54 | → | lep_ joins (~lep@94.31.86.183) |
| 2021-03-09 03:52:02 | → | dave_uy33 joins (~david@108.61.193.26) |
| 2021-03-09 03:52:28 | <Axman6> | > map ($ True) [show, const "Hello", \b -> if b then "Ok!" else "Nope!] |
| 2021-03-09 03:52:29 | <lambdabot> | <hint>:1:70: error: |
| 2021-03-09 03:52:30 | <lambdabot> | <hint>:1:70: error: |
| 2021-03-09 03:52:30 | <lambdabot> | lexical error in string/character literal at end of input |
| 2021-03-09 03:52:36 | <Axman6> | > map ($ True) [show, const "Hello", \b -> if b then "Ok!" else "Nope!"] |
| 2021-03-09 03:52:36 | <monochrom> | Alternatively, ignore $, don't use it. For the exercise, use the "map" function and write your own lambda to give to map. |
| 2021-03-09 03:52:38 | <lambdabot> | ["True","Hello","Ok!"] |
| 2021-03-09 03:52:47 | <Axman6> | > map ($ False) [show, const "Hello", \b -> if b then "Ok!" else "Nope!"] |
| 2021-03-09 03:52:49 | <lambdabot> | ["False","Hello","Nope!"] |
| 2021-03-09 03:52:51 | → | Arch-TK joins (~Arch-TK@ircpuzzles/staff/Arch-TK) |
| 2021-03-09 03:52:54 | → | MTwister joins (~Twister@2a01:4f8:171:4de::40:2) |
All times are in UTC.