« first day (2389 days earlier)      last day (2751 days later) » 

07:00
@Pavel How useful would it really be
I mean seriously
How is a |= 1 << 1 so hard
because that is right indexed
@ASCII-only It wouldn't be useful.
@HyperNeutrino Same as Pavel's idea
Really ._.
@Pavel It should be reserved for more useful things :P
07:02
Like what
Oh the case you gave is ambiguous
What should 4[2] yield.
@Pavel Base conversion this is also a bad idea
Like is it working from the left or the right?
07:03
@HyperNeutrino ??????????
I think 0 being the least significant bit makes more sense.
That way you don't care if it's an int or a long or a BigInteger.
@Pavel Definitely
Holo huw iz everyon
i know English I swear
But IMO it's used rarely enough that it doesn't merit its own operator
Besides, x86 is little-endian, right? So it's the leftmost element anyway.
07:04
@HusnainRaza no you don't >_>
Also keep in mind that with indexing comes slices and multiple indexing
@Pavel Yeah
@HyperNeutrino Good point.
@HyperNeutrino Oh okay that makes much more sense to implement like that now :P
So 15[1,2] is 6
07:07
How?
Wouldn't it be 3
Or are you including trailing zeros
1111 => 1[11]1 => 110 => 6
Ok pls provide unambiguous spec
(0-indexed)
Reference program would be nice
So I tried my hand at the latest OEIS, made what I think is okay code in Python, but for some reason, I keep getting numbers that don't match the sequence
I implemented the definition of the sequence that was on the page
07:12
@Pavel is 2[0] meant to be 1 or 0
@HyperNeutrino 2 => 10 => 1[0] => 0
public class IndexableInt {
    public int num;

    public int this[int i] {
            get => num & (1 << i) == 0 ? 0 : 1;
            set {
                if (value == 0 && num[i] == 1) {
                    num /= (1 << i);
                } else {
                    value |= (1 << i);
                }
            }
    }
}
@HyperNeutrino @ASCII-only Reference C# implementation
This looks similar to Ruby's Integer#[]
except Ruby's integers are immutable
Should I still keep sympy? It's causing a ton of issues
Unless you go full Mathematica, probably not.
K :P
It would be cool to have precise math in Proton but I didn't write the language well enough
07:25
-7
Q: What are the prerequisites for utilizing HBase?

johny bashaActually i am beginner for Hbase course so please send me requirements and share your experience with.Thank you @Johny

@HusnainRaza it never said i3 <= n...
@Pavel I'm going full Mathematica and not using SymPy at all
¯\_(ツ)_/¯
@HyperNeutrino Use Charcoal's :P then I'll have more incentive to finish it
@JohnDvorak and that's the way integers should be
Nah
07:39
I doubt my language is compatible with your setup :P
Ruby is even dropping mutable strings.
@HyperNeutrino Why not :|
I literally have a Number class
the only weird thing is you need to call run with the precision you want
In the future, you'll have to ask nicely before you'll be able to change a string.
Also is it a bad idea to port brotli to python
@JohnDvorak That's good too
@ASCII-only I can take a look. It might actually work because you don't have like 50 crazy expression types
07:41
@HyperNeutrino 50 crazy expression types?
liek wtf sympy has a class for zero and a class for one, presumably for special cases
@HyperNeutrino It isn't working very well atm (e.g. I haven't done Rational or Complex), but if you end up using it and there's a feature you really need then I can add it
@Pavel Done
Can't push but I can test code if you message it to me
@ASCII-only Ah ok. I'll look into it :P
I just realized why Proton used to take so long for the empty program
Also I'd be happy to split it into a separate repo
@HyperNeutrino Why
@Everyone what should Charcoal do on the empty program
If it works better for me, I might make my own but I'll probably just use yours
@ASCII-only Importing sympy takes about .5 seconds
07:44
@HyperNeutrino :| I don't have any dependencies and Charcoal takes .3 seconds
4 mins ago, by ASCII-only
Also is it a bad idea to port brotli to python
And this is why you use from ... import ...
Chat mini poll, respond from 1-10
@HyperNeutrino nice
@HyperNeutrino Does that help
Yes. It's faster (I think) if you only import the stuff you need
Nope it actually isn't
07:46
@HyperNeutrino but doesn't Python still have to read the whole file + run global code
Yeah
It just Reduces name conflicts
Charcoal runtimes would benefit a lot from having a daemon, although not sure if Dennis would allow that
Any more feature requests?
Are regex literalls supported?
@HyperNeutrino Plenty :P but I'd probably need to see the current state to see what's most important rn
07:48
@Pavel Not yet. Let me go do that
@JohnDvorak StringIO is there for mutable strings
@HyperNeutrino wouldn't the range function already cover that?
@HyperNeutrino Also indexing into strings by regex.
@HusnainRaza No because it only goes up to a maximum of n
Not quite the same, but it still looks useful
07:50
@JohnDvorak Well it's what people in sane languages use because it's the only alternative to immutable strings :P
Character arrays :P
@JohnDvorak In other languages it's fine, but some languages don't have a char type...
One-character string arrays
@HyperNeutrino Type casting.
@JohnDvorak Yeah but :| isn't that slow
07:52
Nvm I stopd
I got it
is there any language very similar to Python that I can just port this code to
char *
@HusnainRaza C.
It's very similar to Python in that you can use macro trickery to implement classes.
What are classes
@HusnainRaza You'll be fine with C.
Or JavaScript.
Or possibly Ruby, but I don't know it well enough to be sure.
besides those languages are taken for this challenge
07:55
Jython?
Although that will only count if you use undefined implementation-specific behaviour.
What's a jython
I'm sorry it's 3 am and I can't sleep
so I program
@HusnainRaza It's like CPython, just written in Java and not C.
Similar to PyPy, except PyPy bootstraps a lot.
@HusnainRaza You what
@ASCII-only Classes make or break the language, but they aren't strictly necessary.
@wizzwizz4 But everyone should still know :|
07:57
I don't know how to computer I'm sorry
Done Regex literals
Do they work with flags and stuff?
Also, wow, that was fast.
@ASCII-only I was going to link you to YADFPL, but it's disappeared. :-(
No, they don't. I'd need to look at the re docs for that
Yay! I found it: YADFPL
08:03
@Pavel The nice thing about Proton development is that it's quite fast to add things
@wizzwizz4 :| It's very empty
@HyperNeutrino :| why
@ASCII-only It used to be full, but all commits after b15643f were on a fork that seems to have been deleted.
@ASCII-only Or I could use dir :P
You know, I'll go try that right now
Builtins ftw
Fun fact: At the start of last year I was trying to make golfy python
Using a regex transpiler
08:07
@HyperNeutrino ailmsx -> re.A | re.I etc
Can @anyone give feedback pls
@ASCII-only No, it's not.
@wizzwizz4 what
re.A is all ASCII. re.I is something to do with case.
Neither of those are a or i.
@wizzwizz4 :| If python regex doesn't have an i flag then it's really bad
There's also a g flag, but I'm confused as to how it works.
08:12
@ASCII-only ... flags. *facepalm*
Added Regex flags.
@HyperNeutrino Yay
Lovely
I can probably implement one more feature request today
08:13
@Pavel There is? In JS it serves the same function as Python's findall
@HyperNeutrino String assignment via slices
@HyperNeutrino here-doc strings
@HyperNeutrino string interpolation
@ASCII-only Done
Just needed to modify already existing code
@HyperNeutrino :DDDDDDDDDDDDD
@Pavel What is dat
Ruby example: "Foo #{3 +2}" yields the string "Foo 5"
08:25
Oh that. Hm ok
Can there be spaces between the hash and bracket
Added string interpolation.
@WheatWizard Any new thougths on lost quine?
08:47
Hey I figured out a way to segfault in proton
(f=()=>'#{f()}')()
Anyway gtg o/
09:05
@HyperNeutrino No
@HyperNeutrino +1 nice
09:26
BYOND has no way to string concatenate, but it does have template strings, so to concatenate two strings, one must do x = "[string1][string2]"
@ATaco :| ok that's weird
BYOND is the worst production language I've ever used and I love it.
It's not awful. In Ruby you often see interpolation where concatenation would have sufficed.
-1
Q: Interactive shell script: Recursion too deep

Andrew CourtenayI have written an interactive shell script in KSH, there is a main menu where the options call different functions stored as code snippets on separate files. The script works fine but after a while the script exits with 'recursion too deep' There is no obvious pattern of when it happens, it ca...

09:57
@Mr.Xcoder APL: ⌽+\⌽⎕
10:09
@ATaco Even worse than PHP?
It's easily on the same level.
Hey, PHP 7 is not so bad
@mınxomaτ PHP is definitely getting much better, but it still has plenty of flaws, and PHP 7 isn't what people normally think of then someone says PHP
PHP 5 is only around because of crap CMS that abused the language in the first place. It's the Python debate all over again.
10:43
> Stop hiling
@ASCII-only Copying and pasting makes bad code. :-p
@wizzwizz4 So does introducing spelling errors
Buffer overflows are caused by bugs in Java.
An exception is raised if it's caused by the code and caught by the JVM.
If it occurs in the code, it is caught by the JVM in Ideal Java.
Yay you found a Java bug +1
@ASCII-only Where do I report it?
@Adám Lol, I don't even remember that CMC :))
11:33
@Zacharý SOGL has a very similar looking character used for factorization :o
@flawr Congratulations on your recent two gold badges!
@dzaima 1. Charcoal uses it for logical and (IIRC) lol, 2. O_o SOGL has factorization
FYI I closed the "Polyglot the OEIS" challenge (again), the fixed one is scheduled to be posted later today
@ASCII-only yep.. idk why I added it.. Especially why 4 fommands?
@dzaima :| SOGL wastes so many commands how is it still so golfy
11:38
@LuisMendo did I get gold? let me check O_o
@ASCII-only Honestly I have no idea.. I mean it could probably be at least 30% more golfy if I remade it.
@dzaima D: then it would beat Charcoal like 100% of the time
@LuisMendo thanks, now I've got a "great" and a "famous" question :)
well SOGL was once supposed to be a language meant for everything, the ASCII part just appeared out of nowhere. Probably only when I made the compression I figured out that it's good at ASCII lol
O_o how is it beating an ASCII-art language then
11:41
@ASCII-only compression :p
@dzaima but... but Charcoal has compression too
@trichoplax what is your opinion on this comment? I see his point but I'm not sure how well that works as you should vote on these suggestions individually =/
@dzaima oh also I'm trying to port broccoli compression to python, not sure if it's a really bad idea :P
also what do you think about huffman encoding, because idk how good it will do when you have to store the tree too
@ASCII-only I have no idea what a huffman coding is :p
ooh it's that thing.. I've been thinking about making a language where the whole program is huffman coded
12:02
@dzaima so it would be kinda like binary lambda calculus or sesos?
is no one else gonna try to earn a +200 bounty????
17
Q: Ascii User Interfaces

fergusqIn this challenge, we render Ascii user interfaces. +----------------------+ |+-----------++-------+| ||<- Previous||Next ->|| |+-----------++-------+| |== The title == | | | |Lorem ipsum dolor | |sit amet... | |+--------------+ | ||Post a comment| ...

@OliverNi it's gonna be default-awarded to Halvard (at half value if you don't assign manually)
20 hours left
@ASCII-only I guess, but for golfing
welp
i awarded it
@SEJPM
12:05
@OliverNi I would try it in SOGL but the baselines/baseobjects are just too confusing
 
1 hour later…
13:08
0
Q: Detonate a string

machiavelliGiven any string, print it in the form of a triangle where the text runs up and down along each diagonal. For example, an input of "Hello World" should output: d l r d o l W r d o l ...

13:50
0
Q: Implementation of stack as an array to convert a decimal number to a number in any base using stack

Rohit BhardwajWell I know the algorithm for the conversions :D Please help on how to implement this question as stack as a array. I am facing difficulty as to how the flow of control of the program may be: Whether I should take the number as a 'pushing' in to the stack and then convert it? Any kind of help wou...

Any feedback on this sandbox challenge? I plan on posting it today.
14:35
19
Q: Implement true string addition

Wheat WizardMany languages allow strings to be "added" with +. However this is really concatenation, a true addition would follow the group axioms: It is closed (the addition of any two strings is always a string) It is associative ( (a + b) +c = a + (b + c)) There is an identity (∃e : a + e = a) Every el...

3 standing answers, 9 deleted answers...
0
Q: Print the roots of a quadratic equation

CowabungholeWrite a program or function that takes in a quadratic equation and prints its factorized roots. The input can be taken in from any reasonable source, such as a function parameter, stdin, or a command line argument. Input Input will be either a string or an array of characters, and it will be of...

Does anyone know how I might put a ] inside a character class in sed? escaping it does not seem to be working
Turns out it needs to be the first character in the character class to work
@WheatWizard And if you want ^ it can not be the first character.
14:52
3
Q: Divisibility Streak

OliverWe can define the Divisibility Streak k of a number n by finding the smallest positive integer k such that n+k is not divisible by k+1. Challenge In your language of choice, write a program or function that outputs or returns the Divisibility Streak of your input. Examples: n=13: 13 is divisi...

1
Q: Filter out the pseudo-elements!

Mr. XcoderWe define the hyper-average of an array / list (of numbers) the arithmetic mean of the sums of its prefixes. For example, the hyper-average of the list [1, 4, -3, 10] is computed in the following manner: We get the prefixes: [1], [1, 4], [1, 4, -3], [1, 4, -3, 10]. Sum each: [1, 5, 2, 12]. And...

> You’re receiving this email because your password will expire in 60 days
wha...
@LeakyNun I'll remove the reference to the OEIS.
@Oliver no
it is what it does
Anyone have any tips on how to reduce python startup time?
Or how to profile it for that matter?
Charcoal's 200 ms (on TIO) is pretty good for Python. Jelly takes 750 ms.
15:06
@LeakyNun and mine doesn't even work perfectly atm
@Dennis on my laptop jelyl takes >1s
(locally)
@Dennis 300-400 ms for me on TIO
Oh weird, pretty sure I've never seen sub 300ms though
I guess it's not that bad (right now at least)
Wow, asm.js in Chrome 60 has gotten fast.
15:14
@Dennis That's odd - cQuents takes 60-80 ms for Hello, World!, and it's written in Python: Try it online!
@StepHen Nothing odd about it. Jelly imports sympy and numpy at start-up.
@Dennis oh, misread what you said to mean that Python itself took 200 ms for startup. Shoulda checked first.
Eh, that's because we started the conversation in another room. I'll clarify.
@mınxomaτ It has? I thought they were only going to support WebAssembly.
11 detected...:p
why is unlimited editing of your comments and messages a privilege only mods have ಠ_ಠ
@EriktheOutgolfer probably chat log sanity or something like that
15:19
Because were trusted to not rewrite history in bad faith.
@MagicOctopusUrn little late there, no? :P
wait that means I'm not trusted because I don't have a diamond??? ಠ_ಠ
Different level of trust.
15:22
That's on PPCG, not chat.
@EriktheOutgolfer too pedantic?
@EriktheOutgolfer see your noti
@EriktheOutgolfer huh?
@Dennis well I've got >=10k rep on chat too...afaik that means that you're trusted for chat too...but really they need to trust you too much imo
at least for your own messages
15:26
There are plenty of high-rep users that suddenly rage quit, and there's no way to undelete a chat message. We don't need people to deface the transcript every time they get upset about something.
Heck, IMO, deletion of messages should be a mod or RO only feature.
@mınxomaτ really? Yay
@ASCII-only Import as few libraries as possible. Argparse alone takes it's sweet time to import.
@Dennis :| oh should I roll my own argument parsing then
Also will golfing the source help much :P
@ASCII-only Well, that's up to you. If you want a fast interpreter, Python isn't the best choice anyway.
15:31
True
Right. PowerShell it is.
@AdmBorkBork you mean C++
Idk if C or C++ or Rust would be best
Visual C++# for .NET
@AdmBorkBork where's the Java and PHP
Hmm, would it be possible for me to run a python script on a linux system that constantly listens to and overrides keyboard input?
15:33
I only did the Microsoft ones, and we'll just ignore Microsoft Java
@AdmBorkBork where's F# and ActionScript, and IronPython and TypeScript
Also Visual Basic
I'm pretty sure IronPython wasn't made by Microsoft.
@Dennis Well, at least my previous asm.js experiments run blazingly fast. Of course not as fast as PNaCl, but that's dead now anyway.
@mınxomaτ isn't wasm faster :P
I haven't tested it. You can take a many-100k LOC C++ project and compile it to PNaCl with a few warnings, the WASM toolchain is not remotely as mature.
I like the idea behind WASM, but it has some major catching up to do.
15:45
@AdmBorkBork but... when I say something stupid or obviously wrong, I am so glad I can delete it
Here's one of the asm.js experiments for reference: turbo.github.io/FormulaCompiler
@StepHen The thing is, if somebody already replied to your message, it messes up the transcript.
@Dennis yep. I usually delete the stupid messages within a half a second or so - if someone's replied I edit, or try to.
The easiest way to fix gaps in the transcript is to just move everything to trash ¯\_(ツ)_/¯ /s

« first day (2389 days earlier)      last day (2751 days later) »