←2018-08-10 2018-08-11 2018-08-12→ ↑2018 ↑all
00:02:49 -!- tromp has joined.
00:02:51 -!- imode1 has quit (Ping timeout: 240 seconds).
00:03:10 -!- imode has joined.
00:03:21 -!- bradcomp has quit (Ping timeout: 240 seconds).
00:07:54 -!- tromp has quit (Ping timeout: 272 seconds).
00:10:07 <arseniiv> fungot: YEOOIIOOIOA
00:10:08 <fungot> arseniiv: where? i only see 5
00:10:33 <arseniiv> fungot: there's more
00:10:33 <fungot> arseniiv: ok then... seems udage is turing tarpit. power and expressiveness are independent.
00:13:26 <boily> YEOOIIOOIOA???
00:15:18 -!- arseniiv has quit (Ping timeout: 256 seconds).
00:19:17 -!- erkin has quit (Remote host closed the connection).
00:53:17 -!- xkapastel has quit (Quit: Connection closed for inactivity).
00:55:33 <zzo38> How would I implement seeking for a specific ecliptic longitude of a body (or of a Arabic Part)?
00:56:47 -!- aloril has quit (Ping timeout: 244 seconds).
00:59:06 -!- imode has quit (Quit: WeeChat 2.2).
00:59:52 -!- xkapastel has joined.
01:00:50 -!- aloril has joined.
01:07:47 <zzo38> (Arabic parts have three parameters (called the "personal-point", "significator", and "trigger"). Some use rulers, lords, houses, constants, dispositors, and other Arabic parts, as their parameters. I do not intend to implement any other than the bodies that swe_calc() can calculate, as well as the Asc, MC, and constants 0 Aries and 0 Libra. Note that if the "personal-point" is held constant, you are effectively seeking an aspect.)
01:09:44 <zzo38> (Also, many use reversals, and some use stranger things such as "Lord of New or Full Moon Prior to Birth", "Cusp of House Uranus Occupies", "Use Jupiter if Saturn is combust", "Asc + Moon - (Sun + 144 + Pi)", etc. I don't know what most of these mean, and I also don't care and do not intend to implement any of these things.)
01:15:03 -!- Stryyker12 has joined.
01:15:18 -!- Stryyker12 has quit (Remote host closed the connection).
01:25:27 -!- ais523 has quit (Remote host closed the connection).
01:26:40 -!- ais523 has joined.
01:38:59 -!- benoliver99925 has joined.
01:39:52 -!- benoliver99925 has quit (Killed (Sigyn (Spam is off topic on freenode.))).
01:44:11 -!- boily has quit (Quit: IMPORT CHICKEN).
01:50:42 -!- tromp has joined.
01:55:47 -!- tromp has quit (Ping timeout: 268 seconds).
02:08:24 <zzo38> I don't like W3C's "Secure Contexts". I read a definition it is one of the four: * An origin using an authenticated scheme (https: or wss:) * An origin on the local computer using IP addresses in 127/8 (IPv4) or ::1/128 (IPv6) * An origin on the local computer using a scheme that the browser considers authenticated (file: and possibly packaged browser extensions) * An origin that the user has "configured as a trustworthy origin", through a us
02:08:48 <zzo38> My own opinion is that only the last one should be considered as a trustworthy origin and the others should not be.
02:27:14 <esowiki> [[Arrows]] https://esolangs.org/w/index.php?diff=57310&oldid=57308 * HereToAnnoy * (+1338) Langauge update (also, is there a grid table or do I have to make really long wikitables every time a program is written in this?)
02:27:42 <esowiki> [[Arrows]] M https://esolangs.org/w/index.php?diff=57311&oldid=57310 * HereToAnnoy * (+13) everytime i finish something
02:46:05 -!- u0_a101 has quit (Ping timeout: 240 seconds).
02:49:08 -!- u0_a101 has joined.
02:50:15 -!- ais523 has quit (Remote host closed the connection).
02:51:29 -!- ais523 has joined.
03:38:33 -!- tromp has joined.
03:42:57 -!- tromp has quit (Ping timeout: 240 seconds).
03:46:23 -!- nero7 has joined.
03:46:48 -!- nero7 has quit (Killed (Sigyn (Spam is off topic on freenode.))).
04:05:27 -!- ais523 has quit (Quit: quit).
04:08:43 -!- sleepnap has left.
04:33:16 -!- tromp has joined.
04:37:24 -!- tromp has quit (Ping timeout: 244 seconds).
04:42:50 -!- Nakato has joined.
04:43:09 -!- Nakato has changed nick to Guest27715.
04:44:31 -!- Guest27715 has quit (Remote host closed the connection).
05:27:09 -!- tromp has joined.
05:29:17 -!- ProClifo has joined.
05:32:10 -!- tromp has quit (Ping timeout: 272 seconds).
05:33:53 -!- ProClifo has quit (Ping timeout: 248 seconds).
05:44:57 -!- bads has joined.
05:45:21 -!- bads has changed nick to Guest55883.
05:46:41 -!- Guest55883 has quit (Remote host closed the connection).
06:34:28 -!- S_Gautam has quit (Quit: Connection closed for inactivity).
06:37:35 -!- jeggott0 has joined.
06:38:42 -!- tromp has joined.
06:39:06 -!- jeggott0 has quit (Remote host closed the connection).
06:43:13 <u0_a101> any thoughts on baseline syntax needed for a relatively useful out-of-the-box language? I'm thinking var declaration/assignment, arithmetic ops, conditional evaluation, some kind of collection, functions, parens for eval order...
06:43:21 -!- tromp has quit (Ping timeout: 240 seconds).
06:43:43 <u0_a101> braces for block scope, function bodies, loops, conditional eval
06:44:11 <u0_a101> comparison ops
06:45:10 <u0_a101> datatypes maybe bool, number, string, collection, function
06:46:38 <u0_a101> any of that unneccessary? anything important missing?
06:49:02 <u0_a101> i'm shooting for something reasonably expressive and multi-paradigm, pleasant to use, not something crazy like bf
06:54:05 <u0_a101> ...but at the same time as minimal as it can be, for example one kind of loop should be enough (probably a while loop), and one kind of collection (maybe like lua's table?)
07:14:04 -!- erdic has quit (Ping timeout: 256 seconds).
07:14:56 -!- erdic has joined.
07:23:17 -!- xkapastel has quit (Quit: Connection closed for inactivity).
07:32:22 -!- S_Gautam has joined.
07:38:29 -!- tromp has joined.
07:48:36 <zzo38> I think you should need macros and byte arrays. And then is probably good enough I suppose
07:48:59 <zzo38> You might not need boolean type though, but perhaps can help to have null
08:13:31 <u0_a101> zzo38: are you thinking preprocessor macros, or something else?
08:14:18 <u0_a101> null is a good idea, can probably do away with booleans, null will be falsey and everything else truthy
08:18:33 <zzo38> Yes, that can work. Null is false and everything else can be true. About macros, I thought they could be either preprocessor macros or perhaps dynamic macros (depending on how the rest of the programming language is working); you don't need both
08:25:06 -!- XorSwap has quit (Quit: the creeping crawling chaos will return.).
08:25:24 <zzo38> I believe you though that one kind of loop will be enough (probably a while loop), and one kind of collection. Possibly the suitable flow-controls can be: if/else, while, goto, and return; nothing else is needed I think. I don't know what is you think though; you can figure out what you like to do it.
08:28:14 -!- erdic has quit (Ping timeout: 272 seconds).
08:28:48 -!- erdic has joined.
08:33:58 -!- erdic has quit (Ping timeout: 260 seconds).
08:40:34 -!- erdic has joined.
08:41:35 -!- DrJ23 has joined.
08:42:33 -!- DrJ23 has quit (Remote host closed the connection).
08:58:32 <u0_a101> zzo38: i think you're right... not sure if goto is needed, but probably either goto or break/continue
08:58:56 <u0_a101> should be a way to break out of loops without return
09:00:00 <u0_a101> it makes me wonder if loops are really necessary, maybe something like a self-recursive function instead
09:01:10 -!- GeekDude has quit (Ping timeout: 256 seconds).
09:03:55 -!- GeekDude has joined.
09:05:13 <zzo38> Perhaps, but while and goto (and if/else and return) can make it convenient to program, even though they are not strictly needed.
09:06:30 <u0_a101> yeah, for sure
09:08:49 <u0_a101> zzo38: sent you a link :)
09:10:20 -!- SopaXorzTaker has joined.
09:11:41 -!- Guest74037 has joined.
09:16:22 -!- Guest74037 has quit (Ping timeout: 272 seconds).
09:26:56 -!- tromp has quit (Remote host closed the connection).
09:39:03 -!- jwhisnant21 has joined.
09:39:36 -!- jwhisnant21 has quit (Killed (Sigyn (Spam is off topic on freenode.))).
09:41:57 -!- S_Gautam has quit (Quit: Connection closed for inactivity).
09:46:09 -!- S_Gautam has joined.
09:51:50 -!- erdic has quit (Ping timeout: 272 seconds).
09:53:56 -!- atslash has joined.
10:04:14 -!- erdic has joined.
10:04:58 -!- GeekDude has quit (Ping timeout: 244 seconds).
10:06:24 -!- tromp has joined.
10:07:29 -!- tromp has quit (Remote host closed the connection).
10:07:45 -!- tromp has joined.
10:07:47 -!- GeekDude has joined.
10:08:35 -!- erdic has quit (Ping timeout: 244 seconds).
10:31:17 -!- erkin has joined.
10:44:26 -!- Random2 has joined.
10:46:34 -!- Random2 has quit (Remote host closed the connection).
11:00:59 -!- erdic has joined.
11:23:50 -!- vans12 has joined.
11:30:13 -!- vans12 has quit (Ping timeout: 244 seconds).
11:54:29 -!- wob_jonas has joined.
12:00:41 <wob_jonas> u0_a101: you can try to look at https://esolangs.org/wiki/Mouse or ... uh, there was some low-level language intended to be used as an embedded language that can directly access the memory space of the parent process and with like five types of registers and three-letter commands.
12:01:28 <wob_jonas> zzo38: what was that latter language and wasn't it one of yours?
12:10:54 <wob_jonas> https://esolangs.org/wiki/CLCLC-INTERCAL WTF, a dialect of Intercal without the unary bitwise operators? that's so strange
12:32:04 -!- SopaXorzTaker has quit (Remote host closed the connection).
12:33:08 -!- arseniiv has joined.
12:38:54 <rain2> idea UTF-0 UTF-1
12:51:37 -!- wob_jonas has quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client).
12:59:35 -!- erdic has quit (Ping timeout: 240 seconds).
13:03:20 <myname> how would you make that
13:03:49 <myname> unary would be easy but stupid, but utf-0?
13:11:32 <Taneb> UTF--1+i
13:11:51 -!- erdic has joined.
13:11:58 -!- SopaXorzTaker has joined.
13:12:12 <arseniiv> Taneb: (rofl)
13:13:17 -!- xkapastel has joined.
13:47:39 -!- MDude has quit (Ping timeout: 244 seconds).
13:52:07 -!- BenLand100 has joined.
13:55:35 -!- BenLand100 has quit (Remote host closed the connection).
14:18:40 -!- ForexTrader has joined.
14:19:01 -!- ForexTrader has quit (Killed (Sigyn (Spam is off topic on freenode.))).
14:24:36 -!- SopaXorzTaker has quit (Remote host closed the connection).
14:32:21 -!- Metacity13 has joined.
14:32:49 -!- Metacity13 has quit (Remote host closed the connection).
15:17:23 <fizzie> There was an UTF-1, but it wasn't 1 as in "one bit", it was 1 as in "first". It's an appendix in the original (1993) ISO-10646, it's a multibyte encoding somewhat similar to UTF-8 except worse.
15:19:56 <int-e> `quote worse
15:19:57 <HackEso> 350) <coppro> elliott: actually, it's worse right now, I'm in the USA <coppro> where the solution to counterfeiting problems is "add more ink" <coppro> eventually all US bills will just be solid green \ 385) <SgeoN1> No nasty sounds for a while now. Going to turn off and on and see if the numbers get worse. \ 524) <Gregor> You know how the arrow pierces your skin, rearranging and randomizing vital internal structure? <Gregor> Monads are like that, only
15:20:31 <int-e> `quote 524
15:20:31 <HackEso> 524) <Gregor> You know how the arrow pierces your skin, rearranging and randomizing vital internal structure? <Gregor> Monads are like that, only worse.
15:20:44 <int-e> so much hate
15:23:42 <arseniiv> ((
15:24:18 <arseniiv> I’ll never try burritos then
15:24:27 <arseniiv> if monads are also like them
15:25:35 -!- AnotherTest has joined.
15:30:47 <Taneb> Burritos and monads are both quite nice
15:31:07 <int-e> I wouldn't want to confuse the two.
15:31:08 <Taneb> Although I tend to overfill them
15:31:17 <Taneb> And that just ends up messy
15:33:17 <Taneb> You should try to not have too many at the same time, too, to avoid bloat
15:39:10 <int-e> So to paraphrase, monads are like burritos; if you stack them too high, the result is inevitably a mess?
15:39:26 <Taneb> Yes
15:39:46 <Taneb> Also a burrito inside a burrito is sometimes but generally not a burrito itself!
15:59:15 <arseniiv> is there a ListT burrito which wasn’t done right until some time in the past?
16:12:10 <int-e> Cale knows all about that I believe
16:31:33 -!- steveeJ20 has joined.
16:35:45 -!- steveeJ20 has quit (Ping timeout: 248 seconds).
16:46:34 <Cale> Yeah, the ListT in MTL was (and is) incorrect.
16:47:01 <alercah> wait, really?
16:47:22 <alercah> rofl
16:48:00 <Cale> Yeah, the things it produces are not law-abiding monads unless the monad you give it is commutative, which few monads are.
16:49:26 <alercah> XD
16:49:28 <alercah> amazing
16:54:55 -!- majestic25 has joined.
17:00:26 -!- majestic25 has quit (Ping timeout: 256 seconds).
17:05:31 <quintopia> how common is it for someone to make a monad named Nock for the lulz?
17:05:44 -!- sebbu2 has joined.
17:08:38 <zzo38> What is such monad meaning?
17:08:56 -!- sebbu has quit (Ping timeout: 256 seconds).
17:14:18 <int-e> @google "you could have invented hylomorphisms"
17:14:19 <lambdabot> No Result Found.
17:14:29 <int-e> @google google
17:14:30 <lambdabot> https://www.google.com/
17:28:29 <quintopia> zzo38: its up to you to decide that. sometimes, there are names in want of things.
17:35:43 <int-e> `? zzo38
17:35:44 <HackEso> zzo38 is not actually the next version of fungot, much as it may seem.
17:35:52 <int-e> fungot: oh
17:35:53 <fungot> int-e: i tried /topic in a .c file and see what happens :) they are probably talking more like 100 lines here, and then ' fnord' :p. but that doesn't help
17:36:30 <int-e> (I have not "chatted" with fungot in a while)
17:36:31 <fungot> int-e: where is the acid? where is it? bye!
17:36:45 <int-e> fungot: why are you leaving so soon?
17:36:46 <fungot> int-e: where is lisppaste? i've posted this before i do, be lazy and not check for the extent of your mathematical background. the 1st chapter of sicp.
17:51:19 <arseniiv> fungot: I know where the acid is but I won’t tell you :P
17:51:19 <fungot> arseniiv: are *all* concatenative languages functional? ( no, i'm sure)
17:51:20 -!- MDude has joined.
17:52:17 <int-e> it's so surreal when fungot almost makes sense
17:52:18 <fungot> int-e: well the exercise does describe named let adequately i think?) for the ' most jewish' towns in the red river valley, austin, and state indices could be stored
17:53:22 <arseniiv> fungot: btw have you gained conscience already
17:53:23 <fungot> arseniiv: well i could find about it online. but for people who are technically freelancers, but always doubted they really exist in simple examples. :(
17:53:39 <arseniiv> yes
17:58:51 -!- ErrantEgo0 has joined.
18:00:42 -!- ErrantEgo0 has quit (Remote host closed the connection).
18:01:12 -!- variable has joined.
18:06:35 -!- SopaXorzTaker has joined.
18:06:52 <arseniiv> fungot: как ты относишься к кириллице?
18:06:53 <fungot> arseniiv: i've heard minion is perpetually disgruntled." i have quite a nice learning environment...
18:07:24 <arseniiv> I feared it’d be worse
18:09:48 -!- erkin has quit (Remote host closed the connection).
18:14:19 <int-e> arseniiv: it might be if fungot actually took context into account
18:14:19 <fungot> int-e: was that a question in " the call/ cc's
18:27:14 -!- variable has quit (Quit: Found 1 in /dev/zero).
18:31:08 -!- Sgeo__ has joined.
18:35:14 -!- Sgeo_ has quit (Ping timeout: 276 seconds).
18:35:52 -!- Sgeo_ has joined.
18:38:57 -!- Sgeo__ has quit (Ping timeout: 240 seconds).
18:49:29 -!- Cale has quit (Read error: Connection reset by peer).
18:53:02 <zzo38> Are you good at the computer game I put on here a while ago?
19:02:35 -!- xset has joined.
19:02:57 -!- xset has quit (Killed (Sigyn (Spam is off topic on freenode.))).
19:15:00 -!- imode has joined.
19:16:40 <int-e> high score 80 in the default mode... I don't think that's good
19:18:04 <arseniiv> zzo38: where to find it?
19:20:33 <int-e> http://zzo38computer.org/GAMES/MEGAPANE.ZIP
19:22:47 <u0_a101> .exe :(
19:27:33 <int-e> runs in dosbox
19:27:58 <int-e> it's quaint
19:33:17 <zzo38> I will add some more options later
19:33:36 -!- atslash has quit (Quit: This computer has gone to sleep).
19:47:48 -!- SopaXorzTaker has quit (Remote host closed the connection).
19:56:41 <arseniiv> int-e: zzo38: 35!
19:57:00 <arseniiv> also, basic, really? :o
19:57:53 <int-e> arseniiv: are you complaining because it's not esoteric enough? :P
19:58:21 <arseniiv> no, no
19:59:18 <arseniiv> I haven’t seen a classical (Q?)Basic code in, let me think… forever
20:00:30 <arseniiv> ah, non-classic, no line numbers
20:00:38 <arseniiv> but still not VB either
20:01:07 <arseniiv> my first real programs were in VB6((
20:01:13 <zzo38> Yes, it is written in BASIC. The source codes are public domain so you can do what you want with it (although the executable file may be copyright by Microsoft). That is what I use when writing programs on DOS (for native programs on Linux I use C). While there are some free BASIC compilers, they should be enhanced to support some of the commands they currently don't and support real mode
20:01:55 <arseniiv> zzo38: also interesting game idea
20:02:34 <int-e> uh I accidently reached 311
20:02:43 <arseniiv> :oo
20:03:20 <int-e> (and I mean that... I felt out of control the whole time)
20:04:00 <arseniiv> 44 at the second time
20:04:12 <arseniiv> I think it’s pointless for me to continue :D
20:04:57 <int-e> http://int-e.eu/~bf3/tmp/mph.png
20:06:19 <int-e> (this is not a random file name: mph = mega pane highscore)
20:06:42 <int-e> arseniiv: 44 is a more normal score :)
20:07:29 <arseniiv> I feel a bit too slow for this game still
20:08:24 <int-e> I like the solitaire mode that you get if you press "T" once
20:08:51 <int-e> (where the board moves up every 8 moves you make)
20:08:55 -!- erkin has joined.
20:09:18 <arseniiv> oh, I’ve missed that!
20:12:51 <int-e> actually this part of the game is quite advanced... you can select a preset (0-9), change the settings, save it, and then it'll start recording highscores for that setting
20:13:29 <int-e> reminds me remotely of the good old blockout game
20:13:40 <arseniiv> 50 on default solitaire
20:23:40 -!- FreeFull has quit (Quit: Rebooting for new kernel).
20:24:36 -!- ais523 has joined.
20:25:53 -!- FreeFull has joined.
20:28:43 -!- Cale has joined.
20:36:18 -!- lutki_ has joined.
20:38:04 -!- lutki_ has quit (Remote host closed the connection).
20:47:56 <ais523> @messages?
20:47:56 <lambdabot> Sorry, no messages today.
20:52:42 <int-e> > let act i j = lift (tell [i]) `mplus` lift (tell [j]); x = snd . runWriter . runListT in (x (act 1 2 >> (act 3 4 >> act 5 6)), x ((act 1 2 >> act 3 4) >> act 5 6))
20:52:43 <lambdabot> error:
20:52:43 <lambdabot> Variable not in scope: runListT :: a1 -> Writer c a0
20:52:56 <int-e> @let import Control.Monad.List
20:52:57 <lambdabot> Defined.
20:52:59 <int-e> > let act i j = lift (tell [i]) `mplus` lift (tell [j]); x = snd . runWriter . runListT in (x (act 1 2 >> (act 3 4 >> act 5 6)), x ((act 1 2 >> act 3 4) >> act 5 6))
20:53:01 <lambdabot> ([1,2,3,4,5,6,5,6,3,4,5,6,5,6],[1,2,3,4,3,4,5,6,5,6,5,6,5,6])
20:54:16 <arseniiv> no messages today my love is gone away, the λ-bot stands forlorn a symbol of the dawn
20:54:53 <u0_a101> qq
20:55:41 <arseniiv> int-e: is @let global to all lambdabot?
20:55:57 <arseniiv> all of*
20:56:17 <int-e> @undef
20:56:18 <lambdabot> Undefined.
20:56:19 <int-e> arseniiv: yes
20:56:31 <u0_a101> zzo38: something you said earlier had me briefly playing with the idea of a super-goto that could also pass values, and be returned to, receiving a value... but i gave up on that after about 30 minutes
20:56:56 -!- ErrantEgo14 has joined.
20:56:56 <zzo38> That seem would be difficult to implement, it seem to me.
20:57:18 <u0_a101> yeah, i think you'd have to keep a stack of them to return
20:57:37 <arseniiv> int-e: what one does when some imports are interfering with something, is there a way to un-import?
20:58:20 -!- ErrantEgo14 has quit (Remote host closed the connection).
20:58:22 <u0_a101> actually goto seems hard to implement in general... how do you handle skipping past a var declaration, etc
20:59:05 <int-e> arseniiv: @undef resets all @let commands
20:59:17 <int-e> @where L.hs
20:59:17 <lambdabot> what lambdabot has in scope is at http://silicon.int-e.eu/lambdabot/State/Pristine.hs
20:59:42 <zzo38> Yes, I do know of difficulties of implementing goto, but one way is to just disallow jumping past a variable declaration. Some programming language expect variable declarations at the beginning of a block, and if you cannot jump into a block then that is automatically the case.
20:59:54 <int-e> arseniiv: @let adds stuff to a file L.hs; @undef copies Pristine.hs to L.hs, overwriting all @let changes
21:00:17 <int-e> it's all very well designed and userfriendly. :P
21:00:18 <arseniiv> u0_a101: all declarations within a block could be treated as its inseparable traits, occurring in the same code with runnable instructions only because of a, let’s say, “bad” design
21:00:57 <arseniiv> int-e: it's all very well designed and userfriendly. :P => I see ::::
21:01:14 <int-e> @let import qualified Control.Monad.List as CML
21:01:16 <lambdabot> Defined.
21:01:30 <int-e> > let t = lift . tell . (:[]); a i j = t i `mplus` t j; x = snd . runWriter . CML.runListT in (x (a 1 2 >> (t 3 >> t 4)), x ((a 1 2 >> t 3) >> t 4))
21:01:32 <lambdabot> ([1,2,3,4,3,4],[1,2,3,3,4,4])
21:02:31 <arseniiv> there could be an interesting er… game when someone privately sends @undef to lambdabot in the heat of someone else building a complex machiery in the chat
21:02:59 <int-e> Anyway this is how ListT is broken: The order of effects of the base monad may change with the bracketing of >> (or >=>), breaking the corresponding associative law.
21:03:36 <int-e> arseniiv: it has caused surprisingly few problems so far... people cope.
21:03:43 <zzo38> Yes, so it only transforms some monads and not all of them.
21:03:58 <zzo38> So it is not a real monad transfomer and only is partial
21:04:36 <arseniiv> int-e: seems reasonable. Also I was half-joking :D
21:04:54 <ais523> :t StateT IO
21:04:55 <lambdabot> error:
21:04:55 <lambdabot> • Data constructor not in scope: IO :: s -> m (a, s)
21:04:55 <lambdabot> • Perhaps you meant ‘In’ (imported from Lambdabot.Plugin.Haskell.Eval.Trusted)
21:05:12 <ais523> :k StateT IO
21:05:12 <u0_a101> arseniiv: so, hoisting var declarations to top of block basically? i'f im understanding you right?
21:05:13 <lambdabot> error:
21:05:13 <lambdabot> • Expecting one more argument to ‘IO’
21:05:13 <lambdabot> Expected a type, but ‘IO’ has kind ‘* -> *’
21:05:19 <ais523> :k StateT IO Integer
21:05:20 <lambdabot> error:
21:05:20 <lambdabot> • Expecting one more argument to ‘IO’
21:05:21 <lambdabot> Expected a type, but ‘IO’ has kind ‘* -> *’
21:05:25 <ais523> :k StateT (IO Integer)
21:05:26 <lambdabot> (* -> *) -> * -> *
21:05:44 <ais523> :k IO Integer
21:05:46 <lambdabot> *
21:06:13 <arseniiv> u0_a101: yep, or think of declarations inside a runnable block like a nops
21:06:38 <int-e> arseniiv: http://hackage.haskell.org/package/logict is "ListT done properly" borrowing from Cont (Codensity, Yoneda, yada-yada).
21:07:14 <int-e> It also gets rid of the lists.
21:07:43 <u0_a101> arseniiv: hmm, interesting idea :)
21:07:57 <ais523> I've been having my own thoughts about things like error handling, backtracking, select(2), and the like
21:08:10 <ais523> I think that there's a way to do it correctly, from a programmer's point of view
21:08:20 <zzo38> You could also disallow jumping to a label if there is a variable declaration between the goto and label
21:08:21 <arseniiv> they are “runned” before all explicit runnable statements do, notwithstanding goto jumps, like a finalizer in try…finally statements is run after something almost always, even if something was thrown
21:08:21 <ais523> and monads are heavily involved, but it's not quite the same
21:08:44 <ais523> I think what you need is to collapse the whole mess of monads and monad transformers into a single universal monad that does everything
21:09:36 <zzo38> (unless the declaration in inside of a block that you are jumping out of.)
21:10:07 <arseniiv> u0_a101: also it combines well with freedom to declare things precisely where you need them, and with lexical scoping too
21:10:52 <u0_a101> zzo38: i think this is what lua does
21:11:07 <zzo38> Maybe; I don't know much about what Lua does.
21:11:09 <u0_a101> can't jump past var declaration
21:11:10 <ais523> one big inspiration is that ? from Rust is basically just do-notation, but nicer
21:11:10 -!- ais523 has quit (Remote host closed the connection).
21:11:22 -!- ais523 has joined.
21:11:24 <ais523> <ais523> Rust's x = a? is equivalent to Haskell's x <- a
21:11:34 <u0_a101> also label must be visible to goto, lexically
21:11:39 <ais523> or, well, except that Rust ? only supports Option and Either, making it easier to implement
21:12:07 <arseniiv> int-e: seems I heard of it. Ah I wish I used Haskell more frequently
21:12:09 <FireFly> I guess ? is a postfix operator here?
21:12:26 <FireFly> or, hmm
21:12:30 <zzo38> Well, you should be allowed to jump past a variable declaration as long as you are jumping outside of the block where that variable declaration is. And, yes, of course the label must be visible to goto, too.
21:12:41 <FireFly> or is that, including the assignment, a single syntactic form?
21:13:21 <ais523> FireFly: yes, it's a postfix operator
21:14:43 <ais523> in Rust, it's results in x if its argument is Ok(x), x if its argument is Just(x), and if neither of those is the case, it exits the entire function, returning its argument unchanged
21:14:53 <ais523> (assuming I got the syntax right there, I don't really know Rust)
21:15:16 <alercah> the semantics are not quite right
21:15:20 <ais523> but I personally see ? as more of a "convert the rest of the function into a lambda" operator
21:16:03 <ais523> like, { f; a?; g } ends up being converted to { f; a.map(|| g) }
21:16:16 <ais523> err
21:16:28 <ais523> { f; x = a?; g } ends up being converted to { f; a.map(|x| g) }
21:16:43 <ais523> where |x| is "lambda x."
21:16:53 <ais523> this is exactly the same thing Haskell do-notation does
21:17:11 <ais523> or, well, it's not /quite/ the same; do-notation is flatMap (i.e. >>=), not regular map
21:17:28 <int-e> smalltalk forever
21:18:00 <int-e> (I believe that's where the || notation comes from.)
21:18:25 <FireFly> ah interesting, I associate it with Ruby
21:18:55 <ais523> anyway, it strikes me that most existing languages/APIs are very bad at common tasks like waiting for one of two unrelated events to happen
21:18:55 <FireFly> ais523: hmm
21:19:23 <ais523> "wait until someone clicks the mouse or a particular socket receives a network packet" is very difficult with most programming frameworks
21:19:27 * FireFly nods
21:19:27 <int-e> ais523: erlang should be good at that
21:19:48 <ais523> well, the general solution involves a multiple threads and a blocking queu
21:19:54 <ais523> *blocking queue
21:20:12 <zzo38> Yes, and SDL is also bad at that since not all events are SDL events and SDL can't give you a file descriptor for its events (although Xlib can).
21:20:14 <ais523> I think this is the main reason threading became popular
21:20:23 <FireFly> The most recent case of "that sounds like monadic bind" for me is JS and "await" I think (well, I guess promises in general)
21:20:37 <ais523> FireFly: yes, promises are a special case of this pattern too
21:21:46 <zzo38> JavaScript also has generator functions too
21:21:57 <ais523> I think a well-designed language would use promises for all input, and have an any() operator/function that returned the value of whichever promise completed first, and blocked until one of them did
21:22:00 <ais523> with appropriate error handling
21:22:20 <ais523> what we get instead is a lot of ad-hoc select/poll/epoll calls
21:22:45 <ais523> the UNIX way is to make everything a file descriptor; that's workable, but as zzo38 says, most libraries abstract things away from that model and have no way to abstract-invert them back into it
21:22:56 -!- sebbu2 has changed nick to sebbu.
21:23:08 <int-e> haskell isn't terrible for this either... depending on your taste, using STM or using its light-weight threads (possibly hidden behind an abstraction like the 'parallel' package)
21:23:37 <FireFly> JS has a Promise.all which is a [Promise a] -> Promise [a] function that waits for all of them to complete; a buncha libraries had a Promise.race but I don't think it ended up being a standard thing ("wait until any settles, then settle with its value")
21:23:47 <FireFly> But you could implement it as a library function of course
21:24:12 <ais523> FireFly: well, this is what an event loop is, effectively
21:24:14 <FireFly> in that case you could do like, const thing = await Promise.race([thing1, thing2]) which is kinda decent?
21:24:15 <int-e> It's the OS interface that tends to be awful. (select, epoll... OS threads are usually too expensive)
21:24:18 <FireFly> API-wise
21:24:24 <FireFly> ais523: sure
21:24:27 <ais523> you'd want the other, unfinished promises to continue though
21:24:38 <ais523> this is what LogicT calls msplit
21:24:41 <FireFly> hm this is true
21:24:42 <shachaf> ais523: This sounds similar to the language I was talking about recently with things that affect the rest of the scope.
21:25:02 <ais523> I guess "head" would be a good name, because list terminology seems to be what people have settled on for monads
21:25:02 <zzo38> JSZM uses generator functions for all I/O (it does not implement I/O itself; the application program must handle it; JSZM is only a library)
21:25:28 <shachaf> Which ended up being pretty SSAy, which is similar to CPS/monads.
21:25:39 <zzo38> Not all monads are list monads, although some have features like list monads, so in that case I suppose "head" seem good
21:25:52 <ais523> zzo38: right, this is just about naming
21:26:19 <zzo38> Yes, for monads that are like list monads you can use the names for those features like those for lists.
21:26:21 <ais523> people find "map" quite intuitive on general monads, for example
21:27:11 <zzo38> Yes, that applies to all monads.
21:28:00 <ais523> naming things makes them easier to learn; I think most people have more of an intuitive idea of "flatMap" (i.e. map then flatten) than they do of ">>=", even though they're the same operation
21:28:11 <ais523> (btw, is there a standard name for monad flattening?)
21:28:22 <shachaf> Multiplication?
21:28:54 <ais523> @hoogle Monad m => m (m x) -> m x
21:28:55 <lambdabot> Control.Monad join :: (Monad m) => m (m a) -> m a
21:28:55 <lambdabot> Streaming join :: Monad m => m (m a) -> m a
21:28:55 <lambdabot> Haxl.Prelude join :: Monad m => m (m a) -> m a
21:28:59 <ais523> oh, "join"
21:29:22 <shachaf> Oh, in Haskell. Sure.
21:29:25 <FireFly> I mean, "flatten" would make sense to me if you call flatMap that?
21:29:31 <ais523> right
21:29:41 <ais523> I guess "join" sort-of makes sense on lists but it seems misleading for other things
21:30:05 <shachaf> But there's this spawn :: IO a -> IO (IO a) thing
21:30:07 <ais523> @source Control.Monad.join
21:30:08 <lambdabot> Unknown command, try @list
21:30:13 <ais523> @src Control.Monad.join
21:30:13 <lambdabot> Source not found. Take a stress pill and think things over.
21:30:14 <int-e> :t (runIdentity .) . traverse . (Identity .)
21:30:14 <shachaf> Which spawns a thing in a thread and gives you and IO value you can use to wait for the result.
21:30:15 <lambdabot> Traversable t => (a -> b) -> t a -> t b
21:30:16 <ais523> @src Control.Monad join
21:30:16 <lambdabot> Source not found. My mind is going. I can feel it.
21:30:25 <shachaf> There the name "join" matches the use of "join" in multithreading.
21:30:26 <zzo38> Still "join" is one of those operation of all monads, not only lists
21:30:56 <ais523> shachaf: the thread "join" is bizarrely named too, though; it's more like "wait for termination and take the value"
21:31:09 <ais523> zzo38: yes
21:31:09 <shachaf> Yes.
21:31:22 <shachaf> But it's funny that it ends up working in that context.
21:31:22 <ais523> I personally think of monads as being formed of map, join, return
21:31:25 <int-e> @src join
21:31:26 <lambdabot> join x = x >>= id
21:31:31 <int-e> (not part of the class)
21:31:53 <ais523> haha, because Haskell treats >>= as the primitive, join is implemented by flatMap id
21:31:55 <FireFly> ais523: I mean, it kind of makes sense as a name, since you have two threads of execution, and it joins them into one, by waiting for one of them to terminate?
21:31:55 <int-e> @src [] (>>=)
21:31:56 <lambdabot> xs >>= f = concatMap f xs
21:31:56 <shachaf> Yes, that's the standard definition.
21:32:01 <int-e> @src Maybe (>>=)
21:32:02 <lambdabot> (Just x) >>= k = k x
21:32:02 <lambdabot> Nothing >>= _ = Nothing
21:32:08 <FireFly> well "joins" in the sense of a drawn graph
21:32:17 <ais523> yes, it's the opposite of "fork"
21:32:45 <int-e> so join xs = xs >>= id = concatMap id xs = concat (map id xs) = concat xs
21:33:00 <int-e> for lists.
21:33:53 <ais523> hmm, I assume Haskell doesn't have a Lazy monad because it's lazy anyway?
21:34:03 <ais523> laziness is a monad too, though
21:34:31 <ais523> actually I guess it's just the identity monad in Haskell
21:34:36 <shachaf> Agda has a partiality monad.
21:34:48 <shachaf> I guess that's pretty different.
21:51:56 -!- AnotherTest has quit (Ping timeout: 272 seconds).
21:53:15 <zzo38> I think someone mention that a new feature in GHC can be made to treat both >>= and join as primitive and whichever one you do not define will be defined automatically by other one.
22:04:22 -!- tromp has quit (Remote host closed the connection).
22:14:30 -!- erkin has quit (Remote host closed the connection).
22:33:16 -!- tromp has joined.
22:37:44 -!- tromp has quit (Ping timeout: 256 seconds).
22:57:18 -!- w3stside15 has joined.
22:58:48 -!- w3stside15 has quit (Remote host closed the connection).
23:18:23 -!- tromp has joined.
23:22:41 -!- tromp has quit (Ping timeout: 248 seconds).
23:54:17 -!- gareth__24 has joined.
23:54:46 -!- gareth__24 has quit (Remote host closed the connection).
←2018-08-10 2018-08-11 2018-08-12→ ↑2018 ↑all