[00:25:53] * ColonelJ [ColonelJ!~ColonelJ@unaffiliated/colonelj] has quit (Quit: leaving). [07:58:39] * ephe_meral1 [ephe_meral1!~amnesia@ip5f5bf7d1.dynamic.kabel-deutschland.de] has joined the channel. [08:47:17] * itmuckel [itmuckel!~itmuckel@i577BC8B7.versanet.de] has joined the channel. [08:49:09] Yes, that's exactly what I stumbled upon one minute before turning off my pc yesterday: dynamic variables. [08:49:38] Was looking the whole time for stack parameters. Thank's a lot! [08:50:20] BTW any reason why you're talking of yourself in plural? :-D [08:51:25] dynamic variables are hard to track when you go crazy with them, but I remember doing funny stuff in common lisp with them. :) [09:59:24] <^alex> we talk about ourselves in the plural because we are plural [10:04:50] (°_°) [10:16:38] * Sgeo [Sgeo!~Sgeo@ool-18b982ad.dyn.optonline.net] has quit (Read error: Connection reset by peer). [10:47:32] * neceve_ [neceve_!~quassel@unaffiliated/neceve] has joined the channel. [10:57:34] Okay, that was really tough to find out. When you create a furnace action with "" then the post method by default handles form validation, which isn't acceptable for writing a REST server [11:03:33] I've overridden "action call-responder*" to handle post-requests the same as get-requests, except for dispatching post requests to a handler that analyzes the post-data [11:05:03] I think it would be quite easy to write a "http.rest.server" or something where you can implement endpoints methods and actions a bit easier than abusing furnace's actions :-D [11:05:49] @bmps Did you roll your own server code or did you abuse furnace too when you attempted to write an lsp? [11:44:00] * proteusguy [proteusguy!~proteusgu@cm-58-10-208-180.revip7.asianet.co.th] has quit (Ping timeout: 256 seconds). [11:45:57] * ColonelJ [ColonelJ!~ColonelJ@unaffiliated/colonelj] has joined the channel. [11:47:22] * nonlinear [nonlinear!~discrttm@unaffiliated/discrttm] has quit (Ping timeout: 260 seconds). [11:55:16] I was not; just directly using http.server [11:55:48] But it’s not “abusing” Furnace [12:18:48] itmuckel: this is an example of an action that gets JSON from a POST, extracts a value and returns it in the response [12:18:52] itmuckel: [ 200 >>code "application/json" >>content-type request get post-data>> data>> json> "name" swap at >>body ] >>submit [12:19:17] itmuckel: tested with "curl -d '{"name":"foo"}' -H "Content-Type: application/js application/json" -X POST http://127.0.0.1:9999/test" [12:19:29] Where "test" was the path to the action [12:19:38] That quotation was the "submit" slot of the action [12:26:25] itmuckel: see here for a paste https://paste.factorcode.org/paste?id=4144 [12:36:13] @doublec awesome! thank you! [12:36:46] looks much cleaner than what I taped together :-D [12:38:15] * ephe_meral1 [ephe_meral1!~amnesia@ip5f5bf7d1.dynamic.kabel-deutschland.de] has quit (Read error: Connection reset by peer). [12:43:41] * itmuckel [itmuckel!~itmuckel@i577BC8B7.versanet.de] has quit (Ping timeout: 265 seconds). [12:56:29] * ephe_meral1 [ephe_meral1!~amnesia@ip5f5bf7d1.dynamic.kabel-deutschland.de] has joined the channel. [12:57:41] * proteusguy [proteusguy!~proteusgu@cm-58-10-208-180.revip7.asianet.co.th] has joined the channel. [13:08:23] Good to see you again, doublec ! Long time. [13:43:45] * itmuckel [itmuckel!~itmuckel@i577BC8B7.versanet.de] has joined the channel. [13:44:58] * itmuckel [itmuckel!~itmuckel@i577BC8B7.versanet.de] has quit (Client Quit). [13:51:25] * itmuckel [itmuckel!~itmuckel@i577BC8B7.versanet.de] has joined the channel. [14:13:26] Okay, if I've read the documentation on "furnace action configuration" *really* carefully, I would have found out that I need to override the submit-slot of the action tuple to return something from a POST request. [14:20:21] Sounds right. I can help in a bit, but currently doing work for pay. [14:26:40] * nonlinear [nonlinear!~discrttm@unaffiliated/discrttm] has joined the channel. [14:35:42] Well, that's what doublec did and in the end it's also what I had taped together (just with a loooot more boilerplate) [14:37:47] If validate was POST-validation and submit was POST-response I had known immediately that that's what I'm looking for. The naming suggested that it had to do with form validation only. [14:38:10] Thanks for your help! I'll just scream for help here, if I'm stuck again. [14:41:33] Sounds good. Feel free to throw my nick in there; it'll alert and I can usually jump in here relatively quickly. [14:49:16] :thumbs_up: [15:26:47] * itmuckel [itmuckel!~itmuckel@i577BC8B7.versanet.de] has quit (Ping timeout: 258 seconds). [15:32:09] * xelxebar [xelxebar!~xelxebar@gateway/tor-sasl/xelxebar] has quit (*.net *.split). [15:32:09] * cantstanya [cantstanya!~chatting@gateway/tor-sasl/cantstanya] has quit (*.net *.split). [15:32:26] * xelxebar [xelxebar!~xelxebar@gateway/tor-sasl/xelxebar] has joined the channel. [15:32:26] * cantstanya [cantstanya!~chatting@gateway/tor-sasl/cantstanya] has joined the channel. [15:33:29] * xelxebar [xelxebar!~xelxebar@gateway/tor-sasl/xelxebar] has quit (Max SendQ exceeded). [15:33:54] * xelxebar [xelxebar!~xelxebar@gateway/tor-sasl/xelxebar] has joined the channel. [17:37:25] * Sgeo [Sgeo!~Sgeo@ool-18b982ad.dyn.optonline.net] has joined the channel. [17:37:28] * itmuckel [itmuckel!~itmuckel@i577BC8B7.versanet.de] has joined the channel. [17:52:11] * bitmapper [bitmapper!~bitmapper@142.162.167.202] has joined the channel. [17:56:52] doublec: i'm still not sure how on earth i'd represent lexical variables in a port of shen to factor [18:31:55] How do I split code in factor? Like I have a second factor file next to my main file (which is called like the containing folder). How do I use stuff from the second file in my main file? [18:33:50] The files don't matter as such, but the namespacing does. [18:33:56] So you'd `USE:` the relevant namespaces. [18:34:06] You might look at some of the stuff in `extra/` or the like as examples. [18:34:42] And note that your files have to all be in a Factor root. You can define your own or just use `work/` in the Factor instance itself. Look up the docs on namespaces and feel free to ask questions. [18:49:44] Now I got it. It seems like it had to be in its own subfolder [18:51:17] I now have "factor-lsp.factor" and next to that a folder "types" and inside that folder "types.factor" which defines "IN: factor-lsp.types". That worked. A bit unflexible if you have to create a folder for every submodule, but I can live with that. [18:58:01] You don't. [18:58:12] It just cares about the `IN:` line. [18:58:18] You can look at the existing code for an example. [18:58:39] (I know that erg wanted to go the direction you're implying, and I've been effectively out of this ecosystem for awhile, so it's *possible* that actually landed and I missed it, but I don't *think* so) [19:18:37] Ah, I got it, I made two changes at a time. The submodule needs to be prefixed with "factor-lsp" otherwise it can't be found. [19:19:20] The example I found prefixes the submodule too, but also has it in a subfolder. The subfolder isn't necessary. I now have the file right next to my main file. [20:11:38] itmuckel: Lemme know how and to what extent I can help. I didn't get far and it's likely been long enough that what I did isn't helpful, but I'm very excited you're spending time on this. [20:12:40] Keep in mind, I'm a bloody beginner (with Factor) and this is the first thing I build, but it's definitely an exciting one. [20:12:49] Oh, I know. [20:13:03] But I also know that I always feel like a beginner with Factor even though I've been working on it on and off since something like 2004, so... [20:13:38] It shouldn't be too hard to implement the actual features, because factor has some strong reflection capabilities [20:13:50] Really? That doesn't speak for the language :-D [20:14:24] I didn't really program C# the last years, but now that I'm back at it for work, it feels like I never stopped programming C#. [20:15:33] Then again C# has excessive tooling and once you know Java, you know C#, C++, Python etc. They're all different in details. (In my opinion) [20:16:45] I think what's unbeatable in terms of development speed is "dotting into" stuff. I don't know what that object does, but I dot into it, autocomplete kicks in and the quickdocs tell me what each method does and I chain methods together easily. [20:17:29] I don't know if you can get to that level of tooling in point-free languages like Factor, Lisp, Haskell [20:23:39] <^alex> the factor listener and the emacs integration have the ability to show you the stack effect of the word at point [20:24:04] <^alex> unsure about LSP but `fuel-mode` works great [20:28:48] Yes, but the idea behind the lsp is that you implement it once and then it works with every editor that has an lsp plugin. [20:29:30] https://microsoft.github.io/language-server-protocol/ [20:30:40] https://github.com/emacs-lsp/lsp-mode and there is even an actively developed mode for emacs :-) [20:32:30] So for example the language devs develop one lsp instead of n plugins for n editors. Really good idea. Although I find there is no real substitute for the language integration that JetBrains IDEs offer. But that's a different story. [20:38:05] They can complement one another. The jetBrains team adamantly refuses to do an LSP for Kotlin because it'd pale in comparison to their IDE, which is at once correct and comically hilariously wrong, depending on how you think about it, but I get it. [20:38:14] Raw LSP can't match fuel. [20:38:31] But telling Factor devs to use Emacs is a major problem. And I say that as someone who is *incredibly* comfy in Emacs. [20:46:58] fuel-mode looks really good, but there's no way back to emacs for me. :) [21:17:55] * ephe_meral1 [ephe_meral1!~amnesia@ip5f5bf7d1.dynamic.kabel-deutschland.de] has quit (Ping timeout: 258 seconds). [21:20:31] https://paste.factorcode.org/paste?id=4145 <-- Is this the most idiomatic way to convert a hashtable to a tuple? [21:22:14] ooops, it doesn't even work :) [21:30:32] I just wrote it with locals. Looks much better, reads much clearer. [22:21:39] * itmuckel [itmuckel!~itmuckel@i577BC8B7.versanet.de] has quit. [23:34:32] * neceve_ [neceve_!~quassel@unaffiliated/neceve] has quit (Ping timeout: 256 seconds). [23:58:12] <^alex> itmuckel, a more idiomatic way to do this would be with `tri` [23:59:58] <^alex> at least, in this case