Home freenode/#haskell: Logs Calendar

Logs: freenode/#haskell

←Prev  Next→
Page 1 .. 864 865 866 867 868 869 870 871 872 873 874 .. 5022
502,152 events total
2020-10-26 03:51:49 × notnatebtw quits (~nate@125.161.130.165) (Quit: WeeChat 2.9)
2020-10-26 03:52:14 <mikevdg> no idea. I think you just treat it like a sorted collection and choose a different root.
2020-10-26 03:52:49 <mikevdg> It's the prototypical job interview question.
2020-10-26 03:53:16 <ghoulguy> "An inversion, or mirror, of a Binary Tree (T),​ is just a Binary Tree M(T) whose left and right children (of all non-leaf nodes) are swapped."
2020-10-26 03:53:46 <mikevdg> so, `reverse` then?
2020-10-26 03:53:50 <c_wraith> so that's like... 2 lines?
2020-10-26 03:53:54 × Guest_86 quits (96cb02f0@150.203.2.240) (Remote host closed the connection)
2020-10-26 03:54:02 <Axman6> so invert (Branch a l r) = Branch a (invert r) (invert l); invert a = a
2020-10-26 03:54:05 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
2020-10-26 03:54:23 <ghoulguy> except if mikevdg wants to do it as an exercise then maybe don't look up
2020-10-26 03:54:31 <mikevdg> ah, but you can't use Haskell. That's cheating. Write it in C like a proper coder.
2020-10-26 03:54:46 × geowiesnot quits (~user@87-89-181-157.abo.bbox.fr) (Ping timeout: 246 seconds)
2020-10-26 03:55:08 <koz_> mikevdg: Proper coders write x86 assembly. By hand. :P
2020-10-26 03:55:18 <c_wraith> The only difference in C is that there's a bunch more syntax.
2020-10-26 03:55:52 × tromp quits (~tromp@dhcp-077-249-230-040.chello.nl) (Ping timeout: 260 seconds)
2020-10-26 03:57:41 <Axman6> node_t * invert(node_t * t) { t == NULL ? return NULL : { node_t * tmp = t->l; t->l=invert(t->r); t->r=invert(tmp);}}
2020-10-26 03:57:48 <mikevdg> neat.
2020-10-26 03:57:56 <Axman6> or something, I have no idea
2020-10-26 03:58:07 <mikevdg> I wonder how well it would go down if I did do it in x86 assembly on a white board?
2020-10-26 03:58:26 × GyroW quits (~GyroW@unaffiliated/gyrow) (Quit: Someone ate my pie)
2020-10-26 03:58:27 <mikevdg> I could probably just write gibberish and they'd never check it.
2020-10-26 03:58:45 GyroW joins (~GyroW@ptr-48ujrfd1ztq5fjywfw3.18120a2.ip6.access.telenet.be)
2020-10-26 03:58:45 × GyroW quits (~GyroW@ptr-48ujrfd1ztq5fjywfw3.18120a2.ip6.access.telenet.be) (Changing host)
2020-10-26 03:58:45 GyroW joins (~GyroW@unaffiliated/gyrow)
2020-10-26 03:59:20 <ghoulguy> You'd probably just convince them you'd be difficult to work with and not impress?
2020-10-26 04:00:54 <mikevdg> Yea. I was at a Java job interview and they were asking me about VMs, lambdas, etc. They cut me off everytime I drew a comparison to other languages.
2020-10-26 04:01:05 <dsal> I wrote tons of asm in high school for/on my calculator. Last asm code I wrote was for AVR. It did a useful thing for a tiny program. Demultiplexed a PPM signal onto discrete output channels on an ATTiny85 in ~70 lines of code. Debugged it on an oscilloscope. heh
2020-10-26 04:01:11 <int-e> Axman6: that'll be fun if there's sharing :)
2020-10-26 04:01:21 <T0pH4t> Axman6: not to bother, not sure if u looked at that example.
2020-10-26 04:02:08 <ghoulguy> int-e: Is it still a tree if there's observable sharing?
2020-10-26 04:02:26 × ChaiTRex quits (~ChaiTRex@gateway/tor-sasl/chaitrex) (Remote host closed the connection)
2020-10-26 04:02:27 <Axman6> T0pH4t: sorry, in a meeting at the moment
2020-10-26 04:02:44 <Axman6> int-e: YOLO
2020-10-26 04:02:49 mbomba joins (~mbomba@142.114.9.241)
2020-10-26 04:02:54 <T0pH4t> np
2020-10-26 04:03:11 <int-e> ghoulguy: as long as you don't actually observe it ;)
2020-10-26 04:03:29 jedws joins (~jedws@101.184.148.229)
2020-10-26 04:03:49 ChaiTRex joins (~ChaiTRex@gateway/tor-sasl/chaitrex)
2020-10-26 04:05:48 <int-e> Hmm, I guess there's too little going on in that function to be Turing-complete.
2020-10-26 04:05:55 × Amras quits (~Amras@unaffiliated/amras0000) (Ping timeout: 272 seconds)
2020-10-26 04:06:57 hackage exception-via 0.1.0.0 - DerivingVia for your hierarchical exceptions https://hackage.haskell.org/package/exception-via-0.1.0.0 (parsonsmatt)
2020-10-26 04:08:07 <crestfallen> mikevdg, wtf now I can backspace only to the eighth space on the ghci prompt line. it stops dead, but doesn't jump off the line :)
2020-10-26 04:08:49 <mikevdg> umm.. okay. I'd try creating another user and logging in as that user to see if it's a global problem or in ~/.config somehow.
2020-10-26 04:09:21 <mikevdg> Or try using `xterm`.
2020-10-26 04:09:35 <mikevdg> It's the old workhorse granddaddy terminal emulator.
2020-10-26 04:09:44 <Axman6> my C above is missing a return t
2020-10-26 04:12:13 <int-e> Axman6: yeah, my brain autocorrected that :P
2020-10-26 04:12:17 thir joins (~thir@p200300f27f2523003c23ef77843b8858.dip0.t-ipconnect.de)
2020-10-26 04:12:30 <crestfallen> mikevdg, thanks a lot , what should I look for in .config ?
2020-10-26 04:13:06 <crestfallen> it is global btw , earlier I was trying it in x11
2020-10-26 04:13:19 DirefulSalt joins (DirefulSal@gateway/vpn/privateinternetaccess/direfulsalt)
2020-10-26 04:13:23 <Axman6> int-e: I guess I'll never work for Google :'(
2020-10-26 04:13:28 <mikevdg> You don't really look in .config unless you're really keen. It contains all your settings.
2020-10-26 04:13:59 <crestfallen> mikevdg, what setting may be off though?
2020-10-26 04:14:24 × texasmynsted quits (~texasmyns@99.96.221.112) (Remote host closed the connection)
2020-10-26 04:15:20 apoc joins (~apoc@bridge.mattzq.com)
2020-10-26 04:16:30 × danso quits (~dan@69-165-210-185.cable.teksavvy.com) (Quit: WeeChat 2.9)
2020-10-26 04:16:43 <mikevdg> There's lots of things. You have the environment variables TERM, COLUMNS. You could have a version of ghci that's been compiled funny without readline or whatever alternative it might use. You might have a screwed up terminfo database. You might have a misconfigured /etc/inputrc
2020-10-26 04:17:07 × thir quits (~thir@p200300f27f2523003c23ef77843b8858.dip0.t-ipconnect.de) (Ping timeout: 260 seconds)
2020-10-26 04:17:21 <mikevdg> You're talking about a really deep rabbit hole that has 50 years of history to screw things up.
2020-10-26 04:17:26 whatisRT joins (~whatisRT@2002:5b41:6a33:0:3cb4:1971:1759:f081)
2020-10-26 04:17:51 <mikevdg> Personally I suspect you've got the settings in gnome-terminal wrong.
2020-10-26 04:18:14 <crestfallen> but which setting(s) ?
2020-10-26 04:18:50 <mikevdg> Edit -> Preferences -> Compatibility
2020-10-26 04:19:00 <mikevdg> "Backspace key generates": ASCII DEL
2020-10-26 04:19:09 <mikevdg> Delete key generates": Escape sequence
2020-10-26 04:19:21 <mikevdg> Encoding - always UTF-8 unless you're encoding a URL
2020-10-26 04:19:41 <mikevdg> Actually just hit the "Reset" button at the bottom of that settings form.
2020-10-26 04:20:40 bitmagie joins (~Thunderbi@200116b806e0ec00d9811243e44350b7.dip.versatel-1u1.de)
2020-10-26 04:21:19 <crestfallen> reset it is! thanks trying that mikevdg
2020-10-26 04:23:31 × GyroW quits (~GyroW@unaffiliated/gyrow) (Quit: Someone ate my pie)
2020-10-26 04:23:50 GyroW joins (~GyroW@ptr-48ujrfd1ztq5fjywfw3.18120a2.ip6.access.telenet.be)
2020-10-26 04:23:51 × GyroW quits (~GyroW@ptr-48ujrfd1ztq5fjywfw3.18120a2.ip6.access.telenet.be) (Changing host)
2020-10-26 04:23:51 GyroW joins (~GyroW@unaffiliated/gyrow)
2020-10-26 04:23:59 × mbomba quits (~mbomba@142.114.9.241) (Quit: WeeChat 2.9)
2020-10-26 04:25:07 <mikevdg> Just looking at ghc. It looks like it uses ncurses directly.
2020-10-26 04:25:41 <crestfallen> very sorry pls explain. resetting (they were already as you suggested) didn't fix it
2020-10-26 04:27:45 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds)
2020-10-26 04:29:13 <mikevdg> Sorry, I can't replicate your problem. "It works on my machine" even if I screw with a lot of settings.
2020-10-26 04:29:36 <mikevdg> Having said that, it was an ordeal just getting ghci to work.
2020-10-26 04:31:20 <crestfallen> thanks my friend.. really appreciate it. later mikevdg
2020-10-26 04:39:56 mikevdg parts (73bd539c@115-189-83-156.mobile.spark.co.nz) ()
2020-10-26 04:41:50 bartemius joins (~bartemius@109-252-20-20.nat.spd-mgts.ru)
2020-10-26 04:43:01 bitmagie1 joins (~Thunderbi@200116b8061e1300eda32c0368104b2f.dip.versatel-1u1.de)
2020-10-26 04:43:42 × darjeeling_ quits (~darjeelin@115.215.42.47) (Ping timeout: 260 seconds)
2020-10-26 04:44:08 darjeeling_ joins (~darjeelin@115.215.42.47)
2020-10-26 04:45:07 × bitmagie quits (~Thunderbi@200116b806e0ec00d9811243e44350b7.dip.versatel-1u1.de) (Ping timeout: 260 seconds)
2020-10-26 04:45:08 bitmagie1 is now known as bitmagie
2020-10-26 04:45:18 tromp joins (~tromp@dhcp-077-249-230-040.chello.nl)
2020-10-26 04:45:35 <ptrcmd> is it possible to ask stack to give me a list of packages used to run a .hs file with commands like "stack --resolver lts-16.1 XX.hs"?
2020-10-26 04:46:25 <ptrcmd> I want to run ghci with the packages used in the .hs file
2020-10-26 04:46:39 plutoniix joins (~q@ppp-223-24-60-25.revip6.asianet.co.th)
2020-10-26 04:47:25 × hyiltiz quits (~quassel@unaffiliated/hyiltiz) (Ping timeout: 240 seconds)
2020-10-26 04:48:33 × GyroW quits (~GyroW@unaffiliated/gyrow) (Quit: Someone ate my pie)
2020-10-26 04:48:44 GyroW joins (~GyroW@d54C03E98.access.telenet.be)
2020-10-26 04:48:44 × GyroW quits (~GyroW@d54C03E98.access.telenet.be) (Changing host)
2020-10-26 04:48:44 GyroW joins (~GyroW@unaffiliated/gyrow)
2020-10-26 04:48:59 <ptrcmd> hmm..telling stack to give me verbose output works
2020-10-26 04:49:02 hyiltiz joins (~quassel@82.118.227.47)
2020-10-26 04:49:02 × hyiltiz quits (~quassel@82.118.227.47) (Changing host)

All times are in UTC.