Perl Guru
-
@dkf it's very easy to write C++ that will be outperformed by Java.
-
@dkf it's very easy to write C++ that will be outperformed by Java.
I'll guess I'll be repeating that trope a few more times in this thread, but:
You can write Shlemiel's algorithm in any language.
-
@dkf it's very easy to write C++ that will be outperformed by Java.
i can write a program in sharpie on a cat and it will out perform Java.
-
it's very easy to write C++ that will be outperformed by Java.
In the case I'm talking about, they were using the same algorithm under tightly controlled conditions. We put the differences down to how memory management is different in the two languages, with Java going faster because it was more memory hungry (because GC wasn't immediate). C++ on the other hand had much tighter clustering of performance of runs; we knew exactly how long it would take, and that Java would consistently be faster!
I looked into fixing the memory allocator issues — I had a lock-free allocator that would have been perfect for the use case — but hit some really gnarly library templating issues in the C++ standard and decided “fuck this shit”.
-
-
@hungrier is there even such a thing as Canadian profanity?
-
-
@hungrier is there even such a thing as Canadian profanity?
I think the closest i'vce ever heard a canadian get to profanity was: "YOU FU... Sorry. YOU BA.... Sorry. YOU JE... Sorry. You bad per... Sorry. I don't like you. Sorry. -walk away, blushing for being so rude to the person-"
-
@Vixen Meanwhile the French guys are all "Tabarnak de calisse d'ostie de fucking shit!"
-
@Vixen Meanwhile the French guys are all "Tabarnak de calisse d'ostie de fucking shit!"
well, they would tend to say that when they're that deep in their cups and three sheets to the wind.
-
-
@Vixen Or working with heavy machinery
I thought i just said that.... -confused-
-
-
@Mason_Wheeler said in Perl Guru:
in sharpie
Politics thread is
-get all turned around trying to follow directions-
Hold on. I gotta sitdown to catch my bearings and make the room stop spinning.... Where should I be going, and what does sharpies have to do with going there?
-
@Vixen The "x thread is
:arrows:
" gag is a forum in-joke. As for how it applies here... let's keep actual political messes out of this thread. Google "Donald Trump sharpie" for the gory details.
-
-
@Mason_Wheeler said in Perl Guru:
Google "Donald Trump
/me shrieks in horror and flees
Ah, I'm glad to see our Vixen has some sanity left.
-
I'm less interested in gaffes and more interested in High Crimes and Misdemeanors.
-
I'm less interested in gaffes and more interested in High Crimes and Misdemeanors.
Could we fork any new replies on this line to the Salon or the Garage?
-
I'm less interested in gaffes and more interested in High Crimes and Misdemeanors.
If a high crime is a crime done on the top of a mountain or in a plane at high altitude.... does that make that same crime performed at the bottom of a valley or in a mine a low crime?
-
@Vixen Are you enlightened or endarkened? Which is to be preferred?
-
@Vixen Are you enlightened or endarkened? Which is to be preferred?
No one want
s to beenlightened! We have a thread about that!
-
I hope it can be used on Windows without installation.
You need Eclipse and Python to use PyDev, which is hardly surprising as it is an Eclipse extension for Python development. It works well with virtual environments, and with analysis tools like pylint. My only real complaints about it are that a few of the key bindings are quite idiosyncratic by Eclipse norms, at least on macOS. I know it works on Windows; one of my cow-orkers uses that combination.
Ah, I've already used PyDev then. Many debugging features of Eclipse (such as "Go to Declaration") do not work with Python, even with PyDev, as I recall.
-
@ixvedeusi said in Perl Guru:
while(--n && *q)*p++=*q++;*p=0;
FTFY, at least that way your code won't cause an access violation (or leak someone else's memory) as long as the input string is correctly null-terminated. It still may if the input string isn't terminated; I don't see any way to protect against that with c strings.
Actually it is
while(n--) { *p++ = *q; q += (*q != 0)); }
Yes,
strncpy
will always writen
bytes! 90% of C programmers don't know that.
-
@Bulb And it doesn't null-terminate if the source is longer than N characters. Thus it is not suitable for truncating strings that don't fit in the target buffer without doing extra work.
-
@Vixen Are you enlightened or endarkened? Which is to be preferred?
Tak smiles up at me. For I am Endarkened.
-
@Vixen Are you enlightened or endarkened? Which is to be preferred?
Tak smiles up at me. For I am Endarkened.
But have you attained the correct height?
-
@Vixen Are you enlightened or endarkened? Which is to be preferred?
Tak smiles up at me. For I am Endarkened.
But have you attained the correct height?
I have. for I am the Height that I am, and that is the correct height for being me.
-
Yes,
strncpy
will always writen
bytes! 90% of C programmers don't know that.Is this relevant for anything other than side-channel attacks?
-
@topspin Hardware control, probably. Fixed-time operations, though you'll probably still get to have fun with the optimizer.
-
Yes,
strncpy
will always writen
bytes! 90% of C programmers don't know that.Is this relevant for anything other than side-channel attacks?
I am not sure what it is relevant for, but certainly not side-channel attacks, because while it will write
n
bytes, it will still read only up the the first zero, so there is still some side-channel open.
-
@dfdub oh, you mean that. I thought you meant a chain of resizable arrays or something, since you were talking about having multiple arrays (and what you linked here can be implemented using exactly 1 array).
I read it as using a custom heap.
-
@boomzilla said in Perl Guru:
@dfdub oh, you mean that. I thought you meant a chain of resizable arrays or something, since you were talking about having multiple arrays (and what you linked here can be implemented using exactly 1 array).
I read it as using a custom heap.
In a way, using a contiguous array and indices into that array instead of pointers is an implementation of a custom heap.
-
@boomzilla said in Perl Guru:
@dfdub oh, you mean that. I thought you meant a chain of resizable arrays or something, since you were talking about having multiple arrays (and what you linked here can be implemented using exactly 1 array).
I read it as using a custom heap.
In a way, using a contiguous array and indices into that array instead of pointers is an implementation of a custom heap.
Yes, exactly.
-
@topspin oh, that kind of heap.
-
@topspin oh, that kind of heap.
I had to look up the context again, but there's no sorting involved so it's not the other kind of heap.
-
@topspin oh, that kind of heap.
I had to look up the context again, but there's no sorting involved so it's not the other kind of heap.