[00:19:16] * ColonelJ [ColonelJ!~ColonelJ@unaffiliated/colonelj] has quit (Quit: leaving). [01:45:21] * MrMobius [MrMobius!~MrMobius@208.58.206.154] has joined the channel. [02:04:57] * MDead [MDead!~MDude@74.5.140.76] has joined the channel. [02:07:25] * MDude [MDude!~MDude@74.5.140.76] has quit (Ping timeout: 264 seconds). [02:07:33] * MDead is now known as MDude [02:07:39] * MDude [MDude!~MDude@74.5.140.76] has quit (Client Quit). [03:23:10] * craigo [craigo!~craigo@144.136.206.168] has quit (Ping timeout: 246 seconds). [03:26:44] * diginet_ [diginet_!~diginet@107.170.146.29] has joined the channel. [03:27:29] * diginet [diginet!~diginet@107.170.146.29] has quit (Read error: Connection reset by peer). [03:27:36] * diginet_ is now known as diginet [03:27:38] * root____ [root____!~root@104.248.121.4] has quit (Ping timeout: 260 seconds). [03:27:56] * root____ [root____!~root@104.248.121.4] has joined the channel. [05:03:09] * [1]MrMobius [[1]MrMobius!~MrMobius@208.58.206.154] has joined the channel. [05:03:14] * MrMobius [MrMobius!~MrMobius@208.58.206.154] has quit (Ping timeout: 240 seconds). [05:03:27] * [1]MrMobius is now known as MrMobius [07:11:11] * ephe_meral [ephe_meral!~amnesia@ip5f5bf7d1.dynamic.kabel-deutschland.de] has joined the channel. [08:25:34] * ephe_meral [ephe_meral!~amnesia@ip5f5bf7d1.dynamic.kabel-deutschland.de] has quit (Ping timeout: 256 seconds). [08:49:01] * ephe_meral [ephe_meral!~amnesia@ip5f5bf7d1.dynamic.kabel-deutschland.de] has joined the channel. [10:20:44] * MDude [MDude!~MDude@74.5.140.76] has joined the channel. [11:32:18] * traxex [traxex!traxex@unaffiliated/traxex2] has joined the channel. [12:21:18] * craigo [craigo!~craigo@144.136.206.168] has joined the channel. [13:05:14] * ColonelJ [ColonelJ!~ColonelJ@unaffiliated/colonelj] has joined the channel. [15:28:39] * bitmapper [bitmapper!~bitmapper@142.162.167.202] has joined the channel. [15:50:28] * itmuckel [itmuckel!~itmuckel@i577BC8D3.versanet.de] has joined the channel. [18:25:31] When I do `"abc" first` I get `97`. How can I convert that back to a string? :( [18:25:50] Like how to get "a" from that [18:27:35] <^alex> question, why are you iterating over strings [18:30:22] <^alex> the answer to that requires knowing what character encoding you're coming from [18:34:24] 1string [18:34:47] CHAR: a 1string is "a" 97 1string is "a" [18:35:06] it's infuraiting when you can't find the word you need :p [18:35:38] that's what foogle is supposed to fix, if we ever get it running [18:36:53] perfect, 1string is what I was looking for [18:37:20] ^alex: I know they're all ascii, so it's fine [18:38:09] In hindsight I don't even need it, but good to know anyway [18:44:38] Is there a big disadvantage in using locals? [18:45:02] the disadvantage is single-stepping through their expansion [18:45:19] they translate back to stack code so they're not slower [18:45:32] if the tooling were fixed they'd be awesome [18:46:55] Ah, okay, you mean they're hard to debug, but otherwise okay? [18:48:10] I read a bit about forth and thought about it. I think without locals you can refactor practically everything via copy-paste. With locals you have to think about what variables are in the scope, what to take into the new function etc. [18:49:56] i like var in javascript because it is function-scoped. i dont actually like nesting scopes in the same function because then you get shadowing. i know this is not how lexical scope works traditionally [18:50:15] (factor has lexical scope with nesting and shadowing) [18:50:47] var lets you assign a variable in two branches of an ``if`` without pre-declaring your variable [18:53:14] itmuckel: yes, it breaks copy/paste refactoring [18:58:49] i guess if you use var it wouldn't break copy/paste refactoring? you might have an unbound variable though [19:01:15] yeah, you have to pay attention ;) [19:01:57] I'm doing a bit of advent of code to practice factor and I've got to say, it's really hard to program in and the resulting code is rather cryptic to read so far [19:02:04] i wanted to change the syntax for locals so they're not in the same namespace as words [19:02:56] <^alex> we only use locals when they improve the code [19:03:42] <^alex> which, in all of the factor we've written, is "rarely, but we're glad to have them as a tool in the box" [19:03:52] https://paste.factorcode.org/paste?id=4155 here's what I came up with [19:04:33] the second word reads rather cryptic, because set-at expects the parameters in a different order than they are on the stack [19:04:37] check out inc-at [19:04:41] :-O [19:09:56] Also learned a lot by deciphering inc-at's implementation. Now I know what 2dip can be used for [19:11:39] What's your experience with ergonomics in factor? Is it hard to remember all the words there are for a specific situation? For example how would I have found "inc-at" in my situation? In C# I could have dotted into a Dictionary and get a list of all the methods working with it. Is there a similar way to find words in factor? [19:11:52] * erg onomics [19:11:58] :) [19:13:19] ``"assocs" about`` and then skim the words list. that's what foogle is supposed to be for, i don't know the status [19:14:03] also just memory. i forget how to use ``sets`` because they have dumb names like ``adjoin`` and ``delete`` [19:14:22] sometimes you end up rewriting combinators like you did [19:17:29] :-/ [19:17:46] <^alex> hmm [19:18:05] <^alex> yeah, we keep forgetting the set constructor is `members` [19:18:17] exactly [19:18:56] <^alex> this is giving us a bit to think about, cool :) [19:20:15] <^alex> itmuckel, imo the key to understanding factor is really learning how data flows across the stack [19:20:48] <^alex> like, how the fundamental combinators work, the difference between the various `bi`s [19:21:39] <^alex> overuse of locals tends to obscure what we see as the fundamental stackness of the thing [19:23:15] <^alex> the other part of the key is how `curry` et al, and `fry` (quotations that start with `'[` instead of `[`) are the same thing [19:23:25] <^alex> just our onion [19:24:04] <^alex> of course, we're not immune from rewriting combinators, we've know we've done it several times in the past [19:33:44] How can I split a string into its characters? [19:34:01] It already is, depending on what you mean; things like `map` should just work. [19:34:01] Right now I'm using string>byte-array-fast, but it is private [19:34:26] oooops [19:34:34] I mean, `>vector` would give you a vector of the code points, if that's what you mean. [19:34:38] yes it does, string>byte-array-fast was unnecessary :D [19:34:53] No, a bare string works just fine [19:35:09] string>byte-array-fast [19:35:12] erg: We could always rename those combinators. [19:35:28] : get-letter-frequency ( string -- hashtable ) [19:35:28] H{ } [ over inc-at ] reduce ; [19:35:32] Those are the normal names, but e.g. Python has both `.disjoint` and, you know, `-` [19:35:37] We could do something similar. [19:36:22] itmuckel: Allow me to introduce you to `histogram` [19:36:23] bmp: i'm not against it, just maybe not worth it [19:36:58] <^alex> if only you knew someone who was willing to doggedly pursue improved language despite the effort [19:37:00] <^alex> :) [19:37:16] I'll mull on what better names would actually be. [19:37:39] I occasionally think certain vocabs should be `QUALIFIED:` only; I think some of the odd names in things like `assoc` or `sets` happen to avoid collisions. [19:37:43] there's finite effort :) [19:37:43] bmp: https://i.kym-cdn.com/entries/icons/original/000/030/359/cover4.jpg [19:37:49] E.g., `at` v. `of` is just...not ideal... [19:38:24] <^alex> `at` and `of` are kinda muscle-memory for us atm :/ [19:38:27] itmuckel: I can't tell if you're happy to discover the `statistics` package or annoyed the word already existed. :) [19:38:55] <^alex> also a thing we absolutely adore about factor, ngl, is the breadth of the standard library [19:39:00] Oh yeah. [19:39:11] <^alex> haven't found a finer stdlib yet [19:39:13] I mean for me as a beginner it is valuable training to write that stuff, but it's also a bit of a bummer :D [19:39:15] <^alex> and we have looked [19:39:22] <^alex> itmuckel, yep :D [19:39:35] itmuckel: To your question about ergonomics: I have found that Factor, unlike modern languages that are (very literally! not saying this to be mean!) built around robust autocomplete, requires you to read the documentation. [19:40:05] In exchange, however, the massive library, which is also what ^alex is talking about, means that there is often a word that either does what you need, or is trivially composable to what you want. [19:40:43] I find that, once I'm familiar enough with the part of the stdlib I need (I'm not 100% sure what you're doing, but the questions you're asking vaguely make me wonder if you're doing cryptopals), the way I write code in Factor is different from most other languages. [19:41:03] In most other languages, I think in terms of data structures, or even in terms of types, and then work backwards to what actual methods/functions/whatever I need. [19:41:16] In Factor, I usually think about what flow I want, and then think about what words and tuples will enable me to have that flow. [19:41:30] Going that direction, rather than the inverse, also *heavily* decreases how much stack manipulation I have to do. [19:42:30] I don't view you writing words that already exist as bad, either, itmuckel , in part because the stdlib tends to be written in an at-once optimized and generic style that's harder to chew through. Writing your own `histogram` is genuinely valuable. [19:42:40] <^alex> agreed [19:42:54] <^alex> it's like exercise [19:43:02] Same happens in other languages, too, BTW; if I had a nickel for every time I've seen a Python programmer reinvent `Counter` or `defaultdict`, I'd...I mean...well, I'd have a lot of chewing gum I could buy, at least. [19:43:03] hehe, I'm just doing advent-of-code, small coding puzzles that are fun. perfect for learning a lang [19:43:31] And I likewise am routinely reminding Kotlin coders about why and how to use `data class`, `enum`, and operator overloads properly. [19:43:36] Or the Kotlin streams v. the Java streams. [19:43:43] I think it just feels worse in Factor precisely *because* of how rich the stdlib is. [19:43:58] And because, like in Smalltalk or a lot of lisps, the line between your code and "the system" is extraordinarily blurry. [19:44:28] interesting! [19:45:52] <^alex> that's another thing we like about factor [19:46:01] <^alex> we can reach into the internal [19:46:09] <^alex> workings of the thing [19:46:21] <^alex> and it's just the same stuff that the rest of it is made of [19:46:25] What I like about factor (in comparison to lisps) is the stdlib. In lisp I feel like people reinvent stuff all the time for no reason. Just to have a bit different syntax. They write a new lisp because the other lisp isn't perfect. In factor it feels like all coding effort of the community goes into the stdlib instead of external libraries. [19:46:34] <^alex> our favorite line of smalltalk is `true become: false` [19:46:40] I do wish that our VM was written in pretty much literally anything except C++. I know I have (and I think erg also has?) tried to at least modernize it to C++14, but that's a lot of excitement. [19:46:57] <^alex> YO SAME I do wish that our VM was written in pretty much literally anything except C++. [19:47:02] <^alex> but that's a bigger project [19:47:16] When Zig is stable, I will take a look, but it's way the fuck down on the priority list. [19:47:26] bmp: Really? It didn't look like a lot of code [19:47:32] I weirdly understand the VM better than the compiler. [19:47:32] <^alex> (reflexively) `move zig` [19:47:38] ^alex: It's named after that. [19:47:40] <^alex> GOOD [19:47:42] <^alex> PERFECT [19:47:45] <^alex> 100% [19:48:18] itmuckel: It's not much code, if we're talking about the VM. My issue is that C++ has lot of very exciting things that can happen that are amazingly nonobvious, and our VM (like every VM) relies in part of undefined behavior to operate. [19:48:25] <^alex> que viva la `all your base` [19:48:45] The modernization issues happen because you're navigating around those undefined behaviors while trying to look at things like move semantics. [19:50:29] I mean, itmuckel have you ever written modern C++? [19:50:46] no [19:50:54] https://www.bitquabit.com/post/c++-programming-and-brain-ram/ is tooting my own horn but I don't care; that's discussing the move semantics introduced in C++11/14. [19:51:14] I did a bit of rust [19:51:15] we are on -std=c++11 [19:51:24] "`std::move` doesn’t move anything, for example […]. Move operations aren’t always cheaper than copying; when they are, they’re not always as cheap as you’d expect; and they’re not always called in a context where moving is valid." [19:51:36] :-D [19:51:36] erg: We are not using unique_ptr last I checked, but I haven't been in there for...honestly probably a year or two if I'm honest. [19:51:50] We are likewise not using things like the modern arrays that were introduced, etc. [19:52:16] no unique_ptr usage still. hardly anything changes in the vm lately [19:52:50] Since we compile to asm *in Factor* I don't know that there's a lot of interest or anything in going at it; it'd be purely for my own curiosity/scratching an itch. I'll do html5 parsing first, I promise. :) [19:52:58] And honestly all the HTML/HTTP htings. [19:53:04] s/htings/things [19:55:16] Heh, yeah, okay, so: we've got 49 volatile pointers, our own atomics implementation, heavy use of `std::vector` with copies that could be moves, places where we could bring in `span`, etc. I don't think any of this honestly matters much, but is all I was mentioning earlier. [19:56:25] We also employ unions with technically undefined behavior on PPC, but I don't think our PPC implementation works. If I get fully funemployed I'll buy a TALOS and get us running on ppc64le [19:56:55] <^alex> oh don't do that, it'll make us feel the need to get it running on mac os 9 [19:56:58] <^alex> ;) [19:57:14] I use C, because it's easier to preprocess e.g. https://www.hwaci.com/sw/mkhdr https://github.com/HackerFoo/poprc/blob/master/startle/gen.mk#L8-L18 [19:57:34] There is less to break. [19:57:44] vs. C++ [19:58:48] I, personally, have historically used FPC for that domain, but it's been awhile. And as again noted, Factor's compiler is written in Factor, and compiles to asm, so our VM is quite light. [19:59:10] erg: This is neither here nor there, but at some point, with infinite time, I'd love to get WinRM bindings for Factor. [19:59:13] Then you could write native Factor apps. [19:59:23] Like, trivially, with full access to UWP. [19:59:57] I've looked at it before, since we kinda sorta but not really could build off our COM implementation, but the vastly richer IL and data structures quickly goes into NOPE land for my attention span and needs at the moment. [20:00:04] bmp: cool, haven't looked at it [20:00:31] All new Windows libraries are basically .NET assemblies, except with native code. They finally achieved the Chicago object model. [20:00:39] That's the two-second highly inaccurate sales pitch. [20:01:01] So Factor would instantly gain access to whatever, with no need to do manual header bullshit. [20:01:12] We'd get a lot of that by binding to libclang and doing something reasonable there too, granted. [20:01:14] Which we've also talked about. [20:03:45] Are you fully Linux/macOS these days? You were the Windows guru for a long while. [20:03:59] I'm trying hard to get off macOS, but it's effectively impossible for me atm. [20:04:58] i dual boot linux/windows on my three desktops, i have two macbooks (work and 2012 personal one), a surface book 2, a surface pro x [20:05:20] basically if i dont get my work/code done, i dont want it to be because of lack of computers [20:05:53] i'm using arch right now on a threadripper with 48 cores [20:13:20] Any recommendations for a gaming PC? I want to play X-Plane more easily and my MacBook Fan Turbo throttles me after a literal 6.48 seconds. [20:15:53] :-D [20:17:17] Good night guys/gals/people, thank you for all the insight (bloodborne pun) :) [20:29:16] <^alex> sleep well, itmuckel [20:32:34] And ideally above watere. [20:33:05] * itmuckel [itmuckel!~itmuckel@i577BC8D3.versanet.de] has quit. [22:13:40] * ephe_meral [ephe_meral!~amnesia@ip5f5bf7d1.dynamic.kabel-deutschland.de] has quit (Ping timeout: 272 seconds). [22:40:38] * ephe_meral [ephe_meral!~amnesia@ip5f5bf7d1.dynamic.kabel-deutschland.de] has joined the channel. [22:45:05] * rgrinberg [rgrinberg!sid50668@gateway/web/irccloud.com/x-oiyfmyrivgeoiudw] has quit (Ping timeout: 246 seconds). [22:47:28] * littledan [littledan!sid90245@gateway/web/irccloud.com/x-udubdrdkcekghoqs] has quit (Ping timeout: 260 seconds). [22:47:49] * cstrahan [cstrahan!sid36118@gateway/web/irccloud.com/x-qsbqapyxvywjrkjx] has quit (Ping timeout: 244 seconds). [22:48:19] * rgrinberg [rgrinberg!sid50668@gateway/web/irccloud.com/x-dobrxpggkxhfcldc] has joined the channel. [22:50:42] * ullbeking [ullbeking!sid5364@gateway/web/irccloud.com/x-ykuqqazktmvnrppu] has quit (Ping timeout: 260 seconds). [22:50:53] * nikki93 [nikki93!sid200244@gateway/web/irccloud.com/x-ticvbvvsezepsshs] has quit (Ping timeout: 256 seconds). [22:50:55] * duncanm [duncanm!sid287146@gateway/web/irccloud.com/x-uuquejnqxvmlludc] has quit (Ping timeout: 258 seconds). [22:50:57] * mjl [mjl!sid16781@gateway/web/irccloud.com/x-knfnbzfzbaphlnoj] has quit (Ping timeout: 265 seconds). [22:51:24] * pointfree [pointfree!sid204397@gateway/web/irccloud.com/x-nlilgjnlauunpani] has quit (Ping timeout: 246 seconds). [22:51:57] * jfhbrook [jfhbrook!sid301834@gateway/web/irccloud.com/x-npcivyxhumbctfrr] has quit (Ping timeout: 244 seconds). [22:52:07] * Hotbees [Hotbees!sid234392@gateway/web/irccloud.com/x-qzgnftrbdsmtonju] has quit (Ping timeout: 240 seconds). [22:52:50] * bmp [bmp!sid22344@gateway/web/irccloud.com/x-cnpdidrwbpsdwlql] has quit (Ping timeout: 258 seconds). [22:53:14] * rgrinberg [rgrinberg!sid50668@gateway/web/irccloud.com/x-dobrxpggkxhfcldc] has quit (Ping timeout: 272 seconds).