Logs: freenode/#haskell
| 2021-04-27 19:55:14 | <carbolymer> | I have also a heap profile but converting 2G .hp file to .ps file takes a lot of time |
| 2021-04-27 19:55:17 | <carbolymer> | ... |
| 2021-04-27 19:58:26 | × | _ht quits (~quassel@82-169-194-8.biz.kpn.net) (Remote host closed the connection) |
| 2021-04-27 19:58:54 | × | bennofs_ quits (~quassel@x4dbffbc2.dyn.telefonica.de) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
| 2021-04-27 20:03:45 | → | Lord_of_Life_ joins (~Lord@unaffiliated/lord-of-life/x-0885362) |
| 2021-04-27 20:03:52 | → | DTZUZU joins (~DTZUZO@205.ip-149-56-132.net) |
| 2021-04-27 20:03:54 | × | Gurkenglas quits (~Gurkengla@unaffiliated/gurkenglas) (Read error: Connection reset by peer) |
| 2021-04-27 20:04:08 | → | neiluj joins (~jco@91-167-203-101.subs.proxad.net) |
| 2021-04-27 20:04:09 | × | neiluj quits (~jco@91-167-203-101.subs.proxad.net) (Changing host) |
| 2021-04-27 20:04:09 | → | neiluj joins (~jco@unaffiliated/neiluj) |
| 2021-04-27 20:04:51 | × | Lord_of_Life quits (~Lord@unaffiliated/lord-of-life/x-0885362) (Ping timeout: 265 seconds) |
| 2021-04-27 20:05:14 | Lord_of_Life_ | is now known as Lord_of_Life |
| 2021-04-27 20:05:27 | × | letmein quits (~letmein@2601:1c1:4200:938f:f8bf:6a67:4eed:b2c1) (Ping timeout: 250 seconds) |
| 2021-04-27 20:05:59 | × | petersen quits (~petersen@redhat/juhp) (Ping timeout: 268 seconds) |
| 2021-04-27 20:06:36 | × | sord937 quits (~sord937@gateway/tor-sasl/sord937) (Quit: sord937) |
| 2021-04-27 20:07:34 | → | letmein joins (~letmein@c-71-59-221-7.hsd1.wa.comcast.net) |
| 2021-04-27 20:07:43 | → | petersen joins (~petersen@redhat/juhp) |
| 2021-04-27 20:08:36 | × | stree quits (~stree@68.36.8.116) (Quit: Caught exception) |
| 2021-04-27 20:08:46 | × | Guest6509 quits (~laudiacay@45.162.228.190) (Ping timeout: 276 seconds) |
| 2021-04-27 20:09:01 | → | stree joins (~stree@68.36.8.116) |
| 2021-04-27 20:10:52 | → | conal joins (~conal@64.71.133.70) |
| 2021-04-27 20:16:41 | → | heatsink joins (~heatsink@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
| 2021-04-27 20:17:02 | × | danso quits (~dan@modemcable156.91-20-96.mc.videotron.ca) (Quit: WeeChat 3.0) |
| 2021-04-27 20:19:00 | × | Qwerky quits (~qwerky@37.173.171.170) (Remote host closed the connection) |
| 2021-04-27 20:19:18 | → | Qwerky joins (~qwerky@37.173.171.170) |
| 2021-04-27 20:20:02 | × | Qwerky quits (~qwerky@37.173.171.170) (Remote host closed the connection) |
| 2021-04-27 20:22:30 | <lechner> | Hi, does anyone else feel that affinity with SQL? It's been spooking around my head since I discovered Haskell. http://thoughts.davisjeff.com/2011/09/25/sql-the-successful-cousin-of-haskell/ |
| 2021-04-27 20:23:53 | × | Pickchea quits (~private@unaffiliated/pickchea) (Quit: Leaving) |
| 2021-04-27 20:26:51 | → | Qwerky joins (~qwerky@37.173.171.170) |
| 2021-04-27 20:28:42 | <int-e> | cousin?! |
| 2021-04-27 20:30:19 | → | elfets joins (~elfets@ip-37-201-23-96.hsi13.unitymediagroup.de) |
| 2021-04-27 20:30:27 | <sm[m]> | "the tough problems that haskell would solve are already solved in so many cases" - I don't think so. But it's an interesting post all the same |
| 2021-04-27 20:31:09 | <int-e> | I mean, I do see a certain amount of declarativity and/or purity allowing all sorts of crazy optimizations of queries. That's where the analogies stop to my mind. |
| 2021-04-27 20:32:19 | <sm[m]> | the tough relational data querying problems.. yes maybe that |
| 2021-04-27 20:32:39 | <int-e> | SQL doesn't really shine in the area of abstraction |
| 2021-04-27 20:32:55 | → | dinciorip joins (~dincio@5.171.80.13) |
| 2021-04-27 20:33:50 | <dinciorip> | This is probably a very stupid question, but is there a shorter alternative to `m | m == foo || m == bar -> foo'`? |
| 2021-04-27 20:34:09 | <dinciorip> | That snippet being used as a pattern in pattern matching |
| 2021-04-27 20:34:28 | <ski> | m | m `elem` [foo,bar] -> foo' |
| 2021-04-27 20:35:23 | <ski> | ((`elem` [foo,bar]) -> True) -> foo' |
| 2021-04-27 20:35:53 | → | aa111 joins (3e1d4484@62.29.68.132) |
| 2021-04-27 20:35:54 | <ski> | if we had disjunctive / or- patterns, then those could be appropriate here, if `foo' and `bar' were approprate to use as patterns |
| 2021-04-27 20:36:58 | <dinciorip> | well those are certainly an improvement, thanks! Don't quite understand the second one though... `foo` and `bar` are usable as patterns in my case |
| 2021-04-27 20:37:10 | <aa111> | hello, im trying to construct a binary tree from a list looks like this [0[1,2],[0,4,7,8]], what is the best way to parse this input |
| 2021-04-27 20:37:31 | <ski> | the second is using the `ViewPatterns' extension |
| 2021-04-27 20:37:37 | × | notzmv quits (~zmv@unaffiliated/zmv) (Ping timeout: 252 seconds) |
| 2021-04-27 20:37:48 | <ski> | but i'd probably prefer the first one, over the second, here |
| 2021-04-27 20:38:10 | <ski> | aa111 : is that first `0' a typo ? |
| 2021-04-27 20:38:14 | <dinciorip> | yeah me too tbh. Still will look into that extension when I have time |
| 2021-04-27 20:38:26 | <aa111> | Nope it is not |
| 2021-04-27 20:38:37 | <dinciorip> | You were saying that there was an easier alternative for when `foo` and `bar` are patterns? |
| 2021-04-27 20:38:40 | <aa111> | Yeah it is ... |
| 2021-04-27 20:38:40 | × | alx741 quits (~alx741@181.196.69.35) (Ping timeout: 268 seconds) |
| 2021-04-27 20:38:40 | <ski> | then that's malformed Haskell |
| 2021-04-27 20:38:46 | <aa111> | Let me fix it sorry |
| 2021-04-27 20:39:05 | <ski> | dinciorip : *if* "we had disjunctive / or- patterns". we don't, unfortunately |
| 2021-04-27 20:39:09 | × | jpds quits (~jpds@gateway/tor-sasl/jpds) (Ping timeout: 240 seconds) |
| 2021-04-27 20:39:13 | <dinciorip> | Oh got it |
| 2021-04-27 20:39:15 | × | coot quits (~coot@37.30.50.130.nat.umts.dynamic.t-mobile.pl) (Quit: coot) |
| 2021-04-27 20:39:21 | <aa111> | [[0],[1,2,3],[0,5,6]] looks like this actually |
| 2021-04-27 20:39:27 | <dinciorip> | Thanks anyway everyone |
| 2021-04-27 20:39:50 | <ski> | what information does this list of lists describe ? |
| 2021-04-27 20:40:02 | <aa111> | Nodes and leaves |
| 2021-04-27 20:40:02 | <ski> | iow, how would it correspond to a binary tree ? |
| 2021-04-27 20:40:19 | <ski> | what would be the corresponding binary tree, for this example ? |
| 2021-04-27 20:40:44 | × | conal quits (~conal@64.71.133.70) (Quit: Computer has gone to sleep.) |
| 2021-04-27 20:40:47 | <aa111> | let me give a full example then |
| 2021-04-27 20:40:52 | <aa111> | [[0],[0,0],[0,2,4,5],[1,3,0,0,0,0,0,0]] |
| 2021-04-27 20:40:55 | <aa111> | Node 15 (Node 6 (Node 4 (Leaf 1) (Leaf 3)) (Leaf 2)) (Node 9 (Leaf 4) (Leaf 5)) |
| 2021-04-27 20:41:48 | <ski> | it seems the `0's have some special meaning, but i can't decipher which |
| 2021-04-27 20:42:23 | <aa111> | you sum the leaves of the node to replace 0's |
| 2021-04-27 20:42:24 | <ski> | apparently the element at an internal node is to be the sum of all the leaves beneath it |
| 2021-04-27 20:42:34 | <int-e> | so, guessing... those are levels of the tree; 0 are internal and absent nodes, and internal nodes gat annotated with the sum of the descendants? |
| 2021-04-27 20:42:49 | <int-e> | and the i-th list has 2^i elements |
| 2021-04-27 20:42:56 | <int-e> | (starting at i=0) |
| 2021-04-27 20:43:01 | <aa111> | yes thats the case |
| 2021-04-27 20:43:03 | <ski> | that looks consistent |
| 2021-04-27 20:43:36 | → | horatiohb joins (~horatiohb@159.65.163.65) |
| 2021-04-27 20:43:48 | <aa111> | i've been struggling for this for two days. Could not parse it any logical way |
| 2021-04-27 20:43:59 | <ski> | a function which given a list splits it into the first and second half, could probably be useful |
| 2021-04-27 20:44:29 | <ski> | (or two functions, one for each part, if you prefer) |
| 2021-04-27 20:44:33 | <int-e> | . o O ( unzip, splitAt, zipWith, iterate ) |
| 2021-04-27 20:44:53 | <cheater> | hi |
| 2021-04-27 20:46:07 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 2021-04-27 20:46:08 | <cheater> | i'm using stack supplied ghc and when i compile something that uses llvm-hs i get "error while loading shared libraries: libffi.so.7: cannot open shared object file: No such file or directory" even though that file is in a subdir of ~/.stack. how do i resolve this issue? |
| 2021-04-27 20:46:27 | <int-e> | aa111: More fundamentally, think about how [[0],[0,0],[0,2,4,5],[1,3,0,0,0,0,0,0]] relates to the type of node (internal), and left and right subtree in the same list format. |
| 2021-04-27 20:46:47 | <ski> | aa111 : do you want to validate that the input is a proper representation of a tree, or do you just want to assume this ? |
| 2021-04-27 20:47:14 | <aa111> | I will assume |
| 2021-04-27 20:47:45 | <aa111> | int-e yes im trying to, but still didnt get your point :/ |
| 2021-04-27 20:48:08 | <ski> | aa111 : what are the two subtrees of `Node 15 (Node 6 (Node 4 (Leaf 1) (Leaf 3)) (Leaf 2)) (Node 9 (Leaf 4) (Leaf 5))' ? |
| 2021-04-27 20:48:24 | <ski> | aa111 : which lists of lists do those subtrees correspond to ? |
| 2021-04-27 20:48:41 | <ski> | aa111 : how do those two lists of lists relate to the original list of lists ? |
| 2021-04-27 20:49:27 | <ski> | (direct subtrees) |
| 2021-04-27 20:49:36 | <aa111> | ski: forgive me if i explained it wrong. There are no subtrees, with the given list i need to crate the following tree |
| 2021-04-27 20:49:58 | <ski> | clearly the tree `Node 15 (Node 6 (Node 4 (Leaf 1) (Leaf 3)) (Leaf 2)) (Node 9 (Leaf 4) (Leaf 5))' has subtrees |
| 2021-04-27 20:51:40 | <ski> | i'm not talking about what you (directly) should do, at the moment, to process the input. i'm asking you to attempt to survey the whole process (it still being a bit undetermined, in flux so to speak), to some extent. specifically asking you to consider the desired result tree, for the given list of lists, and how it's built up from subtrees |
| 2021-04-27 20:51:57 | <int-e> | (we could maybe start with a simpler tree description like [[0],[1,0],[0,0,2,3]]) |
| 2021-04-27 20:52:37 | → | alx741 joins (~alx741@181.196.68.118) |
| 2021-04-27 20:53:15 | <aa111> | ski: Yes i see your point, |
| 2021-04-27 20:53:29 | → | kiweun joins (~kiweun@2607:fea8:2a62:9600:51c0:6989:ff0b:33af) |
All times are in UTC.