« first day (738 days earlier)      last day (4201 days later) » 

user142019
12:00 AM
@Pubby nope.
 
user142019
GitHub is much more well-known than Stack Overflow, I think.
 
How many users does Github have?
 
2,380,962
 
@Rapptz github.com
> 2,380,962 people hosting over 4,088,689 repositories
 
Favourite quote: @Cicada
> The Prolog teacher thinks "professional Prolog" actually exists.
 
12:04 AM
Says so right there on their home page.
 
@EtiennedeMartel Where do you see that?
I can't find it.
 
@sehe What do you mean by "professional"?
 
user142019
@Rapptz You need to log out to see it, I guess.
 
Uses it everyday? Has mastered the language?
 
user142019
 
12:04 AM
@sehe I'm using her very own words. Sadly.
 
Oh I see it now.
 
@Borgleader Ask the author? I assume she meant "for a living"., high-quality
 
user142019
@EtiennedeMartel Kick Ass?
 
Yeah I see it. I'm always logged on GitHub that's why I couldn't earlier.
bookmarklet for shooting web pages.
kickassapp.com oh wow the site has changed a lot
 
12:06 AM
Well my AI teacher knows Prolog and teaches it for a living. I guess that counts?
 
user142019
@Rapptz awesome.
 
user142019
Wait I have an idea.
 
@Borgleader That doesn't count.
 
@Borgleader My AI ex-teacher works for some hospital or something.
With Prolog.
 
@R.MartinhoFernandes o.O What the hell does an AI teacher do in a hospital?
 
12:09 AM
Code Prolog. In some thing.
 
user142019
Goggles is awesome, and this room looks too clean:
 
user142019

PHP

Support group for those afflicted with PHP. Don't ask to ask, ...
 
@Borgleader Expert Systems. Diagnostics?
 
He was always on and on about that in classes.
He was a terrible teacher.
 
@sehe Yeah, seems like a the ideal place to showoff that FOL.
 
12:11 AM
@R.MartinhoFernandes That sucks. My AI teacher happens to be the best teacher I had in university so far. I actually took the Web class because he's the one teaching it
 
He assumed we already knew Prolog when we got to that class. Now get this: that was the only class using Prolog in the whole degree curriculum.
 
university* ?
 
Nah, they had some shit in some Master's program.
 
Ah. Like how we have.
 
@sehe Is this a pun on System.Diagnostics?
 
12:13 AM
Yeah some teachers are like that. They're so into their field that they automatically assume it's trivial for everyone.
 
@Cicada No. I wouldn't dare. Medical diagnostics obviously
 
Thanks for Console.Clearing that out
 
@Cicada Siboire.
 
@R.MartinhoFernandes Hey, here's the code I mentioned yesterday.
@EtiennedeMartel I would have thought that's spelled with a cee.
 
@Cicada Okay, I have now fully digested your ... piece :) Two more things that strike me: Indeed I think your expectation of CS may have been "off" a little (see cs-theory.SE for more ideas there); Even in my college (Techn. Univ. Delft), which was supposed to teach applied informatics, everything was kept at abstract levels, and Maths was clearly preferred over code.
Also, they didn't kill your passion for programming. They destroyed your love affair with schools/education. I'm afraid that was bound to happen sooner or later. But it currently has you in shock:
> Let's be neutral: my point of view is certainly biased. But it's become so biased that I'm rejecting everything they teach us.
You probably won't be able to progress until you can let that go. Do you have other things? A boyfriend? (A girlfriend?) Take a break? Reconsider life options? Either way, the shock is probably a good thing: imagine what it would be like if you didn't find out until you were in that job you wanted to love...
 
12:14 AM
@LucDanton It's actually Ciboire
 
@LucDanton Technically, yes. In practice, no one gives a shit.
 
@EtiennedeMartel But apparently there are breweries named such, you'll confuse everyone!
 
Incidentally, there's a microbrewery in Sherbrooke named 'Siboire', and they make lots of puns with "si boire..."
Ended up drinking there a lot during while I was a student (my university was located in Sherbrooke).
 
Had a friend go spend a year at Sherbrooke. Was not enthused about the food.
 
@EtiennedeMartel Like "Si boire est votre intention, vous etes à la bonne place?"
 
12:16 AM
@LucDanton They got great poutine places.
 
@LucDanton I wouldn't bother changing it to use accumulators.
 
@Cicada Sorry. I was busy writing an answer novel :)
 
@EtiennedeMartel Yeah he wasn't super fond of that.
@R.MartinhoFernandes Ya, no real practical need to worry here. It's just that I don't remember the 'common wisdom' that applies here.
 
@LucDanton Weird. Perhaps it's because he did not get drunk enough. Poutine is best taken while heavily inebriated, after all.
 
12:20 AM
^ still doing it wrong, I feel (google activity report)
 
@sehe I'm thinking about reconsidering, yes (that's pretty meta). Oh well, we'll see. It's not like the world ends anyway. I'll do what I can to carry on, but if I fail I won't try again. Thanks for taking the time of reading that poor chunk of text!
 
@Luc btw, elemIndex?
 
@EtiennedeMartel Fuck flash
 
@Cicada Tssss.
> Si boire te rend mou, garde à vous
 
"Si boire est un vice, cale verre en est un autre" ???
 
12:22 AM
@R.MartinhoFernandes Mmmh, when I started I thought that would leave to a worse complexity. Now that it's a bit clearer how the recursion on the two lists take place, I may want to reconsider yeah.
 
@Cicada only fair :) We practically live together in this room. Seems only sensible to actually pay some attention sometimes, i.e. if time permits beside trolling. Of course, trolling must be maintained at professional levels
 
@Cicada "calvaire" est un autre sacre. "cale verre" -> "caler un verre".
Vous avez "caler", non?
 
The thing is that I delete the match in the second list. So since I need to deconstruct, I get to make the comparison 'by hand' myself, don't I?
@EtiennedeMartel Wasn't able to parse 'cale verre' either.
 
@LucDanton Maybe I'm seeing it wrong, but the primed function looks just like a map of elemIndex to me.
 
12:25 AM
@R.MartinhoFernandes I will look for a split that leaves the match in the head of the second part of the split.
 
@EtiennedeMartel Okay I get it now.
@sehe Trolling quality will not drop as long as I'm around, dword.
 
Etienne is a drunkard.
 
@R.MartinhoFernandes I need stability in case of duplicates. Which I'm not sure I support right now, let me check.
 
@R.MartinhoFernandes big news.
 
I'm starbaiting.
Bastards
 
12:27 AM
@Cicada :)
 
And back again. Twinkle twinkle little star has inspired someone tonight.
Or, dasblinkenlight is here under another user name to play with stars
 
@R.MartinhoFernandes lel
Okay I'll let you have it.
 
@R.MartinhoFernandes Yeah okay that doesn't work because the match is not removed from the original list.
 
Alright, time to go home. See y'all in 30 minutes.
 
12:29 AM
Oh, I have not installed GHCi yet.
 
@EtiennedeMartel Drive safely (oder so etwas)
 
Can't really download that thing over 128kbps now.
 
@EtiennedeMartel cya
 
And I'm going to sleep. Cheers all
 
@sehe Was actually me
@sehe Good night!
 
12:29 AM
@Cicada Yeah, you blew your cover there :)
 
@sehe Have fun.
 
Thx :)
 
0
Q: What is the equivalent of CPython string concatenation, in C++?

Cheers and hth. - AlfYesterday, as I'm writing this, someone asked on SO if i have a string x='wow' applying the function add in python : x='wow' x.add(x) 'wowwow' how can i do that in C++? With add (which is non-existent) corrected to __add__ (a standard method) this is a deep and interesting question...

 
How many lines of code is considered "too much" for a header-only library?
 
^ I'm hoping there are not too many erors and buggs in there. :-)
 
12:31 AM
I tried looking at boost for a comparison but boost is huge.
 
@Rapptz over 9000
 
@Cheersandhth.-Alf usrs?
 
@Cheersandhth.-Alf "Return a + b, for a and b numbers."?
I think you quoted the wrong docs.
 
@R.MartinhoFernandes it's a copy paste from the docs
 
@Cheersandhth.-Alf But it says "numbers".
 
12:35 AM
right
thanks
 
(I tried earlier to find the relevant docs for strings, but it seems I am not fit for interfacing with the Python doc site)
 
Python docs suck.
 
user142019
Python docs are awesome. Like Haskell docs.
 
@LucDanton ideone.com/HHKLLu Did I overlook something?
@WTP'-- My experience is pretty negative. Can you please find the docs for __add__ for strings?
I failed terribly.
 
12:39 AM
No relevant entry for strings? (if so, QED Python docs suck)
 
@R.MartinhoFernandes Seems fine. Although I'm working on a new version that can deal with duplicates now. Really not the same beast with that added requirement, I'm rewriting.
 
@LucDanton Oh. Yeah, that changes a lot.
 
restore indices list = map (list !!) indices now because IDGAF. Matches C++ indices + std::get a lot actually.
 
thanks i'll update
i looked in the wrong place, in 9.9
 
I Don't Give A Fuck?
 
12:42 AM
Ya.
 
idgaf.
 
Can I use pattern bindings in lets?
 
@Cheersandhth.-Alf make sure to add /py3k/ for Python 3 docs. e.g. docs.python.org/py3k/reference/datamodel.html#object.__add__
 
user142019
I do give a fuck.
 
@LucDanton Yes.
It's awesome.
 
12:43 AM
Holy shit yes.
Is it bad form? I find that more sexy than if null foo.
 
In do expressions, failed bindings call fail.
If I know the binding won't fail, I prefer it to if or case.
 
Yeah I'll case.
 
user142019
Talking about let, what does foo = let x = x in x do? I have seen it used somewhere.
 
Nothing special.
 
user142019
What will x be?
 
12:45 AM
It's non-terminating.
 
@Rapptz working on it
 
user142019
Oh it’s used in GHC.Prim, but only as dummy definitions for Haddock.
 
user142019
Because GHC.Prim is teh magicz.
 
Off to bed. Cya'
 
user142019
12:46 AM
Später.
 
@WTP'-- Definition of undefined?
 
@Cicada Adios.
 
Oh, seems it's used instead of it.
 
user142019
undefined :: a
undefined = error "Prelude.undefined"
 
ok dunno if perfect but better! thanks r and r!
 
12:50 AM
But if I use span then I don't get the position. Urrr.
 
user142019
Hmm it’s 3 AM but I’m not tired at all.
 
@LucDanton length?
 
user142019
Think I’m just gonna work on mah pawn site.
 
My first impression was to zipWith (,) [0..] -- I think I've got infected with those indices: now I want functional lists with random-access!
 
Your what?
@LucDanton lol
 
user142019
12:52 AM
My video hosting website. :P
 
@R.MartinhoFernandes Of the prefix?
 
Oh, porn?
@LucDanton Yes.
 
user142019
Of course.
 
user142019
But I want to get better at Haskell, so why not.
 
12:52 AM
My FP teachers would shudder at the thought: I just went and recursed on the list, and now I do it again?
 
Dunno if you would get fusion there.
But I have grown to trust GHC to do the unbelievable (it doesn't always do that, sadly).
 
I'm going to do it because std::tuple_size comes for free once the tuple is already instantiated anyway.
 
If you get fusion, there's no "again".
 
Also I'm concatenating right after, so.
Illegal tuple section! Didn't know that was a thing.
 
Haha.
(,x) IIRC?
 
12:58 AM
Ye.
 
should i close my question as duplicate now that the original is reopened?
 
Ok, time to sleep.
 
@R.MartinhoFernandes I guess you're running out of time, but now with more updates.
Oh man, converting that to TMP is unfun. Time to cook.
 
1:45 AM
The 5 minute argument or the full half hour?
 
2:35 AM
@sehe It's alright, I take the metro.
 
2:45 AM
@R.MartinhoFernandes I don't know whel you'll have the time to read this, but here's a naive port of the algorithm into TMP, lol.
If/when I add that into my library I'd better put the Haskell code in the comments.
I challenge everyone to find a better layout/indentation to make those specializations more palatable, too.
 
 
2 hours later…
4:22 AM
That's odd, apparently I compute the wrong permutation? Anyway, swapping the order of parameters is fine. This is too much fun.
 
 
2 hours later…
5:57 AM
Anyone here?
I need some git help.
I borked things up again...
I ran git config --global core.worktree, need to undo it.
fixed
vi ~/.gitconfig
 
morning
 
Ell
6:25 AM
who here devs on Windowsk?
 
6:38 AM
anyone else who puts const after a typename annoyed by constexpr coming before? What's the best thing to do?
If I put both const and constexpr, is that going to be even more ugly and irritating?
 
7:02 AM
ScanBodiesAndBordersAndEmitStartingBlockPositions <--- dafuq
 
People sometimes do that.
 
Metalol
 
Xeo
@Potatoswatter Me! Me!
In my case, I just suck it up, though, since I think of them as semantically different things or something.
 
@Xeo They are. constexpr is a storage class specifier, it has an effect on the ODR and can only apply to a declaration. It just happens to imply const because that's the nature of compile-time "storage".
So by that reasoning, lazily allowing const to be applied could be considered poor practice.
Woops, it's not actually a storage class specifier…
 
Xeo
7:20 AM
That it can only be applied to declarations doesn't make sense
constexpr int answer(){ return 42; }
 
Why not?
Are you saying I'm wrong or that the rule is unintuitive?
 
Xeo
You seemed to be implying that you can't apply constexpr to definitions
 
Definitions are declarations.
 
Xeo
Not all of them, actually
 
It's unusual to have a constexpr declaration which is not a definition, since using such a declaration would usually be illegal. Not sure of the particulars.
"The constexpr specifier shall be applied only to the definition of a variable, the declaration of a function or function template, or the declaration of a static data member of a literal type."
^ All definitions of variables are declarations.
Definitions of enumerators and template arguments are not declarations… what else?
 
7:25 AM
Alright guys.
I'm gonna do it.
I'm gonna write my own stream class, backed by the regular C functions rather than use the nightmare C++ streams
 
Xeo
@Potatoswatter The out-of-class definition of a static member
 
It shall be abstract, and there will be derivates of it such as: MemoryStream, FileStream, and, uh.
... That's all I can really think of.
 
BUT Yeah that's what I'm gonna do. I think I'm on the right track.
 
@ThePhD TCPstream?
 
7:27 AM
@Xeo How is that not a declaration?
 
@MartinJames Never interacted with the internet from my code in my life. Maybe a GZipStream or LZMAStream, though.
 
Xeo
@Potatoswatter You can't just do struct X{}; some_type X::some_member, some_member needs to be declared inside of X.
A declaration introduces a new name
And an out-of-class definition of a static member does not
 
@Xeo A declaration doesn't need to introduce a new name. When the standard says "declaration" it's referring to the syntactic construct covered by clause 7.
 
@ThePhD Well, also useful on LAN or maybe for communicating with services and other processes.
 
@MartinJames You have to address other services or processes on a computer by TCP? That's how you do it? o_O;
 
7:30 AM
@Xeo His explanation sounds more authentic because it mentions a specific clause
 
@ThePhD You do not HAVE to.
 
Xeo
@Neil Meh, I just woke up and didn't have the urge to go on a journey through the standard right away. :P
 
@Xeo Programmers do that in general. When they go through the standard the right way, they're writing perfect programs
 
@Neil Unless they're writing streams.
 
Xeo
@Neil That would imply that the standard is unambiguous :)
 
7:32 AM
@Xeo Well… to summarize, the first sentence is "Declarations generally specify how names are to be interpreted. Declarations have the form: …"
 
I just found out C# streams are like 2x faster than C++ streams. That pisses me off.
How can ti be implemented that shittily? D:
 
… then the rest of the page is filled with BNF, and the next 39 pages define what declarations do.
 
Xeo
@ThePhD virtual, virtual everywhere
 
@Xeo In the C++ streams or the C# streams?
 
Xeo
The C++ ones
 
7:33 AM
@Xeo Now you've opened up a whole new can of beans. Is there more than one "right" way to code or is there only one code for each program that is correct?
 
The foundation of iostreams is littered with adjustable parameters that nobody uses. For example you can register extra parameters to be used alongside precision, width, etc, and custom facets.
 
It would definitely be easier to assume there is only one right way, but it's largely subjective
 
Xeo
@Neil I mean that there are constructs in the standard that are ambiguous by the same standard
take std::common_type
 
:590305 Does it meet the requirements? If it does, it's correct enough - it's deliverable.
 
Xeo
It's implemented through partial specialization, but exactly the form required by the standard is also ambiguous according to partial ordering rules
 
7:35 AM
@Potatoswatter Why would they cram that stuff into C++ streams? Aren't streams just supposed to be responsible for reading bytes? Why give them localization or precision awareness?
 
Xeo
@ThePhD No
The stream buffers are actually doing the read / write work
The streams themselves only do formatting and localization
 
@Xeo Meh, it doesn't have to have perfectly defined behavior with any parameter. It simply must honor what it says it will do
 
Xeo
Now that sentence doesn't make any sense to me.
 
And that it does
 
Are the internal buffers that back these streams exposed? Like, how do most streams do it? Wrap the regular C functions?
 
7:37 AM
@ThePhD Reading bytes is handled by std::basic_filebuf, which inherits from std::basic_streambuf.
 
That was almost a disastrous typo/mispelling.
 
@ThePhD I perferred 'f cuntions' <g>
 
Xeo
@ThePhD .rdbuf()?
 
those function names in the streams API are terrible
 
That simple task is a relatively clean corner of iostreams and those classes are not insanely sluggish, although there is some potentially annoying virtual crud.
 
7:38 AM
couldn't they name it somewhat more human readable???
 
.. Hm. So I guess I'm thinking of it wrong; C# streams are similar to C++ streambuf objects, and C# readers are similar to C++ streams.
I was considering making a Stream class that was actually completely virtual, whose job was just getting and setting bytes, as well as seeking all over the place.
But from what you all tell me, virtual is apparently murderous.
 
@Potatoswatter What is wrong with the 'virtual crud'? If you don't implement the streams with inheritance/poly, how do you do it?
 
Xeo
@TonyTheLion Aw, what's wrong with xsputn?
Or uflow and underflow? :)
 
@MartinJames I'd just expose virtual functions so you don't have to use what you don't want.
iostreams uses NVI unnecessarily, seemingly for the sake of having a "code pattern".
 
Xeo
@Potatoswatter There are no public virtual functions in the stream hierarchy
@Potatoswatter Eh? Why do you think that?
 
7:43 AM
Sorry, expose the virtual functions so they can be called as nonvirtual :P
 
NVI... gotta look that up.
Nothin'. A Berkeley text editor and some stange company.
 
@Xeo What does iostreams gain by hiding the virtual functions? NVI is useful when you have some sentinels around the virtual functionality, which iostreams doesn't.
 
Xeo
@ThePhD non-virtual interface
 
@ThePhD non-virtual interface. Implement the API in the base class, then delegate to private functions in the derived classes.
But it's pointless if delegation, i.e. the call to a private function, is the only thing that happens.
 
@Potatoswatter I was just about to say that.
You might as well just have a Virtual interface and save everyone the agony.
It's not like an NVI makes the code any faster.
 
7:46 AM
I also have a bit of a problem with seek() - what if such an operation is not possible on the underlying stream buffer mechanism?
 
It should probably just fail.
Silently or with an error code return.
Usually seek() should be void, so just make it return an int or bool or something.
 
@Cicada Quit school, and get a job with the skills you already have? Maybe in another country. Or put school on the back burner, something you slog through with a minimum of effort while doing all the fun coding in your spare time? Also, your view of CS is a bit skewed. It is not a coding degree, and it is largely theoretical (although your school sounds extreme, at least the way you portray it). Ideally it should be a mix of practical programming and theory
 
It's not unreasonable to say that seek() should not be supported by any stream.
 
@Xeo everything is wrong with it.
 
Nooo… it should throw. Exceptions are the best friend of an I/O library, since any operation can fail.
 
7:48 AM
@Cicada Also, if you're going to go to a foreign university, start the process now. It takes ages to sort everything out, so look for a promising university right away, and look into the application process.
 
I've never got my head around how to work with exceptions in C++
I've steered completely clear of them.
 
@Potatoswatter I have no problem with throwing exceptions on failure, the issue I have is attempting to support block-device 'random acess' operations on stream classes.
 
@MartinJames You dislike the idea, or you expect it to be difficult?
 
good morning!
 
If you support text encoding translation as basic_filebuf does, then yes it's tricky.
 
Xeo
7:52 AM
3
Q: Can X x(t...) ever result in a function declaration with vexing parse?

Johannes Schaub - litbI was writing a function template as template<typename ...T> void f(T ...t) { X x(t...); // ... } When I was looking at it, I was wondering what happens for a call f(). Will vexing parse make x a function declaration? Compilers seem to make it a variable. Can someone help me be sure...

 
It is MORNING! - An unknown error has occurred - retry / cancel
Fun.
 
Xeo
I wonder if Johannes is going to troll again with some weird corner case...
 
Because as the user seeks within translated characters, the underlying file is seeked by raw bytes.
 
Text translation should probably be handled outside of the seeking mechanism, or just given a separate function altogether. Seek() != SkipCharacters()
 
@Potatoswatter Well, bit of both:) It's very difficult to rewind a TCP stream, for example.
 
7:55 AM
Maybe you could set a boolean on your stream class
CanSeek
That way you can have run-time assurance you can go backwards/forwards arbitrarily
 
@Potatoswatter Well, bit of both:) It's very difficult to rewind a TCP stream, for example.
Chat died, or is it my shitty ISP again?
 
@MartinJames ISP
Always happens when I tether my cellphone.
 
I'm gonna change at end of month:(
 
@Cicada Not sure what to say to that. I had similar times at uni, so I know a little bit of where you are coming from with this. I just hope you can work out what it is you want to do and don't forget their is a wee place where you can fit in, just leave C at the door.
 

« first day (738 days earlier)      last day (4201 days later) »