[02:01:57] slack is down [02:02:00] hi all [02:02:11] hi! [02:02:40] *** Joins: venicecat (b0475f00@gateway/web/freenode/ip.176.71.95.0) [02:02:48] s/down/awful [02:03:00] hi everyone [02:03:04] feels so cosy :3 [02:03:27] \o/ [02:03:32] yeah there's three whole people around ;D [02:03:35] mysig [02:04:08] *** Joins: wabisabiyo (b0475f00@gateway/web/freenode/ip.176.71.95.0) [02:04:15] hello! [02:04:23] hello! [02:06:59] hello! [02:07:54] vin-ivar: kristian is suggesting his flat in estonia [02:08:30] ooh [02:08:34] estonia sounds gr8 :D [02:08:38] ^_^ [02:08:42] gr9, even [02:10:40] how about a barn in rural Latvia [02:10:57] they have chickens, which are Kyckling in Swedish [02:11:00] that would probably work too for kristian [02:12:30] *** Quits: wabisabiyo (b0475f00@gateway/web/freenode/ip.176.71.95.0) (Quit: Page closed) [02:34:56] *** Quits: koom_ (~koo5@109.107.211.244) (Ping timeout: 260 seconds) [02:51:04] *** Quits: venicecat (b0475f00@gateway/web/freenode/ip.176.71.95.0) (Ping timeout: 260 seconds) [05:31:46] *** Quits: proteusguy (~proteus-g@2405:9800:bc10:1ca:406c:6d42:a278:38df) (Remote host closed the connection) [07:00:32] *** Joins: proteusguy (~proteus-g@180.183.98.27) [09:29:02] *** Joins: koom (~koo5@79.98.72.195) [09:59:27] *** Quits: proteusguy (~proteus-g@180.183.98.27) (Ping timeout: 240 seconds) [10:39:10] *** Joins: proteusguy (~proteus-g@180.183.14.107) [10:43:08] *** Quits: proteusguy (~proteus-g@180.183.14.107) (Excess Flood) [10:44:08] *** Joins: proteusguy (~proteus-g@180.183.14.107) [13:56:37] *** Quits: proteusguy (~proteus-g@180.183.14.107) (Remote host closed the connection) [14:15:13] *** Joins: proteusguy (~proteus-g@cm-27-145-90-73.revip12.asianet.co.th) [14:21:06] *** Quits: proteusguy (~proteus-g@cm-27-145-90-73.revip12.asianet.co.th) (Max SendQ exceeded) [14:22:02] *** Joins: proteusguy (~proteus-g@cm-27-145-90-73.revip12.asianet.co.th) [15:00:06] *** Joins: e3928a3bc (~user@2804:14d:5cd8:8447::4) [15:44:02] *** Joins: venicecat (c024e1f8@gateway/web/freenode/ip.192.36.225.248) [15:57:23] *** Quits: proteusguy (~proteus-g@cm-27-145-90-73.revip12.asianet.co.th) (Remote host closed the connection) [16:02:46] hey people [16:03:02] I have a doubt concerning an exercise from the book (again!) [16:03:35] it's exercise 5 from chapter 3 [16:04:03] concrete E5conc of E5 = { [16:04:03] lincat [16:04:03] S = {a,b,c : Str} ; [16:04:03] FS = Str ; [16:04:06] lin [16:04:09] Empty = {a,b,c = []} ; [16:04:12] Iter s = {a = "a" ++ s.a; b = "b" ++ s.b ; c = "c" ++ s.c} ; [16:04:16] Print s = s.a ++ s.b ++ s.c ; [16:04:18] } [16:04:30] this is my concrete grammar, but the results are off, and I can't find out why [16:05:08] it outputs strings such as "a a a a" instead of "a a b b c c" [16:15:41] *** Joins: proteusguy (~proteus-g@2405:9800:bc10:1ca:e544:2d8d:f77e:e2ef) [16:15:59] what are you trying to linearise? [16:16:39] *** Quits: venicecat (c024e1f8@gateway/web/freenode/ip.192.36.225.248) (Ping timeout: 260 seconds) [16:56:19] vin-ivar: it's the language aⁿbⁿcⁿ [16:58:13] no i mean [16:58:17] what are you typing in :D [17:00:10] ah right [17:19:22] I'm typing "> gr | l" at the prompt [17:21:03] it will parse "a a" no problem, but not "a a b b c c" [17:21:17] and I have no idea why.. [17:24:20] e3928a3bc: what is your startcat? gf uses by default S i think. so you can try 'p -cat=FS "a b c"' [17:25:39] ^ [17:26:04] *** Quits: vin-ivar (~vin-ivar@unaffiliated/vin-ivar) (Quit: WeeChat 1.0.1) [17:26:28] *** Joins: vin-ivar (~vin-ivar@unaffiliated/vin-ivar) [17:28:04] it is FS! my abstract grammar: abstract E5 = { [17:28:05] flags [17:28:05] lexer=concat ; unlexer = concat ; startcat = FS ; [17:28:05] cat [17:28:08] S ; FS ; [17:28:11] fun [17:28:14] Print : S -> FS ; [17:28:17] Iter : S -> S ; [17:28:21] Empty : S ; [17:28:24] } [17:28:27] [17:28:29] yeah so that is the problem, just try 'p -cat=FS "a b c"' [17:28:31] (I don't know how to setup the flags correctly, but that doesn't seem to be the problem, I hope) [17:28:53] I think the lexer and unlexer flags are deprecated? [17:29:24] hum, ok. it parses correctly using 'p -cat=FS "a b c"'! [17:29:29] but why? [17:29:30] but anyway, the point is that if you try to parse your string in the S category, and it doesn't have a field called s, weird stuff happens [17:29:42] so there are two weird things that are probably not well-documented [17:29:52] 1) S is by default a startcat [17:29:56] unless you specify another [17:29:57] shouldn't the 'startcat=FS' take care of this? [17:29:59] yes [17:30:06] ah right [17:30:26] is 'S' overriding my setup? [17:31:19] 2) if you have a lincat with multiple fields, and the string that you try to parse is spread over different fields, it won't work [17:31:56] sorry I haven't slept properly and my brain isn't working now; did you have already fhe 'flags startcat=FS' when you first reported the problem? [17:32:17] if you specified the startcat, then S shouldn't override anything [17:36:45] not a problem! yes, I did have the 'flags startcat=FS' beforehand! [17:37:48] okay [17:37:50] this works for me: [17:37:52] concrete E5conc of E5 = { [17:37:52] lincat [17:37:52] S = {a,b,c : Str} ; [17:37:52] FS = { s : Str } ; [17:37:52] lin [17:37:53] Empty = {a,b,c = []} ; [17:37:53] Iter s = {a = "a" ++ s.a; b = "b" ++ s.b ; c = "c" ++ s.c} ; [17:37:54] Print s = { s = s.a ++ s.b ++ s.c } ; [17:38:06] so exactly like before, but FS is linearised as a {s : Str} instead of Str [17:39:52] *** Joins: e3928a3bc2 (~yaaic@2804:14d:5cd8:8447:89d8:e1e2:f7c0:518b) [17:40:38] did you see my latest comment? if you change lincat FS = { s : Str } ;, and Print s = { s = s.a ++ s.b ++ s.c } ; it works for me [17:41:20] yes! I was setting up IRC on mobile so that I can still chat [17:41:42] I'll try it, but hum... do you know why it wouldn't work before? [17:41:47] no idea [17:41:56] just a general "there's something special in the field called s" thing [17:42:24] ok! maybe one day I'll get to read the source, but I must learn how to use gf first :) [17:43:06] I tried to use '+' before, so that I wouldn't have spaces between the characters, but I can't use it with runtime variables [17:43:14] yeah exactly, all tokens must be known at runtime [17:43:22] so you can use + in functions that create tokens [17:43:27] s/functions/opers/ [17:43:39] my next attempt was trying to use the concat lexer to remove the spaces, but as you've said, they are now deprecated? [17:43:58] that is, I should use them from the terminal, and not include the in the grammar? [17:43:59] so e.g. when constructing an inflection table with a helper oper, and then at runtime there is the full inflection table within the noun/verb/whatever [17:44:14] ah, for glueing things without spaces at runtime, we have a new shiny thing [17:44:19] the BIND token [17:44:36] if you're interested in details, http://www.aclweb.org/anthology/W15-3305 [17:44:48] if you just want to use it, there's a token called BIND in Prelude [17:45:38] and even functions called glue, glueOpt, noglueOpt https://github.com/GrammaticalFramework/GF/blob/master/lib/src/prelude/Prelude.gf#L102-L105 [17:45:56] so you can say e.g. [17:46:25] Iter s = {a = glue "a" s.a; b = glue "b" s.b ; c = glue "c" s.c} ; [17:47:13] and then you have to open Prelude, so just begin your concrete syntax with the following: [17:47:16] [17:47:17] concrete E5conc of E5 = open Prelude in { [17:51:28] I'm moving to the mobile, will answer soon. thanks a lot, inariksit ! [17:51:35] *** Quits: e3928a3bc (~user@2804:14d:5cd8:8447::4) (Quit: ERC (IRC client for Emacs 25.2.1)) [17:53:47] so the BIND token: this is what happens with the version where Iter uses glue [17:53:47] E5> l Print (Iter Empty) [17:53:48] a &+ b &+ c &+ [17:54:09] but just give it the argument -bind, and this happens: [17:54:11] [17:54:11] E5> l -bind Print (Iter Empty) [17:54:12] abc [17:54:14] [17:54:36] for parsing in the standard GF shell, you need to input the &+ characters too, which is kinda clumsy [17:55:09] we have at the moment 2 runtimes, one in Haskell and one in C, and the C one supports also parsing just "abc" and not "a &+ b &+ c" [17:55:30] but the one used in the GF shell is the older Haskell runtime, which doesn't support just parsing "abc" [17:56:29] if you use a compiled GF grammar from another program, and you use the BIND token, then it makes sense to use the C runtime. we have bindings to several programming languages, and the API is almost identical to the old Haskell runtime [17:57:14] but to take a few steps back, when you're just developing stuff and using the GF shell for quick testing, I'd say it's handier to use spaces [17:57:48] *** Quits: e3928a3bc2 (~yaaic@2804:14d:5cd8:8447:89d8:e1e2:f7c0:518b) (Ping timeout: 240 seconds) [17:57:56] so you can define your own function, "myGlue" and at testing phase define it as ++, and when your grammar is finished and ready to be used from another program, then change the definition to glue [17:58:25] (daherb, what did you say about procrastinating by helping people on #gf? :-D) [18:01:01] *** Joins: e3928a3bc (~yaaic@2804:18:4805:837:b4d8:dc3a:f327:ad8e) [18:03:02] e3928a3bc: the latest lines are here, in case you didn't see them https://pastebin.com/VApMmJ07 [18:03:15] thanks for the pointers! I'll take a look at these functions and the article! [18:04:03] thank you for the pastebin, I'm on the metro now, so connection is terrible [18:06:33] ^^ [18:08:06] vin-ivar, esg, daherb, how about this for the retreat? :-D https://www.airbnb.com/rooms/19621967?location=Rapla%2C%20Estonia&children=0&infants=0&adults=3&guests=3&check_in=2018-08-18&check_out=2018-08-31&s=99tcu4vS [18:12:59] as for what you said about the two runtimes, inariksit, is the Haskell one being deprecated? [18:13:40] the active development happens on the C runtime nowadays [18:13:55] I don't know if anyone adds anything new to the haskell one [18:14:07] or fixes bugs [18:14:51] ok! I'm still far from writing an app or anything, but wanted to have a better view of the environment\n [18:15:07] but it's not like it will disappear, and aside from the orthography stuff (spaces, capitalisation, ...), the two are pretty much the same [18:15:21] Haskell one is also better documented [18:16:07] but anyway I'll use the C runtime for any new project I start, because it feels clearly to have more future [18:16:11] and it has already more features [18:16:27] but like, if you had an old app using the haskell, there's no urgency to change it to C [18:20:23] ok! so for now, no big changes... [18:20:58] yeah :) [18:40:34] *** Quits: e3928a3bc (~yaaic@2804:18:4805:837:b4d8:dc3a:f327:ad8e) (Ping timeout: 255 seconds) [18:56:28] *** Joins: e3928a3bc (~yaaic@2804:18:4804:e85a:ed1c:2571:9217:721e) [22:23:19] *** Quits: e3928a3bc (~yaaic@2804:18:4804:e85a:ed1c:2571:9217:721e) (Ping timeout: 255 seconds) [22:49:27] *** Quits: proteus-guy (~proteusgu@180.183.14.107) (Ping timeout: 260 seconds) [22:55:15] *** Joins: proteus-guy (~proteusgu@180.183.40.34)