« first day (2720 days earlier)      last day (2125 days later) » 

12:33 AM
2
Q: Subset Sum Orderings

isaacgA set of n positive numbers has 2^n subsets. We'll call a set "nice" if none of those subsets have the same sum. {2, 4, 5, 8} is one such nice set. Since none of the subsets has the same sum, we can sort the subsets by sum: [{}, {2}, {4}, {5}, {2, 4}, {2, 5}, {8}, {4, 5}, {2, 8}, {2, 4, 5}, {4, ...

 
1:18 AM
CMP: is * a reasonable separator?
 
@Zacharý separator for what
 
NVM, it'd get downvoted to oblivion anyways (10|⍎): codegolf.stackexchange.com/questions/168260/…
That would get downvoted fast, right?
 
@Zacharý huh, there should really be a better loophole for that
 
What would that loophole even be?
 
@Zacharý don't abuse freedom in the input format?
 
1:31 AM
Where would one draw the line at "abuse" then?
* seems like a pretty innocent separator (unless one knows APL that is) :p
 
@Zacharý many loopholes don't specifically "draw a line", it's up to the situation
@Zacharý obviously one would need to know the language, e.g. someone who doesn't know C would think it's just their luck that this always gives 4
 
> Related to that, I'm also sick of that comic being referred to so often
WHO GETS SICK OF XKCD?!
 
this is pretty related. Obviously in some languages every program needs a filename (~= inputting an array always needs some separator), but abusing that being given is abuse.
 
1:51 AM
@Adám, what were obverse and under again?
To clarify: I'm asking what they do & whether they are a monadic or a dyadic operator
 
100 rep bounty for an answer to this, which uses a purely mathematical method and outgolfs the shortest non-mathematical answer in that language. Ping me to claim, I'll judge edge cases on "purely mathematical"
 
Would a string based answer be shorter?
 
... maybe, but I haven't implemented yet
Or either.
 
2:07 AM
If you can give me a functioning non-mathematical answer for comparison, then it's eligible for the bounty. Otherwise, there'd be no difficulty
 
I know a way to do it, I think
 
2:53 AM
 
3:12 AM
@Mego Thanks! I had a solution where I just stuck Popen("make") at the top of setup.py, that's much nicer.
 
@cairdcoinheringaahing Should I add an explanation?
 
3:41 AM
argh decided to try to get ssl for my app thing that only I'll use and there's an hour gone with no progress
 
4:11 AM
@cairdcoinheringaahing After all, strings are just list of numbers...
 
4:25 AM
@Mego The "visit meta" link is really misleading, there are no new meta posts. Is there a way to have a custom notice?
Also, OP may want to delete it.
@CatWizard If an answer is "lazy" and it's still serious contender+valid, it's probably the question's fault.
We don't like "too easy" questions, but sometimes "slightly harder" can be easily solved using languages with the right builtins.
Q: Should this be deleted? (I don't think so, but if OP want they can delete it)
 
-1
Q: Help solving this question

Sriman BooraGiven Q queries, with each query consisting of two integers L and R (L may or may not be less than R), the task is to find the total numbers between L and R (Both inclusive), having atmost three set bits in their binary representation. Input : The first line of input contains number of testcases...

 
4:57 AM
0
A: Loopholes that are forbidden by default

Jo KingHard-coding the output of kolmogorov-complexity without any attempt at golfing This is for answers that just hard-code the entire text, for example using languages like /// without using /s, PHP without a starting bracket or the joke language Text. This also includes functional languages where y...

 
Turn on -Wall and it will probably warn about "conversion from char const* to char*
 
@user202729 It doesn't actually, but I already knew that. I'm bad at C, so I'm not sure what to do.
 
Make some mutable char array.
Sometimes C is weird. Anyway if you know that modifying string literal is UB, you're OK.
Historical reasons.
@Pavel Well then... turn on -Wwrite-strings.
 
I actually threw in -Wextra, which apparantly still doesn't include that.
 
5:07 AM
How weird.
 
(is this code golf? what are you trying to do?)
 
5:35 AM
@LeakyNun I did end up going for that third one, yes.
 
I see
 
Coming off of codegolf.meta.stackexchange.com/a/16636, and starting with something simple (I guess), how do I find the complexity of this Perl 5 subroutine, please?: {say for 1..pop}
 
6:25 AM
0
A: Sandbox for Proposed Challenges

Jo KingMost Common Multiple code-golf number Not to be confused with the Least Common Multiple. Given a list of numbers with more than one element, return the most common product of two elements in the array. For example, the MCM of the list [2,3,4,5,6] is 12, as the list of products is: 6 8 10 12 ...

 
ngn
@Zacharý they are like in J: "obverse" is just a less commonly used word for inverse (f⍣¯1) - it's monadic; "under" is best explained by "grab a beer under open the fridge" (g⍣¯1 ∘ f ∘ g) - it's dyadic
 
Okay, I remember obverse being something else as well, but I'll just ask when I actually implement them
 
ngn
@Zacharý correction: in J "obverse" specifies what the inverse of a function should be, so it's dyadic
 
...
 
 
1 hour later…
7:48 AM
@Pavel your array needs to include space for the null terminator
 
8:00 AM
honhonhon Belgium get rekt
 
8:14 AM
Anyone here know anything about USB at a programming level?
 
8:59 AM
@Zacharý f⍫gf and f⍫g⍣¯1g and f⍢g ⍵g⍣¯1 f g ⍵ and ⍺ f⍢g ⍵g⍣¯1 (g ⍺) f (g ⍵).
 
9:38 AM
@Zacharý you were thinking of over instead of obverse maybe
 
10:15 AM
0
Q: Algorithm for winning Sevens*card game)

Agile_Eagle Build a program that can win a Sevens game provided that there are only 2 players(Computer and the user) Here are the instructions from Wikipedia: All cards are dealt to the players, even if as a result some players have one card more than others. The owner of the seven of hearts b...

 
10:49 AM
0
A: Sandbox for Proposed Challenges

Agile_Eagle Build a program that can win a Sevens game provided that there are only 2 players(Computer and the user) Here are the instructions from Wikipedia: All cards are dealt to the players, even if as a result some players have one card more than others. The owner of the seven of hearts b...

 
 
2 hours later…
12:37 PM
@Pavel Like this?
 
1:27 PM
@FrownyFrog Yes, I think so.
 
2:09 PM
@Zacharý I think I understand it, but it does seem very mathematical, especially with the prevalence of , +, * and other such symbols.
 
2:26 PM
@Zacharý both are dyadic then
 
2:54 PM
@Pavel (1) Slightly inefficient (you don't need to calculate the length and copy everything) (although I think the copy time will be dominated by printing time anyway);
(2) strcpy will also copy the null, and strlen doesn't think about it, so UB,
(3) When the string length is 0, UB.
If the string is guaranteed to be non empty, I suggest using
pline("%c%s", toupper(*name), name+1)
No need to strlen or strcpy or allocate a VLA. Also being very short.
What is YAFM?
@msh210 I don't know Perl. What does it do?
 
@user202729 it's a NetHack term. Yet Another Funny Message. Thanks for the advice.
 
Thinking about it...
Because fixnam is allocated after name, it's likely that &fixnam < &name.
 
ldrname() returns a pointer to a static buffer
(IDK if that matters)
 
3:18 PM
Lemme just quickly force push so that no one else will see it took me three tries to edit three lines of code...
 
So, I'm playing around with making an interface for the tube/metro/subway planning system that ships with Dyalog APL, and all of a sudden I have an interface that I like better than Google Maps… Even has a feature that Google Maps's transit planner doesn't have.
 
What is it?
I think Google's is already super simple enough. Plug in address, hit the "transit" button, follow instructions.
 
@Pavel Simple != like.
(also: because it's yours, you can have any features implemented.)
 
@Pavel This allows intermediary waypoints.
 
@Adám I think Google Maps also have that?
@Pavel That means the content will only be invalidated the next time the function (or other functions sharing that buffer) is caled.
 
3:30 PM
@Adám Google maps has that. I literally just used it yesterday.
 
In this case it doesn't matter.
(although why doesn't it just return char*? surely the buffer is modifiable)
 
Hooray for single-threaded applications
@user202729 It does. The compiler prints a warning anyway.
 
@Pavel Warning for what? (I don't feel like cloning and compiling it)
 
Something something discarding attributes?
(Maybe it does return a const char)
 
3:33 PM
Here's mine:
 
If it uses static buffer, casting it to char* and modifying it should be safe.
 
@user202729 I know it's safe, but it still prints the warning
 
No reason to modify it anyway, as the implementation may change later.
 
4:08 PM
@user202729 It grabs the last argument from the list of the subroutine's arguments, and iterates over the list from 1 to that argument as follows: It assigns a variable to each item in that list and then prints the value of that variable followed by a newline.
 
So... (that sounds super complex)
 
So for example if the arguments to the subroutine are ('a', 3), then it iterates over the list (1,2,3), assigning each to a variable and then printing that variable's value followed by a newline.
@user202729 Are you being sarcastic? I did say "something simple".
But how would I find its complexity?
 
The explanation takes 5 lines on the chat window.
Anyway.
Assume reasonable implementation, printing a number n takes ... how much? I don't know actually...
Help how long should printing a number take
...
For some reasons people tend to assume it takes O(1).
Is n limited?
 
I guess the subroutine will do something funky if the number's too big.
Dunno really.
Assume n is unlimited, I guess.
could be negative, for example, in which case the list will have nothing in it, and nothing will be printed.
Could be a string, in which case Perl will numify it (cast it to a number).
And sorry for assuming sarcasm when none was there.
 
Printing n should take large than log n time.
Actually people tend to assume printing a number takes O(1).
Assuming printing takes O(1), then everything should takes O(n).
 
4:22 PM
@user202729 Why?
 
Because it does something takes O(1) n times.
Rule: Doing something that each takes O(a), O(b) time, take O(a×b).
 
It does lots of stuff, though. It reads input. It assigns to a variable (n times).
Well, not lots of stuff, but it does those stuff. :-)
Do reading input and assignment not cost anything?
 
Actually outputting probably involves base conversion (10 ↔ 2?), so the analysis is much more complex.
@msh210 When Perl assigns, does it copy the data or does it make another reference to the same data?
 
$a=1;
$b=$a;
$a=2;
print$b; # will print 1

Does that answer your question? If not, I don't understand your question.
 
Looks like that it copies.
 
4:28 PM
I'm guessing it depends on type/context
strings would be reference and ints would be copy, right?
 
Although... I have to admit that people tend to assume "fast" things are O(1). codegolf.stackexchange.com/questions/167686/…
 
Adding two integers is O(1) if integers are constant size.
 
This is part of why big-O sucks
 
@AdmBorkBork It's not its fault. It's our fault.
 
@Pavel What I wrote above about $a and $b is true for strings also.
 
4:30 PM
@AdmBorkBork Wouldn't you say that anything is O(1) if the input is constant size?
 
Generally, nobody notices if you're off by a (few) log n factors.
 
@msh210 Well yeah, but $a = "foo"; $a = "bar"; doesn't mutate the string, it just mutates the reference to point to a new string
 
Nobody knows Perl......
 
@Pavel yeah, same for numbers; nobody's changing 1 to a different number
 
@DJMcMayhem Pretty much anything is O(1) given the limitations of computing as currently exist.
 
4:32 PM
@msh210 If it's stack-allocated, then yeah, you're changing the value. If it's heap allocated, like numbers in Python are, then it's changing the reference.
 
@Pavel now you've gotten into the "Greek to me" area
 
@msh210 Do you know C or C++, by any chance?
 
IIRC Perl does copy-on-write.
 
@Pavel nope
 
(or something like that, where common expression elimination affects performance negatively. I remember reading it somewhere with nice ASCII art diagram, but forgot it)
 
4:33 PM
@AdmBorkBork Uhm... no?
It's pretty easy to notice the difference between an O(n^2) algorithm with a couple thousand inputs than a couple million inputs
 
@msh210 Ok. Well, basically, it's possible for a variable assigned to a number to be one of two things: One, it has the value of the number itself, as done in C, Java, and most other compiled languages. Two, it has a pointer to a location in memory where that number is stored, as done in python.
 
@DJMcMayhem Technically you can "cheat" and say that they all takes less than universe age, so they're O(1).
 
When you do $a = "foo"; $a = "bar";, you're only chaging the value of the string pointer. The actuall characters "foo" remain in memory somewhere.
 
Calculating complexity has always not always been a gray area.
 
@Pavel That's true in C, you mean?
or in every language?
 
4:36 PM
Measuring in bit complexity, iteration index is O(k) bits, so division k times may take O(k²) time... — user202729 May 11 at 6:44
 
@DJMcMayhem For any value of n that's within current computing capability, it might as well be O(1), as compared to other algorithms everything is finishing in essentially constant time.
 
@msh210 In basically every language. Since strings can be variable length, you can't really store their value in a variable for which the size is expected to be known.
Also, if you stored the value, you'd have to copy the entire string when you passed it to a function.
 
Can Perl modify a character of a string? How long does it take?
 
I don't actually know, but I know ruby has mutable strings.
 
@user202729 Perl is known for modifying strings. s/a/b/. No idea how long it takes.
 
4:39 PM
@msh210 Does that modify a string, or does it return a new string?
 
@Pavel They probably don't know.
 
@Pavel I do know that there are 2 ways to pass arguments to subroutines. You can pass @a, for example, which is an array, or you can pass \@a, which is a reference to an array. The latter is faster but you wind up modifying @a if you modify it in the subroutine; the former is slower but you have the values in @a to work with.
@user202729 Right. And I'm a "he", by the way.
 
@AdmBorkBork Yes, adding two unsigned chars in nanoseconds is basically the same thing as testing the primality of insanely large numbers for months straight
Or running this on a number like 2^100-1
 
@msh210 That's not exactly correct. Both ways are references to an array. @a is a reference to a copy of the array, \@a is a reference to the original array.
 
4:42 PM
@Pavel How do you know that modified the string, as opposed to returning a new string and assigning it to the same variable?
@Pavel Okay. But Perl folks speak of "arrays" and "array references" to refer to those 2 things.
 
@msh210 That's a good way to reason about it when you want to understand what some code does, but it doesn't work if you're trying to reason about how the language functions internally.
 
@Pavel Yeah, got it.
 
@DJMcMayhem I'm not saying they don't take different amounts of real-clock time. I'm just saying that in the grand scheme of things, both are essentially O(1).
 
And I disagree because you could make algorithms that won't finish until the heat-death of the universe
 
4:52 PM
But things with the same big-O notation don't translate to the same real-clock time.
Something with O(n log n) and a million items could take 5 minutes or 5 hours.
 
So? You can still model/predict the runtime over a variety of different input sizes
 
@DJMcMayhem Testing primality is easier than factorizing...
 
So... end of the day, no one (who is here now and paying attention to this conversation) knows how much assignment of a variable, or reading input, costs in Perl. How does anyone answer or questions or judge those answers??
 
@msh210 The key is, if you're off by a few log n factors, nobody would notice.
18 mins ago, by user202729
Measuring in bit complexity, iteration index is O(k) bits, so division k times may take O(k²) time... — user202729 May 11 at 6:44
I claim that that answer may be invalid. It's still there.
People should really just use Õ-notation, then.
 
@DJMcMayhem But some other algorithm with O(n log n) time and the same million items could take a different amount of real-clock time. So what does the big-O notation really tell you? Nothing. Hence, it's essentially as meaningless as saying everything is O(1).
 
4:55 PM
@AdmBorkBork It is a property of the algorithm, not the code.
 
@user202729 hmph
 
I guess I will make some more "How strict are we with restricted complexity" questions.
Assume we have a fastest code multiply two numbers challenge.
How long would this in C take:
int f(int a, int b){return a*b;}
Or is it invalid?
 
What would be invalid about it?
 
@msh210 It only works to finite bound.
 
Is there a mimetype for source code or should I just use text/plain?
 
4:58 PM
(so in practice it's O(1))
 
@user202729 Fastest-code or fastest-algorithm?
 
Things would be much better if people measure asymptotic complexity relative to number of black box function call.
@AdmBorkBork algorithm.
 
@Pavel I think individual languages have their own e.g. text/x-python
 
Too late for editing.....
 
@user202729 I know it's just a hypothetical challenge, but I'd say that's bad challenge because you can't meaningfully measure a difference in algorithm for something that simple
 
4:59 PM
@DJMcMayhem "simple" is subjective.
"bad" is also subjective. Nothing says that the challenge is wrong.
 
@msh210 Well, Q# doesn't :P
 
That's just hiding the problem (complexity of simple thing) behind a larger problem (complexity of huge things).
 
@msh210 In Big O, generally you're looking at the pieces that are going to be running the most times. So if you have a sorting algorithm that reads input 1 time, outputs the array 1 time, reads values at an index 2N times, and swaps values up to N^2 times, then you have an O(n^2) algorithm, and the pieces other than swapping are no longer relevant
@user202729 I vaguely remember something on meta saying that for challenges, if the task is too fast, the challenge should be closed because you can't meaningfully distinguish between a couple milliseconds. I think this falls under that
 
@DJMcMayhem ah, that makes a lot of sense, thanks
In this case, though, assignment of the variable is done as often as anything else is.
 
@msh210 Also, the simple substeps (like swapping or reading a value) might as well be O(1) because even if they're actually O(2N + 3) it doesn't matter because O((2N+3)^2) is still O(N^2).
(for big O at least)
Now, if you're doing something like factorizing each number in an array while sorting, than all the sudden the big O of the substeps becomes a factor again
 
5:11 PM
So {say for 1..pop}, to review its steps: it reads the last item of input (ignore because it's a one-time thing), and then for each number from 1 to that item (so multiply everything by n), it does as follows: assigns a variable (assume O(1)), prints the variable's value (assume O(1)), prints a newline (assume O(1)). So that's O(3n), then, or in other words O(n)?
 
Yes.
 
Thanks. Now how about... :-)
{$_=pop;s/a/b/r} This reads the last item from the input list (one-time thing), assigns it to the variable $_ (one-time thing), substitutes a 'b' for the first 'a' in the value of $_ (one-time thing), returns the result (one-time thing). Sounds like it should be O(1) based on the above. But I strongly suspect it actually depends on the length of the string, meaning is O(some function of n).
 
It probably does depend on the length of the string. Because it has to look at each individual character, I'd assume it's O(N) or so
But that's definitely a less obvious case
 
hm, thanks for all your help, folks. I've gtg. I'll probably return with more questions another day. Have a good timezone.
 
5:30 PM
Useful extension that converts the new tab page into a notepad: getpapier.com
 
5:47 PM
But does it have vim keybindings :thinking:
 
1
Q: Restricted functionality return correct string

ScathWithout using the following, output the string "Hello World!": Strings Numbers Regular Expressions Functions named "Hello", "World", "HelloWorld" or anything similar. Object keys named "Hello", "World", "HelloWorld" or anything similar. This is code golf, so shortest program in bytes the bet...

 
6:07 PM
Why does this throw a python syntax error: if encoding in ['UTF-8', 'UTF-16', 'ISO-8859-1']:
 
nothing in the if statement?
 
There's nothing wrong with that line. Do you have an unbalanced parenthesis before or something?
 
actually nevermind looks like it was caching issue :P
What does sorted(tuple_array) do in python?
Is it sorting by the first tuple item, or all items?
I'm wondering if sorted(dict.items()) is enough to get a list of key-value tuples sorted by only the key
 
@Downgoat it returns the sorted version of the array
 
@EriktheOutgolfer but how does it sort a tuple?
 
6:22 PM
um, like it sorts a list?
mutability isn't an issue here, sortedlist.sort
 
take (3,4) < (4,3) what does that do?
 
of course True
 
do is it doing func <(lhs: Tuple, rhs: Tuple) => lhs.0 < rhs.0
 
um, are you talking about Python?
 
yeah
above is psuedo code
 
6:24 PM
Python's tuples don't behave like Haskell's, by the way
 
CMC: given some like [0 => x, 2 => y, 3 => z] convert that to an array where the keys represent the index to place their respective values in, filling in gaps with your language's null value (or negative 1) e.g. the eaxmple would give [x, -1, y, z]
 
Python's null value is None
 
yeah?
 
@Downgoat this is simply how it's called
 
6:39 PM
0
Q: Program for winning sevens game

Agile_Eagle Build a function in python that can win a Sevens game provided that there are only 2 players Here are the instructions from Wikipedia: All cards are dealt to the players, even if as a result some players have one card more than others. The owner of the seven of hearts begins by pla...

 
ngn
7:39 PM
@Downgoat k, 23: {@[-1&!1+|/!x;!x;:;.x]}
 
@Downgoat Can we take input as a list of keys and a list of values?
 
@Adám sure
 
@Downgoat 1-based indexing ok, I presume? (And then 0 for fill)
 
@Downgoat that can save a few bytes in CJam...
 
@Downgoat Will keys always be sorted?
@Downgoat And if so, may we take input in descending order?
 
7:55 PM
@Adám order isn't guaranteed
 
@Adám you need to use ⎕NULL or ¯1 for the missing values
 
@EriktheOutgolfer I presumed 0 was ok if 1-indexing.
 
⍴∘¯1
@Downgoat ^^
 
@EriktheOutgolfer No, ! Try it online!
 
8:01 PM
@Adám wasn't a golfing tip yet ;)
 
@EriktheOutgolfer One could also argue that APL's null value the prototypical element, since that's what APL will pad with.
 
@Adám well, waiting for Downgoat's answer :P
 
@EriktheOutgolfer Doesn't matter, since putting -1 has same byte count. And why wouldn't 1-indexing be allowed?
 
@Adám didn't say 1-indexing is out of the game, just said that the original spec calls for the null value (⎕NULL in Dyalog's case) or -1 (¯1 in APL)
@Adám oh, I thought again of that, doesn't seem feasible because then there would be two null values, 0 and ' '
 
@EriktheOutgolfer There are infinity many fills, but each array has one particular one. Then again, pointless discussion as I can just use -1 per spec.
@EriktheOutgolfer ⎕NULL isn't really used in Dyalog other than to accept .NET nulls. Even JSON nulls are not translated to ⎕NULL.
 
8:12 PM
@Adám that is, if the spec doesn't mean that "you can use -1 only if your language doesn't have a null value"
(e.g. the case for CJam)
 
@Downgoat May we use -1 even if our language has a null value?
 
but we're just speculating now, since Downgoat has yet to reply to my ping :P
 
@EriktheOutgolfer Doesn't sound like it though.
 
@Adám sure
 
@ngn Does k have a null?
 
ngn
8:14 PM
@Adám it has many of them, one per type
 
@Adám any value is fine as long as it can be distinguished from non-empty values
 
5 mins ago, by Adám
@EriktheOutgolfer There are infinity many fills, but each array has one particular one. Then again, pointless discussion as I can just use -1 per spec.
 
@Downgoat Ah, so even 0 for 1-indexed.
 
@ngn So what would be an int null?
 
@Pavel 0n I think, i.e. an integer NaN.
@ngn Even dictionary and character and date nulls?
 
8:18 PM
(Which K are we talking about btw TIO has 3 and they're all different)
 
ngn
@Pavel \$-2^{63}$, written as 0N
@Adám 0n is the float null, a NaN
@Adám the char null is " " (space), I'm not sure about dicts, I would presume ()!()
 
@ngn Then () is array null?
 
ngn
@Pavel oK is a special case because js doesn't have ints, so 0N = 0n
 
Why is space null and not ASCII/UTF-8 null
i.e. (char) 0
 
ngn
@Pavel it looks better in the console :)
 
8:23 PM
@Pavel APL also uses space rather than U+0 as fill for character data.
 
But if I have a field that contains a character, and I want to indicate it's invalid or something, I wouldn't put space there.
 
ngn
@Adám () is an empty generic list - before k6 it used to be an empty list of empty char lists :) in k6 afaik there is only one generic empty list
 
Is there a "base" type like Java/C#'s Object?
 
ngn
@Pavel in k? it's not object-oriented, there aren't even user-defined types
 
@Pavel I would just put a number or an empty numeric list to indicate such.
 
ngn
8:28 PM
@Adám that would "blow up" the array
 
I think about things in a statically-typed way so I'd want to avoid that
 
ngn
@Adám i.e. turn it from a tight unitype contiguous memory region into a list of pointers to scalars
 
I'm fairly confident that when I submit my python code for review later today I'm gonna get complained at for having a type annotation for every single variable and function
 
@ngn Yeah, I know what you mean, but if we're already talking about a mixed type table (Pavel spoke of a single-char field), it doesn't matter much.
@Pavel Free your mind!
 
8:32 PM
Dynamic typing and no compile-time checks turned 30 minutes of work into 4 hours of work for me this morning
So
Nah
 
ngn
@Pavel you can always assert() if you feel uncertain about the types
 
@ngn The problem is that assert fails at runtime
 
ngn
@Pavel well, that's true but that's what tests are for
 
My workflow this morning has been: Save python module. Run setup.py to install it as a module. Wait for native extensions to finish building. Install jupyter kernel. Start jupyter. Open a new notebook. Type several lines of code, run. Check jupyter kernel output. AttributeError: 'function' object has no attribute 'replace'. Add parentheses to actually call the function. Repeat.
Also, autocomplete is shite if the text editor can't figure what type something is even though the programmer can obviously see there's only possible option, since the standard library doesn't have annotations.
 
ngn
8:52 PM
@Pavel sounds like you need to automate the fix-build-test cycle
 
@ngn It was supposed to be 30 minutes of work! I didn't feel it would be neccessary to write an automation script for 30 minutes!
 
ngn
@Pavel ah, you're so young and green - you still believe in estimates :)
 
It did take me half an hour before there were only syntax and type errors left
I got the logic down on pretty much the first try
 
ngn
I never trust estimates, especially my own :)
 
Programming projects always take longer than estimated, even when taking this rule into account.
8
 
8:57 PM
Let the cone of uncertainty be your guide
@ngn a lot of agile methodologies are still based on estimates but not a set number of hours or anything like that
 
Mind you, I told my project manager this would be done Monday
 
ngn
@Pavel hm, so you blame it on python's dynamic typing? static typing is not without annoyances either - the time spent trying to make the thing compile...
 
So I'm good
@ngn Not much time at all if you have type inference and autocomplete
 
@Pavel While migrating a project to a newer version of java and updating dependencies i had to run a build including a full suite of unit tests and then do manual integration testing. i know that feel, haha
 
Our COO told me yesterday that estimates can't really be any more precise than 1 hour/day/week/month/year. But if I plan on doing anything with the APL-to-R interconnect, I should multiply my estimates by 3.
 
9:03 PM
normally you should always double your estimate and then use the next higher time unit e.g. 2 hours becomes 4 days
 
or, 2 years → 4 decades :P
 
@Adám If you create an issue/user story that contains either "APL" or "R", the estimate should be doubled by the tracker automatically.
 
ngn
@Adám known as Hofstadter's law
 
@Adám Do you even know R?
 
@Pavel No.
@mınxomaτ Why? APL is usually pretty fast to get things done in.
 
9:08 PM
@Adám So why are you using the APL-R interconnect for anything?
 
@mınxomaτ R u sure dat dat would b flawless? I WANNA EAT AN APL!!!
 
@EriktheOutgolfer If you use APL to mean apple in an issue on a project I maintain, I would delete the issue.
 
ngn
as long as a programmer is paid monthly (or any other unit of time), it's always in their interest to overestimate; yet, almost everyone underestimates...
 
um, is that really the issue here? I'm pretty sure nobody is interested in when you want to eat apples
overestimating, if done correctly, results in $$$
 
@Pavel I'm not, but we have customers that want to program in APL but use R's libraries.
 
9:22 PM
Good... lets see... Good afternoon!
@ngn Programmers are... a strange subset of the earth's population.
 
ngn
@FreezePhoenix good very late afternoon (past midnight here), the sun never sets on TNB :)
 
@Adám Faster than JS?
 
@FreezePhoenix Depends what you're trying to do, obviously.
 
ngn
@Adám and what you already know
 
@ngn And if there's a library/built-in for it.
 
9:31 PM
And if you already wrote the code in your API :)
 
0
Q: Count Consecutive Characters

StephenGiven a string containing only letters, output the length of the longest run of consecutive alphabetical letters the word contains, where order does not matter. An example algorithm may sort the word, remove duplicates, and then output the length of the longest run. Test Cases watch -> 1 stars ->...

 
0
A: Sandbox for Proposed Challenges

AmphibologicalScoring Briscola code-golfcard-games Introduction Briscola is one of Italy's most popular card games. It is a trick-taking card game, like Bridge. Briscola is well known for its bizzare point system. In this challenge, given two cards, you will output whether the first one scores more, less, o...

 
 
2 hours later…
11:21 PM
@NewMainPosts That seems fun.
 

« first day (2720 days earlier)      last day (2125 days later) »