« first day (2388 days earlier)      last day (2753 days later) » 

18:10
CMP: I have a prefix operator in Proton that times how long an expression takes to be evaluated. What should I name it?
(it was formerly named timeit and is currently named speed of)
maybe "diagnotsic"
huh
I'm just wondering what would make the most sense for readability :P
"diagnostic"
okay. that sounds like a pretty good name for it
thanks
18:13
:P
So like @f = a => a < 2 ? 1 : f(a - 1) + f(a - 2); print(diagnostic f(1000)) would time how long a memoized recursive fibonacci function would take on input 1000.
you could also include other information with the time to make the name more accurate
maybe the result of the evaluation? :P
If I do include more information, then I want to also have a separate operator that only gives the time
it could be on object/dict/hash/whatever, like diagnostic(f(10000)).time or smth
otherwise I'd need ugly things like print((diagnostic f(1000)).time)
oh lol
18:14
I like the idea of diagnostic returning multiple things but then I'd also prefer to have a separate timeit operator
maybe "runtime", "timefunc", "timeop", "time" (probably taken), or maybe a clock emoji :P
How about "timeof".
C# has sizeof, nameof, typeof.
huh interesting. that's a good idea
The reason I didn't use time is because that might be a common variable name, and it's a module name
I'll use timeof
18:17
pats self on back
@Mr.Xcoder FryAmTheEggman found a 5-byte thingy...
(truthy: [1] falsy: [])
@Hosch250 merci :P
I dunno what my college will think when they have an incoming freshman applying for a job saying "I'm a fairly competent programmer" xD
6
in VBA Rubberducking, 17 hours ago, by Hosch250
And yes, I probably qualify as a jerk.
18:22
rip
They'll probably think you're a troll.
@Hosch250 well they gave me a scholarship... so at least they appreciate my test scores or something
What are you going for?
@Hosch250 Comp Sci
Sweet.
I went for IT Management, but I work as an ASP.NET MVC dev.
18:27
lol this is great. without memoization, Fibonacci takes 0.0438 seconds for fib(10) and with it it only takes 0.00295 seconds :P
Anyone here good at SQL?
I know a bit but I wouldn't claim to be even decent at it
I had an interested scenario at work that I'd like to discuss with someone.
@HyperNeutrino same
I took a course on one of those code learning sites, but nothing beyond that lol
18:29
My boss is really good at it though
We are all probably about the same level, then.
lol without memoization, f(100) can't even compute in reasonable time but with memoization, f(1000) takes 0.44 seconds :P
Long and short of it was I have one temp table, and I pull data from a DB table and inner join it to the temp table. Then, I join it to another table and do a like search.
If I just stuck the second join to the end of the where clause, it took a couple seconds.
oh um you know more than me
@HyperNeutrino cQuents takes .09 seconds to do f(1000) :P
18:32
If I did the first join and the filter, dumped the results in another temp table, then did the second where on the new temp table, it took like .2 seconds.
I just know SELECT column FROM table WHERE condition :P
LOL.
@HyperNeutrino Ha, I know inserts
That's what I knew before I started my job 3 months ago.
@StepHen ಠ_ಠ that's because it specializes in that specific type of computation. Proton has huge overhead because of how many recursive calls there are
18:32
@Hosch250 huh... that's really odd
@HyperNeutrino specializes, yes. optimizes, no
lol
Proton: specializes, no. optimizes, negative yes :P
Yeah, turns out one used a couple loops instead of a join.
@HyperNeutrino just rewrite Python with tail call optimization
btw, I don't know how to tail-call optimize...
:P
18:35
I just know it may help with recursion optimization :P
I don't either
@HyperNeutrino don't do anything after the call of a recursive function, basically
huh ok
example? I'm not following as to how that would speed things up
you can get rid of stack overflows with it iirc
e.g., return recur(x)
huh ok
I'll have to try to get that to work somehow, but it's not particularly high on my TODO list
18:37
@EriktheOutgolfer ?
btw the empty program in Proton takes .7 seconds... :P
It uses the same stack frame over and over again.
@Mr.Xcoder well his -1iVt is 2 bytes shorter than our .AtMiVt...
Did you use it in any way?
@HyperNeutrino the empty program in stacked is between 0.7 and 1.1 seconds sooo...
18:38
@Mr.Xcoder for a start I credited him and put that as the non-restricted version
@StepHen Proton takes .32 without recursion :(
@ConorO'Brien lol rip
@EriktheOutgolfer I try to find a workaroud with that one, ping you if I have something
@HyperNeutrino I don't really know what memoization is but I think cQuents does it automatically since it stores the entire sequence
@Mr.Xcoder yeah he intended such a use too :p
so the longer you get the more useless cQuents gets because it's storing everything in memory
18:40
@StepHen essentially if you call a function, it remembers the args => value pairing and pulls it from the cache when you call it with the same args
@EriktheOutgolfer Welp, nearly all are coprime
btw Proton causes segfaults for fib(10000) (after pushing up the system recursion limit to prevent a recursion error) (cc @MDXF)
@HyperNeutrino maybe you shouldn't recurse so much :P
yes :P
fib(10000) using the iterative method takes 1.5 seconds
@HyperNeutrino use my method :P
18:44
what's your method :P
using phi?
aw but I like that method :P
my method uses purely integers (with arbitrary precision) and has complexity log(n)
oh cool :D
fib_cache = {0:0, 1:1, 2:1}

def Fib(n):
    global fib_cache
    if n in fib_cache:
        return fib_cache[n]
    else:
        result = fast_fib(n)[1]
        fib_cache[n] = result
        return result

# F(2n) = (F(n-1) + F(n+1)) * F(n)
#       = (F(n-1) + F(n-1) + F(n)) * F(n)
#       = (2F(n-1) + F(n)) * F(n)

# F(2n-1) = F(n-1)*F(n-1) + F(n)*F(n)

# this returns [F(n-1), F(n)], so
# the implementation should be
# fast_fib(1000)[1]
def fast_fib(n):
    global fib_cache
    if n==0: return 1,0
18:46
f[0] = f[1] 1
f[x_] := f[x] = f[x-1] + f[x-2]
A simpler caching implementation in Mathematica.
don't you mean "cashing"? since it's mathematica? (I'll excuse myself lol)
Mathics is free
@ConorO'Brien before caching goes cashing :p
@Pavel ah but you didn't say mathics now did you? :P
It's a different implementation of the same language.
18:48
it's also less extensive, slower, and made in python
(iirc)
That is true, but my method still works.
nope
"$RecursionLimit::reclim: Recursion depth of 200 exceeded." Try it online!
@LeakyNun why have fib_cache like {0:0, 1:1, 2:1} and not [0, 1, 1]?
@EriktheOutgolfer so that you don't need to store 15000 values at once
because python arrays aren't sparse by default
18:50
@LeakyNun oh so python dicts are lazy or something?
@EriktheOutgolfer what?
@ConorO'Brien That's because I forgot an equals sign between f[1] and 1.
;-;
you can have {0:0, 15000:-1, (1,3):2}
you can't do the same with arrays
Mathics only has a default recursion limit of 200, which is unfortunate, but you can increase it.
@LeakyNun oh so you don't always use integers for indexing?
18:51
@EriktheOutgolfer oh, ignore the (1,3):2
@EriktheOutgolfer you can use anything immutable as keys
tuples, numbers, strings, etc.
@StepHen I meant if his code was using anything else but integers for indexing or something
@ConorO'Brien Try it online!
huh I borked Proton again
LOL.
Hey, you guys want to write an interpreter for VBA?
18:55
o_o visual basic?
@Hosch250 uh no
@ConorO'Brien * Visual Basic for Applications
LOL.
I hardly understand the syntax myself, much less recreate it >.>
turn every symbol into a word, and you have VB
I totally don't blame you
18:57
I mean I suppose it wouldn't be terribly hard if we didn't have to remake all of the functions that come with it
I have somewhat vague understanding of VB.NET because the C# docs are actually combined C#/VB.NET/F#/C++CLI docs, and that vague understanding is already too much.
@Hosch250 I'll write a VBA interpreter in VBA if VBA has an eval function
It is a terrible language.
It is.
@Pavel VBA isn't .NET though (doesn't change what you said otherwise)
18:57
And an even worse IDE.
Rubberduck VBA fixes the IDE up, somewhat.
@Hosch250 I'd prefer Visual Studio to, say, NetBeans though...
It isn't VS.
I prefer notepad++ to anything else tbh
@Hosch250 oh, oh, yeah that IDE, yeah... I forgot about that one on purpose
I've found that Visual Studio, while being a pretty bad IDE, is still better then the vast majority of the IDEs out there.
18:59
I remember being told through a youtube comment that I "could not possibly be a real programmer using notepad++ while staying sane"
JetBrains IDEs are the best
> Real programmers use Vim
>inb4 "relevant XKCD"
@ConorO'Brien well... there are some text editors I'd prefer over Notepad++... VSCode is pretty decent, for example
VSCode is awesome
@NickClifford something something butterfly
5
19:00
I use it with the Vim plugin
and yay I unborked proton
i've heard that VS Code's autocomplete is really good
What was "borked"? (I don't use an IDE... I use gedit (Linux) or notepad (Windows))
@NickClifford I mostly use it for JavaScript, but it's the first decent JS autocompleter I've seen
I have defined something depending on the definition of itself (like recursive definition in real life)....
19:01
@StepHen That gives me a brainwave.
bork
past tense: borked; past participle: borked; past tense: Borked; past participle: Borked

obstruct (someone, especially a candidate for public office) through systematic defamation or vilification.
"“We're going to bork him,” said an opponent"
(:P)
When I do my lightweight IDE for Roslyn languages, I'm going to call it Butterfly.
@NickClifford Depends on what language you're using. For a .NET lang, absolutely, but for many other languages the autocompleter and syntax-highlighter are community plugins.
i've also heard that VS Code integration for TypeScript is one of the best
@Hosch250 you're welcome
19:02
Not to say that they're bad, just not amazing.
@ConorO'Brien Bork origin: Watergate scandal (look it up)
VS Code is like an Atom that runs at a reasonable speed.
@StepHen I know what it is >.>
@Pavel Actually, I don't think it is.
@ConorO'Brien talking to the group :P I assumed you did
19:03
If you just install the basic thing and start typing English, it will start autocompleting your words based on previous words you typed.
@Hosch250 Eh?
No plugins installed, or anything.
Oh, yeah there is that.
for Atom?
For VSCode
19:03
@Hosch250 but it also recognizes builtin functions in, say, JavaScript, which is awesome
Yup.
i think atom will do that as well though
I wouldn't call that "great autocompletion" though.
19:04
@StepHen oh, I assumed the reply was to me lol
@ConorO'Brien it was for context :P that's it, sorry
I don't use it because it doesn't support F5 debug by default. You have to hack up some JSON file for that to work.
@StepHen no it's fine, I was just confused
is the VS Code plugin ecosystem well developed?
Pretty well.
There are plugins for most major languages, I believe.
19:09
right, that's what I figured
ooh, new language
It's not a golf-lang either!
yup. relatively new; I think like 4-5 days?
@HyperNeutrino 3/10, has an emoji
19:11
was it actually a rewrite of Positron, or did you just start from scratch? :P
start from scratch :P
it was meant to follow the same specs originally...
@ConorO'Brien where?
oh you mean :P?
is that bad or good... :P
wait since when did I have 12k network rep
official documentation with an emoji....
definitely a plus
then you'll love my dict syntax
@ConorO'Brien Emojicode
@ConorO'Brien IT. IS. AN. EMOTICON. NOT. AN. EMOJI.
16
19:13
@HyperNeutrino Link?
the syntax wiki page doesn't exist yet
@HyperNeutrino I'm sure it doesn't matter in the long run >.>
why are messages with 25 stars pushed off by a message with 1 star
but dicts are like this: [key1 :> value1, key2 :> value2]
Example then?
19:14
ninja'd
@HyperNeutrino eh. I personally prefer :> for "range from 0 to n-1"
@StepHen the 25 star messages were probably old. I think the "importance" scales up with star count and down with age
oh, that reminds me
Unstar it. My notice me sympy comment must remain there.
I still need to write guides for Ohm
19:14
@HyperNeutrino it does, for sure, and I'm complaining about it
@ConorO'Brien I could change it if you want ¯\_(ツ)_/¯
I was mostly just kidding
there is no documentation of :> being dict syntax, that's just what I say
oh ok :P
@StepHen complain to meta not me :P /s
So, "the wiki consists of a few components" ... lie.
not done yet :P
19:17
/consists/will consist/s
also, can someone try to break Proton and tell me where it breaks? tio.run#proton I want to fix any bugs
BTW multiplication not working on TIO is a known bug that's been fixed on GH
I love breaking things, so I'll try.
lol
at the last hackathon I did, one of my friends who was on our team was mostly just breaking our code and fixing things, though my other friend did have to write the program 3 times before it was "ok"... :P
@HyperNeutrino are non-variables supposed to be able to exist?
19:20
aka is 1 exists supposed to be valid?
that's valid
it should return True
check if a variable is defined. != check if a number is defined :P
fine :P
done ಠ_ಠ
you said to break it :P
THAT'S THE WIKI ಠ_ಠ_ಠ_ಠ_ಠ_ಠ_ಠ_ಠ_ಠ_ಠ_ಠ_ಠ
I wanted the bug-fix the language not the wiki ಠ_ಠ
19:23
@HyperNeutrino That reminds me of a centipede, but with eyes instead of legs.
So, 1.5 spiders.
/ / / / / / / / / / /
------------------o<
\ \ \ \ \ \ \ \ \ \ \
How come you didn't implement * at the time?
I did...
It's because of a lexer bug; a * b is becoming [expression: identifier a][prefix: *][expression: identifier b]
I did a slightly hacky fix but it works nicely now, I just need a TIO pull
19:27
So, pointers, or unpacking?
unpacking
it's built off of python, I'm not sure pointers would be a good idea :P
Switch to Assembly, or something.
Talk to y'all later. GTG now.
19:40
What would you call a function that takes a list, and returns a permutation that is not sorted?
@flawr depends on context
@LeakyNun code-golf :D
@flawr p
that is golfy, but not very descriptive :)
sort and scramble?
19:42
hm that might work
well it is a little bit misleading
I'm talking about this challenge
I wanted to name it not-sort but that is not long enough for titles, it needs at least 15 characters
permutatenosort ?
@flawr bouncy permutation?
0
Q: Script that outputs a script that prints a given input

QuartzicWrite a piece of code that takes a string as input, and outputs a piece of code in the same language that, when run, will output the initial input string. It must be able to handle any combination of characters A-Z, a-z, and 0-9. Example in Python: import sys print "print('" + sys.argv[1] + "...

@LeakyNun bouncy?
@flawr if it isn't ascending and descending then it's bouncy
19:47
Is that a term used elsewhere?
I don't know
Oh, perhaps I can still use not-sort and append some of those invisible characters
ah that seems to work

« first day (2388 days earlier)      last day (2753 days later) »