« first day (1601 days earlier)      last day (3362 days later) » 

11:00 AM
What is wrong with rhetorics these days? <rolls-eyes/>
 
is scared by the new lounge name
 
Of course he's right. It's moronic to close the question as such
 
The answer is much better now, though you still don't say simply and clearly why it is that the OP's code is broken: that native arrays cannot be copy-assigned. You touch on it but in advanced wording that the OP doesn't have a hope in hell of understanding. — Lightness Races in Orbit 1 min ago
@R.MartinhoFernandes wut
wut
 
What is confusing about that?
"foo" is a const char[4]. How do you not know that?
 
@BartekBanachewicz He's right (well, it's Robot)
 
11:02 AM
fucking robot being right again
 
@Bartek: C-strings have an extra, invisible character at the end called a 'null terminator'. It tells C library functions (such as strlen) when the string ends.
That character takes memory: one byte.
 
HELP I shouldn't be trying to trace those "â"s.
 
@BartekBanachewicz tell me you didn't know not
 
And yes it's "rules of thumb"
 
@R.MartinhoFernandes indeed. I already fixed them removeds
 
11:03 AM
@LightnessRacesinOrbit rule of thumbs
 
no no
the rule of thumbs is
never touch a hot plate with your thumbs
I learned it on my own skin
 
* String literals have type of const char[n] (n being their length + 1 for \0 character). To use them in C Standard Library functions, they decay to const char*, which don't carry the size of the string, and in order to find it, the strings need to be traversed (every character being looked at at and compared to \0)
is that ok
 
I already fixed it
So no need to bother
 
11:05 AM
@LightnessRacesinOrbit I was in the middle of writing my version and mine was expanding even more
 
Ok the answer is now factually accurate but it still won't help the OP identify their bug
 
@LightnessRacesinOrbit that's why I didn't want to write all that in the first place
 
The bug is that OP is using a legacy misfeature :/
 
he needs a fucking book, not a 100th answer explaining why C strings suck
 
I'm sorry to say it but aside from the trailing strcpy example (which isn't his only recommendation) Vlad's answer is spot on.
Shame the Lounge downvoted it. Then sbi tried to use that as some kind of "evidence" that it was wrong. Lol
 
11:06 AM
I don't get it.
 
Logical as ever
 
@LightnessRacesinOrbit I didn't downvote it
 
Latin-1 doesn't explain it.
 
> the Lounge downvoted it
 
UTF-8 is definitely not it. Maybe some Asian thing.
 
11:07 AM
Did the room suddenly gain self-awareness and downvoting privileges?
 
@BartekBanachewicz You just have to say that you cannot assign arrays.
 
@BartekBanachewicz I didn't say you did
@R.MartinhoFernandes Eh? Really? I see error messages with those in them all the time
 
> In other words, you can't assign C arrays like other values.
there we fucking go
 
@LightnessRacesinOrbit I know, which is why I went to the usual culprits.
 
ANSI-ised Unicode smart quotes IIRC
 
11:08 AM
remove C arrays from C++ PLZ KTHX
 
@LightnessRacesinOrbit But those are not single bytes in any Unicode encoding.
 
@Griwes very high privileges actually, as it can downvote the same answer more than once
 
In UTF-8 they're three bytes.
 
@BartekBanachewicz have an upvote
 
OH WAIT
Got it.
lol
 
11:09 AM
@BartekBanachewicz dude. I aced the solution in a comment. And that was just a joke because someone had made a very stupid suggestion in the comment - which also suggested any relation to C++. I had to correct for that. And then Robot aced the explanation‌​. Two lines ought to suffice. There's no "expanding on all that".
 
Are the other two printable?
 
laughs hysterically
 
headdesks
next time I go out to write an answer to a C/C++ question someone slap me
 
11:10 AM
I can give you advance slaps
 
not guilty unless proven otherwise!
 
Next time you say "C/C++" I'm going to slap you
 
@R.MartinhoFernandes I expect that information got removed. I think the quotation marks should be distinct for open/close.
 
@LightnessRacesinOrbit Yes. Almost all UTF-8 starters and continuation bytes are printable.
 
let's manipulate Bartek into writing several C++ questions and look forward to the unconference! :D
 
11:11 AM
@sehe I'm pretty sure the originals are just prime marks or fancy apostrophes.
 
@LightnessRacesinOrbit Well, this question kinda was "C/C++".
 
@R.MartinhoFernandes The latter have distinct open/close code points, right?
 
@R.MartinhoFernandes ^ Looks spot on. So it appears <80> <9C> and <80> <9D> got removed
 
@R.MartinhoFernandes Yes, and it's the starter that you're seeing, bub...
 
11:12 AM
@sehe No, apostrophes and single quotation marks are not the same.
 
Not quite sure where the subsequent characters went but that's likely some anomaly due to the broken UTF-8 -> Latin-1 "conversion"
possibly there was a Latin-1 -> ASCII "conversion" afterwards
 
askhell
4
 
@LightnessRacesinOrbit ASCII doesn't have â
 
It's telling that that site opts to render the 'extended ASCII' bytes as hex pairs rather than actually as their character
@R.MartinhoFernandes well some other thing then ;p
 
@BartekBanachewicz Someone should edit the room title
 
11:15 AM
Well, I guess I should have considered real Latin-1 and not actual-in-practice-Latin-1.
 
It could just be that his console font doesn't have € or œ
which would not surprise me in the slightest
 
@LightnessRacesinOrbit That's what got me.
 
The full output in his console with a compatible font, though, would assuredly have been "“" to open the 'smart quote'
 
Those are Windows-1252, which is not Latin-1 despite what the W3C tells browsers to think.
 
And on that bombshell, my caring has expired ;p
 
11:16 AM
Latin-1 has nothing assigned to 80-9F
 
@LightnessRacesinOrbit For some reason I assumed "her" for the OP. No clue what made me do that
 
"Latin-1 extended" is the colloquial name for that Windows codepage, right?
 
I don't think that's usual.
AFAIK the colloquial name is "Latin-1".
And that has the W3C blessing.
 
then why did you just say Latin-1 has nothing assigned to 80-9F
 
Because it doesn't.
 
11:18 AM
Yet Windows-1252 does, which you say is colloquially called "Latin-1"
the difference between Latin-1 and "Latin-1" I assume you're making?
 
There are two things that go by Latin-1.
It's fucked up.
 
The 100 today
 
11:19 AM
ISO/IEC-8859-1 is the "real" Latin-1. The Windows codepage is what most people mean when they say "Latin-1".
And the W3C tells browsers that if a page claims to be in Latin-1 they should interpret it as Windows-1252, which gives some legitimacy to the dilution of the term.
 
legintimacy
 
mmm I'd like to cover a (one, particular) song on stage
I'd need a stage
 
I remember the days when you were in love with cicada
 
@BartekBanachewicz And a big tarp.
 
@R.MartinhoFernandes Troubled Asset Relief Program, the largest part of the U.S. government's $700 billion financial bailout plan of 2008?
 
11:24 AM
A tarpaulin, or tarp, is a large sheet of strong, flexible, water-resistant or waterproof material, often cloth such as canvas or polyester coated with urethane, or made of plastics such as polyethylene. In some places such as Australia, and in military slang, a tarp may be known as a hootch. Tarpaulins often have reinforced grommets at the corners and along the sides to form attachment points for rope, allowing them to be tied down or suspended. Inexpensive modern tarpaulins are made from woven polyethylene; this material is so associated with tarpaulins that it has become colloquially known in...
 
oh god. It took me a while
@thecoshman Using std:;string in thius case is a very bad solution. There is no any need to use the whole class std:;string that to output a string literal. OP is learning language and it is clear enough (except of course you) that he is learning character arrays now and his task is to manage correctly character arrays. — Vlad from Moscow 31 secs ago
 
@BartekBanachewicz unconference will be your stage
 
@VladfromMoscow: What is std:;string? — Lightness Races in Orbit 5 secs ago
BTW he's right.
You don't just use std::string all the bloody time because std::string
 
@LightnessRacesinOrbit way to derail everything (more).
 
I'm glad you're taking this conversation off my hands
 
11:29 AM
I'm glad you're glad
 
user1804599
coool, an e-joint
 
too bad in such a low style
but I wouldn't expect anything better from Tomalak from Nottinhgam
 
@R.MartinhoFernandes The entire thread is a lost cause. If you were expecting Bartek and Vlad to come to some sort of mutual agreement that aids the OP and future visitors, you're deluded. :)
 
@BartekBanachewicz hahahahahah
Keep the misspelling. It will drive Tomalak nuts.
 
Nothing-ham
that's how you do it
 
11:31 AM
@BartekBanachewicz Someone checked into "Nottigham" on Facebook in the early days of the feature, and now it's the default geolocated city name.
I see it all the time :(
 
Impressive.
 
@LightnessRacesinOrbit lol
 
@BartekBanachewicz ¬_¬
speaking of Unconference, who's booked up?
 
@LightnessRacesinOrbit oh boy
 
I use C-strings a lot.
 
11:34 AM
actually I retract my previous oh boy
I want to use it under this image
 
There are thousands of those things in ogonek, for instance.
 
this red middle string
the suit
the background
I;m going to start inventing new haskell operators soon .... *.* (*).(*)
 
It's still a perfectly fine way to shove static strings into an executable.
 
@R.MartinhoFernandes we all know you suck :P
@R.MartinhoFernandes oh well now... string literals are another matter
 
I don't want to both have the static strings and to spend a ton of time allocating stuff and making copies of them for no reason as would if I used std::string.
 
11:37 AM
May 6 '14 at 14:36, by R. Martinho Fernandes
(If you have to ask, I needed a 200kiB string literal for the HTML template I use for output)
 
Oh, yeah, nonius too.
 
> Dear Microsoft C/C++ Optimizing Compiler,

The 1990s called. They want their 64kiB fixed-size buffers back.
I didn't pay for 32GiB of RAM so that you could whine about a string
literal that is a few hundred kiB big.

Fuck You.

Sincerely,

rmf
4
 
@BartekBanachewicz still laughable that VS can't handle that.
 
@R.MartinhoFernandes yea
actually
 
11:38 AM
@R.MartinhoFernandes haha, I remember that one
oh look another downvote at my answer
 
"Fuck You."
Yep that's the way to get what you want.
 
> Only after practicing it six to eight hours a day for six months did I know it was doable.
holy fuck
 
user1804599
Without access to the article saying one thing it is hard to refute its arguments. IMO Exceptions, unlike any kind return value (however wrapped in option or discriminated union types), allow intermediate code between the point of failure and the point of handling to be much cleaner. In real applications this intermediate code is in the majority. In the end this is a matter of opinion. — Richard 2 hours ago
 
@LightnessRacesinOrbit I filed bugs about the issues. (That "letter" was just in a commit message)
Me: I filed bugs about the issues.
You: Yep that's the way to get what you want.
Would still make sense :(
 
11:43 AM
The bugs were closed as wontfix, I think.
 
I remember that
 
> And, on top of that, my code did not compile.
Huh. On top of what?
Wasn't that the problem to begin with?
 
11:48 AM
@LightnessRacesinOrbit On top of wasting transistors.
 
mleh
Unconvincing
not to worry
 
It would be ok-ish if it compiled but somehow stuck to a ridiculous arbitrary memory usage limit, since it would still produce something useful even though in a slow and wasteful manner.
What I don't get is why they say they're working on it, but then close as wontfix.
 
@R.MartinhoFernandes So you'd prefer your program compiled but silently truncated your strings?
 
@LightnessRacesinOrbit No, compiled but took too long because it had to do gymnastics to fit in less memory.
 
Using up more memory than you have allocated does not "take longer". It fails to be possible.
 
11:52 AM
@LightnessRacesinOrbit less
 
There are no "gymnastics" you can do to magically squeeze 16MB into 8MB.
@R.MartinhoFernandes what?!
 
@LightnessRacesinOrbit It's simple: you don't have to put it all in at once.
I can't think of an operation that would require operating on the entire string at once.
 
It would be a bit stupid to set out to write such an implementation, but it would be more useful than the current one.
 
You're expecting that a reasonable half-solution would be for the compiler to, what, repeatedly re-parse your string literal, taking different substrings of it on each pass, and map those substrings into the various parts of your program where the literal is used?
That's ludicrous
 
user3010322
11:54 AM
> closing this issue as "won't fix" because there is nothing directly actionable here
 
The only reasonable outcome of limited buffers is to fail to compile when those limits are exceeded
 
@LightnessRacesinOrbit I'm not saying I'd expect that, but that such a thing would be a superior solution than the current one.
 
user3010322
Poor, poor microshaft.
 
mmm that chick is an Ibanez endorsee
hearing her play with real amp settings kinda makes you realize why
 
user3010322
Not able to figure out anything actionable from a direct, well-written Bug Report.
 
11:55 AM
@LightnessRacesinOrbit In fact... It already does something like that!
HAHA, get ready for this...
 
I'd like to be good enough one day for Ibanez to make me a custom guitar
 
There is a global 64kiB limit on string literals. But there's a 16380-byte limit on string literal pieces.
So when concatenating adjacent string literals, it copies each portion into a small buffer, and then copies it back onto the concatenated thing instead of just putting it all in the same place.
 
user3010322
So what you're saying is Microsoft is dumb?
 
user3010322
Then again, I'm not surprised. The front-end for the compiler is still written in C.
 
user3010322
I can imagine that using malloc to get some memory for arbitrary sized strings is a BIG NO NO.
 
12:02 PM
@R.MartinhoFernandes wat.
as in 64kb for all string literals combined?
 
Ooh! String types/handling fight. Not had one of those in ages.
3
 
user1804599
Bjarkell Hastroup
 
So, like, the only way to get a 64k string is to chop it into 16k-ish pieces.
 
I wish it were christmas
winter holiday = best holiday
 
user1804599
12:16 PM
Can't choose between Perl 6 and Scala.
 
@R.MartinhoFernandes there's a high probability of this being true. Actually finding out would take - on everage - a Lunar month, so let's go with the projected values here
 
@R.MartinhoFernandes I believe that microsoft would tell you to go use resource files if you need more
 
user3010322
@Mgetz No, they just said it's "not actionable" to do anything at this time.
 
@Mgetz Yeah, no, because portable.
I guess I could generate resource files, maybe.
 
@R.MartinhoFernandes sounds like we need to standardize get-text
 
12:19 PM
But then the usage would be different, I think.
 
user3010322
plsno
 
@Mgetz Or not pretend we're in the 90s.
 
@Mgetz That's exactly what they would say, 'shove 'em in a resource along with your bitmaps and other humungous shite'.
 
does G++/Clang handle resource files somehow?
 
user1804599
> Packrat parsing is a technique for implementing backtracking, recursive-descent parsers, with the advantage that it guarantees unlimited lookahead and a linear parse time.
 
user1804599
12:24 PM
Nice.
 
@Mgetz standardizing get-text still counts as pretending we're in the 90s for me
 
@sehe what would you prefer GETINTRESOURCE?
 
I'm trying to remember when I last used a string literal approaching even 16k....
 
I would prefer a nice modern API.
Also, resources don't easily solve the issue of getting them mapped in readonly memory pages. String literals have this property.
 
user1804599
Problem.
 
user3010322
12:26 PM
Is ti because readonly memory pages are only 64K big, and they won't let you allocate multiple adjacent pages?
 
@MartinJames I used a table that size, IIRC, to store pre-calculated trig values in fixed point. Back when my 286 didn't have a 287 and emulation was slow
@ThePhD more likely about 16bit length fields in the COFF file formats...
 
user1804599
'%{' (any text as long as brackets match) '}'
 
user1804599
Not too hard to lex I guess.
 
user1804599
Just have to keep an integer.
 
user1804599
And return when it reaches 0.
 
12:28 PM
strncpy is insecure — sehe 5 secs ago
Hope that boils it down enough for the guy (ARRRG n was a typo)
 
user1804599
Hmm actually, if Java regexes support recursion then this should be a breeze.
 
user1804599
> Java's standard regex lib does not support recursion
 
user1804599
(╯°□°)╯︵ ┻━┻
 
user3010322
@sehe Wiat, hold on. Wasn't COFF like... "deprecated"?
 
user3010322
In the sense that it was shitty at scaling up and it was ditched by everyone with a brain?
 
user3010322
12:30 PM
Microsoft still uses it?
 
in JavaScript, 1 min ago, by Aadit M Shah
@BartekBanachewicz I guess I'm just a stickler for perfection. Assembly is just too fine grained for me to care about.
laffo people reading generated js
 
user3010322
Oh wait, they migrated to PE...
 
user3010322
PE is an extension of COFF, but they didn't change the length fields in COFF for that stuff...?
 
> I've been playing consistently now for 44 years on the guitar
-.^
 
@BartekBanachewicz I was still young and naive!
 
12:36 PM
> A GHC 7.10 3rd Release Candidate on March 13, 2015, and Final Release is planned to happen on March 20th, 2015.
**AAAAAAAAAAAAAAAAAAAAAAAAAAA
so close so psyched
 
What's so great in it?
 
@Griwes in the particular version?
 
Yeah.
Because you seem hiperhyped.
 
AMP
but in general new GHC version is always fun
 
12:37 PM
@ThePhD you're asking the wrong crowd. Ask MS why the limit is still there. My point was: it's not likely an OS restriction
 
> Re-export (<$>) from Prelude
> Inferred type-signatures now may require to enable FlexibleContexts, GADTs, or TypeFamilies
bah like it didn't before
 
@BartekBanachewicz base64: invalid input
 
@OfficerBacon Well most of it is the same function copy and pasted for the different variables. — user3622016 37 secs ago
 
12:39 PM
> With base-4.8, the Prelude re-exports a few more entities from modules such as Data.Monoid and Control.Applicative.
dances /cc @Xeo
 
I'm not in the habit of assuming a compiler that doesn't even support C99 — sehe 17 secs ago
 
please oh please no more "shit I forgot to import Applicative"
 
o.O
 
> One of <*>, pure, join is defined in a different context to avoid naming conflicts, as these functions will go into the Prelude
Neat.
 
pure, joy
@BaummitAugen lel
 
12:42 PM
Why is there no gmail/calendar app for windows 8.1 modern-apps-whatever
 
user1804599
I was invited to this.
 
Is it a gangbang
 
user1804599
Not a very smart dev.
 
12:44 PM
@райтфолд lol I guessed right that he's from india
they have this weird signature of theirs in every message they post
 
user3010322
@ParkYoung-Bae That would assume anyone wants to make an app for that PoS environment.
 
user3010322
Which nobody does.
 
I can't explain it
 
Simple, in your Vim session, :%y+, go to word, C-a C-v, optionally C-a, C-S-f "Cour" <BR> to also give it that typewriter look. If you have something of a PDF converter, use :ha (with :se popt+=syntax:y!) and profit — sehe 15 secs ago
 
@ThePhD In all seriousness, is that really the reason? (lack of dev enthusiasm)
 
user1804599
Although this would've been nicer: """(%{(?:[^{}]++|(?1)*)})""".r.
 
user1804599
Recursive regex master race.
 
user3010322
@ParkYoung-Bae The last time I had a Windows RT device I had to use Internet Explorer to get around because not even Firefox had anything that runs on that shit-crap WinRT runtime.
 
@BaummitAugen Shit I missed the requirement to compress it:
If you need it to take fewer pages, conside doing :%!gzip -9 | base64 -w 180 first — sehe 25 secs ago
 
@ParkYoung-Bae shitcrap
 
user3010322
12:46 PM
So despite there being tools to dev for it, I'm pretty sure WinRT-enabled devices are considered an ENTIRELY niche market.
 
stumbled on that too
 
@ParkYoung-Bae Windows RT is "8" without the "Windows"
 
> nicer
 
btw @Jefffrey you can look at rendering-backend branch
 
user3010322
Having had to build a WinRT surface app, I can confirm that WinRT is terrible.
 
12:47 PM
@sehe Glorious. His A+ is guaranteed!
 
@BartekBanachewicz Did you make it work for 3.3?
 
Alright thx guis
I must say I don't follow these windows things much
 
np
 
@Jefffrey I've prepped a ground for that. If you don't have anything better to do, you can implement the 3.3 version in the BackendCompat module
I've done the hardest part
 
lol, I have no idea how to OpenGL
 
12:49 PM
@Jefffrey the only thing that would need to change is that the texture has to be bound manually
remember that binding thing that blocked me
it's literally just glBindTexture
other functions should prolly be copied (yes I want duplicate code there) from modern
 
user3010322
Why not just forward to the modern interface.
 
@ThePhD why not what?
 
user3010322
Like, uh.
 
user3010322
In Haskell, can you say "just call this function instead" ?
 
user3010322
Like make one identifier point to a prexisting function?
 
user1804599
12:52 PM
mymap = map
 
user1804599
except monomorphism restrcutiaino hhahahaha
 
user1804599
so the idea is that %{...} returns a quotation object.
 
user1804599
Which can then be passed to a function like raw or sql or awk.
 
@ThePhD you can, but the data types won't match
like, you can simply write f = g
 
> StatTrak™ M9 Bayonet | Crimson Web
 
user1804599
12:58 PM
Like raw(%{Hello, world!"""haha""}) for a raw string literal.
 
this CS GO knife sells for more than 15k eur
 
but RendererModern has its own cache and RendererCompat another
 
user1804599
Although %raw{Hello, world!"""haha""} would be nicer.
 
user1804599
But more difficult to parse.
 

« first day (1601 days earlier)      last day (3362 days later) »