Home liberachat/#haskell: Logs Calendar

Logs: liberachat/#haskell

←Prev  Next→
Page 1 .. 336 337 338 339 340 341 342 343 344 345 346 .. 17992
1,799,109 events total
2021-06-08 07:46:13 × ubert1 quits (~Thunderbi@p200300ecdf259d2de6b318fffe838f33.dip0.t-ipconnect.de) (Ping timeout: 244 seconds)
2021-06-08 07:48:34 involans joins (~alex@cpc92718-cmbg20-2-0-cust157.5-4.cable.virginm.net)
2021-06-08 07:50:33 <guest61> dminuoso you mean I should parse and return a map not a list?
2021-06-08 07:51:43 <dminuoso> Or better yet, straight the Config itself.
2021-06-08 07:52:26 <dminuoso> Consider using a big record `data Config = Config { cfgMode :: Mode, cfgUser :: String, cfgPassword :: String, cfgPort :: Int }`
2021-06-08 07:52:35 <dminuoso> And have your parser build up that Config
2021-06-08 07:52:47 <dminuoso> If there's settings that are allowed to be optional, use `Maybe`
2021-06-08 07:55:14 <guest61> dminuoso https://paste.ubuntu.com/p/BpdDdZCxP4/
2021-06-08 07:56:37 <guest61> dminuoso I did return a tuple
2021-06-08 07:56:57 <dminuoso> The paste is incomplete, then
2021-06-08 07:57:07 <guest61> (a,b) is tuple? pair? how you call it?
2021-06-08 07:57:08 <dminuoso> Either way, the point is that the parser itself return that data structure
2021-06-08 07:57:20 <dminuoso> tuple, 2-tuple, pair
2021-06-08 07:57:22 <dminuoso> Either works
2021-06-08 07:58:39 <guest61> print r3 -- Right [Just ("a","b")]
2021-06-08 07:58:47 <boxscape> (if we were strictly following the "n-tuple" nomenclature it'd be "double" but no one says that)
2021-06-08 07:59:16 <dminuoso> Personally I say <n>-tuple
2021-06-08 07:59:26 <guest61> dminuoso parser shouldn't return data structure? what's the right way to do?
2021-06-08 07:59:35 <dminuoso> The parser should, but consider using a data type for it.
2021-06-08 07:59:41 <dminuoso> Let me give you some sketch
2021-06-08 08:02:34 <dminuoso> guest61: https://gist.github.com/dminuoso/d4e8fc5fa0c647a6fd1bfa342614b840
2021-06-08 08:02:36 <dminuoso> Something along these lines
2021-06-08 08:03:14 × xff0x quits (~xff0x@2001:1a81:5287:b700:8416:9e9:b58b:926d) (Ping timeout: 272 seconds)
2021-06-08 08:03:55 xff0x joins (~xff0x@2001:1a81:5287:b700:b1a7:c5b9:6672:3b03)
2021-06-08 08:04:36 <guest61> dminuoso oh, you use a data structure instead of a map
2021-06-08 08:05:56 × hnOsmium0001 quits (uid453710@id-453710.stonehaven.irccloud.com) (Quit: Connection closed for inactivity)
2021-06-08 08:07:09 hendursa1 joins (~weechat@user/hendursaga)
2021-06-08 08:07:54 dhil joins (~dhil@195.213.192.47)
2021-06-08 08:09:53 <dminuoso> Yes.
2021-06-08 08:10:30 <dminuoso> This leads to more robust code, because you can for one have varying types as content, and the field names are pre-known.
2021-06-08 08:10:31 × hendursaga quits (~weechat@user/hendursaga) (Ping timeout: 252 seconds)
2021-06-08 08:10:51 × hendursa1 quits (~weechat@user/hendursaga) (Remote host closed the connection)
2021-06-08 08:10:54 <dminuoso> maps are better suited for when the associations are known only at runtime
2021-06-08 08:11:14 hendursa1 joins (~weechat@user/hendursaga)
2021-06-08 08:11:30 anon joins (~anon@176.59.52.187)
2021-06-08 08:12:36 <boxscape> (Oh, the wikipedia page on "tuple" also gives the word "couple" for the 2-tuple, but I've never heard that one being used either)
2021-06-08 08:13:19 wonko joins (~wjc@62.115.229.50)
2021-06-08 08:13:25 <guest61> boxscape so there is triple?
2021-06-08 08:13:35 <boxscape> triple is sometimes used, yes
2021-06-08 08:14:09 <boxscape> (as in, for example, the "Kleisli triple")
2021-06-08 08:14:22 <guest61> english is weird, once, twice, thrice, what about fourice? fivice? no
2021-06-08 08:14:25 × wonko quits (~wjc@62.115.229.50) (Changing host)
2021-06-08 08:14:25 wonko joins (~wjc@user/wonko)
2021-06-08 08:14:41 <boxscape> heh to be fair I think a lot of languages have special cases for small numbers
2021-06-08 08:14:44 <guest61> couple triple, fourple?
2021-06-08 08:14:55 <c_wraith> English is fine when you realize it isn't one language. It's about 30 mashed together
2021-06-08 08:15:09 <siraben> Is there a `transpose` equivalent for Data.Vector?
2021-06-08 08:15:21 <siraben> I need it to behave the same as List's transpose
2021-06-08 08:15:33 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:90fb:e693:9986:91e0) (Remote host closed the connection)
2021-06-08 08:16:16 × ubert quits (~Thunderbi@p200300ecdf259d2d3d1bf7f6f1f48366.dip0.t-ipconnect.de) (Remote host closed the connection)
2021-06-08 08:16:30 <dminuoso> Shouldn't it be fove and fice?
2021-06-08 08:16:50 MQ-17J joins (~MQ-17J@d14-69-206-129.try.wideopenwest.com)
2021-06-08 08:17:07 ubert joins (~Thunderbi@p200300ecdf259d2de6b318fffe838f33.dip0.t-ipconnect.de)
2021-06-08 08:17:12 <guest61> look at prince and price, what's the related?
2021-06-08 08:17:39 <maerwald> being prince is priceless
2021-06-08 08:20:15 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Quit: Lost terminal)
2021-06-08 08:20:38 <guest61> finance and fiance, what's the related?
2021-06-08 08:21:15 <keltono> who let my dad into #haskell? :P
2021-06-08 08:21:51 <c_wraith> I'm not sure "similar spelling => similar meaning" holds in any language
2021-06-08 08:22:05 <maerwald> guest61: that isn't really a hard one...
2021-06-08 08:22:15 × azeem quits (~azeem@dynamic-adsl-94-34-34-125.clienti.tiscali.it) (Ping timeout: 252 seconds)
2021-06-08 08:22:23 <tdammers> all languages are weird when it comes to counting and numbers
2021-06-08 08:23:01 <guest61> even the word haskell, h ask ell, permutation it, one would be hell ask or ask hell?
2021-06-08 08:23:04 azeem joins (~azeem@176.201.35.122)
2021-06-08 08:23:05 [exa] remembers french 90s
2021-06-08 08:23:13 jorjor joins (~jorgemene@85.251.190.6.dyn.user.ono.com)
2021-06-08 08:23:36 tomsmeding . o O ( 4 * 20 + 19 )
2021-06-08 08:23:49 <tdammers> German, for example, has special words for eleven and twelve (like English), but from thirteen on, it's regular. French has special words up to 16 (seize). Spanish has much the same, but only up to 15.
2021-06-08 08:24:05 <tdammers> and yeah, four-twenty ten-nine
2021-06-08 08:24:27 <tdammers> the history of all that is interesting
2021-06-08 08:24:31 <tomsmeding> tdammers: and Dutch has up to 14 :)
2021-06-08 08:25:02 <tdammers> tomsmeding: I'd argue that Dutch only has truly special words up to 12, just like German and English; the ones above are "calcified" versions of regular ones
2021-06-08 08:25:10 <[exa]> like, it's an improvement since MCMXLXXXX or what
2021-06-08 08:25:11 <tomsmeding> fair
2021-06-08 08:25:19 <tdammers> "veertien" is just "vier-tien" that didn't get the spelling memo
2021-06-08 08:26:33 <[exa]> (now, please allow me to steer this conversation to the related comprehension of time intervals that depend on planet rotation)
2021-06-08 08:26:55 ekaj joins (~ekaj@188.163.29.25)
2021-06-08 08:26:56 × ekaj quits (~ekaj@188.163.29.25) (K-Lined)
2021-06-08 08:27:30 <c_wraith> Romans didn't even use the super-formalized system we credit them with. they'd be just as happy to write 4 as IIII as IV
2021-06-08 08:27:59 letiw joins (~letiw@130.105.222.195)
2021-06-08 08:28:34 × dhil quits (~dhil@195.213.192.47) (Ping timeout: 250 seconds)
2021-06-08 08:28:50 × letiw quits (~letiw@130.105.222.195) (Client Quit)
2021-06-08 08:29:02 × hmmmas quits (~chenqisu1@183.217.201.236) (Quit: Leaving.)
2021-06-08 08:29:22 hmmmas joins (~chenqisu1@183.217.201.236)
2021-06-08 08:29:37 × favonia quits (~favonia@user/favonia) (Ping timeout: 244 seconds)
2021-06-08 08:30:34 <tomsmeding> guest61: I dare bet your language has the same issue with words that look much alike but mean something very different :)
2021-06-08 08:30:58 favonia joins (~favonia@user/favonia)
2021-06-08 08:31:47 kuribas joins (~user@ptr-25vy0i7u51qchbo4u5u.18120a2.ip6.access.telenet.be)
2021-06-08 08:32:16 <dminuoso> guest61: One of things I learned to love, is making data types. Many data types.
2021-06-08 08:32:27 <dminuoso> You can never have enough data types and newtypes in your program.
2021-06-08 08:33:42 × justBull quits (~justache@user/justache) (Remote host closed the connection)
2021-06-08 08:33:47 <tdammers> c_wraith: yes, and they'd be equally happy to use the C symbol to mean "a troop of ideally 100 soldiers, but realistically probably a good bit smaller"
2021-06-08 08:34:00 <tdammers> they were quite pragmatic
2021-06-08 08:34:35 justBull joins (~justache@user/justache)
2021-06-08 08:35:00 <tdammers> in a similar fashion, their "distance" units (Roman miles) were really more like travel time estimates, and most of their maps would mark not distances, but how many days it would take someone to walk
2021-06-08 08:35:37 <guest61> dminuoso that senior haskell expert always define some date types I can't understand
2021-06-08 08:36:04 agumonke` joins (~user@88.160.31.174)
2021-06-08 08:36:20 × ubert quits (~Thunderbi@p200300ecdf259d2de6b318fffe838f33.dip0.t-ipconnect.de) (Ping timeout: 244 seconds)
2021-06-08 08:36:51 × aplainzetakind quits (~johndoe@captainludd.powered.by.lunarbnc.net) (Quit: Free ZNC ~ Powered by LunarBNC: https://LunarBNC.net)
2021-06-08 08:37:28 aplainzetakind joins (~johndoe@captainludd.powered.by.lunarbnc.net)

All times are in UTC.