« first day (2756 days earlier)      last day (2094 days later) » 

12:01 AM
;)
 
@ConorO'Brien Cute.
 
12:11 AM
@Adám Write("t\n¯")
 
@Pavel Yeah, see that's the kind of thing I wanted to avoid. Also, in APL: ⍪'t¯'
 
12:50 AM
0
Q: Construct a line graph / conjugate graph

Curtis BechtelIntroduction Given an undirected graph G, we can construct a graph L(G) (called the line graph or conjugate graph) that represents the connections between edges in G. This is done by creating a new vertex in L(G) for every edge in G and connecting these vertices if the edges they represent have ...

 
oh hell
I screwed this model up
that's a day down the drain
 
 
2 hours later…
2:39 AM
accidentally tweeted the word marketing
 
hmmm i just realised a pretty easy way to make a cyclic quine in one of my languages
wait actually now that i think of it that doesn't work
dang
wait i think it's possible with a slight adjustment
 
2:57 AM
is there a way to 'combine generators' in python or something
basically:
def combine(*generators):
    for generator in generators:
        yield from generator
 
combine = lambda *generators: sum(map(list, generators))
@DestructibleLemon that's the same thing
except without yield from
which is an actual thing
-1/10
 
i didn't know that
 
it's not that commonly used afaik
 
why do you need to combine generators anyway
it seems like it would be more convenient to just have the "for generator in generators" right before the relevant code i guess
 
@DestructibleLemon flask chunk takes a generator and I don't want to churn out maybe 100s of DB items when I don't need to
 
3:03 AM
fair enough
i think your combine function works well enough
 
I can do this but IIRC this will call all the generators: [*unsynced_posts, *unsynced_answers, *unsynced_users]
@DestructibleLemon :( but.. but.. syntax sugar
 
summing lists is a Bad Thing as well i think
 
I had an idea - code golf challenge - shortest sequence of keyboard inputs that creates a program of the language of your choice to do some code challenge
(in vim)
 
interesting
 
so you have two levels of optimization
optimize the actual code too much, and you may cause the vim inputs to be longer
 
3:07 AM
i think the challenge would need to be made carefully to reduce the chances that "i"+<program> doesn't win trivially
 
yes
do we have a question like this already though?
 
doesn't look like it
i searched "[code-challenge] vim is:question" and "[code-challenge] vi is:question", nothing like your idea was there
 
how about making this into a variation on the 99 bottles of beer?
or is that an very not original idea
 
i would say that
since most kolmo challenges of new stuff gets closed as a due of 99 bottles of beer or the rick roll one it would be cool for some variety i guess?
 
but that would just become either writing the entire thing in vim for verbose languages or i<program> in shorter ones (maybe with a few tricks like bo<c-p> for bottles)
 
3:20 AM
so, it needs to be very carefully chosen
(the code challenge)
 
is it more idomatic in python to do empty dict {} or dict()
 
3:39 AM
@Downgoat IMO dict() since {} might be confused for an empty set
 
Always {}
dict() is gross
 
@quartata do you know if celery's wait() frees all resources etc.
 
@Downgoat Dunno why no one told you but this is what itertools.chain does
 
docs have a 'warning' under wait() that says one must call get()/forget() to free resources
however I'd find it weird that this does not happen on wait but I can't check the source as I can't find the wait() function in source
 
@Downgoat on a result?
 
3:51 AM
@quartata yeah on an AsyncResult
 
Pretty sure you do have to do forget
 
@quartata CC @Mego
btw anyone know how to lock a row with SQLAlchemy
 
@Downgoat nope I was wrong
 
4:07 AM
@Adám Canvas, 5 bytes :P
 
@quartata do I know how I can call a syncronous function in a chord because celery will error if I use .wait() in a task
 
4:24 AM
Howdy.
 
4:41 AM
dtd's are soul crushing
 
Oh wow
That got me tripping
 
@quartata have you used celery with flask-sqlalchemy
 
I think the last time I wrote a DTD was like, 2006
@Downgoat no
 
:(
 
Actually
Probably more like 2004
What could you possibly be using it for I wonder @micsthepick
 
That's if you have an iterator of iterators
 
5:33 AM
 
Fedora 29 beta came out today
 
Oh neat
 
I hope the upgrade goes well
Python 37 here I come
 
6:03 AM
@Pavel why do you need to update OS to get new python O__o
 
@Downgoat I mean, I don't, have to, but In Fedora 28 everything still depends on Python 36 so if I install Python 37 on the side I'll just end up with two pythons
Well, 3 pythons counting 25
 
@quartata so just do itertools.chain.from_iterable([iter1, iter2, iter3])
 
6:26 AM
@quartata Uni subject
 
6:49 AM
@ConorO'Brien Thanks for the bounty, but any reason why you gave me one?
 
@Fatalize I put a bounty up just to give the question more exposure then awarded it to the shortest answer :)
 
@Pavel do people actually still use python 2
 
@ConorO'Brien Oh I see
(still surprised it's the shortest answer though)
 
quite frankly so was I. the jelly solution around twice as long as the brachylog one, I felt there wasn't enough activity on the question
 
Though the Jelly answer is from Erik who's generally pretty good at it so I don't know
I'm mostly surprised that there's no MATL answer on such a challenge
 
7:18 AM
@Pavel a lot of applications just install their own environment anyway
 
 
3 hours later…
10:24 AM
@ConorO'Brien @Fatalize Jelly lacks built-ins...
(and basically every language which doesn't have a, erm, make sure my matrix is square or I will curse you to eternity built-in)
 
@EriktheOutgolfer Square as in non-ragged, like APL's ↓∘↑
 
@Adám no, square as in width = height
 
@EriktheOutgolfer Chopping or padding?
 
@Adám checking
it fails if it's not square and tries again with different stuff
 
@EriktheOutgolfer So error on no-square, [what?] on square?
 
10:39 AM
@Adám well, Brachylog's is defined as . (the output) is ? (the input) and square
Brachylog is a declarative language (in the Prolog sense), so, if a failure occurs, the interpreter backtracks
 
CMC: Given a matrix, check if it is square.
 
so it effectively also does the brute force by itself
 
CMC: Given an n-dimensional array, check if all dimensions have same length.
 
Can n be given as an argument?
 
@ATaco Uh, sure.
@ATaco Is it hard to find the number of dimensions?
 
10:50 AM
Without a doubt, bytes can be saved by not having to do it.
 
not in every language though
 
@EriktheOutgolfer You can do the CMCs in 3 and 5 bytes in APL, right?
 
@Adám I actually had a Jelly solution ready
it's the Ƭ I am referring to
 
@EriktheOutgolfer That seems like a lot of code. How does it work?
 
@Adám yeah, I now developed the APL solution too
 
11:00 AM
@EriktheOutgolfer Both?
 
@Adám ẎƬ: concatenate elements until you can no more, keep every iteration in an array, including the beginning; : pop the last element (iteration), who cares about the length of the flattened array?; : concatenate elements (remaining iterations), let's finish it off at once, shall we?; : get the length of each element; =L: compare all lengths to the input's length; : finally, check if all elements are truthy (well, 1 in this case, all should be equal to the input's length)
 
@EriktheOutgolfer "Jelly lacks built-ins…" has to be one of the most outrageous claims I've read on this site :p
 
11:22 AM
Brachylog's is actually pretty unique
and Jelly also lacks some of them
 
is actually sometimes very useful so I'm surprised it doesn't exist in other languages
(in a non-declarative version obviously)
 
@Adám @EriktheOutgolfer I think ,ZŒJ€E would work for 6 bytes.
 
@EriktheOutgolfer May we see?
 
@Adám ⍴≡⍴∘⍉
 
I misunderstood the CMC, then.
 
11:32 AM
@EriktheOutgolfer 3 2 3 ⍴1 gives 1
 
@EriktheOutgolfer ^
 
@Adám took me way too long to find the 5-byte answer
 
@Adám yeah, didn't have time to test it
 
i am very close to release my humble golfy language's first stable version
 
@dzaima Interesting solution. I had ⍴≡1⌽⍴
 
11:36 AM
@gnu-nobody Any link? What is it good at?
 
@Adám by some reason I thought that wouldn't work ಠ_ಠ
 
idk what it is good at, but it is kind of functional, and im currently editing the code online so sending the link would not help very much, but i'll send one when I finish it
 
Functional? Is it based on a specific languages?
 
Is it by any chance Thing?
 
no, it is not
it transpiles to python
but not like pyth, pyth is imperative and has for loops or such
everything except constants is a function here
like
umm
 
11:40 AM
@dzaima I thought ∧/⊃=⍴ would work, but then I realised that does not apply to
 
i have this ~70 byte fizzbuzz code
 
Like, say, mini-Haskell?
 
@Cowsquack that was like my 10th idea :p
 
Technically you could consider constants to be functions with no input and constant output
 
:⍴
 
11:41 AM
j" "CşCQS+++l+lT%_15 "Fizzbuzz"l+lT%_5 "Buzz"l+lT%_3 "Fizz"l+l1_FNI
 
@dzaima ⍴∧.=≢ is even more APLy.
 
^^ about as readable as I expected :p
 
@Adám I never know what . does :p
 
i could send the transpiled code but most functions are overloaded to hell so they have weird names
 
Speaking about language development, I finally got to implement Solve and Optimize in Physica...
 
11:43 AM
@dzaima For scalar and/or vector args, A f.g B is the same as f/ A g B.
 
@Adám that much I know, but everything beyond is a mystery to me
 
12:20 PM
Is APL Dyalog closed-source?
 
yes
it's a commercial product, people need to make money for a living ;-) (APL is also an expensive market)
 
That makes sense.
 
@dzaima @Cowsquack Remember my trick to analyse operator behaviour? — User operands like {⍺'f'⍵}!
@Mr.Xcoder CXO is dreaming of opening it, but we're not quite there yet.
 
@Adám I tried to do that, and, while that could give insight to a specific case, it doesn't really help understanding the general results
 
ngn
12:38 PM
CMC: given two numeric lists of odd length, align their centres, pad with 0s, and sum them:
  a0 a1 a2 a3 a4 a5 a6 a7 a8
+
  0  0  0  b0 b1 b2  0  0  0
-----------------------------
  c0 c1 c2 c3 c4 c5 c6 c7 c8
 
12:52 PM
@ngn Should we only output [c0, c1, c2, ...] or should we actually do ascii-art?
 
ngn
@Mr.Xcoder only [c0, c1, c2, ....]
also: you can't assume that a is longer than b
 
hey, i released the first stable release of my language: repl.it/@_Nobody_/ugl-1-0-0
 
@ngn Dyalog APL (not golfed at all) a{⍺+(¯2÷⍨(≢⍺)-≢⍵)⌽⍵↑⍨≢⍺}b
 
this drives me crazy ._.
 
ngn
@J.Sallé are you assuming a is longer?
 
1:03 PM
looks like it
 
@ngn yeah I just saw you saying we can't assume that
I thought that was a can
I'll adjust it later, unfortunately I need to do some work >.>
 
ngn
I was trying to solve the knotty challenge before we publish it, and this mini-problem came up naturally there. The arrays represent the coefficients of Laurent polynomials (polynomials where x can be raised to negative powers) from x^-n to x^n.
 
@ngn ⍺{a b←(⍺{(≢⍺)>≢⍵:⍺⍵⋄⍵⍺}⍵)⋄a+(¯2÷⍨(≢a)-≢b)⌽b↑⍨≢a}⍵ this works but it looks really bad
 
ngn
@J.Sallé it's longer than my ungolfed k function :)
 
Okay now I really need to work, I'll golf that later
 
1:11 PM
TFW codegolf = work
 
@Adám lol I wish
 
Extremely ugly, but Jelly, 10 bytes (I think the shortest it can get is around 6-7)
Minor improvement: 9 bytes
 
TFW you have to wait over five minutes for your IDE to start working
 
What IDE is that, Eclipse? :P
 
@Mr.Xcoder Satan incarnate Delphi 10.1
 
1:15 PM
Nevermind, both my answers assume that len(a) > len(b) :(
 
@J.Sallé simple golfs (too lazy to write an answer myself)
 
ngn
@Mr.Xcoder I wish tio had tooltips for the squiggles...
 
ngn
@Adám nice :)
 
ngn
1:30 PM
@Adám it's not the same - you have to search for the squiggle in the bar manually
with my attention span, I'll have forgotten what solution I'm looking at
 
@ngn Yeah, we have to write an extension which looks at whichever character is pointed at (if possible, else: selected) and looks it up in the language bar, and then displays a tooltip.
Isn't there a tool which takes a Jelly program and displays each characters with its description?
 
I won't let APL beat me in golflangs!...
 
@ngn Do you have a shorter one?
 
ngn
@Adám no, only a longer one in k
I'll give it a try
 
1:34 PM
@dzaima APLX's explanation is quite good, methinks.
 
@Adám witchcraft
 
@J.Sallé You don't understand it?
 
Oops, I have a leftover, it should be 14
 
@Adám I do, it just took a while
 
ngn
@Adám +⌿↑⌽⍨2÷⍨2-/3⍴≢¨
ugh, that's wrong
I need a 0⌊ like this: +⌿↑⌽⍨2÷⍨0⌊2-/3⍴≢¨ but that's 17 bytes again
 
1:46 PM
@ngn I like that yours doesn't have parens, but mine is more general, and 2-/3⍴ is frankly obscure.
 
ngn
@Adám "obscure" :)
you're right about generality - yours is better
 
ngn
2:01 PM
@Adám 16 bytes: +⌿↑⌽⍨2÷⍨≢¨-≢∘⍉∘↑
 
@ngn Clever, but expensive.
 
ngn
@Adám "obscure", "expensive" :)
only bytes count ;)
 
@ngn I know, I know.
 
@ngn PowerShell, 87 bytes -- Try it online!
 
Hey look guys, actual Operator Precedence!
 
@ATaco Does that assume |a| > |b|?
 
It does, yes. Is that incorrect?
 
2 hours ago, by ngn
also: you can't assume that a is longer than b
 
2:52 PM
Oh, You can't assume a > b
OH
 
Yeah, a good chunk of my code is explicitly for that reason, too.
 
I don't really understand why people are so mad about a question that needs ML
I promise I'll get a good accuracy when I'm done here, the problem is not too difficult to be answered
 
@Downgoat A lot of older stuff depends on it
@micsthepick Maybe on Windows
 
@quartata Mego's Onion challenge?
 
yes
 
2:55 PM
Yah, it seems really divisive
 
people are trying to close it which just doesn't really make any sense
I guess it won't be resolved until there's an answer that works
 
@quartata ML has nothing to do with it; the challenge is unclear. I honestly can't tell if Arnauld's answer is valid or not. Its magic numbers were most likely chosen to optimize the score.
 
Is there a comment sandbox?
 
@Dennis I agree it probably should have had a hidden test set. But it's not the end of the world
 
what is ml
 
2:58 PM
It means it should be closed though. If I had an actual close vote, I would have cast it already.
@gnu-nobody Machine learning.
 
If it helps, Arnauld's answer actually gets a 79% on a larger set of stuff.
 
Low-effort solution fix.
 
er
Whoops wrong dataset
This once is imbalanced
OK made the classes even, it's more like 64%
That's pretty bad but it's reasonable for a baseline answer
It's conservative -- it in general thinks most things are not the onion.
 
3:05 PM
But if a 64% answer has a 78% score, it's optimizing for the test cases, no?
 
For a 50 item sample, that's reasonable error
imo
 
But it's not an error. Those constants were chosen to optimize its score.
 
And you know this, because?
Anything less than 85% is poor performance for a classifier anyways so it's not like it's optimizing for much
 
@quartata Wild guesses.
If I have to guess an answerer's intentions to determine if their answer is breaking a rule, the challenge is unclear.
 
But, you don't really. I've demonstrated that the answer does better than randomly guessing on a much larger set of data (2000 items)
All of this can be avoided with a hidden test set though. That's an easy fix.
Hardly worth closing it over.
 
3:09 PM
When did we stop closing challenges because they could be fixed?
 
@ATaco A+ for effort
 
If you close it, it will never be reopened. You and I both know this is the reality for most challenges.
 
That's completely besides the point.
 
Not really. Should the challenge be fixed or should it be thrown into purgatory?
Furthermore, I'd say that hiding the test set isn't really necessary for a challenge where the winning answers are going to be ML solutions. If those were optimized for the test set, you'd know because they'd be absurdly overfit
A tiny model can remember 50 inputs like that....
 
Fixed, preferably. But we already had this discussion while it was being sandboxed, and none of the concerns have been addressed before posting it.
 
3:18 PM
I think the challenge is clear enough unless you need a very explicit definition of what "optimizing for the test cases" means... which I don't think you should
there's even a metapost about what the means that was linked by mego
in this case I feel like the answer is at fault more than the challenge
though maybe Arnauld's answer works across all headlines, magically
ML seems to be the only "correct" way to solve this challenge and is likely(?) what mego was going for
@Mego ^ thoughts
 
3:38 PM
0
Q: Custom Number Base Converter

Martin BarkerThe powers that be want to be able to quickly convert any number they have into there own number base using any format they would like. Input Your program must accept 3 parameters. Number: The string number to be converted InputFormat: the base string the number is currently in OutputFormat:...

 
@NewMainPosts 1 byte in Jelly...
hm, looks like it's not really y
 
Didn't we already have an arbitrary-base conversion question? I can't seem to find it.
 
that's probably mine that has been sitting in the sandbox for a long time
but that's not really just arbitrary base conversion, it also requires specific digits
 
oh, that
but the new challenge looks like a superset
lol Jelly is really bad at this — 11 bytes
 
Ping Dennis with a feature request :p
 
inverse of (base digits provided) and atoms for ṙ1$ and ṙ-$? :P
1-indexing is also to blame here though
 
@EriktheOutgolfer Yeah, not an exact duplicate
 
@EriktheOutgolfer yes? >.>
 
5:06 PM
you have no idea how happy I am that we have all these great optimizers with momentum that can get out of local minima now
 
Anonymous
@quartata Could you share your larger dataset?
 
I have two
One is 1000 in both classes, pulled from the top posts
The other is 1000 onion and 3000 not the onion, but not all are from the top posts. they were in any order, as long as they had more than 10 upvotes
er
actually the first one isn't quite balanced
957 Onion, 932 Not the Onion
Because of reddit api limitations
I had to use a third party API for the 3000 not the onion one
anyways here they both are github.com/quartata/files
They contain no headlines from your test set, I filtered those out
They're pickles, tuple with two arrays
the first one is the Onion the second is not the onion
Ignore xkcd.pck that's something else
 
5:42 PM
@Mego hope that helps
 
6:07 PM
I go away for a few minutes and come back to this
 
refresh?
 
already did, haha
of course that fixed it
this is one of those useless bugs that we report and then it sits on Meta for 3 years
until they redo the chat system entirely
 
@ETHproductions hahaha look at this verbose loser "quartata"
5
more like "quartotalitarian regime consuming all vertical space"
6
 
 
2 hours later…
7:54 PM
Anyone have recommendation on where to upload a 3MB ML model
 
8:13 PM
3 MB?
That's all? :P
I just was putting stuff on GH
If it's for the Onion I'd recommend waiting since I think Mego is going to make changes
I don't know what's going to happen
 
 
2 hours later…
10:35 PM
h*ck definetly did not forget to download model >_<
 
Announcement: 05AB1E has now been rewritten in Elixir and is available on TIO. It now has recursive list generation, infinite lists, new commands and new operators.
4
 
@Mr.Xcoder :o owow that's cool
 
10:54 PM
@Downgoat dropbox/github/google drive/---onedrive---
 
11:10 PM
@ASCII-only I just went with GitHub lol
 
11:33 PM
Well if you've already got 100% I might as well throw away this model then
Your model is so small though, I'm really surprised it works
 
@Mr.Xcoder "operators" as in...?
 
@EriktheOutgolfer Like map, filter etc. They are still functions but I wanted to make it clearer for a broader audience
I have finished about three quarters of the Commands while updating the Wiki...
 
11:50 PM
@quartata how big was yours?
model is actually much bigger than I expected it's 12MB.. previous model had 83% val acc on all posts and still for 100% but was only 3MB
 
Anonymous
I'm going to add a hidden test case of 200 headlines (100/100), and require that scores are no worse than 20% less than the scores on the test cases. Does that sound reasonable?
 
@Downgoat huge
 
@Mego oh, so then you'd put up the score with the hidden test cases?
@quartata how many things are you testing it on
 
4000 currently
 
Anonymous
@Downgoat I'd have to post the score
 
11:55 PM
@quartata do you have like a v complex model or something
 
yes but the first half is frozen, I stuck a fully connected classifier on top afterwards
trained it straight up first, then unfroze the top parts for finetuning
which hasn't finished yet
 
oh ok
what's your training time like?
 
first half is fast because I calculate the features once for the training examples (which takes a long time)
second half is slow
there's two LSTMs in the pre-trained part
followed by an attention mechanism
honestly it's all just because there's not enough Onion headlines
I was going to go fetch 1500/5000 but ran out of time
 
@quartata have you tried to scrape the onion website instead of reddit
 
nah
 

« first day (2756 days earlier)      last day (2094 days later) »