05AB1E - Oasis

For discussing and golfing in 05AB1E and Oasis
Jun 3, 2019 07:24
It's implemented that way to handle negative values. So 2(L would be [1,0,-1,-2] for example. I don't recall having needed that functionality though. Ÿ is probably better suiting for handling negatives since L can only ever start at 1.
May 28, 2019 11:24
So 3L2Q = [0,1,0] but 3L2.Q = 0
May 28, 2019 11:24
Actually, .Q does not vectorize
May 28, 2019 11:22
I am not aware of a difference between .Q and Q either. Every time I've tried .Q it has behaved exactly like Q, but costs a byte extra
May 28, 2019 11:21
@Grimy ‚Θà would be a byte shorter
May 24, 2019 14:56
Most commands are there
May 24, 2019 14:55
The language bar Adám made is very helpful
May 24, 2019 14:50
ZÊ is technically better since it's easier to type ;)
May 24, 2019 14:40
And that as well yes :)
May 24, 2019 14:40
@Grimy this would be 22
May 24, 2019 12:39
Ah OK. Never used ÅL so I did wonder why it existed :P
May 24, 2019 12:24
‚à works as a 2-byte alternative
May 24, 2019 12:13
All very good ideas. I can't say I've ever needed P/O to work on mixed lists, but I can't see a drawback to them having this function. The suggestion for à/ß might need some consideration as they could no longer be used to pop the largest digit in a number. Doing Ws\ over ß is a bit clunky. Haven't personally used ß a lot though, but I've seen it used by others more.
May 23, 2019 11:54
14 without lazy-eval
May 23, 2019 11:40
Actually it was 18, but still way too long
May 23, 2019 11:34
@KevinCruijssen First attempt at 23 bytes. There has to a better way though
May 23, 2019 11:04
Ah, I think I understand you question about the list. I'll have a look and see if I can do it
May 23, 2019 11:02
@KevinCruijssen I had these as alternatives. Where the last one was the most interesting imo printing backwards, but unfortunately finding out the direction to start with got quite expensive
May 23, 2019 09:38
@KevinCruijssen: Interesting. None of my alternative versions were the same as yours. I really thought we'd have some in common
May 22, 2019 13:13
I've got 4 different solutions as well. Feels like there are many ways to do this, so very fun to golf. I'm sure some of ours align :)
May 22, 2019 13:11
Ah yeah, that makes it clearer. It aligns the characters in one string with characters from another, filling with spaces
May 22, 2019 12:15
Like this. Seems like it could be useful at times
May 22, 2019 12:14
@KevinCruijssen hadn't seem overlap before, but it seems to pad a word with spaces the amount of another word
Apr 27, 2019 10:42
@KevinCruijssen I assume it's due to vectorization. It might be logical to have a special case for the empty list, but maybe that is not what you'd expect in some cases. Unsure of what the best behavior for that would be.
Apr 27, 2019 10:41
@KevinCruijssen I vote yes. I don't really see what else it should do.
 

 The Nineteenth Byte

The Nineteenth Byte: General discussion for codegolf.stackexc...
May 24, 2019 12:12
It was Grimy's idea :) Very clever use of a word I'd never heard of before (ubridal)
May 24, 2019 09:18
Awh, doubt I can beat that
May 24, 2019 09:13
Aye :) I'll see if I can beat it
May 24, 2019 09:12
Yeah, I forgot about the case-insensitive part
May 24, 2019 09:10
I'll add an explanation after I've tried getting it down some more. Not happy with the last part
May 24, 2019 09:08
I'm sure you can improve it more. You can't let 05AB1E win on a challenge like this ;)
May 23, 2019 14:06
May 23, 2019 13:11
@Anush Yeah
May 23, 2019 12:04
Allowing both nth digit, first n digits and output indefinitely is pretty common among oeis-sequence challenges and no one complains on that
May 2, 2019 14:06
It definitely is harder making questions asking for optimized programs in time/memory
May 2, 2019 14:06
The standard-ish way of "must complete test-cases within x seconds" seem to work decently. Although there is always the question of on what specs
May 2, 2019 14:03
@Anush Inefficient code is short code ;)
May 2, 2019 14:02
I changed it to a a number beginning with 2
May 2, 2019 14:01
@Anush: yes, but for a different number (1 higher than your example)
May 2, 2019 13:43
You should probably change the wording on the sandbox post to show that it is "a possible solution". Sounds like it's the only one right now
May 2, 2019 13:42
512, 1024 also works for last 2 ofc
May 2, 2019 13:41
Yeah, there are a few different solutions
May 2, 2019 13:39
code
May 2, 2019 13:39
So not that hard just to take the first 9 2**x numbers and increase one
May 2, 2019 13:39
Well, it was a 2**x number
May 2, 2019 13:38
@Anush [1, 2, 4, 8, 16, 32, 64, 128, 4096]
May 2, 2019 13:32
yes
May 2, 2019 13:29
I didn't immediately realize that we should include 1 (although it should be obvious since we're maximizing factors)
May 2, 2019 13:28
I would add the actual numbers to the output example, like (1, 17, 59, 127) for the 127381 example, to make it a bit clearer
May 2, 2019 13:27
The player-bit at the start makes it feel a bit like we're making koth bots