« first day (2435 days earlier)      last day (2622 days later) » 

12:00 AM
Replace it with a text area.
(If you want it to be multiline)
No it is just one search
Not multiline
What functionality are you trying to achieve from enter (or none at all)?
12:02 AM
In this case, you're probably best with going with (almost) your original idea of $("#searcher" ).on("keydown",(e)=>{if(e.keyCode==13){e.preventDefault(); return false;}})
0
A: Sandbox for Proposed Challenges

sergiolCount letter frequency Inspired by question Tweetable hash function challenge, you should take the English dictionary used there and produce a program or function that outputs the the absolute and relative frequency of each character. It is CASE SENSITIVE and the APOSTROPHE is also accountable a...

 
1 hour later…
1:36 AM
RIP, I think my hard drive just died a sudden death
My laptop started beeping from where the hard drive is before a BSOD 30 seconds later and now the bios is complaining about no boot device.
@ATaco or you could remove jQuery from your program.
1:52 AM
In that case, use $("#searcher").onkeydown = (e)=>{if(e.keyCode==13){e.preventDefault(); return false;}}
> $
I firmly believe in communistic javascript programming, no jQuery allowed
That's fine, because $ isn't jQuery.
1) don't use jQuery pls 2) jQuery don't got onkeydown AFAIK
@ATaco oic query selector
$ is highjacked by jQuery, but ^
Trust me I apparently Javascript.
also golf: e=>e.keyCode-13||e.preventDefault()||false
1:57 AM
(I wasn't trying to golf that's just the only way I know how to JS, it's just bad habits)
VSCode > VS :P
They achieve two different things. I wouldn't use VSCode for the things I use VS for, and vice versa.
On the other hand, VSCode is the best at what it does, while VS has thankfully been mostly made obsolete by Rider.
If you could banish a popular programming language forever what would you choose?
I've yet to find a thing I'd prefer to do in VS, however, I've not done much C#.
@HelkaHomba Python. Mwahahahahah!
2:09 AM
JS would have to go methinks
Not Python :/
Python has bearable syntax and rules
> Bearable syntax
> Whitespace dependent
Well, except for indented multiline strings...
Or if you hate whitespace
I hate the tabs vs spaces argument and python is like a beacon for that.
JS isn't that bad, but it's not very good.
@ATaco It's better for organizing large projects that have multiple projects in a solution and dependencies and such. I use it for work.
I can understand that, but I was quickly turned off by the interface and load times on my machine.
I don't want the first thing an IDE askes me to do to be log in.
2:12 AM
@HelkaHomba C, so the purists will finally accept that they can achieve everything they want in C++ without arbitrary restricting themselves.
C++, Because C is fine just the way it is.
@HelkaHomba Python
Raises a hand to hifive/hoof the goat
@Pavel C++ compiler is ucky though (why you should obviously use VSL)
@ATaco Load time decreases by 20x after the first launch (with the sign in and all) but is still quite slow. The interface is bad.
It really is better for managing projects with hundreds of classes though.
2:16 AM
The only thing stopping me from making VSCode my main text editor is that I can't have multiple projects open in one window.
eehhhh, VSL has like 150 class and work perfectly fine in Atom
@HelkaHomba C++, so the C++ heretics will finally accept that C is a valid language without having to think of themselves as superior
@ATaco if you really want braces in python you can use them
@ATaco This is implemented in VS Code Insiders
struct > class :P
2:18 AM
File -> Add folder to workspace
@DestructibleLemon Wat how
Slams that DL for windows button
@ConorO'Brien C++'s standard library is worse of a mess than the sheep's barn
basically
if x==3:
    #{
    print("hi")
    #}
2:20 AM
ಠ_ಠ
Uhmm.
or however it is you guys use braces
ಠ____ಠ
it is a very versatile language
@Downgoat No one says you have to use the C++ stdlib while writing C++.
2:21 AM
The only way to write braces.
@Pavel lol good one
just use D
so you hate and like braces at the same time?
2:21 AM
@ConorO'Brien An excellent alternative
I write in Lua, thankyou.
if cond then statement end
oh, you can use that
statement if cond
if x==3:
    #then
    print("hi")
    # end
Ruby FTW
2:22 AM
@DestructibleLemon That's not inline
if(cond) {
    statement;
}
the only reasonable way
(if cond foo bar) :P
@ConorO'Brien Braces for one statement?
@Pavel yeah
@Pavel if (cond) statement; is a thing
2:23 AM
maybe not for a short statement, but for most statements
or VSL's if cond: one_statement_only
@JohnDvorak Lisp: A language which I really want to know and really don't want to learn.
Seriously - I like ruby's postfix conditionals.
though often braces are good because it provides place to put comment
Yes. They are awesome.
2:24 AM
@Pavel it's basically just (op operand1 operand2)
Although I do prefer C-style
@Pavel tbh lisp has a lot of weird things to be confused by and parens are not one of them
@ASCII-only should we also do postfix conditional in VSL
YES
Also postfix loops
but we have if a == 0: return
@Pavel you mean do-while?
2:25 AM
No, i += 1 until i == 4 # ruby
oh btw I used my first do-while loop ever (in 3 years of programming) 2 days ago
@Pavel :
ok so I might make my koth language agnostic but that makes it slow what do I do
But that's less pretty
do: i += 1
until i == 4
actually idk if : works with chain blocks idk lemme check
repeat i = i + 1
until i == 4
Works in lua.
2:27 AM
> i = i + 1
Lua doesn't have ++ or +=?
Nope.
that sucks
Can you define such operators?
I'm guessing you can
Because lua is magical that way
Nope, Lua doesn't allow defining custom operators.
2:28 AM
wat.
ok so can anyone help me reduce lagginess on language agnostic challenges?
please
not with any current code just general tips I guess
Lua gives you incredibly little control in regards to handling variables as varibles.
@ASCII-only wait how are we doing custom operator precedence
Oh, method_missing works like of like lua's setmetatable(_G,{__index = function(key) blah_blah_blah... end})
2:33 AM
Hey in Jquery can I make specific div items disappear on command (and come back on command)
Yep, use .css({display: 'none'}) and .css({display: 'literallyanything'}) on those items.
I don't believe that uses jquery.
@Pavel My equa.lua library doesn't allow functions to implement any sort of traditional looping.
(.css is a jquery func)
I could have sworn it was built in. Welp.
class="field">
          <li class="bold filter-button" data-filter="all">All</li>
          <li class="bold filter-button" data-filter="bustion">Combustion Gas</li>
          <li class="bold filter-button" data-filter="wet">Condensing Gas</li>
          <li class="bold filter-button" data-filter="emissions">Emissions</li>
          <li class="bold filter-button" data-filter="flares">Flare Gas</li>
          <li class="bold filter-button" data-filter="safety">Safety</li>
          <li class="bold filter-button" data-filter="savë>Save Money</li>
2:34 AM
@ATaco However, Lambda calculus to the resque.
whileloop = call(x,x)(#call(x,x))
How to break
i need to make all of those <li class> to dissappear so what do I do?
I'm no good at lambda calc.
(i don't know jquery )
How are you referencing the div?
$(".field .filter-button").css({display: 'none'}) should work.
2:36 AM
It is not really in div :P
ohh
I just realized that div stands for divide
@Christopher2EZ4RTZ 1) don't use jQuery 2) use el.classList.toggle
or you can use react :D
#isthislua?
@ATaco where do I put my div name
2:40 AM
CnR idea: longest code that does task X which cannot be golfed by removing and rearranging chars
@ATaco halp how do i make visable
@Downgoat cough unary
$(".field .filter-button").css({display: 'visible'})
@Christopher2EZ4RTZ www.stackoverflow.com/q/...
@ATaco display has no visible property
@Pavel nah, probably possible as the BF can be golfed
@Downgoat Any invalid thing will default to it's default :P
2:44 AM
@Downgoat But even after golfing it will likely be longest
Wait but how do I specify what div?
It is just making everything go away
@ATaco not if there is anyother style in which case any other style will take precedence. You can jstu use initial or even better classList
@Pavel yea and jelly is likely shortest in code golf.
@ATaco what if someone made python but with braces instead of indentation? would you use it?
No, because I'm stubborn.
But jelly is at least hard to use.
2:46 AM
I see, BF is very easy to golf in
Not very easy, but at least typable.
ಠ_ಠ jelly is typable just use codepage keyoard
I have a codepage keyboard :D
ḅḷạḥ!
does jelly have verbose mode
no
2:53 AM
:(
@Downgoat hmm actually that's possible, but only when we bootstrap so I'd say don't worry about it atm
@ASCII-only ok
btw LLIR is on C9
I have the ExecutionGraph part done
@ATaco what languages would have to be used for you to participate in a koth?
Unless we want to extract operator things to shunting yard
so we can start having backend creating execution graphs using import llir from 'llir'
2:56 AM
@DestructibleLemon Java, Javascript, C/C++, Lua(Why tho)
hmmm all of those are bad
except maybe lua
C is bad.
You heard it here first folks.
bad for a koth anyway
if you're programming a kernel it's applicable
Tell that to Futuristic Gun Fight
that one was a copy cat but it got answers because it was overly simplistic
just saying
can we close all the clone gun fight koths as dupes from now on?
2:58 AM
But, it was fun!
I created a bot from a simple genetic algorithm!
ok but is it possible that if I made a new language you would use it
> all of those are bad
wat
> except lua
WAT
I think you just made history
No one else has ever said that
I don't know lua really
it probably is bad
:<
Anyone know a fast way to do cumulative binomial distribution? Like given a number in the range of the number of outcomes convert that to a number in the distribution
2:59 AM
arrays do not start at 1
They do in Lua.
No they don't
Tables start at 1 in lua.
Because they're tables, not arrays.
you can't just call things by a different name and pretend they are different
@ATaco hmm what about chairs
table = {chair, chair, chair, chair}
@DestructibleLemon Is a list an array?
3:01 AM
basically yeah
Sure why do you theink it's called an ArrayList
Even though arrays are, by definition, statically sized and such.
It's a dynamically resizing array.
:O TIL table is 4 chairs
@Pavel There is a thing called an arraylist, but a list isn't an array.
3:01 AM
^
anything in the list of things data family should not start at 1
@DestructibleLemon you what why
sorry do you not believe in logic?
Logic = I get first item with 1
0 is there only because of C...
you just don't get it
3:03 AM
Lua's tables are as much arrays as they are maps.
@ATaco yes they are like JS >_>
JS arrays are just fancy objects, they're cheating.
There's nothing stopping you from starting your lua tables at 0, but the tables themselves are designed to default at 1.
JS objects are just fancy dicts
They're not even that fancy
(But I would prefer it if lua decided to start their tables at 0)
were they pretending to be anything else though?
syntactic sugar is sweet
3:05 AM
Can you set the lua starting array index?
Not for the constructor, no.
e.g. in APL you can make it whatever you want with ⎕IO←0 or ⎕IO←1
In C/++ you can do someArray--
Just define your own constructor: t = function(zero,...) return {[0]=zero,...} end t('arrays', 'start', 'wherever', 'you', 'want')
@Pavel 0.5 pls
funciton t(tab) tab[0] = table.remove(tab[1]) return tab end t{"or","even","do","this"}
3:08 AM
@DestructibleLemon:
Crap my thing got wiped
I forgot to switch keyboards to a layout where ctrl+c works
Basically the assignment fails
You cannot assign 0.5 to ⎕IO
@ASCII-only do we want: sqrt 81 or 81.sqrt
@Pavel this is such a cop out
@Downgoat I think 9 is a bit shorter :P
3:20 AM
Downgoat is bad golfer confirmed
Clubs are hard to hold with hooves.
@Downgoat I prefer 2 root 81
solve n pow 2=81 for n
@Pavel that would definetly be 81.root(2)
Thinking about it more .root is better
3:32 AM
Is 81root2 possible? Assuming variables can't start with numbers
@HelkaHomba nope, you need a space after root
Because variables can end with numbers
@Downgoat I'd say both but IDK, I don't really want to clutter global
@ASCII-only also you can use with comanda chain if you want natural-like syntax maybe
Idea: syntax for inplace function calls, e.g. if used with ! foo = foo.bar() could become foo!bar()
idea: add unicode symbol like sqrt as custom operator in libnatural when we bootstrap
@Pavel we have foo = .bar()
10/10
Although .= makes it fit in with += and the rest
I suppose that would look akward
3:47 AM
When I see .= i think append to
(Thanks PHP)
Although I suppose this would imply that foo =. bar() works.
well you can also do like: let color: Color = .black and like newNode = .derive(from: .parent())
Would that get the static value black of the class color?
it's same as Color.black
Interesting.
How would that last one work
3:51 AM
same as: newNode = newNode derive from: newNode.parent
@Downgoat I thought both are already command chain
@ASCII-only like I mean 4 root 2
@Downgoat doesn't that become 4.root(2), at least when command chain is fixed
yea
but 4.root(2) is bot comand cahin
does foo = [bar] work (array access)?
3:57 AM
Halp how to find probability distribution of n dice
@Pavel no that is an array...
Like equivalent to foo = foo[bar]
Oh, I see
@Pavel assuming you want foo as a function then $0[bar] would work
I though {} arrays
@Pavel no those are sets
Right, right.
Is {} an empty dict or an empty set?
4:04 AM
@Pavel empty dict
which is inconsistent with [] but those would be the ones used more often
{,} is an empty set and [:] is an empty whatever that is
Um
@Neil Shouldn't the first O be an E
I would like to know more about whatever that is
Is that an error a thing
Does [:] error or do something
4:07 AM
IIRC it was supposed to be something
compile-time dictionary or something like that
Idea: Dictionary that can contain multiple of each key, keys have indexes.
So if we say foo = [a:b, a:c, d:e] we can do foo[a][0] to get b or foo[a][1] to get c.
@Pavel this is called dictionary of arrays
Like sugar for dict of arrays but can doo foo[a] which is same as foo[a][0]
4:10 AM
@Pavel .. if foo is Array<T> it can't be T also ಠ_ಠ
That's why it's not an array
@ASCII-only wait what {} is empty closure {,} is empty set. and [:] is empty dict
oh ok
what is {:} then
and what is empty closure for
syntax error
4:12 AM
Clearly you should implement my idea
@ASCII-only func ping(server: URL, callback: (Response) -> Void = {})
is {foo: 1} also syntax error
@Downgoat right good idea
@Downgoat D: why
also compile error foo is not define
@ASCII-only because not valid syntax?
idk what that is like named set or idk
4:13 AM
oh wait
that is unnamed struct isn't it
@Downgoat hmm true but i don't want to do like python needing quotes for every key
@ASCII-only no struct is struct name { body }
@ASCII-only :|
but then you have to do [[foo]:1] to use foo var as key
i said unnamed struct
also doesn't play well with encoding
and primitives
and string constructors
@Downgoat true
and multiple stdlibs
and @primitive statement
@ASCII-only I thought you say no unname struct
if we are then it would be like tuple (a: x, b: y)
4:15 AM
hmm true
kinda want a use for {:} but yeah there isn't really any data structure that would make sense for it haha
set and like order don't really go together which is whhy i think we should use tuple syntax if we're doing
tbh named tuple good be good for like multiple return values when you don't want to create a new struct
e.g.:
You could do the ruby thing
With symbols
return (value: x, remainder: x % a)
oh yeah we should have symbols
@Pavel nah imo useless
@ASCII-only symbol = enum
4:18 AM
@Downgoat yeah but like user would need to define global enum
??? why
please give real-use practical specific example
138
A: When to use symbols instead of strings in Ruby?

fotanusTL;DR A simple rule of thumb is to use symbols every time you need internal identifiers. For Ruby < 2.2 only use symbols when they aren't generated dynamically, to avoid memory leaks. Full answer The only reason not to use them for identifiers that are generated dynamically is because of memor...

@Pavel 1) ruby is not VSL 2) VSL is strict type 3) does not address fact you can use strings 4) can't be compile-time checked 5) susceptible to typos 6) does not handle an APIs changes to symbols well if it were to occur
@Downgoat strings are usually slow
but yeah enum can be used for all the usecases
C Strings are pretty fast :P
(As long as you aren't using them as keys, I suppose)
4:29 AM
@ASCII-only in ruby not VSL
@Downgoat in every language...
@Downgoat would you rather do on("eventname", cb) or on(.eventname, cb)
enum is internally int = more memory efficient, faster comparison
1) both would have same speed 2) neither, nodejs use yucky way of handling event
@ASCII-only not how symetric optimize work
@Downgoat what is that
4:32 AM
LLIR's style of optimization
we would see that case as f -> p{ c_1, c_2, ..., c_n }; p(s -> f) (s being string). so we can convert s to a bit-repr representing the cases as there is no difference to LLIR
c_1 - c_n being case_1 - case_n
right
would that work in an interpreter
VSL is compiled?
yes but isn't it supposed to be scripting language too
it would use JIT
you would do a custom LLIR churner for JIT
well i guess we can profile later anyway
4:38 AM
since conditionals need a predicate (which from it derives the branch mapping) we'd have a lookup -> p( \$0 -> case ) so we'd constant fold on that predicate to get the case
4:57 AM
print(call(x,x,0)(#(branch(lt(y,30),call(x,x,y+1,write(y,'\n')),orr(y,x),x,y)),‌​x,y)) is equa.lua printing all numbers from 0 through and inclusive of 30.
equa.lua is a golf library, aslong as you don't want it to do anything TC.
5:25 AM
Why not implement loops
Also, is equa on tio?
floop(0,le(i,30),i+1,write(i,'\n'))
I implemented loops.
And as equa is just a library, it's not on TIO.
TIO has libraries
Like numpy and such can be imported from python
Well, once I feel it's a bit more complete I'll poke dennis.
> Last commit 2 months ago
k
I haven't touched it in a while, so what?
5:29 AM
Don't think will be a bit more complete any time soon
If we took my commit history as a suggestion of completion I'd have a lot less half-finished projects.
6:05 AM
0
Q: Increasing, decreasing, none or all?

Stewie GriffinTake two inputs, a non-empty vector/list containing digits 1 and 2 and a string (no, you may not take 0/1 instead). The string will be one of the following (in lowercase, exactly as written below: increasing decreasing ones twos all none If the string is ____ then you shall return the indices ...

6:46 AM
@Pavel Readme added.
6:58 AM
Neat

« first day (2435 days earlier)      last day (2622 days later) »