« first day (2171 days earlier)      last day (2657 days later) » 

2:00 AM
No eval or exec
What is g?
 
But what does it do
 
it returns the charcode of the character at the coords the command is given
 
@DestructibleWatermelon Yes eval
 
In Java?
 
2:02 AM
doesn't processing have any preset variables that javascript does not have set
 
Integer.MAX_VALUE
 
... long double apparently only has 6 digit of precision
 
well, I mean because then you can do if (var) or whatever and maybe that would work
 
Is there like a std::to_string alternative that's like half-smart meaning it gives full precision?
 
hmmmmm, this would be easier if I knew ><>
 
2:07 AM
if(Integer.MAX_VALUE==4294967295)
Which should error in JS, so you catch it.
 
why would that error in JS?
 
I don't know JS, but I'm pretty sure it doesn't have Integer
JS uses Number.MAX_VALUE instead.
 
Can I get more votes here?
5
Q: Should we remove [transcendental-numbers]?

Easterly IrkWe have a tag transcendental-numbers. It's currently used on only 2 questions, here and here. Both are code-golf and involve approximating 2 transcendental numbers. (e and the Fransén-Robinson constant) This doesn't appear really to add anything to these challenges, 1 is also tagged math and ...

2 answers are tied
 
@Pavel oh right
 
Both answers are for burninating the tag though.
 
2:13 AM
indeed, they are not mutually exclusive
 
You can burninate it, and then create a separate post for
it's not tied btw
8/7
 
they were tied.
 
oh, k
Who has tag-burnination power?
 
it was 6-6
@Pavel permanent? SE admins
but we can retag all exsiting tho
 
> x = new num(2)
CheddarNumberBinding {}
> x.pow(100)
undefined
> x.toString()
'1267650600228229401496703205376.000000'
Good news: I made a thing for cheddar and it worked :D
Bad news: I have to rewrite entire standard library
 
2:20 AM
You mean there weren't numbers before? Shit I had no idea we were so far ahead :P
 
Why is x.pow(100) undefined?
 
@Pavel It returns undefined because it modifies x
creating new object is slow
 
@Pavel In place I guess
 
@quartata yeah but those were sucky weird ugly eck eww JS numbers.
 
If creating a number is slow, something is wrong.
 
2:21 AM
JS numbers are just doubles I thought
Native speed
 
Anonymous
@quartata Hence "sucky weird ugly eck eww"
 
@FlipTack when you can, if you can retag those questions you mentioned in your meta [approximation] vs [trans-numbers], that would be great. I don't have time right now
 
@Mego Good point.
 
and it's your answer
 
@quartata yes but they have such weirdness on top of them
also on the plus side I can now directly integrate number operations in C++ instead of in JS which will be huge speed benifit
Literal Creation
  ✓ Numbers x 1,420 ops/sec ± 0.00%
     Average: 0.70 ms
     Cycles : 6 total
 
2:23 AM
such weird much wow
 
@Pavel oops
I'm sure I have a gaping resource leak in cheddar somewhere that is making GC go haywire and slowing down my beautiful cheese
 
.7 ms haha
 
what is Pytek at rn?
 
To create a constant number? 0 since that happens at parse
 
is pytek compiled?
 
2:26 AM
Only if you want it to be.
 
wait pytek is JIT, right? so it isn't really applicable here
 
Pytek is pure interpreted
 
@quartata So no JIT?
 
But it will be capable of transpiling to other languages
@Downgoat Yes
 
2:28 AM
so like you are making like python objects to represent python objects?
okay well parser is slow apparently:
$ time cheddar-parser --ast <<< "1"
StatementExpression
 ├ PropertyToken
 │ ├ NumberToken
 │ │ ├ 10 0 '1'
real	0.16s
user	0.14s
sys	0.02s
 
C++ objects tied to a Python object's lifetime.
although we're not quite done with that
It also depends on the object.
Like Python lists are faster than C++'s vectors so we've got just those
 
Wait what O_O
how
 
I know right?
 
Isn't C++ vector made by very smart people who know how to make fast thing
 
Has to do with some cache miss voodoo I don't get.
And not especially.
 
2:31 AM
actually I should implement cheddar arrays as C++ array brb
 
FWIW it's by very very little.
 
"very smart people who know how make fast thing" ~~ 'Goat 2016
9
 
Also since stupid JS doesn't allow binary strings (always does UTF-16) I am worried I will have to create binding for that too
Also there's the fact cheddar's parser is crap
 
@Downgoat do you know about ABNF?
 
I haven't timed ours yet
 
2:33 AM
@quartata can you review tag wiki edits?
if you can, can you check teh queue?
@ConorO'Brien you too
 
@EᴀsᴛᴇʀʟʏIʀᴋ approved
 
nevermind this probably won't fix because C++ is slow as shit
 
Downgoat: A C++ vector is a contiguous chunk of memory, guaranteed.
 
@Downgoat I'm pretty sure you're doing it wrong
 
@ConorO'Brien if it's like ENBF yes
 
2:36 AM
it's like it yes
 
@quartata doing what wrong? there's a lot of things I'm doing wrong
 
@Downgoat What does TEXTDATA mean?
 
Any overhead you have is almost certinly coming from however you are bridging between it and Node
That overhead will most likely drown out any performance benefits.
 
there is no overhead
 
There has to be.
 
2:37 AM
And yet C++ is slow as shit <-
 
Even if it's just dlopen
 
It compiles to a V8 executable which is kinda like a normal compiled C++ item but like not
meaning it can be imported as kinda like a "pre processed" node file
 
There's your overhead. It adds glue to convert between types.
 
Imma try seeing how fast new numbers are
 
@Downgoat nevermind I'm just an idiot
 
2:39 AM
@quartata no it doesn't, I do that part
 
I didn't read everything
 
@ConorO'Brien :O me too! :P
 
@Downgoat i guarantee you it's doing something in between
 
@Downgoat \o/ together idiotic!
 
@quartata more likely some programming fault of mine in node
node is very very fast
I found benchmark on internet and it show V8 can optimize better than G++
 
2:41 AM
yeah in special situations
 
Where special is like 99% then yeah. V8 it does like all sorts of crazy stuff for speed.
 
Look no matter how fast Node is we're talking an extra file read here and probably RTTI. Blah blah orders of magnitude all that
 
@Downgoat: The vagueness of all of your statements does not inspire confidence in me.
 
but that extra file read is start up time which I'm not counting
I could if I really want to compile Cheddar into one big C++ file and compile that but then I loose JIT speed boost
 
@El'endiaStarman if you're looking to draw confidence from a goat, you're looking in the wrong place :P
 
2:43 AM
@El'endiaStarman I can't tell if vagueness of that message itself was intentional or not :/
 
@Downgoat Erm...what's vague about it?
 
I have no idea what you're talking about?
Like pretty much everything I do/did counts as one of "my statements"
 
> V8 it does like all sorts of crazy stuff for speed.
No specifics whatsoever here.
 
Eh, I thought elaboration was not needed
My point was V8 does not pose a significant performance barrier and I felt that got the point accross
I'm not in marketing for a reason :P
 
writes some paper for chat messages as to avoid vagueness anywhere
 
2:46 AM
Hah, well, I suppose a better way to say it is that it's not clear that you know what you're talking about. It's also not clear that you don't know what you're talking about. Hence, "vague".
 
Do you seriously want to me give you a citation for every chat message I post?
 
Anonymous
 
This is not an academic paper, it's a chatroom :/
 
I'm actually somewhat interested in the basis for your claims.
 
@Mego URL is: http://chat.stackexchange.com/rooms/240/, it's subdomain is "chat" and the path is "room". By addition property of addition I get "chatroom"
 
2:49 AM
but you need to apply division first
 
For instance, you said earlier that Node is very fast. I've only heard the opposite. So, I'd like some evidence so I can be more right in my opinions.
 
@El'endiaStarman where have you heard it's slow?
I found this by someone else: gist.github.com/spion/3049314
Also check out V8 blog
 
Anonymous
@Downgoat Sorry, I only accept proofs expressed in untyped lambda calculus
 
I mean for really primitive operations then yeah, C will obviously beat the hell out of Node
 
@Downgoat Check out the Benchmark Game
 
2:53 AM
@Downgoat I could hardly find where I've heard that. That's just the general impression I have. Thanks for the link!
 
C++ kicks the shit out of Node at every task except for regex-dna which is because std::regex sucks
We're talking orders of magnitude. You can't get much better than native + 25 years of GCC optimizations
 
what is their implementation?
 
Just transpile everything to assembly.
 
@quartata wait what before you were saying C++ wouldn't be faster
@Pavel That is what V8 does internally
 
Yeh because of communication between V8 and a shared library
 
2:55 AM
Just directly cheddar->assembly. Maximum speed.
 
For a friggin arthimetic operation of course that's slower
One instruction vs hundreds
 
So we're talking about some application that's a mixture of C++ and JS?
 
Apparently so yes.
 
Why can't you just remove the JS part?
 
because 98% is JS and 2% C++ and 1% is some weird glue in between
 
2:58 AM
Furthermore JIT isn't magic pixie dust
 
101% cheese
 
JIT works by keeping memory and branches it knows are hot points (based on what it sees at run time) hot. That means speedups sometimes (actually often) but only in comparison to interpreted languages. You almost never can be faster than what you're written in
 
If JIT were really faster, I suppose C++ JIT would be used.
 
Then we'd rewrite g++ in that and have a stack of turtles running VMs going all the way down.
 
The actual best way is to compile into jvm byte code.
 
3:04 AM
That is JIT
@Downgoat Sorry I don't mean to be blunt I'm just a massive pedant
 
@quartata massive pedants are some of the best programmers
 
@quartata well yeah. It just mean it gives opportunity to be fast, like compiler. Pure Interpreter does not g I've opportunity
 
'g I've'? Are you on mobile?
 
Who says pure interpreters can't optimize? Sure JIT is better at it but
 
I mean, minor and moderate typos due to hooves are one thing, but 'give' -> 'g I've' is something special.
 
3:10 AM
We can easily TCO and loop unroll in objectify although we don't currently
(and by we I mean Pytek)
 
I let quartata handle all those little details. :P
 
Yeah and I suck at this. I'm even lazier
Anyways
 
Well, you have more knowledge and experience in that regard. I'm better at figuring out and implementing language features.
 
Speaking of which I'm giving in and transpiling to ES6 instad of ES5
 
@quartata hehehe
 
3:16 AM
@El'endiaStarman it is worse without autocorrect
@quartata D:
 
ES5 is just too gross. And I'd say it's better to have it working in ES6 first then moving to ES5 after
 
@Downgoat text.rev
 
How to code in Assembly
There are so many assemblys in Windows, which one do I use?
 
the correct one, but carefully
Try Z80 asm
 
z80 asm for windows?
 
3:18 AM
There is only one assembly? Your architecture
 
@Qwerp-Derp no, native Z80
 
What I am confused
I want to learn Assembly but there are so many different types
 
Windows does not run on z80.
 
@quartata That is instruction set. Different assembly have different syntax
 
Assembly is a textual representation of your architecture's machine code.
 
3:19 AM
@quartata So 32 or 64 bit?
 
The different types are just different syntax for the same language.
 
So you want x86 assembly. I recommend NASM for your assembler
 
@quartata want*
x86 for 32-bit right?
 
@feersum but it should
 
What should I use to code in Assembly? Is SASM good?
I'm just really confuse
 
3:21 AM
I learned MIPS Assembly in college for a class. The professor co-wrote an emulator, IIRC.
 
If you have GCC already just use its assembler
 
Hi Nineteenth Byte, happy slightly-belated birthday to meeeee!! (it's way past midnight here already, oops)
 
@Qwerp-Derp most people use NASM but might not work on windows
 
@Lynn Happy Birthday!
 
What's the difference
@Lynn Happy birthday!
 
3:22 AM
@Lynn :O Happy Birthday!!!!
 
(You're only 17 minutes late here.)
 
@Lynn <insert virtual cake>
 
@Lynn Happy new multiple of 365 (optionally plus 1)!
 
@Lynn What day is your birthday?
 
@Dennis Ha, excellent.
January 7
 
3:22 AM
Oh
@Lynn You're 11 hours late here :(
 
'tis 22:22. Jan 7 here. That's a fine time to announce your bday
 
Thank god for time zones, right?
 
still 19:23 7th here:D
 
It’s my birthday somewhere for like, 50 hours.
 
In Australia it's 14 hours late - double :(
 
3:24 AM
I guess it would be easier if we all lived in texas. Then we wouldn't need timezones
it would get much harder in all other respects, but at least we wouldn't need timezones
 
@quartata My birthday cake was… tiramisu!
 
is there an efficient way to interweave two strings in python (e.g. "Hello","world" -> "Hweorlllod") given they will be within one character of length with each other?
 
Australia is mostly empty in the middle
 
Oh damn tiramisu is the bomb
 
It was really good, but no candles. Lots of leftovers, too.
 
3:25 AM
@WheatWizard zip?
 
Hope you enjoyed it
 
@Maltysen Its a pain unfolding a zip and if the characters are off by one I loose one of them
 
What does this mean
%include "io.inc"

section .text
global CMAIN
CMAIN:
    xor eax, eax
    ret
 
@WheatWizard "".join(a+b for a, b in zip("Hello", "world"))
 
say, are CMC's considered noise now? as per meta consensus
@Qwerp-Derp please look up a tutorial
 
3:26 AM
@WheatWizard oh lpad/rpad
 
Isn't there some itertools thing like izip longest
 
ok It just ends up being a bit verbose to pad and then remove the pad. Thanks though
 
It was looking to be a pretty crappy birthday (because I'm in the middle of exam hell), but then my BFFs showed up at my house as a surprise!! Which really saved it. ;◡;
 
@WheatWizard 99% positive you can do itertools.izip_longest(a, b, fillvalue="")
I think the name changed in Py3 though can't remember what to
 
@quartata Ok I'll give that a try!
sounds good
 
3:31 AM
@Lynn exams at this time of year? :( good luck on the rest of them!
 
Yeah, all of January. Sucks.
Thanks, though — I hope they'll go smoothly
 
I looked up a basic tutorial
How does output work?
In assembly
 
Syscall.
So depends on your system.
 
@quartata It seems to have a problem with fillvalue Is there anywhere I can find documentation on izip?
 
when in doubt, add underscores. Maybe fill_value works?
 
3:35 AM
Yeah check the itertools page. I'm just going off the top of my head.
I think it was turned into a third arg instead of a kwarg in 3
 
@quartata I'm still using 2
 
Oh huh.
Lemme take a look then.
 
13
Q: Quine that takes as input the name of a language and outputs the same thing implemented in the input language

marcogFrom Quine central: Write a quine that takes as input the name of a language and outputs the same thing implemented in the input language. The source article has something you can work from, but as the author says this is much harder. Obviously you only need to support a limited set of language...

is noone else going to answer this question?
 
@quartata its izip_longest()
 
What's the error?
 
3:39 AM
unexpected keyword
arguement
 
Huh.
 
izip_longest is the proper function
 
Anybody here used Rust in production for migrating from C (not C++)?
 
Looks like it got changed to an optional third arg earlier than 3. Try it like that
 
@quartata It treats the "" as a third string to zip
 
3:43 AM
the heck
 
@quartata okay, C++ number bindings made cheddar numbers about 4x faster
which is pretty significant
lets see what other things I can make fast
Wait this makes no sense
 
@WheatWizard How were you calling it before?
 
@quartata import itertools;print [x+y for x,y in itertools.izip("Hello","world!",fillvalue="")]
 
izip_longest
 
yeah
 
3:47 AM
So it works now?
 
yeah unfortunately there are a few extra chars
I don't know why izip and izip_longest are different functions
 
How did you intend it to interleave?
vs what it outputs
 
How to exit a program in Assembly?
 
@Qwerp-Derp ret usually
 
@quartata They are the same "Hello","world!" -> "Hweorlllod!" when I said few extra chars I meant _longest
 
3:49 AM
Anyone know if there's a variant of stold that takes a radix argument?
 
Oh are we golfing
 
yeah
 
then why did you ask for efficient ?
 
%include "io.inc"

section .text
global CMAIN
loop:
    PRINT_DEC 1, var
    inc BYTE PTR [var2]
    mov eax, var2
    cmp eax, [var]
    jle loop
    ret

CMAIN:
    var DB 5
    var2 DB 0
    call loop
    ret
 
Oh I probably shouldn't have said that I meant character efficient
My bad
 
3:51 AM
Very different definitions of the word efficient
 
@EᴀsᴛᴇʀʟʏIʀᴋ Congrats on your latest hat. And thanks for the rep. :P
 
:P
 
Well thanks a bunch
 
@Qwerp-Derp Data goes in a different section
(the vars)
 
Do I have to call it?
 
3:53 AM
?
No I mean data goes in section .data. That's how this works
 
OK now I'm confuse as to why this doesn't work
%include "io.inc"

section .data
var DB 5
var2 DB

section .text
global CMAIN

loop:
    PRINT_DEC 1, var
    inc BYTE PTR [var2]
    mov eax, var2
    cmp eax, [var]
    jle loop
    ret

CMAIN:
    GET_DEC 1 var2
    call loop
    ret
Because from what I see it should be all right
But there's errors on the inc BYTE PTR [var2] line and the GET_DEC 1 var2 line
 
I can't believe this actually works.
 

« first day (2171 days earlier)      last day (2657 days later) »