« first day (2688 days earlier)      last day (2158 days later) » 

12:09 AM
@Neil it's been showing me too much lately >_> probably because i usually just copy TIO formatted posts
oh yeah, @Neil this may be useful?
 
12:26 AM
is "ones’ magnitude" binary a thing
@Downgoat wait. sale?
@FrownyFrog Monopoly Millionaire: RPG edition
 
12:57 AM
question: if you could set the precedence of an operator what would you prefer?
1. prec((+) higher_than:(&))
2. (+).prec.higher_than((&))
3. something else
 
@ASCII-only definetly 2
(+).prec(higher: (&))
 
Which lang is this for?
 

 new language yay

DIscussion for a possible new language
 
Any interpreter yet
 
nope
there's a basic parser though: link
@Downgoat hmm. the thing is i was going to use 1 to make it consistent with class, fn and op
 
1:12 AM
Oh, the shunting yard algorithm. I think I vaguely remember that from looking at it ~2 yrs ago
Oh god, we're recreating perl
 
@Zacharý yessss
 
@ASCII-only Make it decent, plz
 
@Zacharý a heavily modified, insanely hacky version
@Zacharý that is my intention
 
@ASCII-only Hacky language, interpreter or both?
 
to make it nice to program in
@Zacharý language mostly
 
1:14 AM
Perl is already way too hacky
 
it should support operators that are two of: prefix, infix and postfix
two
 
Why no circumfix :p (please don't, only fortress can pull that off right)
 
and: anything can be an operator. one of the cons of this is that -~ will have to be - ~
@Zacharý circumfix? as in {foobar}?
 
Or post-circum fix like a{2}
 
@Zacharý this exists already
 
1:15 AM
@ASCII-only ye
 
(exists for all known unicode brackets, that is)
 
@ASCII-only In Creampuff?
 
@Zacharý yes
 
@ASCII-only This looks sort of promising. Definitely looks more organized than Perl.
 
@Zacharý organized?
 
1:17 AM
As in: things aren't hacked on at different times, with different versions having MAJOR inconsistencies
$a[2] v. @a[2]
 
@Zacharý ?????????
 
@ASCII-only Perl5 v. Perl6, or am I not remembering correctly?
 
@Zacharý oh. that's fine then. perl 5 is not perl 6
it's like py2 vs py3 but even more different
perl themselves stress this
 
Wut about very early versions of perl then?
 
i guess perl5 vs perl6 is kinda like cheddar vs vsl
@Zacharý who knows :P
 
1:18 AM
@ASCII-only As long as it's not python0.9.1 cough multiplication breaks cough
 
@Zacharý what O_o
 
And no ==, only =. It was fun to make programs work in EVERY version of Python
 
@Zacharý wut.
+1, python
also: what is your stance on = vs ==
 
Depends on the language
 
oh, one thing: i intend for the language to have macros
which here are basically inline functions
 
1:20 AM
Just bodge in C's preprocessor
I've done it with D before
 
i'm planning for things like for and while to be implemented as macros. thoughts?
@Zacharý ew not like that
 
@ASCII-only No... don't
 
it works but doesn't look nice
@Zacharý why not :P
 
@ASCII-only Maybe a for in loop as a macro would work
@ASCII-only Wait, while as a macro. Oh god, goto
 
@Zacharý :| goto isn't bad
you do know break and continue are just controlled gotos right
 
1:22 AM
@ASCII-only It is if you don't need it: (i.e. not being able to label statements)
 
@Zacharý ?
 
@ASCII-only Yeah, but they actually make sense.
a: {
print("HELLO");
{
if(fn() == true)
break a;
}
print("STUFF");
}
 
hmm. good point actually, how would break and continue be implemented
which reminds me of the worst design philosophy i forgot to mention:
everything is an operator.
everything.
including newlines. and commas
 
I has done it before
@ASCII-only Weak. RAD has that planned as well
@ASCII-only Commas are already operators.
 
@Zacharý yes. but remember this is a C-derived language
@Zacharý true >_>
oh. also: should commas and newlines be RTL or LTR?
 
1:27 AM
@ASCII-only The commas portion: it has it's own equivalent: ; is an operator (returning internally a tuple)
@ASCII-only LTR, obviously
 
@Zacharý ???
 
It's like , in indexing
 
So it's like the cons operator
 
@Pavel INTERNALLY. Tuples are not a part of RAD
@Pavel In the same way variables are sets of strings
 
Right, but if comma is an operator, then 2, 3, 4 is equivalent to 1 , ( 2 , ( 3 , ( 4 ) ) ), yes?
Which would make , act like cons
Or is it more like APL's , function
 
1:33 AM
tried @ASCII-only ambigram again
 
:||||||||||
 
come on dude. ambigrams are gonna be a stretch a lot of the time
ok if you wanna see a good one i did
 
@Zacharý everything being operators means 1. no keywords and 2. things like operator declarations look like this: op ((+) (left: MyType, right: MyType)) {body} (instead of op +(args){body}
 
@DestructibleLemon wat
 
1:36 AM
@DestructibleLemon :| looks like meaw
 
come on
i post my creative work here and you can't even say one nice thing or anything
 
Oh boy one where I can tell what it's supposed to say
That's a first
 
these are good :P
more (they're not all readable, but stull)
 
@Pavel So it's an ASTRONOM(Y)ically good ambigram?
 
the most important thing is that all the letters are (usually) the same width
@Zacharý the thing is. you can change the syntax drastically with a single import. which means it's not better. it's 1000x worse
 
1:47 AM
@ASCII-only So you could easily make the language unusable
 
yes.
by e.g. redefining comma and newline
 
@Zacharý back on topic. 1? 2? 3?
@DestructibleLemon this one actually looks decent
 
2
 
ok. now the next problem. + may not have been defined at that point. do we require it to be defined then?
 
@ASCII-only No
 
so if + is undefined then (+).prec would make it an operator?
 
2:30 AM
Yeah, just have it null or something
 
@Zacharý is that really a good idea though
i.e. would it ever be useful
null.property -> look for interface with property -> error if more than one found?
 
@ASCII-only When would errors be a good idea in this case?
 
Apparently jQuery is advanced open source encryption library
 
._.
 
2:41 AM
@Downgoat how do you know it's jquer
@Zacharý no the thing is. what if something else defines prec
 
@ASCII-only jquery and angular
 
@ASCII-only j.n.s.p. I'm not interested in this hack that much
 
@Zacharý ?
 
Je ne sais pas, IDK, IDC
 
30 mins ago, by ASCII-only
so if + is undefined then (+).prec would make it an operator?
 
2:44 AM
@ASCII-only why wouldn't throw error
 
38 mins ago, by ASCII-only
ok. now the next problem. + may not have been defined at that point. do we require it to be defined then?
and the thing is, it'd be kinda weird if you had to declare prec of + after one overload has been defined
 
@ASCII-only why not do like ches and have operator + { right precedence less than * }
 
@Downgoat wait does this work
@Downgoat yeah. but what if conflicting precedence
 
2:58 AM
@ASCII-only so? then LTR/RTL
 
@Downgoat hmm?
no. what if MyClass says prec is 10 but MyOtherClass says prec is 20
 
Anyone using the Android P beta? (Thoughts?)
 
 
1 hour later…
4:16 AM
what the hell
my school board is forcing me to change my password
makes sense right? except none of the passwords I've tested are allowed
> Staff and Secondary students -Passwords must be a minimum of 8 characters, contain numbers and/or special characters (#,$,%,! etc) with upper & lowercase letters
I picked one with a ton of random numbers, letters of both cases, and specials, and it still kept saying "nope you fool"
yeah I'm probably going to get my school account locked due to me being forced to do the impossible
like seriously spamming random symbols into your password only makes it marginally more secure, length is more important, and besides nobody's going to remember a password that had to be created by dropping your computer down the stairs
i've had to retype my password at least 50 times already because it doesn't tell you if a password is invalid until you try submitting and then you have to retype it
 
@HyperNeutrino you do have all of: symbols, upper, lower and numbers right
 
and between 8 and 14 chars?
 
it just says 8+, my old password was well over 14 and it was accepted
 
hmm. ok then
@HyperNeutrino you can confirm your old password is correct and your password wasn't reset to default password (from old password)?
 
4:21 AM
and fuck my account is now locked from password changes for an hour because I mistyped my password too many times of the 60 million times I had to retype it
honestly if I didn't need this account for the non-crazy restricted internet at my school I'd just ask my parents to let me use my laptop instead of a potato for my schoolwork
@ASCII-only yes it works I log into my school's network every day with it
this is why I hate the school system
they "care" about the most pointless things like making your password exactly the way they want it and then they completely fail at actually teaching anything useful properly
 
@HyperNeutrino this is true for any current school system
 
it's pretty disappointing
 
I basically gave up on the school system ever since grade 5 when I was put into enrichment. Those 4 years were actually fantastic because it allowed me to temporarily stop being part of the mainstream school system and actually do something useful for once.
 
@HyperNeutrino what kind of enrichment
 
4:28 AM
full-time placement into another specialized class
 
But what does the word mean?
 
@HyperNeutrino define "specialized class"
how specialized exactly
 
it's a swear word. it doesn't mean a specific thing it just is used as a higher level superlative
 
Which special class?
So you don't have to study anything except that class?
 
@ASCII-only ok so basically they stick you into a class with a bunch of other "special kids" and then don't deal with you, and you hope that your teacher is competent. my grade 5/6 teacher was amazing and then my grade 6 end-of-year teacher was bad, grade 7 teacher was okay (but was a one-year sub so he didn't really do his best) and grade 8 teacher got overrun by a communist regime started up by my friend
 
4:30 AM
@user202729 ... it's primary school
you only have one class
 
@user202729 no that class doesn't cover music (grade 7/8), art, french, gym, etc
 
@HyperNeutrino please elaborate on last sentence
 
> since grade 5
 
@HyperNeutrino hmm, okay
 
@ASCII-only How is it primary school?
 
4:31 AM
@Downgoat Okay. Long version or short version?
 
I mean, subject.
No?
 
@user202729 Primary, elementary, junior/senior elementary, high school, and terms like that all have overlaps depending on where you're from
 
@user202729 primary schools only have one teacher per student per year though?
 
@ASCII-only Yes correct.
 
@user202729 is primary not 1-6
 
4:32 AM
That's country specific.
 
as far as i am aware the majority of countries do not have separate schools for 1-3 and 4-6 or w/e
 
@HyperNeutrino im ok with long version
 
@ASCII-only Usually not. Here 1-3 is primary and 4-6 is intermediate but they're always in the same school. Some schools have an unwritten division (or in the case of my original homeschool, a mandatory division during recess which got REALLY annoying because everyone thought I was two years older than I really was). Some recent schools also have 7-8 with the rest of them (middle school).
 
@HyperNeutrino wait. "two years older". did you skip two grades
 
@Downgoat Alright. So this started back when my friend first joined the 5/6 enrichment class in grade 6 (late entry). Near the later half of the year, he started this thing called "<Name> Rules" (not using actual name for obvious reasons), which were basically a set of rules that banned all sorts of pointless things like chewing apple slices at 14h25. He even had a court set up to convict criminals and one of my other friends says she apparently got sentenced to death three times.
 
4:36 AM
@HyperNeutrino wtf.
 
@ASCII-only no I'm apparently tall and that threw people off at first but now I'm like average-tall height
 
@HyperNeutrino disappointing fair enough
 
@HyperNeutrino who would even participate in that
 
@ASCII-only ok it was funny ok, everyone did these things just to break the rules
 
4:37 AM
collaborationists
 
@HyperNeutrino but... court
 
@HyperNeutrino wait wtf
what could get you sentenced to death?
petting a sheep?
 
@Downgoat well stuff like touching his hair probably
Later on, he developed the "social point system" (not similar to China's social credit system FWIW), where basically you gain/lose social points based on certain actions like [+] joining a sports team or [-] (idk what). I'm pretty sure I was around 0 or maybe negative half of the time. That carried into grade 7 and we all made jokes about how he was the least qualified to judge anything social-based.
 
@HyperNeutrino so a dictatorship
 
@ASCII-only hm? no it's a communist state shhhhhhhhhhhhhhh
 
4:40 AM
offtopic: it's always funny what's ontopic in TNB
 
In grade 8, he met another one of my classmates who eventually managed to combine the social point system, <Name> Rules, and a former inside joke about the worship of one of my other classmates into a cult which eventually became known as Kommunazia. That sort of un-developed into a sort of group of more academically-inclined and successful people consisting of my friend, the subject of those fools' worship, me, and a few others I think. (...)
 
@HyperNeutrino wait if you have social point system how can this be communist
this is more like fascist
 
@Downgoat that became irrelevant after the communist part of it was established. that was sort of abolished after grade 7 ended but was part of the foundation of how this thing started
(...) Eventually that developed into an actual government system partially thanks to two of my classmates getting into a relationship (which my friend strongly opposes apparently, even though my whole class would agree that he definitely has a crush on this one girl in our class). They mostly just messed around and randomly made fun of people (...)
 
@ASCII-only Nothing is ontopic, as usual...
 
(...) which I tried to stop before they got carried away but that didn't work (main target was probably this one Austrian girl in my class because a) speaks German and my friend is obsessed with fake-German because of the distinct consonant sounds, and b) is blonde and you know where that goes wrong when your friend has an apparent IQ of 2). (...)
(...) That carried on for a good while until in April (last 3 months of the school year) my friend finally realized that I had been in a relationship (took him 3 months), interestingly enough with the same Austrian girl I was talking about, and so he "kicked me out of the State" at the same time that I "quit the State because it's a terrible idea and is getting carried away". (...)
 
4:46 AM
@HyperNeutrino you mean he exiled you, but only after you emigrated
 
@ASCII-only yes
(...) So then it kind of started getting suppressed after I decided to raise a non-empty threat about actually getting serious about stopping it (involving school people, obviously) so it kind of stopped being a thing for a while. Then one of my other friends in the very early academic group was suspected of having a crush on someone (we were really bored in grade 8) so he decided to send a warning email calling it a "Tier 1 warning" and so they made a whole 6-tier system (with an additional T0)
 
ooookkkkkaay remind me to never go to canda school
 
and then eventually creating more rating systems (T, K, and S) and eventually it just became pure chaos
the next year the teacher was apparently very strict
I wonder who caused that
 
@HyperNeutrino so 6 tiers
 
@Downgoat shhh canada is great 10/10
@ASCII-only sure, though T0 just means "everything proceeds as normal".
 
4:48 AM
@HyperNeutrino so did america destroy the micronation
 
T1 means suspect T2 (according to the official rulebook) but then there's also a suspect T1...
suspected suspect T2???
@ASCII-only No, the end of the school year did.
 
@HyperNeutrino still. it's not 5 tiers if there's 6
 
ok fine
ftfy
 
mfw I realize there's been that many messages in 2 minutes
 
@HyperNeutrino yea but Canada doesn't have racism 🇺🇸
 
4:50 AM
@Downgoat and also canada has angry birds (geese) who are basically the university mafia
ok that was probably the longest message chain I've sent here ever (not anywhere) help. where did this start again o_O
 
33 mins ago, by HyperNeutrino
this is why I hate the school system
 
right
anyway gtg o/
 
5:06 AM
JHT is so quiet recently...
 
Yeah thankfully I will have time for JHT after the next week (done with the exams, summer holiday). That is, if there are other people willing to train too :P
@HyperNeutrino :O fascinating real-life story
 
@Mr.Xcoder is this an apl pun
 
@Mr.Xcoder Shouldn't you be studying?
 
5:25 AM
@Mr.Xcoder yes no
 
6:05 AM
wtf is that codegolf-unrelated discussion
 
@gnu-nobody Most discussions in The Nineteenth Byte have nothing to do with code golf, and we are rarely having on-topic conversations. Our interests include food, linguistics, GDPR, math, School systems, how much exams suck and many others ;) Welcome to TNB (I do realise you've been here before)!
Sep 6 '17 at 18:16, by Dennis
@TheIOSCoder Rather atypically for TNB, we're having an on-topic discussion.
 
i have been here for a little while. all the discussions i had was about golfing
except for some political stuff about eu yesterday
 
6:57 AM
@Mr.Xcoder and langauge design oh wait that's offtopic
 
yay a discussion about cream puff
so what have you decided prec syntax to be? @ASCII-only
 
hi all
 
@Cowsquack nope :|||||||||\
still can't decide
 
I have a challenge idea... write code to read in a "csv" file where each line has a different number of fields. Your code should just output how many fields there are in each line
 
i'm thinking: how much should we able to hack the language?
like, Template Haskell level? less? more?
 
7:06 AM
idk what that is
 
does that sound a good/bad idea?
 
@Anush isn't that just the number of commas in each line + 1?
 
@Cowsquack no!
 
@Cowsquack oh yeah. what do you think is best? (+).prec?
@Anush wat?
 
E.g. 2, "Hello, World!"
is valid CSV
with two fields
 
7:09 AM
guess who earned the downvoting privilege
 
@gnu-nobody Umm... :)
 
@Cowsquack well apparently that's just macros
 
@ASCII-only sure, but now how is higher specified? prec.higherthan or prec(higherthan: )?
 
@Cowsquack latter
 
so that will be like kwargs?
 
7:13 AM
nvm
 
slightly random question.. if I have some numbers x_i e.g 59, 59.5, 61, 61.5, 62.5 and I want to find coefficient a and b so that (sum ax_i + b)/5 = 70, how would you do that?
 
@Cowsquack (well actually i prefer prec((+) number) because this has a couple of issues)
 
like what
 
oh is it even possible?
 
@Cowsquack the ideal place to define it is before the operator behavior is defined. hence (+) will be undefined
 
7:15 AM
why before?
 
@Cowsquack otherwise you can't use it
 
oh right
@ASCII-only so what will the interpreter do when it sees that (since (+) is not defined)?
 
@Cowsquack Hmm. IMO I'd make prec a macro, meaning it takes its arguments unevaulated
 
so it gets evaluated when (+) is used, or when it is defined?
 
@Cowsquack nah, you have control over when it's evaluated (or whether it's evaluated at all)
so what prec does is just add it to the parser
 
7:23 AM
oh okay
 
(not sure if it's a good way to do this. i guess we'll just have to see if it can be improved later on)
 
so for relativity, we use prec((+) higher_than: (-))
 
yeah.
what that would do in parser is shift all precedences above that up by one if needed, and then insert a new precedence
 
any numpy people? how do you get numpy to print numbers like 0.0001 instead of 1e-04 ?
 
7:54 AM
I don't know numpy but for Python just use %f.
(only for Python 2 and % operator ...)
 
@user202729 1. why only Python 2, 2. what makes you so sure numpy numeric types would support that
 
That's why I said "I don't know numpy"...
And of course I don't know whether numpy has numeric types.
(although it seems pointless to have another numeric type ...)
 
@user202729 of course it does... which is why Anush asked the question in the first place...
 
@Riker reminds me of /r/finlandConspiracy/
 
@user202729 performance reasons...
 
8:07 AM
@ASCII-only I feel the performance overhead for the wrapper is going to dominate any performance improvement.
 
@user202729 for numpy's internal calculations... so the only time there's overhead is input/output
 
% is supposed to be a Python 2 thing. Of course it's still used for Python 3, but it feels wrong.
 
@user202729 if it was supposed to be a python 2 thing it wouldn't be in python 3...
 
Only for compatibility.
 
@Riker plz thaw I wanna post this
 
8:09 AM
@user202729 since when was py2 compatible with py3...
 
8:22 AM
@ASCII-only import py++
 
@flawr still not completely compatible
 
8:44 AM
CMC: given an integer, return its unary representation (with a preceding - if it is negative, nothing else otherwise). Note you can use any non-minus printable ascii symbol for the repeating character 5 => #####, -3 => -111, 10 => !!!!!!!!!!, 0 => [empty string]
 
ngn
@Cowsquack k: {,/(x<0;x)#'"-1"}
 
@ngn interesting approach
@flawr what does let do?
 
ngn
@Cowsquack one byte shorter: {,/(x<0;x)#'$-1}
 
8:56 AM
@Cowsquack nothing, you can use it here instead of True or otherwise (I just recently learned about it, see here. alternatively you could use 1>0)
 
@Cowsquack Charcoal, 10 bytes: ⎇‹θ⁰-ω×1↔θ
 
9:09 AM
@Cowsquack sed (with trailing newline), 94 bytes (or 93 with -r), Try it online!
without newline, 97 bytes, Try it online!
@Cowsquack *93 (or 92 with -r) Try it online!
without trailing newline this time :)
 
ngn
@Cowsquack apl: '-1'/⍨<∘0,|
 
@Cowsquack Retina 0.8.2, 6 bytes: \d+<newline>$*
 
^ difference between sed and retina
@ASCII-only retina 1 allows you to do \d+<newline>*
and by using _ as the repeating char
 
9:24 AM
@Cowsquack :O
@Cowsquack Retina, 5 bytes: \d+<newline>*
 
9:43 AM
@ASCII-only Nice, but it needs to say " Link is to verbose version of code" if you use -v as well
 
@Neil ah. good idea
 
@ASCII-only Charcoal, 7 bytes: ‹θ⁰×1↔θ
 
@Neil >_> oh yeah. i was thinking how that was messing the second part up but forgot that it would be useful for the first part
 
10:06 AM
@Cowsquack Python, 29 bytes: lambda n:"-"*(n<0)+"1"*abs(n)
 
@Mr.Xcoder :| I should have seen that coming
@LeakyNun lol this is basically what the Charcoal one translates to
 
@Mr.Xcoder Nice (abuse of Ḍ)
 
It's 's behaviour that is very convenient here (convert to decimal)
And I think this solution is optimal.
In case Dennis doesn't come up with a 2-byter.
 
hmm. @Neil how should basestring/basearray behave for negative numbers
 
10:11 AM
hmm
 
0
A: Sandbox for Proposed Challenges

Suda# Proposed Question # code-golf List the amount of factors for a given number. For Example: If given 1936, the output should be 15 (as 1936 has 15 factors) If given 196, the output should be 9 (as 196 has 9 factors) Test cases: 64 - Outputs 7 196 - Outputs 9 1936 - Outputs 15 Scoring: ...

 
@Cowsquack i tried to do this in reregex but failed
 
10:30 AM
 
10:42 AM
@Cowsquack 05AB1E, 5 bytes if the character doesn't need to be consistent
 
@Mr.Xcoder doesn't work for abs(n)>=10
 
@ASCII-only well, I suppose basestring(-x) should be '-' + basestring(x) and basearray(-x) should be -1 * basearray(x) for consistency
the other approach would only work for basearray
 
@Neil hmm. what if array has inconsistent sign
 
(example of the other approach: basearray(-2, 3) = [-1, 1])
converting from array back to integer doesn't care, it's just a polynomial
 
good point
 
10:56 AM
@ASCII-only Ah, you are right.
 
@Neil oh. also should decimal basestring be allowed
 

« first day (2688 days earlier)      last day (2158 days later) »