< 1633565498 930099 :asteriska!~asteriska@2601:603:5180:a000:d1e7:ee6e:f70:1c15 JOIN #esolangs * :[https://web.libera.chat] asteriska < 1633565522 932697 :asteriska!~asteriska@2601:603:5180:a000:d1e7:ee6e:f70:1c15 PRIVMSG #esolangs :i died was there any developments < 1633565540 972752 :asteriska!~asteriska@2601:603:5180:a000:d1e7:ee6e:f70:1c15 PRIVMSG #esolangs :cant remember who it was i spoke to < 1633565753 300060 :asteriska!~asteriska@2601:603:5180:a000:d1e7:ee6e:f70:1c15 PRIVMSG #esolangs :wanted some help making a sane interpreter for hanoi love, or a way to run original quickbasic code in a browser < 1633565771 197777 :asteriska!~asteriska@2601:603:5180:a000:d1e7:ee6e:f70:1c15 PRIVMSG #esolangs :https://esolangs.org/wiki/Hanoi_Love is the link < 1633565837 582135 :asteriska!~asteriska@2601:603:5180:a000:d1e7:ee6e:f70:1c15 PRIVMSG #esolangs :any good base languages to start in? i see rust, cpp, java, and ruby fairly frequently used, along with javascript < 1633565867 376650 :asteriska!~asteriska@2601:603:5180:a000:d1e7:ee6e:f70:1c15 PRIVMSG #esolangs :realistically i havent really programmed before, want something to jump into and figure out, but also didnt want to doom myself < 1633566127 756173 :oerjan!oerjan@sprocket.nvg.ntnu.no JOIN #esolangs oerjan :Ørjan Johansen < 1633566382 867644 :sknebel!~quassel@v22016013254630973.happysrv.de PRIVMSG #esolangs :if you've dabbled with python, that's totally viable to make a small interpreter like that too < 1633566656 130720 :asteriska!~asteriska@2601:603:5180:a000:d1e7:ee6e:f70:1c15 PRIVMSG #esolangs :true, but id like to hear your opinions as well. what would you use, and why < 1633566868 709575 :asteriska!~asteriska@2601:603:5180:a000:d1e7:ee6e:f70:1c15 PRIVMSG #esolangs :hanoi love is stack based, and pretty close to the idealogy of brainfuck < 1633566880 171993 :asteriska!~asteriska@2601:603:5180:a000:d1e7:ee6e:f70:1c15 PRIVMSG #esolangs :simplistic and a small number of commands < 1633566908 11202 :asteriska!~asteriska@2601:603:5180:a000:d1e7:ee6e:f70:1c15 PRIVMSG #esolangs :well, sort of < 1633567355 208483 :zzo38!~zzo38@host-24-207-14-22.public.eastlink.ca PRIVMSG #esolangs :Much of the computer programming I do is written in C < 1633567490 695881 :asteriska!~asteriska@2601:603:5180:a000:d1e7:ee6e:f70:1c15 PRIVMSG #esolangs :anything that draws you to c specifically? how long did it take you to learn? < 1633567600 579442 :zzo38!~zzo38@host-24-207-14-22.public.eastlink.ca PRIVMSG #esolangs :About learning it, I don't remember. < 1633567634 256074 :zzo38!~zzo38@host-24-207-14-22.public.eastlink.ca PRIVMSG #esolangs :About using it, well, it is common and also many other programming languages don't do some things as well < 1633567653 554026 :asteriska!~asteriska@2601:603:5180:a000:d1e7:ee6e:f70:1c15 PRIVMSG #esolangs :fair < 1633567702 943247 :asteriska!~asteriska@2601:603:5180:a000:d1e7:ee6e:f70:1c15 PRIVMSG #esolangs :what all do you tend to use it on? id like to know general use cases, from a real person instead of a broad spectrum on some wikipedia entry < 1633567864 471261 :zzo38!~zzo38@host-24-207-14-22.public.eastlink.ca PRIVMSG #esolangs :Well, I wrote many programs (including some are incomplete), including NNTP client, picture processing, game, etc. < 1633567887 493803 :zzo38!~zzo38@host-24-207-14-22.public.eastlink.ca PRIVMSG #esolangs :Sometimes I also use PostScript, and sometimes other programming languages, but mainly C < 1633567907 315063 :asteriska!~asteriska@2601:603:5180:a000:d1e7:ee6e:f70:1c15 PRIVMSG #esolangs :any experience with ruby? ive heard good things about it < 1633567961 803078 :zzo38!~zzo38@host-24-207-14-22.public.eastlink.ca PRIVMSG #esolangs :I have not used Ruby (except maybe once to modify an existing program, although I don't really remember) < 1633568017 635320 :asteriska!~asteriska@2601:603:5180:a000:d1e7:ee6e:f70:1c15 PRIVMSG #esolangs :ah, i see < 1633568069 914751 :asteriska!~asteriska@2601:603:5180:a000:d1e7:ee6e:f70:1c15 PRIVMSG #esolangs :any opinion of java? < 1633568112 318193 :zzo38!~zzo38@host-24-207-14-22.public.eastlink.ca PRIVMSG #esolangs :I don't really like Java, although I had used it once to read a Microsoft Compound file, although now 7-Zip does that so I can just use 7-Zip instead < 1633568151 294721 :asteriska!~asteriska@2601:603:5180:a000:d1e7:ee6e:f70:1c15 PRIVMSG #esolangs :any specific reason? ive heard java was indesirable elsewhere, but i dont remember why and whatfor < 1633568816 770827 :asteriska!~asteriska@2601:603:5180:a000:d1e7:ee6e:f70:1c15 QUIT :Quit: Client closed > 1633569694 604867 PRIVMSG #esolangs :14[[07Truth-machine14]]4 10 02https://esolangs.org/w/index.php?diff=88607&oldid=88569 5* 03GoodCoderBBoy 5* (+319) 10/* Implementations */ added AutomataF > 1633570065 264430 PRIVMSG #esolangs :14[[07User:Dlosc14]]4 10 02https://esolangs.org/w/index.php?diff=88608&oldid=85384 5* 03Dlosc 5* (-32) 10Changed Pip link to point to Esolangs page < 1633571167 676734 :Sgeo!~Sgeo@user/sgeo QUIT :Read error: Connection reset by peer < 1633571321 754346 :Sgeo!~Sgeo@user/sgeo JOIN #esolangs Sgeo :realname < 1633571965 634776 :scjosh!~scjosh@206.189.79.69 QUIT :Quit: The Lounge - https://thelounge.chat < 1633572044 886987 :sknebel!~quassel@v22016013254630973.happysrv.de PRIVMSG #esolangs :Python IMHO is a good first language to learn, unless you are specifically after low-level projects it's not suited for. lots of intro material, easy-ish to grok, tools and libraries for many different things. < 1633572420 456883 :src!~src@user/src QUIT :Quit: Leaving < 1633572712 168420 :scjosh!~scjosh@206.189.79.69 JOIN #esolangs scjosh :Josh < 1633573724 401075 :moony!moony@hellomouse/dev/moony NICK :cd < 1633575201 317454 :dutch!~DutchIngr@user/dutch QUIT :Quit: WeeChat 3.3 < 1633577260 246185 :cd!moony@hellomouse/dev/moony QUIT :Quit: leaving > 1633580138 278172 PRIVMSG #esolangs :14[[07Special:Log/newusers14]]4 create10 02 5* 03Asteriska 5* 10New user account > 1633580437 169370 PRIVMSG #esolangs :14[[07Esolang:Introduce yourself14]]4 10 02https://esolangs.org/w/index.php?diff=88609&oldid=88605 5* 03Asteriska 5* (+374) 10exist - asteriska < 1633580617 932138 :cd!moony@hellomouse/dev/moony JOIN #esolangs moony :Kaylie! (she/her) > 1633580957 260164 PRIVMSG #esolangs :14[[07User:Asteriska14]]4 N10 02https://esolangs.org/w/index.php?oldid=88610 5* 03Asteriska 5* (+220) 10Created page with "'''Welcome!''' This is the user page for Asteriska ( That's me! Hi. :> ) I am currently venturing into the programming language Ruby, on a quest to make a modern interpreter f..." < 1633584371 446619 :delta23!~delta23@user/delta23 QUIT :Quit: Leaving < 1633589253 742029 :b_jonas!~x@catv-176-63-2-81.catv.broadband.hu PRIVMSG #esolangs :fizzie: re DOS VM bot, yes, that was my termbot. I never let it on #esolangs proper, but it was in #esolangs-blah . but it can't really run QBASIC – in theory it can, but the console i/o doesn't work, because QBASIC direct accesses the keyboard and video, while my bot uses serial console, so you can only use QBASIC programs if they read and write to regular files < 1633589272 547724 :b_jonas!~x@catv-176-63-2-81.catv.broadband.hu PRIVMSG #esolangs :or perhaps if you edit the program to read and write serial port < 1633589386 373265 :b_jonas!~x@catv-176-63-2-81.catv.broadband.hu PRIVMSG #esolangs :I agree with Python being a good first language to learn programming with, but also in its current form you can't write one-liners on it, and as such it's a bit hard to teach on IRC and especially with bots. < 1633589424 499750 :b_jonas!~x@catv-176-63-2-81.catv.broadband.hu PRIVMSG #esolangs :as for Java, I don't know too much about it, you'll have to ask ais523 about how suitable it is in principle, and someone might be able to tell how much learning material there is available < 1633589454 711990 :b_jonas!~x@catv-176-63-2-81.catv.broadband.hu PRIVMSG #esolangs :asteriska: it might help if you tell what kind of toy projects you want to try < 1633589517 985684 :hendursaga!~weechat@user/hendursaga QUIT :Remote host closed the connection < 1633589547 628737 :hendursaga!~weechat@user/hendursaga JOIN #esolangs hendursaga :weechat < 1633590387 628577 :hendursaga!~weechat@user/hendursaga QUIT :Ping timeout: 276 seconds < 1633590475 302529 :oerjan!oerjan@sprocket.nvg.ntnu.no QUIT :Quit: Nite < 1633590529 623000 :hendursaga!~weechat@user/hendursaga JOIN #esolangs hendursaga :weechat < 1633591590 578972 :ais523!~ais523@109.249.181.94 JOIN #esolangs ais523 :(this is obviously not my real name) < 1633591671 4738 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :asteriska (for when you get back): I've taught Java as a first language to students, there are good learning resources around and it's a good starting point if you're looking for a job in Java or C# (and might also help if you're planning to go into C++ eventually) < 1633591700 398610 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :but, I don't think it's an ideal place to start with programming – it requires you to learn some concepts from Java-era object-oriented programming that won't be much use to you outside the three languages I listed < 1633591752 217910 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :and they're a) fairly hard to figure out relative to certain other programming concepts, although not terrible; and b) not actually a good way to think about programming < 1633591790 147510 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :I don't like Python, but it was invented as a teaching language and won't be horrible for that purpose; I'd recommend moving onto something else once you've got the basics figured out < 1633591804 148240 :Sgeo!~Sgeo@user/sgeo QUIT :Read error: Connection reset by peer < 1633591837 7492 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :Rust is kind-of a high-risk option: it really forces you to learn and get comfortable with a number of low-level programming concepts, so the learning curve is very steep, but if you do manage to learn it the knowledge will be helpful in other low-level languages < 1633591846 329061 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :I didn't really understand C++ until after I learned Rust < 1633591903 740301 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :but my recommendation is to a) work out what sort of programming paradigm you want to be programming with in future (e.g. the Java/C#ish languages are good for getting jobs at big companies with) < 1633591917 57015 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :and b) work out what sort of knowledge about programming you want to gain < 1633591920 602316 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :and then pick an appropriate language < 1633591952 159001 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :if you want to be working fairly difficult or low-level languages, for example, you should probably pick one to start with – it'll be harder to learn but you'll have to learn that information anyway < 1633591981 549572 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :I think I would recommend against starting with C or C++, though, because they don't give good feedback when you do something wrong and thus it's hard to learn what mistakes you're making < 1633592102 358911 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :actually, now I'm wondering about good options for general-purpose languages which will help you get the basics of modern-ish programming down < 1633592148 95257 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :maybe Lua? that seems to have all the features I'd want in a teaching language, and it's fairly small and simple, in addition to being easy to get started with and somewhat robust due to the situations where it's used < 1633592153 738914 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :although I'm not sure what the teaching materials are like < 1633592196 918696 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :that said, I've heard that Lua got worse since I last looked at it (although I heard this from a somewhat unreliable source so I'm not sure whether it's true) < 1633592706 820666 :b_jonas!~x@catv-176-63-2-81.catv.broadband.hu PRIVMSG #esolangs :ais523: about when (what year) have you last thought Java as a first language? < 1633592777 213055 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :last taught? hmm, probably around 2014 < 1633592804 566964 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :it's been changing rapidly since then, with lots of new features added, although last time I checked most Java-based companies were wary of using them < 1633592810 886640 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :but, programming doesn't change that much in small spans of time < 1633592822 300601 :b_jonas!~x@catv-176-63-2-81.catv.broadband.hu PRIVMSG #esolangs :thanks < 1633592837 562715 :b_jonas!~x@catv-176-63-2-81.catv.broadband.hu PRIVMSG #esolangs :and yes, that is a small timespan, I thought it might be more < 1633592875 325155 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :it feels like longer < 1633592902 550970 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :my most recent job was writing Java, though, so my Java skills are more recent than that < 1633593191 908301 :b_jonas!~x@catv-176-63-2-81.catv.broadband.hu PRIVMSG #esolangs :I personally like lua from the implementation perspective, they have a solid interpreter and are one of the very few interpreters with a moving garbage collector that defines a documented C API that lets you refer to objects in the language. (the other is mzscheme or PLT-scheme or whatever they renamed it now). but I hate it from the language user's perspective. Mostly hate it because of the 1-based < 1633593198 100082 :b_jonas!~x@catv-176-63-2-81.catv.broadband.hu PRIVMSG #esolangs :indexes; but also because of the syntax: the implicit semicolon lets you make mistakes, and the clumsy syntax makes you express easy things with long keywords. < 1633593227 986435 :b_jonas!~x@catv-176-63-2-81.catv.broadband.hu PRIVMSG #esolangs :so lua is decent for someone who wants to add a macro/modding language to their video game, but not for the people who write mods mostly in lua < 1633593267 790292 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :Lua doesn't have implicit semicolons (in the JavaScript sense) – the syntax is unambiguous < 1633593282 117743 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :like, you can shuffle around the whitespace and a program still has the same meaning < 1633593312 125699 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :I actually used to write code like «x = x + dx y = y + dy» until someone told me it was legal to put a semicolon there to make it easier to read < 1633593351 772552 :Riviera!Riviera@user/riviera PRIVMSG #esolangs :x ;= dx y;= dy < 1633593367 184374 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :I think the semicolons do have to go between statements if you use them < 1633593396 431202 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :anyway, I agree that Lua doesn't really scale to large programs, but that isn't a property you need in a teaching language < 1633593396 507258 :b_jonas!~x@catv-176-63-2-81.catv.broadband.hu PRIVMSG #esolangs :ais523: yes, it's not the same as javascript where the newlines matter. but that and no semicolons exactly means you can make costly mistakes. < 1633593397 566309 :Riviera!Riviera@user/riviera PRIVMSG #esolangs ::;) < 1633593445 645777 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :for a language I'm working on I'm considering a compromise, in which the language would be ambiguous without semicolons or newlines, but you still need to place a semicolon or a newline between statements anyway < 1633593451 661596 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :* would be unambiguous < 1633593468 749918 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :maybe even with a backslash when you split a statement across multiple lines < 1633593488 837594 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :(and perhaps with an option to automatically fix files in which the whitespace has become mangled) < 1633593529 127757 :b_jonas!~x@catv-176-63-2-81.catv.broadband.hu PRIVMSG #esolangs :ais523: is it an alternate syntax for a yacc extension? < 1633593533 328112 :b_jonas!~x@catv-176-63-2-81.catv.broadband.hu PRIVMSG #esolangs ::-) < 1633593554 958288 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :b_jonas: actually no; I *am* working on one of those, but the language I was talking about a few lines ago is a different one < 1633593587 906752 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :or, not so much yacc extension < 1633593595 652816 :b_jonas!~x@catv-176-63-2-81.catv.broadband.hu PRIVMSG #esolangs :ok. I hope it's also not an alternate syntax for Analogia :-) < 1633593613 757939 :b_jonas!~x@catv-176-63-2-81.catv.broadband.hu PRIVMSG #esolangs :(the "x = x + dx" above reminded me of that) < 1633593617 421246 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :I've been going through about 4 or 5 attempts at writing a good input language for parser generators recently < 1633593683 122244 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :because I've become fed up with the existing parser generators, it's clearly possible to do better, yet people have mostly either a) dropped the idea entirely or b) moved onto combinator-based parsing which is a little nicer for the programmer but can produce very inefficient parsers < 1633593758 246690 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :parser generators seem to be split into three groups nowadays: a) generalised parsers that handle any grammer, even ambiguous ones; b) LR-alikes where you need a grammar that the parser-generator can prove unambiguous; and c) PEG-based parsers, which use an input format in which all grammars are inherently unambiguous but often don't do what you meant them to < 1633593767 372392 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :s/grammer/grammar/ < 1633593828 292464 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :group a) is sort of the parser-generator equivalent of a scripting language; the language doesn't give you much help in debugging because anything is expected, but if you do write the program correctly you can write it very quickly, but the runtime performance is often bad < 1633593856 322067 :imode!~imode@user/imode QUIT :Ping timeout: 245 seconds < 1633593861 369927 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :(most of these generators are O(n) best case and O(n³) or O(n⁴) worst case, and aim to hit the best case as often as possible but don't give you much guidance in doing that) < 1633593912 728720 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :and group c) is universally O(n) worst case but often with a terrible constant factor, and *also* doesn't give you much help in writing correct programs because PEG is a language that makes subtle errors really easy to make (and basically only exists because it's guaranteed to be unambiguous and O(n)-parseable) < 1633593935 632254 :hendursa1!~weechat@user/hendursaga JOIN #esolangs hendursaga :weechat < 1633593937 84492 :nakilon!~nakilon@user/nakilon PRIVMSG #esolangs :did you try ragel? I see it often recently < 1633593958 429776 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :group b) is my favourite but it's been mostly abandoned at this point, so I was hoping to make something modern and widely usable that's more powerful than LR(1) and just as efficient < 1633593997 715886 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :nakilon: that appears to be a lexer, rather than a parser? < 1633594003 775118 :nakilon!~nakilon@user/nakilon PRIVMSG #esolangs :idk < 1633594061 185960 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :good lexers aren't as hard to find as good parsers because it's a fundamentally easier problem, there aren't tradeoffs to make between efficiency and generality < 1633594104 746651 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :although, what I've really been focusing on is scannerless parsers that don't need a separate lexer < 1633594131 629474 :hendursaga!~weechat@user/hendursaga QUIT :Ping timeout: 276 seconds < 1633594153 943358 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :I proved that LR(*) can be evaluated in O(n) time (i.e. LR but with regular-expression lookahead), and that's sufficient to write a scannerless LR parser, although I'm leaning towards a different algorithm < 1633594199 940165 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :because my proof involves first running a state machine backwards across the input and recording the history of states, which is O(n) but likely to be quite slow in practice, especially if the state machine is very large < 1633594318 31603 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :if anyone's interested, here's where I've got to so far: http://nethack4.org/pastebin/burlGaQaD3.html < 1633594350 465624 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :the automaton is provably O(n), and capable of simulating the combined effect a lexer followed by an LR(k) parser for any k < 1633594356 871476 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :but I haven't worked out how to calculate the states for the automaton yet < 1633595669 302217 :nakilon!~nakilon@user/nakilon PRIVMSG #esolangs :support says I'm being billed for an instance that utilizes >100% CPU core 24/7 < 1633595678 14025 :nakilon!~nakilon@user/nakilon PRIVMSG #esolangs :but I only have one and it's at 20% < 1633595684 130547 :nakilon!~nakilon@user/nakilon PRIVMSG #esolangs :am I going crazy < 1633595886 855585 :nakilon!~nakilon@user/nakilon PRIVMSG #esolangs :will be funny if that's that glitched Chromium OS that is shown as disabled in my interface but is still running because of that lack of RAM < 1633596805 41785 :brettgilio7!~brettgili@x-node.gq JOIN #esolangs brettgilio :Brett Gilio < 1633596867 578572 :brettgilio!~brettgili@x-node.gq QUIT :Ping timeout: 240 seconds < 1633596867 848808 :brettgilio7!~brettgili@x-node.gq NICK :brettgilio < 1633596939 629311 :hendursa1!~weechat@user/hendursaga QUIT :Ping timeout: 276 seconds < 1633596977 638760 :hendursa1!~weechat@user/hendursaga JOIN #esolangs hendursaga :weechat < 1633597618 446677 :wib_jonas!~wib_jonas@business-37-191-60-209.business.broadband.hu JOIN #esolangs b_jonas :[https://web.libera.chat] wib_jonas < 1633597703 368905 :wib_jonas!~wib_jonas@business-37-191-60-209.business.broadband.hu PRIVMSG #esolangs :"combinator-based parsing [...] can produce very inefficient parsers" => that, but I'm more worried that it can cause ambiguous grammars without anyone noticing, and then hard to debug problems when it parses an ambiguous input in the other of two possibilities < 1633597822 888575 :wib_jonas!~wib_jonas@business-37-191-60-209.business.broadband.hu PRIVMSG #esolangs :ais523: "LR(*) can be evaluated in O(n) time" => do you mean with the constant factor in the O independent of the lookahead length of the LR? < 1633597835 364608 :wib_jonas!~wib_jonas@business-37-191-60-209.business.broadband.hu PRIVMSG #esolangs :wait, "LR but with regular expression lookahead" < 1633597841 235108 :wib_jonas!~wib_jonas@business-37-191-60-209.business.broadband.hu PRIVMSG #esolangs :I didn't look ahead reading your statement apparently < 1633597934 79474 :wib_jonas!~wib_jonas@business-37-191-60-209.business.broadband.hu PRIVMSG #esolangs :as for the previous problem of parsers, LR(1) is a good start, but I think it can help a lot if you have extensions over the BNF-like grammar. yacc already provides one very useful one, for operators with precedence, but I was kind of thinking of other potential extensions. < 1633598020 191469 :wib_jonas!~wib_jonas@business-37-191-60-209.business.broadband.hu PRIVMSG #esolangs :by which I mean extensions for how to specify the grammar, the one that you'll then generate an LR(1) parser for < 1633598045 970710 :wib_jonas!~wib_jonas@business-37-191-60-209.business.broadband.hu PRIVMSG #esolangs :(or an optimized LR(1) parser) < 1633598056 312422 :op_4!~op_4@user/op-4/x-9116473 QUIT :Ping timeout: 245 seconds < 1633598077 649633 :op_4!~op_4@user/op-4/x-9116473 JOIN #esolangs op_4 :tslil < 1633598197 449673 :wib_jonas!~wib_jonas@business-37-191-60-209.business.broadband.hu PRIVMSG #esolangs :I was wondering on an extension for when some rules have an optional terminator token. So in a rule, if the last symbol is a terminal, you could mark it as optional, claiming that this may cause LR(1) ambiguities, which you want to resolve against applying that rule without the terminator token, but importantly, you ask the parser generator to < 1633598197 951045 :wib_jonas!~wib_jonas@business-37-191-60-209.business.broadband.hu PRIVMSG #esolangs :prove you that if all those optional terminators were mandatory, then the grammar has no LR(1) ambiguities. < 1633598264 334718 :wib_jonas!~wib_jonas@business-37-191-60-209.business.broadband.hu PRIVMSG #esolangs :It seems like this could be done with a preprocessor that runs yacc twice, once with all the terminators mandatory to prove that the grammar has no ambiguities as yacc understands it (or at least only has a few ambiguities that you as the grammar writer know of), then generate the parser with those tokens optional. < 1633598280 484353 :wib_jonas!~wib_jonas@business-37-191-60-209.business.broadband.hu PRIVMSG #esolangs :but I'm not entirely sure if this makes sense. < 1633598392 240807 :wib_jonas!~wib_jonas@business-37-191-60-209.business.broadband.hu PRIVMSG #esolangs :plus I'm not sure if just making single terminals optional is enough, because rust has those weird syntax cases where it tries to find out which left brace after the "if" keyword ends the condition and starts the body, and you might want something to prove eg. that if you parenthisize the condition then it's unambiguous < 1633598423 804025 :wib_jonas!~wib_jonas@business-37-191-60-209.business.broadband.hu PRIVMSG #esolangs :to be clear I mean unambiguous as yacc understands it, not just theoretically unambiguous as a grammar, though in practice the difference rarely comes up. < 1633598549 409383 :wib_jonas!~wib_jonas@business-37-191-60-209.business.broadband.hu PRIVMSG #esolangs :"LR but with regular-expression lookahead [... is] sufficient to write a scannerless LR parser" => *sigh* not always. some languages like C++ allow custom multi-byte terminators for a string, where the lexer has to scan for the matching terminator sequence. < 1633598571 209554 :wib_jonas!~wib_jonas@business-37-191-60-209.business.broadband.hu PRIVMSG #esolangs :but I also agree that you usually want a separate lexer, even just for clarity < 1633598627 822875 :wib_jonas!~wib_jonas@business-37-191-60-209.business.broadband.hu PRIVMSG #esolangs :and then there's of course the classical C problem where you have to know if an identifier is a typename or not to parse < 1633598690 181508 :wib_jonas!~wib_jonas@business-37-191-60-209.business.broadband.hu PRIVMSG #esolangs :although I kind of wonder if that can be worked around by parsing with some modified yacc grammar despite that, then later fixing up the cases that involve a typename vs other identifier ambiguity, like (a)(b) and (a)*(b) < 1633598727 266726 :wib_jonas!~wib_jonas@business-37-191-60-209.business.broadband.hu PRIVMSG #esolangs :I'm not sure if C allows that, and if it does, does C++ too? < 1633598761 888095 :wib_jonas!~wib_jonas@business-37-191-60-209.business.broadband.hu PRIVMSG #esolangs :there are some weird cases with declarations and function type names and whatnot < 1633598773 118775 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs : "combinator-based parsing [...] can produce very inefficient parsers" => that, but I'm more worried that it can cause ambiguous grammars without anyone noticing, and then hard to debug problems when it parses an ambiguous input in the other of two possibilities ← I agree with this < 1633598816 882983 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :in terms of precedence, I think it's an important feature to have but don't like the way that yacc does it – precedence can be implemented as sugar but yacc lets it affect the grammar directly, which can be confusing < 1633598825 347743 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :err, affect the algorithm, rather than the grammar < 1633598887 314493 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :re: C++'s custom multi-byte terminators, I don't consider those to have an effect on scannerless parsing because they can't be lexed with a normal lexer < 1633598930 795416 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :so it has no impact on the difference between scannerless parsing and a parser+separate lexer (although, scannerless parsers should in theory be better at them, as they can do CFG-based lexing rather than regular expressions) < 1633598946 297345 :wib_jonas!~wib_jonas@business-37-191-60-209.business.broadband.hu PRIVMSG #esolangs :as much as I like rust's semantics, I think their syntax is terrible, though mostly not because of the parser ambiguities, but because of the terrible identifier scoping rules, and because of the ambiguity between constructors vs bindings in patterns. that latter would be really easy to improve if they just allowed empty parenthesis after any < 1633598946 799911 :wib_jonas!~wib_jonas@business-37-191-60-209.business.broadband.hu PRIVMSG #esolangs :0-argument constructor, because that let you disambiguate both ways. but there's hope, because they started to allow multiple incompatible syntaxes now in the same compiler, so they can improve some of the syntax later. < 1633598997 450825 :wib_jonas!~wib_jonas@business-37-191-60-209.business.broadband.hu PRIVMSG #esolangs :ais523: that depends on what you mean by "normal lexer". if you mean a regular expression lexer, then sure. but we're not limited to that when using yacc. < 1633599000 585026 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :I agree that constructor vs. binding is a bad ambiguity (interestingly, you could mostly fix it using Rust's normal conventions for identifier case, but it only enforces them with warnings rather than at the syntax level) < 1633599010 692846 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :wib_jonas: right, regular expression lexer < 1633599044 474930 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :I don't know what you mean by the identifier scoping rules, though: do you have an example of what it does wrong there? < 1633599049 119829 :wib_jonas!~wib_jonas@business-37-191-60-209.business.broadband.hu PRIVMSG #esolangs :ais523: rust already enforces identifier case as warnings, but there are also lots of wrong-cased type names in the standard library, so that's not enough. < 1633599087 345170 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :wait, why? < 1633599126 836711 :wib_jonas!~wib_jonas@business-37-191-60-209.business.broadband.hu PRIVMSG #esolangs :ais523: for the identifier scoping rules ... let me try to get an example, I think it was something about multiple identifiers of different kinds coming from different scopes, where the one closer to your scope should really shadow the other, but instead rust disambiguates based on which kind is valid when using it < 1633599137 33904 :wib_jonas!~wib_jonas@business-37-191-60-209.business.broadband.hu PRIVMSG #esolangs :ais523: mostly to match the name of C types < 1633599143 285336 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :oh, u8 and friends < 1633599165 138394 :wib_jonas!~wib_jonas@business-37-191-60-209.business.broadband.hu PRIVMSG #esolangs :no, I can take `u8`, I actually thought that was a keyword < 1633599166 422528 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :I guess i've internalised "u8" as being a keyword, and thus being able to use any case it wants, but it probably isn't < 1633599176 457007 :wib_jonas!~wib_jonas@business-37-191-60-209.business.broadband.hu PRIVMSG #esolangs :this isn't about u8 < 1633599187 490437 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :c_void and friends? < 1633599214 312141 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :actually, that's really weird, why wouldn't it be called C_void? < 1633599225 409987 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :the "c_" at the start isn't part of the name in C < 1633599234 578390 :wib_jonas!~wib_jonas@business-37-191-60-209.business.broadband.hu PRIVMSG #esolangs :those, and even worse ones in the libc crate IIRC < 1633599262 420663 :wib_jonas!~wib_jonas@business-37-191-60-209.business.broadband.hu PRIVMSG #esolangs :you can say that c_void is fine because the set of builtin types in C and C++ is growing slowly < 1633599276 707159 :wib_jonas!~wib_jonas@business-37-191-60-209.business.broadband.hu PRIVMSG #esolangs :(it's not closed; we have wchar16_t and wchar32_t as builtins now I think) < 1633599282 755281 :wib_jonas!~wib_jonas@business-37-191-60-209.business.broadband.hu PRIVMSG #esolangs :(and nullptr_t and more) < 1633599300 839687 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :oddly, the _t suffix is reserved by POSIX but not, IIRC, by C itself < 1633599303 528256 :wib_jonas!~wib_jonas@business-37-191-60-209.business.broadband.hu PRIVMSG #esolangs :but I think the libc crates wraps types that are identifiers < 1633599318 729856 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :at least libc isn't technically part of Rust itself < 1633599331 456795 :wib_jonas!~wib_jonas@business-37-191-60-209.business.broadband.hu PRIVMSG #esolangs :yes, it's not < 1633599561 299912 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :u8 is not a keyword, I just looked it up < 1633599593 894256 :wib_jonas!~wib_jonas@business-37-191-60-209.business.broadband.hu PRIVMSG #esolangs :I know < 1633599599 745248 :wib_jonas!~wib_jonas@business-37-191-60-209.business.broadband.hu PRIVMSG #esolangs :I thoguht it was a keyword too < 1633599608 273433 :wib_jonas!~wib_jonas@business-37-191-60-209.business.broadband.hu PRIVMSG #esolangs :but later found it isn't < 1633599614 118560 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :I wasn't sure until I checked < 1633599640 865724 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :one thing that's been paining me with this parser generator work is trying to avoid clashes, in generated code, with keywords in the target language < 1633599648 857926 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :namespacing can solve most problems, but not that one < 1633599672 508127 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :my current hacky workaround is to append an underscore to identifiers, on the basis that most languages don't have keywords that end with an underscore but don't start with one < 1633599978 344195 :wib_jonas!~wib_jonas@business-37-191-60-209.business.broadband.hu PRIVMSG #esolangs :ais523: here's an example on what I don't like about the scoping rules: https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=45fe7999658232760b1fd3ce7c578cf4 < 1633599999 95058 :nakilon!~nakilon@user/nakilon PRIVMSG #esolangs :`factor 992654469589 < 1633600000 37649 :HackEso!~h@techne.zem.fi PRIVMSG #esolangs :992654469589: 993319 999331 < 1633600024 213795 :wib_jonas!~wib_jonas@business-37-191-60-209.business.broadband.hu PRIVMSG #esolangs :note that if you define the outer struct K as a parenthisized struct rather than a braced struct, this no longer works, so it's not like structs and consts are in an entirely different namespace and you can always tell from usage which one to use < 1633600045 937115 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :ACTION looks < 1633600076 203295 :nakilon!~nakilon@user/nakilon PRIVMSG #esolangs :`factor 41758540882408627201 < 1633600077 154399 :HackEso!~h@techne.zem.fi PRIVMSG #esolangs :41758540882408627201: 479001599 87178291199 < 1633600095 970771 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :wib_jonas: I think that behaviour was probably borrowed from C? shadowing is separated into different lexical categories < 1633600122 797323 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :but the "this isn't an entirely different namespace" is interesting < 1633600178 504260 :wib_jonas!~wib_jonas@business-37-191-60-209.business.broadband.hu PRIVMSG #esolangs :for posterity in the channel logs, pointed example was: #[derive(Debug)] struct K{ x: i32, } fn main() { const K: i32 = 20; println!("k = {:?}", K); let b: K = K{x: 13}; println!("b = {:?}", b); } < 1633600182 793215 :nakilon!~nakilon@user/nakilon PRIVMSG #esolangs :`factor 3858055874062761829426214599 < 1633600183 743509 :HackEso!~h@techne.zem.fi PRIVMSG #esolangs :3858055874062761829426214599: 5600748293801 688846502588399 < 1633600214 289088 :wib_jonas!~wib_jonas@business-37-191-60-209.business.broadband.hu PRIVMSG #esolangs :ais523: yes, but in C you don't get things like parenthisized structs that apparently shadow multiple lexical kinds < 1633600230 861418 :wib_jonas!~wib_jonas@business-37-191-60-209.business.broadband.hu PRIVMSG #esolangs :and I'm not sure C is a good example in first place < 1633600245 574832 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :I can't find the shadowing rules in the reference < 1633600248 192892 :wib_jonas!~wib_jonas@business-37-191-60-209.business.broadband.hu PRIVMSG #esolangs :Haskell might be better, that has three entirely separate lexical categories clear from the syntax < 1633600248 531845 :nakilon!~nakilon@user/nakilon PRIVMSG #esolangs :`factor 137438953490360560825792535807496799 < 1633600260 410806 :wib_jonas!~wib_jonas@business-37-191-60-209.business.broadband.hu PRIVMSG #esolangs :or maybe just two < 1633600261 26963 :nakilon!~nakilon@user/nakilon PRIVMSG #esolangs :oh finally < 1633600264 453386 :HackEso!~h@techne.zem.fi PRIVMSG #esolangs :137438953490360560825792535807496799: 59604644783353249 2305843009213693951 < 1633600267 604946 :nakilon!~nakilon@user/nakilon PRIVMSG #esolangs :damn < 1633600312 980887 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :nakilon: if you're just looking for primality or not, I recommend a primality tester rather than a factoriser, the numbers are starting to reach the range where factorisation is slow < 1633600316 972987 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :but I'm not sure that HackEgo has one < 1633600369 157070 :nakilon!~nakilon@user/nakilon PRIVMSG #esolangs :I'm searching for its limits < 1633600377 922994 :wib_jonas!~wib_jonas@business-37-191-60-209.business.broadband.hu PRIVMSG #esolangs :let me try to see if there's an example that involves mod versus trait < 1633600383 570699 :nakilon!~nakilon@user/nakilon PRIVMSG #esolangs :`factor 928510396424831231988564183404743747335769 < 1633600384 428945 :HackEso!~h@techne.zem.fi PRIVMSG #esolangs :factor: ‘928510396424831231988564183404743747335769’ is too large < 1633600389 242594 :nakilon!~nakilon@user/nakilon PRIVMSG #esolangs :yeeeeee < 1633600393 309552 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :`` perl -Mntheory -E 'say is_prime("137438953490360560825792535807496799")' < 1633600394 522120 :HackEso!~h@techne.zem.fi PRIVMSG #esolangs :Can't locate ntheory.pm in @INC (you may need to install the ntheory module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.28.1 /usr/local/share/perl/5.28.1 /usr/lib/x86_64-linux-gnu/perl5/5.28 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.28 /usr/share/perl/5.28 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base). \ BEGIN failed--compilation aborted. < 1633600433 254641 :nakilon!~nakilon@user/nakilon PRIVMSG #esolangs :\wa factorize 928510396424831231988564183404743747335769 < 1633600435 522117 :velik!~velik@nakilon.pro PRIVMSG #esolangs : Result: 68480406462161287469×13558774610046711780701 (2 distinct prime factors) < 1633600517 121603 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :needs to be -Mntheory=is_prime, it seems (based on my local testing) < 1633600671 17714 :wib_jonas!~wib_jonas@business-37-191-60-209.business.broadband.hu PRIVMSG #esolangs :ais523: C++ has both a function and a variable named clog in the std namespace, and I still don't understand how it does that < 1633600704 511403 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :complex logarithm and standard logging handle, respectively? < 1633600713 528049 :wib_jonas!~wib_jonas@business-37-191-60-209.business.broadband.hu PRIVMSG #esolangs :yes < 1633600721 728248 :wib_jonas!~wib_jonas@business-37-191-60-209.business.broadband.hu PRIVMSG #esolangs :but maybe the function is never in std, it's only in the global namespace? < 1633600724 91597 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :I wonder if the function is actually a macro < 1633600726 928221 :wib_jonas!~wib_jonas@business-37-191-60-209.business.broadband.hu PRIVMSG #esolangs :I really don't understand < 1633600728 696634 :nakilon!~nakilon@user/nakilon PRIVMSG #esolangs :in ruby you have both and interpreter checks if you are appending the "()" to identifier to resolve the ambiguity < 1633600761 116678 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :Perl has an ambiguity between function calls and string literals, which is a fun one < 1633600770 491624 :wib_jonas!~wib_jonas@business-37-191-60-209.business.broadband.hu PRIVMSG #esolangs :I think maybe the function is never in the std namespace < 1633600779 426784 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :e.g. $x{shift} versus $x{+shift} < 1633600805 831119 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :(works even under use strict) < 1633600952 967524 :wib_jonas!~wib_jonas@business-37-191-60-209.business.broadband.hu PRIVMSG #esolangs :on the other hand, I have to appreciate the rustc compiler, which is really well made and gives high quality warning/error messages that usually point you to the right issue < 1633600960 501837 :wib_jonas!~wib_jonas@business-37-191-60-209.business.broadband.hu PRIVMSG #esolangs :they clearly put a lot of work in that < 1633600982 852138 :wib_jonas!~wib_jonas@business-37-191-60-209.business.broadband.hu PRIVMSG #esolangs :well yes, perl has weird syntax < 1633600999 894298 :nakilon!~nakilon@user/nakilon PRIVMSG #esolangs :``` ruby -rprime -e "p Prime.prime? 992654469589" < 1633601001 729490 :HackEso!~h@techne.zem.fi PRIVMSG #esolangs :false < 1633601005 924954 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :wib_jonas: in your Rust scoping example, you can actually give basically everything the same name: https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=45fe7999658232760b1fd3ce7c578cf4 < 1633601009 628408 :nakilon!~nakilon@user/nakilon PRIVMSG #esolangs :``` ruby -rprime -e "p Prime.prime? 41758540882408627201" < 1633601019 45286 :wib_jonas!~wib_jonas@business-37-191-60-209.business.broadband.hu PRIVMSG #esolangs :ruby too but I gave up trying to understand that when they changed the syntax significantly between ruby 1.8 and 2.0 < 1633601038 113618 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :or, hmm, that somehow reverted to your version? < 1633601045 497273 :HackEso!~h@techne.zem.fi PRIVMSG #esolangs :No output. < 1633601052 107417 :wib_jonas!~wib_jonas@business-37-191-60-209.business.broadband.hu PRIVMSG #esolangs :ais523: that looks like my version, yes. you have to click on the share button. < 1633601063 493981 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :I did < 1633601073 928045 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :but I basically just changed the struct field to K too, and used the const to initialise it < 1633601084 605702 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :so it becomes let b: K = K{K: K}; < 1633601133 767276 :wib_jonas!~wib_jonas@business-37-191-60-209.business.broadband.hu PRIVMSG #esolangs :ais523: yes, but struct fields are clearly scoped, sort of like in C, so that doesn't matter as much < 1633601146 228817 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :right, and scoped to the struct they belong to < 1633601153 577373 :wib_jonas!~wib_jonas@business-37-191-60-209.business.broadband.hu PRIVMSG #esolangs :ais523: also I think you can just write K{K} or K{...} instead of K{K: K} but I'm not certain < 1633601154 477129 :nakilon!~nakilon@user/nakilon PRIVMSG #esolangs :``` ruby -rprime -e "p Prime.methods.grep /div/" < 1633601155 881474 :HackEso!~h@techne.zem.fi PRIVMSG #esolangs :​[:int_from_prime_division, :prime_division] < 1633601172 564619 :nakilon!~nakilon@user/nakilon PRIVMSG #esolangs :``` ruby -rprime -e "p Prime.prime_division 992654469589" < 1633601174 57126 :HackEso!~h@techne.zem.fi PRIVMSG #esolangs :​[[993319, 1], [999331, 1]] < 1633601230 95371 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :wib_jonas: you can write the former, at leats < 1633601234 684540 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :* least < 1633601257 793969 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :neither .. nor ... works though < 1633601289 282102 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :anyway, when I define a tuple struct and brace struct with the same name, I get "note: `K` must be defined only once in the type namespace of this module" < 1633601311 845424 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :which seems to be a big indication as to what Rust is doing < 1633601317 245087 :nakilon!~nakilon@user/nakilon PRIVMSG #esolangs :`factor -12 < 1633601318 176888 :HackEso!~h@techne.zem.fi PRIVMSG #esolangs :factor: invalid option -- '1' \ Try 'factor --help' for more information. < 1633601320 902204 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :(that's in addition to an error) < 1633601322 600260 :nakilon!~nakilon@user/nakilon PRIVMSG #esolangs :haha < 1633601325 983146 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :`factor -- -12 < 1633601326 972768 :HackEso!~h@techne.zem.fi PRIVMSG #esolangs :factor: unrecognized option '-- -12' \ Try 'factor --help' for more information. < 1633601331 711412 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :`` factor -- -12 < 1633601332 847986 :HackEso!~h@techne.zem.fi PRIVMSG #esolangs :factor: ‘-12’ is not a valid positive integer < 1633601338 903087 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :that looks better < 1633601344 581751 :nakilon!~nakilon@user/nakilon PRIVMSG #esolangs :``` ruby -rprime -e "p Prime.prime_division -12" < 1633601346 17901 :HackEso!~h@techne.zem.fi PRIVMSG #esolangs :​[[-1, 1], [2, 2], [3, 1]] < 1633601363 24022 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :…also, it's kind-of amazing that -- syntax works there, there's no reason for factor to be able to support it; probably the consequence of some library for command-line options parsing < 1633601377 92347 :wib_jonas!~wib_jonas@business-37-191-60-209.business.broadband.hu PRIVMSG #esolangs :``` factor --help < 1633601378 253376 :HackEso!~h@techne.zem.fi PRIVMSG #esolangs :Usage: factor [NUMBER]... \ or: factor OPTION \ Print the prime factors of each specified integer NUMBER. If none \ are specified on the command line, read them from standard input. \ \ --help display this help and exit \ --version output version information and exit \ \ GNU coreutils online help: \ Report factor translation bugs to \ Full documentation < 1633601414 10086 :wib_jonas!~wib_jonas@business-37-191-60-209.business.broadband.hu PRIVMSG #esolangs :ais523: it's in GNU coreutils, so it must support --help and --version , so it uses GNU getopt_long < 1633601415 898674 :nakilon!~nakilon@user/nakilon PRIVMSG #esolangs :\wa factorize -12 < 1633601417 247821 :velik!~velik@nakilon.pro PRIVMSG #esolangs : Result: -2^2×3 (3 prime factors, 2 distinct) < 1633601430 338885 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :wib_jonas: I'm thinking about the semantics of non-hyphen-prefixed arguments < 1633601434 726570 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :the -- convention only makes sense when those are filenames < 1633601446 507767 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :or, hmm, maybe in cases like yes? < 1633601453 427549 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :`` yes -- -yes | head < 1633601454 676401 :HackEso!~h@techne.zem.fi PRIVMSG #esolangs :​-yes \ -yes \ -yes \ -yes \ -yes \ -yes \ -yes \ -yes \ -yes \ -yes < 1633601461 655624 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :right, so echo-alikes too < 1633601466 499157 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :`` echo -- -test < 1633601466 671394 :wib_jonas!~wib_jonas@business-37-191-60-209.business.broadband.hu PRIVMSG #esolangs :but it doesn't hurt to just support the -- syntax everywhere < 1633601467 588979 :HackEso!~h@techne.zem.fi PRIVMSG #esolangs :​-- -test < 1633601474 431006 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :(this is what I expected echo to do) < 1633601477 767589 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :`` echo --help < 1633601478 894518 :HackEso!~h@techne.zem.fi PRIVMSG #esolangs :​--help < 1633601482 746811 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :`` /usr/bin/echo --help < 1633601483 868876 :HackEso!~h@techne.zem.fi PRIVMSG #esolangs :​/hackenv/bin/`: line 5: /usr/bin/echo: No such file or directory < 1633601486 238567 :wib_jonas!~wib_jonas@business-37-191-60-209.business.broadband.hu PRIVMSG #esolangs :at least everywhere that takes options starting with a hyphen < 1633601489 23039 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :`` /bin/echo --help < 1633601490 161368 :HackEso!~h@techne.zem.fi PRIVMSG #esolangs :Usage: /bin/echo [SHORT-OPTION]... [STRING]... \ or: /bin/echo LONG-OPTION \ Echo the STRING(s) to standard output. \ \ -n do not output the trailing newline \ -e enable interpretation of backslash escapes \ -E disable interpretation of backslash escapes (default) \ --help display this help and exit \ --version output version information and exit \ \ If -e is in effect, the following sequences < 1633601495 714472 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :ooh < 1633601502 528965 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :`` /bin/echo -- --help < 1633601503 623019 :HackEso!~h@techne.zem.fi PRIVMSG #esolangs :​-- --help < 1633601512 402630 :wib_jonas!~wib_jonas@business-37-191-60-209.business.broadband.hu PRIVMSG #esolangs :hehe < 1633601517 866619 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :`` /bin/echo -E --help < 1633601519 109388 :HackEso!~h@techne.zem.fi PRIVMSG #esolangs :​--help < 1633601530 289839 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :`` /bin/echo -E -E < 1633601531 548971 :HackEso!~h@techne.zem.fi PRIVMSG #esolangs :No output. < 1633601557 165176 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :this isn't doing a great job as an echo command < 1633601586 442952 :wib_jonas!~wib_jonas@business-37-191-60-209.business.broadband.hu PRIVMSG #esolangs :also if REGEX may start with a minus, then it's (grep -e REGEX) but (grep -eREGEX) or (grep -- REGEX) also work, and so do workarounds like (grep -E "(REGEX)") if it's an egrep < 1633601597 513489 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :I don't think there's any sequence of options that's guaranteed to echo the remaining arguments literally? < 1633601625 371553 :wib_jonas!~wib_jonas@business-37-191-60-209.business.broadband.hu PRIVMSG #esolangs :no idea about /bin/echo , I don't really use that. you'd have to look it up in the info documentation how that works. < 1633601648 557582 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :`` POSIXLY_CORRECT=1 /bin/echo --help < 1633601649 626090 :HackEso!~h@techne.zem.fi PRIVMSG #esolangs :​--help < 1633601663 586079 :wib_jonas!~wib_jonas@business-37-191-60-209.business.broadband.hu PRIVMSG #esolangs :it's in coreutils too, so the syntax is probably documented < 1633601679 396189 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :I know, I'm looking at the info page right now < 1633601680 821835 :nakilon!~nakilon@user/nakilon PRIVMSG #esolangs :so there are three ways to factorize numbers here: 1) factor can't negative 2) ruby is slower and harder to invoke 3) velik < 1633601697 520540 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :nakilon: if you support negative inputs than the output is ambiguous < 1633601714 811227 :wib_jonas!~wib_jonas@business-37-191-60-209.business.broadband.hu PRIVMSG #esolangs :ais523: I think (/bin/printf %s "$yourstring") should work < 1633601718 967441 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :is the factorisation of 6 (-2, 3) or (-3, 2)? (or (-1, 2, 3)?) < 1633601732 648572 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :wib_jonas: yes, that's the workaround suggested on echo's info page < 1633601740 132341 :wib_jonas!~wib_jonas@business-37-191-60-209.business.broadband.hu PRIVMSG #esolangs :oh great < 1633601747 808998 :nakilon!~nakilon@user/nakilon PRIVMSG #esolangs :it's ambigous in \wa I would say < 1633601751 360105 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :although the format string should actually be '%s\n' < 1633601758 630778 :nakilon!~nakilon@user/nakilon PRIVMSG #esolangs :but [-1, 1] is pretty much straight forward < 1633601769 465014 :nakilon!~nakilon@user/nakilon PRIVMSG #esolangs :though -1 isn't a prime < 1633601809 540955 :wib_jonas!~wib_jonas@business-37-191-60-209.business.broadband.hu PRIVMSG #esolangs :newline, right < 1633601856 275290 :nakilon!~nakilon@user/nakilon PRIVMSG #esolangs :\wp prime number < 1633601859 736278 :velik!~velik@nakilon.pro PRIVMSG #esolangs : prime number -- positive integer with exactly two divisors, 1 and itself https://en.wikipedia.org/wiki/Prime_number < 1633601872 611778 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :oh, man -s1posix echo suggests using printf too, and says that the only reason echo hasn't "been made obsolescent" is that it's widely used < 1633601906 847860 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :(the spec allows -n to have implementation-defined behaviour) < 1633601925 425750 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :printf "%s\n" isn't a drop-in replacement for echo though < 1633601931 404986 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :`` echo 1 2 3 < 1633601932 481175 :HackEso!~h@techne.zem.fi PRIVMSG #esolangs :1 2 3 < 1633601937 764412 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :`` printf "%s\n" 1 2 3 < 1633601938 817189 :HackEso!~h@techne.zem.fi PRIVMSG #esolangs :1 \ 2 \ 3 < 1633601968 314729 :wib_jonas!~wib_jonas@business-37-191-60-209.business.broadband.hu PRIVMSG #esolangs :and then of course there's all the workarounds like (perl -e'print"@ARGV\n"' "$yourstring") , the links of which I used on Windows < 1633602015 814694 :Riviera!Riviera@user/riviera PRIVMSG #esolangs :it being a drop-in replacement would be silly though, 'cause that would have to have all the same undefined behaviours :) < 1633602068 121600 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :Riviera: well, the usual intended behaviour of `echo` is "join the arguments with spaces, then print them followed by a newline" < 1633602069 831256 :Riviera!Riviera@user/riviera PRIVMSG #esolangs :`` printf -----%s---- hehe < 1633602070 927357 :HackEso!~h@techne.zem.fi PRIVMSG #esolangs :​/hackenv/bin/`: line 5: printf: --: invalid option \ printf: usage: printf [-v var] format [arguments] < 1633602073 86690 :Riviera!Riviera@user/riviera PRIVMSG #esolangs :xD < 1633602098 560909 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :and I'm not sure there's actually a standard POSIX command that does that exactly, not even echo or printf with options < 1633602111 482934 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :(as wib_jonas posted above, perl can do it) < 1633602120 659509 :Riviera!Riviera@user/riviera PRIVMSG #esolangs :la () ( IFS=' '; printf '%s\n' "$*" ) < 1633602121 108861 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :actually no < 1633602125 349533 :Riviera!Riviera@user/riviera PRIVMSG #esolangs :i guess, but meh < 1633602128 359960 :wib_jonas!~wib_jonas@business-37-191-60-209.business.broadband.hu PRIVMSG #esolangs :ais523: maybe a small shell script could do it? < 1633602133 153769 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :`` perl -e'print"@ARGV\n"' -45 < 1633602134 436651 :HackEso!~h@techne.zem.fi PRIVMSG #esolangs :Unrecognized switch: -45 (-h will show valid options). < 1633602138 363303 :Riviera!Riviera@user/riviera PRIVMSG #esolangs :not quite sure what the problem is, you can't use the same syntax, but there's no actual problem < 1633602138 802489 :wib_jonas!~wib_jonas@business-37-191-60-209.business.broadband.hu PRIVMSG #esolangs :yeah, what Riviera says < 1633602140 153037 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :`` perl -e'print"@ARGV\n"' -- -45 < 1633602141 357446 :HackEso!~h@techne.zem.fi PRIVMSG #esolangs :​-45 < 1633602151 522594 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :I think Perl will treat that -- consistently though < 1633602156 272912 :wib_jonas!~wib_jonas@business-37-191-60-209.business.broadband.hu PRIVMSG #esolangs :huh < 1633602176 519488 :wib_jonas!~wib_jonas@business-37-191-60-209.business.broadband.hu PRIVMSG #esolangs :I thought perl treated -e as the last option. maybe not, because it accepts two -e strings? < 1633602180 609507 :Riviera!Riviera@user/riviera PRIVMSG #esolangs :(i'm not sure if function definitions with ( .. ) is posix, but then just nest () within {}) < 1633602185 28941 :wib_jonas!~wib_jonas@business-37-191-60-209.business.broadband.hu PRIVMSG #esolangs :``` perl -e'print' -e' "hello"' < 1633602186 199473 :HackEso!~h@techne.zem.fi PRIVMSG #esolangs :hello < 1633602189 491265 :wib_jonas!~wib_jonas@business-37-191-60-209.business.broadband.hu PRIVMSG #esolangs :yeah :( < 1633602193 508222 :wib_jonas!~wib_jonas@business-37-191-60-209.business.broadband.hu PRIVMSG #esolangs :that's worse < 1633602226 865905 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :anyway, this is starting to convince me that -- makes sense with things other than filenames < 1633602454 651682 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :`` /bin/true --version < 1633602455 733661 :HackEso!~h@techne.zem.fi PRIVMSG #esolangs :true (GNU coreutils) 8.30 \ Copyright (C) 2018 Free Software Foundation, Inc. \ License GPLv3+: GNU GPL version 3 or later . \ This is free software: you are free to change and redistribute it. \ There is NO WARRANTY, to the extent permitted by law. \ \ Written by Jim Meyering. < 1633602457 790756 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :`` /bin/true -- --version < 1633602458 953496 :HackEso!~h@techne.zem.fi PRIVMSG #esolangs :No output. < 1633602462 991470 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :there's another potential use < 1633603285 840931 :velik!~velik@nakilon.pro QUIT :Remote host closed the connection < 1633603317 274177 :velik!~velik@nakilon.pro JOIN #esolangs velik :velik < 1633603369 532917 :velik!~velik@nakilon.pro QUIT :Remote host closed the connection < 1633603391 355998 :velik!~velik@nakilon.pro JOIN #esolangs velik :velik < 1633603400 418889 :wib_jonas!~wib_jonas@business-37-191-60-209.business.broadband.hu PRIVMSG #esolangs :while we're at silly syntax. in HTML in the srcset attribute of an img element, given https://html.spec.whatwg.org/multipage/images.html#srcset-attribute , how are you supposed to quote an URL if its last character is comma? > 1633603436 580970 PRIVMSG #esolangs :14[[07BracketsLang14]]4 10 02https://esolangs.org/w/index.php?diff=88611&oldid=88603 5* 03PoetLuchnik 5* (+13) 10block to subcode in c-like < 1633603532 658733 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :wib_jonas: replace the comma with %2C? < 1633603572 37433 :wib_jonas!~wib_jonas@business-37-191-60-209.business.broadband.hu PRIVMSG #esolangs :is that guaranteed to never change the semantics actually? < 1633603717 69707 :wib_jonas!~wib_jonas@business-37-191-60-209.business.broadband.hu PRIVMSG #esolangs :maybe you could append a ? if there's no query segment, or a & if there is a query segment. that's not perfect either, but might work better. < 1633603763 573591 :fizzie!irc@selene.zem.fi PRIVMSG #esolangs :"URIs that differ in the replacement of an unreserved character with its corresponding percent-encoded US-ASCII octet are equivalent: they identify the same resource." (RFC 3986) < 1633603819 314263 :wib_jonas!~wib_jonas@business-37-191-60-209.business.broadband.hu PRIVMSG #esolangs :fizzie: is comma one of those unreserved characters? < 1633603821 484535 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :oh wow, I think that might answer a question I've been stuck on for a while < 1633603847 527379 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :wib_jonas: appending an & isn't safe, there are multiple possible encodings for query segments and & can be semantically important with some of them < 1633603869 268131 :velik!~velik@nakilon.pro QUIT :Remote host closed the connection < 1633603875 638254 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :(although it's a no-op in the most common encoding, that isn't the only one in use and isn't enforced by the standard) < 1633603887 323112 :velik!~velik@nakilon.pro JOIN #esolangs velik :velik < 1633603903 532027 :fizzie!irc@selene.zem.fi PRIVMSG #esolangs :Actually, the comma is not in the set of entirely unreserved characters; that's only ALPHA / DIGIT / "-" / "." / "_" / "~". < 1633603916 744776 :wib_jonas!~wib_jonas@business-37-191-60-209.business.broadband.hu PRIVMSG #esolangs :ais523: yes, I know, plus I'm not even sure if all schemes of URI allow a query part when there's no question mark < 1633603928 913441 :fizzie!irc@selene.zem.fi PRIVMSG #esolangs :Comma is in the "sub-delims" set, which means it depends on where the comma is, I guess. < 1633604036 984575 :wib_jonas!~wib_jonas@business-37-191-60-209.business.broadband.hu PRIVMSG #esolangs :who-ever invented that syntax for srcset should get a swift kick in the hindside. they could have chosen the vertical bar as a separator or something < 1633604042 522705 :nakilon!~nakilon@user/nakilon PRIVMSG #esolangs :\wa random 20 digit prime number < 1633604044 670442 :velik!~velik@nakilon.pro PRIVMSG #esolangs : Result: 92847417466922372783 | Scientific notation: 9.2847417466922372783 × 10^19 | Properties: 92847417466922372783 is an odd number., 92847417466922372783 is a number that cannot be written as a sum of 3 squares. | Number length: 20 decimal digits | Number names: 92 quintillion ..., 92 billion billion ... | Prime factorization: 92847417466922372783 is a prime number. | Comparison: ≈ 2.1 × the number of arrangements of a 3×3×3 Rubik's cube (... < 1633604051 945405 :wib_jonas!~wib_jonas@business-37-191-60-209.business.broadband.hu PRIVMSG #esolangs :no awit, vertical bar might not be good < 1633604067 505934 :wib_jonas!~wib_jonas@business-37-191-60-209.business.broadband.hu PRIVMSG #esolangs :hmm < 1633604107 707407 :nakilon!~nakilon@user/nakilon PRIVMSG #esolangs :gotta make a shorter variant of the \wa, maybe \was < 1633604112 643940 :fizzie!irc@selene.zem.fi PRIVMSG #esolangs :I guess what the RFC means is, it's possible a specific URI scheme uses ',' as a component delimiter, which means it cannot necessarily be always percent-encoded without changing the meaning. < 1633604113 496223 :nakilon!~nakilon@user/nakilon PRIVMSG #esolangs :though it sounds cryptic < 1633604530 916967 :wib_jonas!~wib_jonas@business-37-191-60-209.business.broadband.hu PRIVMSG #esolangs :I wonder if that could occur in a data: URI, with an escaped comma occuring in one of the key-value parameters after the media type < 1633604578 657380 :wib_jonas!~wib_jonas@business-37-191-60-209.business.broadband.hu PRIVMSG #esolangs :although that wouldn't matter for the srcset thing, where you only escape the *last* comma, since that last comma must be part of the data proper < 1633604661 804677 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :data:text/html,a%2C appears to be an HTML document consisting of "a," < 1633604688 72589 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :whereas data:text/html%2Ca%2C is a bad URL < 1633604700 844299 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :so this does appear to be an inescapable comma < 1633604715 548451 :fizzie!irc@selene.zem.fi PRIVMSG #esolangs :Actually, I'm not 100% sure whether that spec allows for an unescaped comma at all. < 1633604717 900899 :fizzie!irc@selene.zem.fi PRIVMSG #esolangs :The description is: "one or more image candidate strings, each separated from the next by a U+002C COMMA character (,). If an image candidate string contains no descriptors and no ASCII whitespace after the URL, the following image candidate string, if there is one, must begin with one or more ASCII whitespace." < 1633604720 124631 :fizzie!irc@selene.zem.fi PRIVMSG #esolangs :Which you *could* read to mean "if there's a comma not surrounded by whitespace, it's not actually separating two strings", but you could *also* read as saying "a comma *always* separates two strings, and it's just invalid to not have whitespace there". < 1633604757 693580 :wib_jonas!~wib_jonas@business-37-191-60-209.business.broadband.hu PRIVMSG #esolangs :fizzie: huh < 1633604765 136409 :wib_jonas!~wib_jonas@business-37-191-60-209.business.broadband.hu PRIVMSG #esolangs :that's even more scary < 1633604782 25259 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :it makes more sense to check the parsing algorithm rather than the description of valid syntax for this sort of thing, IMO < 1633604817 148027 :fizzie!irc@selene.zem.fi PRIVMSG #esolangs :Wouldn't that only work if there is a canonical algorithm? < 1633604841 381729 :fizzie!irc@selene.zem.fi PRIVMSG #esolangs :Oh, there is one, I see. < 1633604899 879722 :fizzie!irc@selene.zem.fi PRIVMSG #esolangs :Yeah, an embedded comma with no surrounding whitespace will be just collected as part of the URL. < 1633604958 429900 :wib_jonas!~wib_jonas@business-37-191-60-209.business.broadband.hu PRIVMSG #esolangs :fizzie: how about a comma before (the separator comma after an URL)? < 1633604959 738494 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :there's always a canonical algorithm in HTML5 < 1633604980 925822 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :I found the spec really creepy the first time I read it < 1633604985 316247 :wib_jonas!~wib_jonas@business-37-191-60-209.business.broadband.hu PRIVMSG #esolangs :although that won't help < 1633604990 467118 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :it's basically an entire web browser implementation in pseudocode < 1633605010 569146 :wib_jonas!~wib_jonas@business-37-191-60-209.business.broadband.hu PRIVMSG #esolangs :because you usually want a scale thingy between the URL and the separator comma < 1633605036 281776 :wib_jonas!~wib_jonas@business-37-191-60-209.business.broadband.hu PRIVMSG #esolangs :ais523: yep. < 1633605045 638295 :wib_jonas!~wib_jonas@business-37-191-60-209.business.broadband.hu PRIVMSG #esolangs :the HTML5 spec is like that < 1633605054 86749 :wib_jonas!~wib_jonas@business-37-191-60-209.business.broadband.hu PRIVMSG #esolangs :and it has an entire javascript API in it too < 1633605054 681740 :velik!~velik@nakilon.pro QUIT :Remote host closed the connection < 1633605082 819467 :velik!~velik@nakilon.pro JOIN #esolangs velik :velik < 1633605096 983507 :wib_jonas!~wib_jonas@business-37-191-60-209.business.broadband.hu PRIVMSG #esolangs :as in an api from (the javascript running client-side in the webpage) to the webpage content < 1633605140 339015 :nakilon!~nakilon@user/nakilon PRIVMSG #esolangs :\was pi < 1633605144 613871 :velik!~velik@nakilon.pro PRIVMSG #esolangs : Decimal approximation: 3.1415926535897932384626433832795028841971693993751058209749445923... < 1633605271 593703 :nakilon!~nakilon@user/nakilon PRIVMSG #esolangs :``` ruby -e "p Math::PI" < 1633605272 889229 :HackEso!~h@techne.zem.fi PRIVMSG #esolangs :3.141592653589793 < 1633605297 259052 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :somewhat difficult Prolog question: is there a way to write a predicate for which, e.g., p(f(A,B,C), [A,C], X, Y) on input becomes p(f(A,B,C), [A,C], f(D,B,E), [D,E]) on output? < 1633605309 559225 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :i.e. I want something like copy_term, but it only copies some of the variables, not all of them < 1633605323 339000 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :I was hoping it would be a builtin, but I can't find one < 1633605342 739127 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :so either there's some way to abuse a degenerate case of bagof, or else I'll have to write it manually < 1633605515 588605 :wib_jonas!~wib_jonas@business-37-191-60-209.business.broadband.hu PRIVMSG #esolangs :ais523: didn't one of the prolog implementations have a builtin for either that, or for when you specify the compliment set of variables? < 1633605558 879663 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :I guess I'll have to write it manually, by iterating over it to find the free variables, then doing copy_term(f(A,B,C)-[A,C]-[B], f(D,B,E)-[A,C]-[B])) as the final step (with the [B]s unified earlier) < 1633605578 349445 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :err, copy_term(f(A,B,C)-[A,C]-[B], f(D,B,E)-[D,E]-[B])), obviously < 1633605601 298214 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :wib_jonas: bag_of is close but doesn't seem to be close enough < 1633605649 933082 :arseniiv_!~arseniiv@136.169.202.194 JOIN #esolangs * :the chaotic arseniiv < 1633605659 773817 :Thelie!~Thelie@business-24-134-17-157.pool2.vodafone-ip.de JOIN #esolangs * :Thelie < 1633605785 338081 :wib_jonas!~wib_jonas@business-37-191-60-209.business.broadband.hu PRIVMSG #esolangs :hmm, I don't find such a builtin at a quick look < 1633605829 721977 :wib_jonas!~wib_jonas@business-37-191-60-209.business.broadband.hu PRIVMSG #esolangs :I think I looked for something like that when I made olvashato, and perhaps even before, to implement functions with upvalues, but then just decided I'll use copy_term and say that the upvalues must be ground terms < 1633605875 354023 :wib_jonas!~wib_jonas@business-37-191-60-209.business.broadband.hu PRIVMSG #esolangs :not quite ground terms, but terms with no free variables -- bound variables that are used only inside them, such as in referenced functions with upvalues, those are fine, they're renamed harmlessly by copy_term < 1633605903 977746 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :right < 1633605966 285933 :wib_jonas!~wib_jonas@business-37-191-60-209.business.broadband.hu PRIVMSG #esolangs :can you do something like temporarily define a perdicate with asserta, with variables that you don't want to copy mentioned in the head? < 1633606002 962004 :dutch!~DutchIngr@user/dutch JOIN #esolangs DutchIngraham :dutch < 1633606041 404705 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :the iterate-to-find-free-variables approach is almost working < 1633606060 164238 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :the main difficulty is just that call/9 doesn't exist, so I'm needing to create temporary structures to hold some of my arguments < 1633606114 564224 :ais523!~ais523@109.249.181.94 PRIVMSG #esolangs :(I'm already iterating over the structure anyway so I threw in some free variable extraction while I was there) < 1633606313 864931 :velik!~velik@nakilon.pro QUIT :Remote host closed the connection < 1633606340 367015 :velik!~velik@nakilon.pro JOIN #esolangs velik :velik < 1633606389 547191 :nakilon!~nakilon@user/nakilon PRIVMSG #esolangs :\wa e < 1633606393 756342 :velik!~velik@nakilon.pro PRIVMSG #esolangs : Upper case: E (U+0045) | Name: Latin small letter E | Phonetic alphabet: Echo (ECK·OH) | "e" on a US English keyboard: (left middle finger) | Similar characters: ℮ (estimated symbol) | ℯ (script small E) < 1633606399 740529 :nakilon!~nakilon@user/nakilon PRIVMSG #esolangs :\was e constant < 1633606402 14129 :velik!~velik@nakilon.pro PRIVMSG #esolangs : Decimal approximation: 2.7182818284590452353602874713526624977572470936999595749669676277... < 1633606407 546760 :nakilon!~nakilon@user/nakilon PRIVMSG #esolangs :\wa ꙮ < 1633606408 733873 :velik!~velik@nakilon.pro PRIVMSG #esolangs : Name: Cyrillic letter multiocular O | Unicode block: Cyrillic Extended-B (42560 through 42655) (96 characters) < 1633606485 98792 :nakilon!~nakilon@user/nakilon PRIVMSG #esolangs :weird that it said it's upper case e, anyway < 1633606593 988819 :nakilon!~nakilon@user/nakilon PRIVMSG #esolangs :velik ꙮ < 1633606617 933555 :nakilon!~nakilon@user/nakilon PRIVMSG #esolangs :scared < 1633606651 523854 :fizzie!irc@selene.zem.fi PRIVMSG #esolangs :It doesn't really say it's uppercase, it tells you what the uppercase equivalent is. < 1633606678 337211 :fizzie!irc@selene.zem.fi PRIVMSG #esolangs :The wobsite goes "Input interpretation: e (character)", "Name: Latin small letter E", "Upper case: E", "Similar characters: ..." and so on. < 1633606691 465347 :nakilon!~nakilon@user/nakilon PRIVMSG #esolangs :oh indeed < 1633606847 663328 :nakilon!~nakilon@user/nakilon PRIVMSG #esolangs :\was random 100 digit prime number < 1633606849 845611 :velik!~velik@nakilon.pro PRIVMSG #esolangs : Decimal approximation: 6.97799599080530032728805445398475807079187919778470343445802... × 10^99 | Result: 6977995990805300327288054453984758070791879197784703434458023173697519646764322440809193108195240417 < 1633606957 23147 :nakilon!~nakilon@user/nakilon PRIVMSG #esolangs :\was factorize random 100 digit prime number < 1633606966 288061 :velik!~velik@nakilon.pro PRIVMSG #esolangs :thread error < 1633607005 554232 :nakilon!~nakilon@user/nakilon PRIVMSG #esolangs :(parser fault) < 1633607148 312439 :nakilon!~nakilon@user/nakilon PRIVMSG #esolangs :ah, nope, it's because of the trailing space in my message, gotta fix < 1633607346 696257 :velik!~velik@nakilon.pro QUIT :Remote host closed the connection < 1633607375 759884 :velik!~velik@nakilon.pro JOIN #esolangs velik :velik < 1633607699 960611 :velik!~velik@nakilon.pro QUIT :Remote host closed the connection < 1633607724 809886 :velik!~velik@nakilon.pro JOIN #esolangs velik :velik < 1633611863 921722 :Thelie!~Thelie@business-24-134-17-157.pool2.vodafone-ip.de QUIT :Remote host closed the connection < 1633612240 913682 :nakilon!~nakilon@user/nakilon PRIVMSG #esolangs :twitch is now opensource /s < 1633615994 959913 :Sgeo!~Sgeo@user/sgeo JOIN #esolangs Sgeo :realname < 1633616024 653363 :ais523!~ais523@109.249.181.94 QUIT :Quit: quit < 1633617275 761492 :int-e!~noone@int-e.eu PRIVMSG #esolangs :yeah, the terrible kind where you can see the code but not touch it with a ten foot pole < 1633617319 559994 :int-e!~noone@int-e.eu PRIVMSG #esolangs :(except for the 80% (I suppose) that are free software) < 1633619818 36997 :Thelie!~Thelie@business-24-134-17-157.pool2.vodafone-ip.de JOIN #esolangs * :Thelie < 1633620229 903409 :InfiniteDonuts!~InfiniteD@208.122.67.117 JOIN #esolangs * :[https://web.libera.chat] InfiniteDonuts < 1633620272 972306 :InfiniteDonuts!~InfiniteD@208.122.67.117 QUIT :Client Quit < 1633620647 924330 :delta23!~delta23@user/delta23 JOIN #esolangs delta23 :delta23__ < 1633621525 108364 :Thelie!~Thelie@business-24-134-17-157.pool2.vodafone-ip.de QUIT :Remote host closed the connection < 1633621533 937223 :arseniiv_!~arseniiv@136.169.202.194 QUIT :Ping timeout: 265 seconds < 1633622314 196028 :wib_jonas!~wib_jonas@business-37-191-60-209.business.broadband.hu QUIT :Quit: Client closed > 1633622837 570212 PRIVMSG #esolangs :14[[07FlipJump14]]4 10 02https://esolangs.org/w/index.php?diff=88612&oldid=88579 5* 03Tomhe 5* (+38) 10/* The Standard Library */ < 1633623023 308774 :arseniiv_!~arseniiv@136.169.202.194 JOIN #esolangs * :the chaotic arseniiv < 1633623576 653466 :chiselfuse!~chiselfus@user/chiselfuse QUIT :Ping timeout: 276 seconds < 1633623601 358460 :benji_!~benji@user/benji JOIN #esolangs benji :benji < 1633623609 647699 :chiselfuse!~chiselfus@user/chiselfuse JOIN #esolangs chiselfuse :chiselfuse < 1633623656 171048 :benji!~benji@user/benji QUIT :Ping timeout: 246 seconds < 1633623656 564112 :benji_!~benji@user/benji NICK :benji < 1633623716 985235 :xylochoron[m]!~xylochoro@2001:470:69fc:105::e2e1 QUIT :Ping timeout: 260 seconds < 1633623717 168773 :craigo[m]!~craigover@2001:470:69fc:105::12bc QUIT :Ping timeout: 260 seconds > 1633623777 23398 PRIVMSG #esolangs :14[[07Talk:Hanoi Love14]]4 N10 02https://esolangs.org/w/index.php?oldid=88613 5* 03Asteriska 5* (+227) 10Created page with "I am working on an interpreter for this language in ruby. Any news on it will go here. ~~~~" > 1633624303 115001 PRIVMSG #esolangs :14[[07OISC14]]4 M10 02https://esolangs.org/w/index.php?diff=88614&oldid=87268 5* 03Tomhe 5* (+86) 10more info on FlipJump < 1633624491 650070 :src!~src@user/src JOIN #esolangs src :realname < 1633624718 306949 :src!~src@user/src QUIT :Client Quit < 1633624729 994130 :src!~src@user/src JOIN #esolangs src :realname < 1633625075 602363 :xylochoron[m]!~xylochoro@2001:470:69fc:105::e2e1 JOIN #esolangs * :@xylochoron:matrix.org < 1633625139 113530 :craigo[m]!~craigover@2001:470:69fc:105::12bc JOIN #esolangs * :@craigoverend:matrix.org < 1633625332 581641 :arseniiv_!~arseniiv@136.169.202.194 QUIT :Quit: gone too far < 1633625494 817060 :sprock!~sprock@user/sprock QUIT :Ping timeout: 245 seconds < 1633625577 933284 :arseniiv!~arseniiv@136.169.202.194 JOIN #esolangs * :the chaotic arseniiv < 1633626356 570205 :imode!~imode@user/imode JOIN #esolangs imode :imode < 1633627486 975921 :b_jonas!~x@catv-176-63-2-81.catv.broadband.hu PRIVMSG #esolangs :ais523: probably doesn't help you but just in case: there's a built-in predicate term_variables/2 that gives you a list of all variables in a term. < 1633627731 859462 :nakilon!~nakilon@user/nakilon PRIVMSG #esolangs :Google keeps disappointing me < 1633627817 356404 :nakilon!~nakilon@user/nakilon PRIVMSG #esolangs :dude says I have exceeded the 720 hours month CPU quota < 1633627840 987260 :nakilon!~nakilon@user/nakilon PRIVMSG #esolangs :I show him CPU graph in their GUI that shows I'm <25% for at least a months already < 1633627848 572752 :nakilon!~nakilon@user/nakilon PRIVMSG #esolangs :and guess what < 1633627874 502080 :nakilon!~nakilon@user/nakilon PRIVMSG #esolangs :he says "yes, 720 = 24 * 30 but some months have more days" < 1633627897 208753 :nakilon!~nakilon@user/nakilon PRIVMSG #esolangs :*more than 30 < 1633627930 489750 :nakilon!~nakilon@user/nakilon PRIVMSG #esolangs :so I've already paid for two 120 days long months in some alternative reality < 1633628604 404154 :int-e!~noone@int-e.eu PRIVMSG #esolangs :> 360/365.2422 -- uptime < 1633628606 4167 :lambdabot!~lambdabot@haskell/bot/lambdabot PRIVMSG #esolangs : 0.9856473320990837 < 1633628614 507392 :int-e!~noone@int-e.eu PRIVMSG #esolangs :hmm, not true actually < 1633628636 4263 :int-e!~noone@int-e.eu PRIVMSG #esolangs :> 358.2422/365.2422 -- uptime, corrected for february always having fewer than 30 days < 1633628637 867211 :lambdabot!~lambdabot@haskell/bot/lambdabot PRIVMSG #esolangs : 0.9808346352091845 < 1633628815 489430 :int-e!~noone@int-e.eu PRIVMSG #esolangs :So how does that really work... you buy a CPU-month of computation? And the fine print says that if you use a CPU in a particular minute, they will bill you for that minute? :P < 1633628872 591597 :int-e!~noone@int-e.eu PRIVMSG #esolangs :(That 25% number is great but is that really what they bill you for? If you keep the VM busy it'll mean more hot data in memory which is a real cost.) < 1633628899 607688 :int-e!~noone@int-e.eu PRIVMSG #esolangs :Or the CPU may be idle while data for your VM is swapped in. < 1633628918 166062 :int-e!~noone@int-e.eu PRIVMSG #esolangs :Lots of reasons why this might actually end up with you being billed for 100% of that time. < 1633628933 302027 :int-e!~noone@int-e.eu PRIVMSG #esolangs :<3 speculation < 1633629039 63197 :nakilon!~nakilon@user/nakilon PRIVMSG #esolangs :in the Billing interface when I chose the time span of the last half of the month I see that it applies a "360 hours discount" < 1633629069 620081 :nakilon!~nakilon@user/nakilon PRIVMSG #esolangs :but I'm already exceeding it because in some freaking way I've used 470 hours < 1633629101 955679 :delta23_!~delta23@user/delta23 JOIN #esolangs delta23 :delta23__ < 1633629109 201841 :delta23!~delta23@user/delta23 QUIT :Killed (NickServ (GHOST command used by delta23_)) < 1633629109 911938 :nakilon!~nakilon@user/nakilon PRIVMSG #esolangs :and so it already has few dollars to bill to the time of the next invoice, and the prediction is even higher for this month than for the previous one < 1633629113 218773 :delta23_!~delta23@user/delta23 NICK :delta23 < 1633629160 982581 :nakilon!~nakilon@user/nakilon PRIVMSG #esolangs :so I've migrated half of the services to another cloud and switrched the machine type to pay ZERO but in fact I've got billed in August even more than usually, even more in September and even MORE in October according to the current extrapolation < 1633629378 762616 :nakilon!~nakilon@user/nakilon PRIVMSG #esolangs :their Free Tier does not separate CPU from RAM -- it says "one e2-micro instance per month" > 1633629467 911078 PRIVMSG #esolangs :14[[07Scroll14]]4 10 02https://esolangs.org/w/index.php?diff=88615&oldid=87568 5* 03MathR 5* (+118) 10 < 1633629651 902193 :nakilon!~nakilon@user/nakilon PRIVMSG #esolangs :I'm 80% sure they are billing me for the instance that has glitched and isn't under my control < 1633629658 789583 :sprock!~sprock@user/sprock JOIN #esolangs sprock :Maeve Sproule < 1633629684 573662 :nakilon!~nakilon@user/nakilon PRIVMSG #esolangs :so I've provided screenshot of my Compute Engine panel < 1633629951 843765 :nakilon!~nakilon@user/nakilon PRIVMSG #esolangs :but it would explain only a September anyway, but I was billed for August for no reason too... < 1633629972 391224 :b_jonas!~x@catv-176-63-2-81.catv.broadband.hu PRIVMSG #esolangs :I haven't heard of a virtual server provider that charges extra for CPU usage yet. only ones that charge extra for the amount of data through net connection. it's how they can offer such a low base price then catch you unaware. more honest model would just limit the net access (or CPU respectively) to very slow when you exceed the quota, with an option to pay for more, rather than charge you < 1633629978 577234 :b_jonas!~x@catv-176-63-2-81.catv.broadband.hu PRIVMSG #esolangs :automatically. < 1633629990 306468 :b_jonas!~x@catv-176-63-2-81.catv.broadband.hu PRIVMSG #esolangs :but the providers with the more honest models seem to have higher base prices. no surprise there. < 1633630017 998518 :nakilon!~nakilon@user/nakilon PRIVMSG #esolangs :GCP instead does not have charges for traffic > 1633630067 988841 PRIVMSG #esolangs :14[[07Scroll14]]4 10 02https://esolangs.org/w/index.php?diff=88616&oldid=88615 5* 03MathR 5* (+4) 10 < 1633630072 973435 :b_jonas!~x@catv-176-63-2-81.catv.broadband.hu PRIVMSG #esolangs :the same distinction exists for mobile internet service too. slow your internet access when you exceed the quota, versus automatically charge a horrendous price for each byte that you go over the quota. < 1633630144 627752 :nakilon!~nakilon@user/nakilon PRIVMSG #esolangs :there are only some bucket storage traffic limits that I won't ever exceed even if I try < 1633630192 755969 :nakilon!~nakilon@user/nakilon PRIVMSG #esolangs :you'd rather reach the limits of operations count if doing it carelessly < 1633630350 285131 :nakilon!~nakilon@user/nakilon PRIVMSG #esolangs :in fact I guess it's even impossible to utilize 720 for me because https://cloud.google.com/compute/vm-instance-pricing according to this e2-micro is limited to 25% load < 1633630377 823792 :nakilon!~nakilon@user/nakilon PRIVMSG #esolangs :it's another reason why it all makes no sense < 1633631066 462766 :b_jonas!~x@catv-176-63-2-81.catv.broadband.hu PRIVMSG #esolangs :I guess an even more evil virtual server provider could charge you extra if you accidentally allocate more hard disk capacity than is in the base price, or have more hard disk access traffic, or allocate more RAM. < 1633631072 439402 :int-e!~noone@int-e.eu PRIVMSG #esolangs :So what's that context, this? https://cloud.google.com/free/docs/gcp-free-tier#compute < 1633631169 412143 :int-e!~noone@int-e.eu PRIVMSG #esolangs :which is different in that 1) it sounds like 0.25 CPU-hours per hour because that's what the e2-micro instance gives you and 2) it takes the actual length of the month into account. so... weird < 1633631218 344263 :int-e!~noone@int-e.eu PRIVMSG #esolangs :love how the egress excludes China and Australia, I wonder why. < 1633631276 405794 :b_jonas!~x@catv-176-63-2-81.catv.broadband.hu PRIVMSG #esolangs :int-e: probably because those have slow internet connections to the outside world < 1633631286 315249 :int-e!~noone@int-e.eu PRIVMSG #esolangs :b_jonas: this is the difference between cloud and vps providers ;) < 1633631302 760852 :int-e!~noone@int-e.eu PRIVMSG #esolangs :"this" being the resource-use-centric billing > 1633633559 76647 PRIVMSG #esolangs :14[[07Category:Stack-based14]]4 10 02https://esolangs.org/w/index.php?diff=88617&oldid=7904 5* 03AceKiron 5* (+29) 10 > 1633633565 681338 PRIVMSG #esolangs :14[[07Category:Queue-based14]]4 10 02https://esolangs.org/w/index.php?diff=88618&oldid=7927 5* 03AceKiron 5* (+29) 10 < 1633633872 765319 :nakilon!~nakilon@user/nakilon PRIVMSG #esolangs :there are websites with popular language runtimes working via webasm or smth like that < 1633633889 699026 :nakilon!~nakilon@user/nakilon PRIVMSG #esolangs :and there are websites to edit the code in coop, for job interviews, etc. < 1633633903 734660 :nakilon!~nakilon@user/nakilon PRIVMSG #esolangs :why the hell there is no website with coop editing AND the runtime? < 1633634005 993225 :zzo38!~zzo38@host-24-207-14-22.public.eastlink.ca PRIVMSG #esolangs :Apple has "Uniform Type Identifier", I had my own idea of "Structured Type Identifier" which allows specifying multiple types and also allows parameters (e.g. to specify code page). It is not fully defined and may be changed later or abandoned, but for example "text:postscript:paged:document", "text:postscript:program", "postscript:paged:document", and "postscript:program" are distinguished. (Terms can be in any order.) < 1633634010 146150 :hendursa1!~weechat@user/hendursaga QUIT :Quit: hendursa1 < 1633634041 630177 :hendursaga!~weechat@user/hendursaga JOIN #esolangs hendursaga :weechat < 1633634091 10481 :zzo38!~zzo38@host-24-207-14-22.public.eastlink.ca PRIVMSG #esolangs :It is a similar idea but I think that UTI has a few problems, such as I think it is unable to describe things like this example < 1633636277 623709 :nakilon!~nakilon@user/nakilon PRIVMSG #esolangs :oh wait, people say repl.it has both things at the same time < 1633636728 324021 :earendel!uid498179@user/earendel JOIN #esolangs earendel :AmoreFS < 1633638395 506694 :dutch!~DutchIngr@user/dutch QUIT :Quit: WeeChat 3.3 < 1633638654 595860 :dutch!~DutchIngr@user/dutch JOIN #esolangs DutchIngraham :dutch < 1633640254 157157 :src!~src@user/src QUIT :Quit: Leaving < 1633640326 585811 :sprout_!~quassel@2a02:a467:ccd6:1:9093:865d:793c:93e8 JOIN #esolangs * :anon < 1633640537 578334 :sprout!~quassel@2a02:a467:ccd6:1:aca2:ad7b:536b:eb53 QUIT :Ping timeout: 265 seconds < 1633641631 365630 :Lord_of_Life!~Lord@user/lord-of-life/x-2819915 QUIT :Ping timeout: 245 seconds < 1633641781 352309 :earendel!uid498179@user/earendel QUIT :Ping timeout: 252 seconds < 1633641816 615276 :Lord_of_Life!~Lord@user/lord-of-life/x-2819915 JOIN #esolangs Lord_of_Life :Lord < 1633641848 734284 :ProofTechnique!sid79547@id-79547.ilkley.irccloud.com QUIT :Ping timeout: 250 seconds < 1633641848 766916 :integral!sid296274@user/integral QUIT :Ping timeout: 250 seconds < 1633641853 867341 :yuu_!sid267332@id-267332.ilkley.irccloud.com QUIT :Ping timeout: 252 seconds < 1633641855 287011 :j4cbo!sid186930@id-186930.helmsley.irccloud.com QUIT :Ping timeout: 250 seconds < 1633641872 155418 :Argorok!sid195487@id-195487.hampstead.irccloud.com QUIT :Ping timeout: 268 seconds < 1633641872 231213 :pikhq!sid394595@user/pikhq QUIT :Ping timeout: 268 seconds < 1633641886 663243 :dnm!sid401311@2a03:5180:f:2::6:1f9f QUIT :Ping timeout: 260 seconds < 1633641896 361121 :mich181189!sid268336@londonhackspace/mich181189 QUIT :Ping timeout: 268 seconds < 1633641905 577796 :mich181189_!sid268336@londonhackspace/mich181189 JOIN #esolangs mich181189 :Michael < 1633641909 193964 :aarchi!sid486183@id-486183.uxbridge.irccloud.com QUIT :Ping timeout: 268 seconds < 1633641933 391812 :earendel!uid498179@user/earendel JOIN #esolangs earendel :AmoreFS < 1633641937 961791 :dnm!sid401311@lymington.irccloud.com JOIN #esolangs dnm :dnm < 1633641992 591053 :Argorok!sid195487@hampstead.irccloud.com JOIN #esolangs * :Argorok < 1633642058 357182 :j4cbo!sid186930@helmsley.irccloud.com JOIN #esolangs * :j4cbo < 1633642075 5350 :yuu_!sid267332@ilkley.irccloud.com JOIN #esolangs * :yuu < 1633642122 342379 :pikhq!sid394595@user/pikhq JOIN #esolangs pikhq :Ada Worcester < 1633642158 951687 :ProofTechnique!sid79547@ilkley.irccloud.com JOIN #esolangs ProofTechnique :ptech < 1633642198 220096 :integral!sid296274@user/integral JOIN #esolangs integral :bsmith < 1633642220 434137 :aarchi!sid486183@uxbridge.irccloud.com JOIN #esolangs aarchi :aarchi < 1633642394 819293 :sprock!~sprock@user/sprock QUIT :Ping timeout: 245 seconds < 1633646266 933561 :Asteriska!~Asteriska@2601:603:5180:a000:7c7f:ad4c:80d4:5bb JOIN #esolangs * :[https://web.libera.chat] Asteriska < 1633646284 595751 :Asteriska!~Asteriska@2601:603:5180:a000:7c7f:ad4c:80d4:5bb PRIVMSG #esolangs :hello esolangs irc < 1633646298 558335 :Asteriska!~Asteriska@2601:603:5180:a000:7c7f:ad4c:80d4:5bb PRIVMSG #esolangs :oops i pinged the bot < 1633646384 882527 :Asteriska!~Asteriska@2601:603:5180:a000:7c7f:ad4c:80d4:5bb PRIVMSG #esolangs :im trying to make an interpreter for hanoi love, in ruby, on replit.com, and im running into a point where i have no clue how to get it working < 1633646481 196556 :Corbin!~Corbin@c-73-67-140-116.hsd1.or.comcast.net PRIVMSG #esolangs :Cool. < 1633646492 870683 :Asteriska!~Asteriska@2601:603:5180:a000:7c7f:ad4c:80d4:5bb PRIVMSG #esolangs :this is the spec sheet http://kidsquid.com:443/files/hanoilove/hanoi.txt < 1633646532 786280 :Asteriska!~Asteriska@2601:603:5180:a000:7c7f:ad4c:80d4:5bb PRIVMSG #esolangs :and this is what ive got so far https://replit.com/@foxsouns/HanoiL-Intp < 1633646553 47209 :Asteriska!~Asteriska@2601:603:5180:a000:7c7f:ad4c:80d4:5bb PRIVMSG #esolangs :just trying to wrap my head around it is hurting < 1633646575 92444 :Asteriska!~Asteriska@2601:603:5180:a000:7c7f:ad4c:80d4:5bb PRIVMSG #esolangs :this is my first project < 1633646653 25878 :Asteriska!~Asteriska@2601:603:5180:a000:7c7f:ad4c:80d4:5bb PRIVMSG #esolangs :maybe not the easiest haha < 1633646682 108559 :Asteriska!~Asteriska@2601:603:5180:a000:7c7f:ad4c:80d4:5bb PRIVMSG #esolangs :anybody have any experience to give me a hand? < 1633646806 92347 :nakilon!~nakilon@user/nakilon PRIVMSG #esolangs :Asteriska what does stop you? < 1633646862 913302 :Asteriska!~Asteriska@2601:603:5180:a000:7c7f:ad4c:80d4:5bb PRIVMSG #esolangs :logic, i guess: i cant think of a way to handle and express the stacks < 1633647165 87555 :nakilon!~nakilon@user/nakilon PRIVMSG #esolangs :woah, basic < 1633647203 791732 :Asteriska!~Asteriska@2601:603:5180:a000:7c7f:ad4c:80d4:5bb PRIVMSG #esolangs :i know: wanted to bring it to a modern lang when i first saw it < 1633647252 546681 :Asteriska!~Asteriska@2601:603:5180:a000:7c7f:ad4c:80d4:5bb PRIVMSG #esolangs :quickbasic runs on dos only, afaik: nobody wants to port it to js or anything haha < 1633647261 879746 :nakilon!~nakilon@user/nakilon PRIVMSG #esolangs :what is cleaned? < 1633647280 720209 :nakilon!~nakilon@user/nakilon PRIVMSG #esolangs :quick basic worked fine on Win XP at least < 1633647297 351023 :nakilon!~nakilon@user/nakilon PRIVMSG #esolangs :pretty sure it's supported even today, just named diffrently maybe < 1633647303 915070 :Asteriska!~Asteriska@2601:603:5180:a000:7c7f:ad4c:80d4:5bb PRIVMSG #esolangs :its just the proper instructions, with all else removed < 1633647361 141621 :Asteriska!~Asteriska@2601:603:5180:a000:7c7f:ad4c:80d4:5bb PRIVMSG #esolangs :basically i take out these: . ' , ; ` " : ! < 1633647362 267985 :nakilon!~nakilon@user/nakilon PRIVMSG #esolangs :so cleaned is the code? < 1633647366 339924 :Asteriska!~Asteriska@2601:603:5180:a000:7c7f:ad4c:80d4:5bb PRIVMSG #esolangs :yeah < 1633647383 730130 :nakilon!~nakilon@user/nakilon PRIVMSG #esolangs :how does stack D work? < 1633647390 70065 :nakilon!~nakilon@user/nakilon PRIVMSG #esolangs :*supposed to work < 1633647416 477463 :Asteriska!~Asteriska@2601:603:5180:a000:7c7f:ad4c:80d4:5bb PRIVMSG #esolangs :its something like the code being ran? im lost on it tbh < 1633647418 699405 :nakilon!~nakilon@user/nakilon PRIVMSG #esolangs :I guses you don't need \ in lines 41 and 45 < 1633647472 14935 :Asteriska!~Asteriska@2601:603:5180:a000:7c7f:ad4c:80d4:5bb PRIVMSG #esolangs :and line 58 of reference.txt explains stack d < 1633647517 159464 :Asteriska!~Asteriska@2601:603:5180:a000:7c7f:ad4c:80d4:5bb PRIVMSG #esolangs :its a weird self-editing clusterfuck thing, supposedly what loops are based upon < 1633647545 120035 :nakilon!~nakilon@user/nakilon PRIVMSG #esolangs :I guess D is like addresses of call stack < 1633647585 807786 :nakilon!~nakilon@user/nakilon PRIVMSG #esolangs :but you control it manually... < 1633647645 757520 :Asteriska!~Asteriska@2601:603:5180:a000:7c7f:ad4c:80d4:5bb PRIVMSG #esolangs :yeah: i was hoping it'd be one of those things where its easy to implement, but hard to use, but that is not the case < 1633647654 67414 :Asteriska!~Asteriska@2601:603:5180:a000:7c7f:ad4c:80d4:5bb PRIVMSG #esolangs :its just hard all around < 1633647674 743019 :Asteriska!~Asteriska@2601:603:5180:a000:7c7f:ad4c:80d4:5bb PRIVMSG #esolangs :and basic isnt very legible, so i dont really know how he pulled it off < 1633647678 519453 :nakilon!~nakilon@user/nakilon PRIVMSG #esolangs :so D is like a storage of addresses for manual GOTO < 1633647726 892312 :Asteriska!~Asteriska@2601:603:5180:a000:7c7f:ad4c:80d4:5bb PRIVMSG #esolangs :that would make sense; if it helps ive got some of the sample programs i found in the progs/ folder < 1633647786 445144 :nakilon!~nakilon@user/nakilon PRIVMSG #esolangs :as I understood you ahve to store indices in D but you assign cleaned to it that is wrong < 1633647833 65307 :Asteriska!~Asteriska@2601:603:5180:a000:7c7f:ad4c:80d4:5bb PRIVMSG #esolangs :dang, now i have to refigure out how arrays work < 1633647927 287062 :zzo38!~zzo38@host-24-207-14-22.public.eastlink.ca PRIVMSG #esolangs :QuickBasic works on DOSBOX on Linux < 1633647930 442863 :nakilon!~nakilon@user/nakilon PRIVMSG #esolangs :I don't see where is the instruction of goto, how does it loop? < 1633647939 598997 :Asteriska!~Asteriska@2601:603:5180:a000:7c7f:ad4c:80d4:5bb PRIVMSG #esolangs :supposedly d < 1633648164 880950 :nakilon!~nakilon@user/nakilon PRIVMSG #esolangs :\wa ascii 34 < 1633648167 519999 :velik!~velik@nakilon.pro PRIVMSG #esolangs : Name: quotation mark | Similar characters: ʺ (modifier letter double prime) | ̋ (combining double acute accent) | ̎ (combining double vertical line above) | ״ (Hebrew punctuation Gershayim) | , , (double prime) | 〃 (ditto mark) < 1633648279 95368 :Asteriska!~Asteriska@2601:603:5180:a000:7c7f:ad4c:80d4:5bb PRIVMSG #esolangs :? < 1633648296 873320 :Asteriska!~Asteriska@2601:603:5180:a000:7c7f:ad4c:80d4:5bb PRIVMSG #esolangs :oh < 1633648303 83860 :Asteriska!~Asteriska@2601:603:5180:a000:7c7f:ad4c:80d4:5bb PRIVMSG #esolangs :thats a bot, duh < 1633648368 394814 :Asteriska!~Asteriska@2601:603:5180:a000:7c7f:ad4c:80d4:5bb PRIVMSG #esolangs :zzo38: i dont always have access to a linux system, and dont want a programming language's only implementation to be via a vm < 1633648384 492501 :nakilon!~nakilon@user/nakilon PRIVMSG #esolangs :from the basic code I suppose that , isn't fully described I don't see it < 1633648392 317854 :fizzie!irc@selene.zem.fi PRIVMSG #esolangs :Using WolframAlpha to look up an ASCII character feels a little like using an to do an . < 1633648408 794941 :nakilon!~nakilon@user/nakilon PRIVMSG #esolangs :, is goto when we are on stack D < 1633648412 774564 :nakilon!~nakilon@user/nakilon PRIVMSG #esolangs :I suppose < 1633648432 40859 :fizzie!irc@selene.zem.fi PRIVMSG #esolangs :That's under the "stacks" part of the spec. < 1633648439 970748 :nakilon!~nakilon@user/nakilon PRIVMSG #esolangs :fizzie how would you look up ascii with HackEso? < 1633648506 837313 :nakilon!~nakilon@user/nakilon PRIVMSG #esolangs :oh indeed < 1633648612 610814 :Asteriska!~Asteriska@2601:603:5180:a000:7c7f:ad4c:80d4:5bb PRIVMSG #esolangs :im figuring, have sd set to an array from 0 to the code length - 1, and go from there < 1633648665 348668 :nakilon!~nakilon@user/nakilon PRIVMSG #esolangs :aren't all stacks emotry from start? < 1633648669 104215 :nakilon!~nakilon@user/nakilon PRIVMSG #esolangs :*empty < 1633648718 715163 :Asteriska!~Asteriska@2601:603:5180:a000:7c7f:ad4c:80d4:5bb PRIVMSG #esolangs :excluding d, and when stacks abc are empty, they pop 1,0,0 respectively < 1633648783 149843 :Asteriska!~Asteriska@2601:603:5180:a000:7c7f:ad4c:80d4:5bb PRIVMSG #esolangs :one sec ive got an idea < 1633648786 2246 :fizzie!irc@selene.zem.fi PRIVMSG #esolangs :Re the ASCII lookup, that's actually surprisingly nontrivial when it's a decimal number. There's many many ways to do it by hex or octal because those are available as escape sequences, but decimal usually isn't. < 1633648790 529824 :fizzie!irc@selene.zem.fi PRIVMSG #esolangs :`` unidecode $(printf '\x'$(printf %02x 34)) # silly but works < 1633648791 753176 :HackEso!~h@techne.zem.fi PRIVMSG #esolangs :​[U+0022 QUOTATION MARK] < 1633648834 784402 :fizzie!irc@selene.zem.fi PRIVMSG #esolangs :Of course shelling out to some oneliner-friendly programming language (awk, perl, ...) is probably the way to go on HackEso. < 1633648846 705834 :fizzie!irc@selene.zem.fi PRIVMSG #esolangs :`forth 34 emit < 1633648847 625129 :HackEso!~h@techne.zem.fi PRIVMSG #esolangs :​" < 1633649023 856911 :Asteriska!~Asteriska@2601:603:5180:a000:7c7f:ad4c:80d4:5bb PRIVMSG #esolangs :according to the spec, the following should be equivalent to bf .[+.] < 1633649027 155096 :Asteriska!~Asteriska@2601:603:5180:a000:7c7f:ad4c:80d4:5bb PRIVMSG #esolangs :. , ' " ' . . . . . . ' . . , ' . . . : , . ; ' . . . . , ' " ' . . . . . . , ! . . . ; . < 1633649055 268801 :Asteriska!~Asteriska@2601:603:5180:a000:7c7f:ad4c:80d4:5bb PRIVMSG #esolangs :that means theres a loop there, somehow < 1633649100 94713 :Asteriska!~Asteriska@2601:603:5180:a000:7c7f:ad4c:80d4:5bb PRIVMSG #esolangs :let me cut it down a bit < 1633649138 981333 :Asteriska!~Asteriska@2601:603:5180:a000:7c7f:ad4c:80d4:5bb PRIVMSG #esolangs :. , ' " ' . . ' . . , ' . . . : , . ; ' , ' " ' . . , ! . . . ; . < 1633649209 106567 :fizzie!irc@selene.zem.fi PRIVMSG #esolangs :You could say the loop part is the ..., right before the !. < 1633649274 412660 :nakilon!~nakilon@user/nakilon PRIVMSG #esolangs :what does it do when it reaches the last character? the . < 1633649297 532644 :Asteriska!~Asteriska@2601:603:5180:a000:7c7f:ad4c:80d4:5bb PRIVMSG #esolangs :thats unneeded, but it switches stacks < 1633649303 249210 :Asteriska!~Asteriska@2601:603:5180:a000:7c7f:ad4c:80d4:5bb PRIVMSG #esolangs :forgot to take it out < 1633649322 712931 :Asteriska!~Asteriska@2601:603:5180:a000:7c7f:ad4c:80d4:5bb PRIVMSG #esolangs :i just took out the bits that had 4 .'s in a row because thats redundant < 1633649376 350762 :fizzie!irc@selene.zem.fi PRIVMSG #esolangs :Yeah, that trailing . would be just a leftover from the BF translation, so that the next translated instruction would have a predictable stack (A). < 1633649487 84948 :Asteriska!~Asteriska@2601:603:5180:a000:7c7f:ad4c:80d4:5bb PRIVMSG #esolangs :it moves to B, pops to the register, copies to stack b, pops to stdout, modes to D, copies to D, moves to B, pops to register, copies reg to b, moves to a, starts "loop", (cont soon) < 1633649619 647427 :Asteriska!~Asteriska@2601:603:5180:a000:7c7f:ad4c:80d4:5bb PRIVMSG #esolangs :fuck this is confusing to keep ahold of < 1633649645 272420 :fizzie!irc@selene.zem.fi PRIVMSG #esolangs :The loop really started from the "copies to D" instruction. < 1633649650 204701 :Asteriska!~Asteriska@2601:603:5180:a000:7c7f:ad4c:80d4:5bb PRIVMSG #esolangs :yeah < 1633649673 535572 :Asteriska!~Asteriska@2601:603:5180:a000:7c7f:ad4c:80d4:5bb PRIVMSG #esolangs :and i assume next read from d is the goto < 1633649757 933087 :nakilon!~nakilon@user/nakilon PRIVMSG #esolangs :I don't understand what does ` do in Echo program < 1633649859 955395 :Asteriska!~Asteriska@2601:603:5180:a000:7c7f:ad4c:80d4:5bb PRIVMSG #esolangs :i assume its a part of the check for the "end at 255" claim it makes < 1633649889 50892 :Asteriska!~Asteriska@2601:603:5180:a000:7c7f:ad4c:80d4:5bb PRIVMSG #esolangs :because ` is sub current stack from register < 1633649905 294428 :nakilon!~nakilon@user/nakilon PRIVMSG #esolangs :I thought : is check for \x00 < 1633649932 663732 :Asteriska!~Asteriska@2601:603:5180:a000:7c7f:ad4c:80d4:5bb PRIVMSG #esolangs :makes sense < 1633649956 882403 :fizzie!irc@selene.zem.fi PRIVMSG #esolangs :"If a stack is empty when asked to pop a value, the value returned will be 1 for A, --" < 1633649985 888649 :Asteriska!~Asteriska@2601:603:5180:a000:7c7f:ad4c:80d4:5bb PRIVMSG #esolangs :for b and c, it pops 0, and d never pops < 1633649988 605924 :fizzie!irc@selene.zem.fi PRIVMSG #esolangs :So the initial , from A will give 1, and then the "; will *add* the input character to that 1. < 1633650005 861493 :nakilon!~nakilon@user/nakilon PRIVMSG #esolangs :omg < 1633650005 945087 :fizzie!irc@selene.zem.fi PRIVMSG #esolangs :So the : will be a check for 255 or -1, whichever way you want to look at it. < 1633650073 949891 :fizzie!irc@selene.zem.fi PRIVMSG #esolangs :And then the ` subtracts that 1 back out so you get to print the original character. < 1633650091 265090 :Asteriska!~Asteriska@2601:603:5180:a000:7c7f:ad4c:80d4:5bb PRIVMSG #esolangs :in the reference, this is the comment "Echo: (Outputs back any input received. Enter char 255 to end) " < 1633650104 334671 :fizzie!irc@selene.zem.fi PRIVMSG #esolangs :(The 1 is still on the stack at that point, because the ,' pushed it on there.) < 1633650145 117615 :Asteriska!~Asteriska@2601:603:5180:a000:7c7f:ad4c:80d4:5bb PRIVMSG #esolangs :and the program stacks only store 8bit < 1633650148 103941 :nakilon!~nakilon@user/nakilon PRIVMSG #esolangs :oh so ` subtracts -1 after the exit check < 1633650149 197152 :nakilon!~nakilon@user/nakilon PRIVMSG #esolangs :ok < 1633650155 224878 :nakilon!~nakilon@user/nakilon PRIVMSG #esolangs :*1 < 1633650188 871819 :Asteriska!~Asteriska@2601:603:5180:a000:7c7f:ad4c:80d4:5bb PRIVMSG #esolangs :im assuming that the default behaviour should be loop back to 0 from 255, and vice versa < 1633650198 509649 :Asteriska!~Asteriska@2601:603:5180:a000:7c7f:ad4c:80d4:5bb PRIVMSG #esolangs :at least, thats the way i would make it < 1633650256 615512 :Asteriska!~Asteriska@2601:603:5180:a000:7c7f:ad4c:80d4:5bb PRIVMSG #esolangs :im going to stare at the basic code for a while < 1633650325 174278 :nakilon!~nakilon@user/nakilon PRIVMSG #esolangs :so you have sa, sb, sc, sd = [], [], [], []; instead of storing a number in it you can do something like.... st = [sa, sb, sc, sd] and then st.rotate!(1) and st.rotate!(-1) and then access the current stack as st[0] < 1633650341 963717 :Asteriska!~Asteriska@2601:603:5180:a000:7c7f:ad4c:80d4:5bb PRIVMSG #esolangs :its settled: i dont understand basic < 1633650357 415927 :Asteriska!~Asteriska@2601:603:5180:a000:7c7f:ad4c:80d4:5bb PRIVMSG #esolangs :nakilon: thats smart, im going to impliment that rq < 1633650388 946648 :arseniiv!~arseniiv@136.169.202.194 QUIT :Ping timeout: 265 seconds < 1633650407 994748 :fizzie!irc@selene.zem.fi PRIVMSG #esolangs :Here's an annotated echo: https://0x0.st/-EsA.txt < 1633650422 796373 :nakilon!~nakilon@user/nakilon PRIVMSG #esolangs :though it becomes harder to check which stack you are on to implement those different behaviours for a, b, c, d...; you would need .eql? or .equal? instead of == I suppose < 1633650488 576957 :oerjan!oerjan@sprocket.nvg.ntnu.no JOIN #esolangs oerjan :Ørjan Johansen < 1633650544 533498 :nakilon!~nakilon@user/nakilon PRIVMSG #esolangs :or you could even store the whole instruction handler lambda attached to the stack object as the "OOP style" would suggest < 1633650572 457961 :nakilon!~nakilon@user/nakilon PRIVMSG #esolangs :but it would make your code deeper into ruby though < 1633650613 314320 :fizzie!irc@selene.zem.fi PRIVMSG #esolangs :I imagine the choice of .',;`":! as instructions must've been a deliberate choice to be as non-mnemonic as possible. < 1633650642 174760 :nakilon!~nakilon@user/nakilon PRIVMSG #esolangs :I mean imagine classes A, B, C, D that are all inherited from something the same for all instrucitions but those few that are different for D are declared additionally for it < 1633650714 707303 :nakilon!~nakilon@user/nakilon PRIVMSG #esolangs :fizzie do you have an idea why does A pop 1? < 1633650732 221050 :fizzie!irc@selene.zem.fi PRIVMSG #esolangs :So that the echo program could be so short and sweet? ;) < 1633650753 103482 :nakilon!~nakilon@user/nakilon PRIVMSG #esolangs :yeah that's the only eplanation I see so far < 1633650759 465223 :Asteriska!~Asteriska@2601:603:5180:a000:7c7f:ad4c:80d4:5bb PRIVMSG #esolangs :naikilon: theres no other way to get a 1 other than from user input < 1633650762 164912 :fizzie!irc@selene.zem.fi PRIVMSG #esolangs :Oh, maybe more seriously, so that you have *something* nonzero other than the isntruction offsets. < 1633650764 474221 :nakilon!~nakilon@user/nakilon PRIVMSG #esolangs :that it's somehow ralated < 1633650789 115702 :nakilon!~nakilon@user/nakilon PRIVMSG #esolangs :oh < 1633650791 587054 :fizzie!irc@selene.zem.fi PRIVMSG #esolangs :Right, you can't pop from D to the register either. < 1633650793 243108 :nakilon!~nakilon@user/nakilon PRIVMSG #esolangs :indeed, no literals < 1633650834 756884 :Asteriska!~Asteriska@2601:603:5180:a000:7c7f:ad4c:80d4:5bb PRIVMSG #esolangs :theres basically an add, a minus, a pop, a push, a switch, a modifier, and start skip and end skip < 1633650876 185597 :nakilon!~nakilon@user/nakilon PRIVMSG #esolangs :Asteriska forget about the rotate(), I guess it does not give a profit < 1633650974 261695 :Asteriska!~Asteriska@2601:603:5180:a000:7c7f:ad4c:80d4:5bb PRIVMSG #esolangs :nakilon i meant that with the "switch" term < 1633650975 178912 :nakilon!~nakilon@user/nakilon PRIVMSG #esolangs :line 40 will be: when ?. then st = (st + 1) % 4 < 1633651036 283500 :nakilon!~nakilon@user/nakilon PRIVMSG #esolangs :and declare some ss = [sa, sb, sc, sd] so ss[st] will be current stack < 1633651140 918228 :Asteriska!~Asteriska@2601:603:5180:a000:7c7f:ad4c:80d4:5bb PRIVMSG #esolangs :nakilon: refresh, i think youre looking at an older version < 1633651149 290704 :Asteriska!~Asteriska@2601:603:5180:a000:7c7f:ad4c:80d4:5bb PRIVMSG #esolangs :because as it sits, 40 is a comment < 1633651165 203938 :nakilon!~nakilon@user/nakilon PRIVMSG #esolangs :you can take a look at RASEL implementation -- it has tests; if you throw out 99% of code ..) you could reuse it to put those ./progs into test.rb and see when they'll start passing < 1633651185 47660 :nakilon!~nakilon@user/nakilon PRIVMSG #esolangs :oops