« first day (2023 days earlier)      last day (2927 days later) » 

9:00 PM
No I mean. I'm fine with callbacks existing for something like routing a request and handling a request. That makes sense.
 
user1804599
If you have only a single thread, the only way to get concurrency is through callbacks (aka promises aka continuations aka stackless coroutines)
 
I don't understand why connect to the database or making a query gives you the result in a callback.
Like what do you gain out of that?
 
user1804599
Concurrency in an environment with no more than one thread
 
You "gain" or you "painfully accept"?
 
user1804599
If you block waiting for a query result, you can't do anything else in the meantime.
 
9:01 PM
@Zoidberg What else would you do?
 
user1804599
THREADS
 
user1804599
MULTIPLE THREADS
 
Like 99% of the times you need that query results to go forward with the request
 
user1804599
GO ERLANG GHC STACKLESSPYTHON RUBYFIBERS
 
I can't think of a single instance in which I send a query to be completed and then go forward and do something else
Like your average login handler is something like "fetch the user, check hash against password, respond"
 
user1804599
9:03 PM
You can only do it with callbacks.
 
user1804599
If you do it without callbacks, you have to block the sole thread
 
user1804599
Which means you get 0 concurrency
 
user1804599
How hard is it to understand this
 
I see
right
That's still awful
It's like a poor man's concurrency
 
user1804599
So use an environment that supports multiple threads, and preferably one that is post-stone-age so that threads are cheap resources in it (not C++ or .NET or Java)
 
9:06 PM
why are threads so slow in c++ anyway
 
wat
 
seems like having them always causes issues
 
Hello from my new laptop!
 
unless ur really careful
 
"using threads causes issues" is very different from "c++ threads are slow"
 
user1804599
9:07 PM
C++ threads require large stacks and kernel objects
 
and yes concurrency is hard
 
user1804599
Erlang for example uses growing stacks and user-space objects
 
@Zoidberg Does rust have a story for that?
 
user1804599
So you need no system calls to context switch and you don't need to pre-allocate lots of memory that you are never going to use
 
user1804599
@JohanLarsson there is a library for it AFAIK
 
9:09 PM
@Charlie one is not really relevant to the other
 
Xeo
Gotta say, string interpolation is a nice feature.
 
:B
 
Xeo
@ThePhD Sup. Good laptop atleast?
 
@Xeo Personally I think it's an abhorrent feature.
evening all
 
Xeo
Why so?
 
9:18 PM
@Xeo Yeah. Glorious 1920 x 1080 resolution, at long last.
 
because it's a core language feature whose sole purpose is to .... concatenate some strings together?
 
God I hated 1600 x 900.
 
@Borgleader thread creation is slow.
 
because clearly a library function to do this just isn't good enough
 
Xeo
@Puppy Convenience.
And it's prettier
 
user1804599
9:19 PM
@Xeo yeah, but I like it generic, not just show and ++. For example, so that you can say sql"select bla where $foo and x" and it'll call sql("select bla where ", foo, " and x") so that sql can create a prepared statement with the odd-numbered arguments being turned placeholders and bound, preventing SQL injection
 
I think that + is pretty convenient
 
Xeo
Maybe. Still, nothing you said so far would make it "abhorrent" in my book.
 
> core language feature
all language features should have to meet a minimum bar to exist, and string interpolation is way beneath that bar
 
Xeo
@Zoidberg Customizability is always nice, if it exists and doesn't interfere with normal usage.
 
user1804599
Get rid of normal usage and the latter issue is void.
 
9:23 PM
@Zoidberg Boo can do that
 
user1804599
E.g. for string concat in Scala you use the s interpolator Explicitly
 
Xeo
@R.MartinhoFernandes Can't Boo do pretty much anything if you implement it?
 
user1804599
@Ven interesting idea: make LS generate PS instead of TS/Flow
 
user1804599
🤓
 
@Xeo Pretty much, yes :p
 
Xeo
9:26 PM
Well, "duh", then :P
How's your situation w/ work n stuff?
 
So like when you do setTimeout(fn, 10000); rest();, then you set the timeout and continue with rest() but when the timeout is over rest() gets interrupted and fn() executes?
I guess so
 
@Xeo I'm going slow
 
Xeo
@Shoe what language?
 
JS
Wait, how can it work if you don't have threads
 
user1804599
@Shoe nonono
 
user1804599
9:33 PM
There's a global event loop
 
user1804599
When the timeout fires, it just queues the callback on the event loop queue
 
user1804599
Nothing is ever interrupted
 
Right, and that is for the DOM
Is that the same for Node?
 
user1804599
YEP
 
user1804599
DOM events, timeouts, HTTP requests etc all come in through the event loop
 
9:35 PM
Say you have something like the first example in here: callbackhell.com
If you had some code after the fs.readdir call, when would it be executed?
 
user1804599
Immediately
 
user1804599
readdir will schedule the callback on the event queue when it has finished reading the directory contents
 
I see
 
user1804599
Node.js is literally event loop + V8 + libraries
 
Wait, it's saturday night already
Wat
Why didn't you ring the friday alarm rightfold?
 
user1804599
9:40 PM
The voice of Richard Dawkins is so nice.
 
@Shoe Because people who link that video now get kicked without warning for first offenses.
 
Not if it's Friday!
 
especially if it actually is Friday.
 
Puppy is right.
 
OTOH I doubt that Zoidberg cares about being kicked so I guess your question is still valid.
 
user1804599
9:59 PM
I really don't care
 
user1804599
The only people who care about being kicked are help vampires.
 
user1804599
They would feel so offended.
 
user1804599
We shifted the #DConf schedule one hour forward. No programmer deserves to be in a meeting at 9 AM! http://dconf.org/2016/schedule/ #dlang
 
user1804599
Lol
 
I watched a D-talk the metaprogramming looked nice.
Nice as in allowing lots of stuff, no idea about what it would be like to work on code written with stuff like that.
 
user1804599
10:09 PM
Autodrop is so delicious.
 
user1804599
It should be forbidden.
 
what is it?
 
user1804599
Automobile-themed licorice.
 
user1804599
@JohanLarsson mixin and CTFE are killer features.
 
10:11 PM
do you use d much?
 
@Puppy For posting a YT video?
 
yes.
 
No fun allowed!
 
user1804599
 
not that fun
 
10:12 PM
24 mins ago, by Johan Larsson
Puppy is right.
 
user1804599
Oh Imgur
 
user1804599
Hahahahaha C++ modules
 
yay, modules!
 
user1804599
In 2023, C++ will get modules, and they'll suck.
4
 
10:15 PM
It's unfunny now
actually it was never funny
 
> can you please help me by giving the coDe.?
 
It's a meme, it was not supposed to be funny :(
 
Xeo
Hm. Any way to do C++-style T[] arr = { {vars for T}, {vars for T} }; in C#?
I want a concise way to define a static list
 
new T[]{new T(blerb), new T(blurb)}
 
Xeo
bleh
 
user1804599
10:21 PM
@Xeo use Go nub
 
new all the things!
 
Xeo
It's not about new, it's about verbosity
 
Can you show your ideal syntax?
with types and shit
 
"The conventional and most popular C++ software organization practice rests upon
a more than four decades old linking technology and a copy-and-paste discipline."
 
@Borgleader T[] arr = { {blerb}, {blurb} };
 
Xeo
10:24 PM
I'd even accept the new[] for the array
 
is the reason for proposing modules to c++17
 
@Charlie and youre bringing this up because?
 
hm? do I need permission to talk?
someone mentioned modules being suggested for c++17
 
well no but it seems to me youre not having a discussion with anyone but merely dispensing facts about modules most people here have been aware of for quite a while
 
so I did a little digging, and in the proposal, that is listed as the reason.
I thought it was valuable information, pertaining to c++ itself
Sometimes I will say things that isnt a direct response?
"that newest bond movie is good", isnt necessarily a direct response, even tho movies were the topic
 
10:29 PM
@ThePhD Did you get Win7 working?
 
4 decades old linking technology, imagine the optimization possibilities
 
Xeo
@JohanLarsson it's an array of structs (just pure data)
 
@Charlie ive been doing that for a few years now
 
improving linking tech? =P
 
10:30 PM
no, modules
 
@Xeo dunno what that means
 
cool, I saw bjarne sjoustrup talk about them, but that they werent as fast
 
weve all been waiting for modules
 
what are they exactly?
like functions for type safety or something like that?
 
10:33 PM
@Charlie that link you posted should explain all those details...
 
You could save me some time with a quick summary? idk, im not that well versed (yet)
im fine managing my types, for now atleast, but yeah, im probably confusing things
 
@Xeo I would write it like this
 
Xeo
That's what I did. Annoying.
 
You can use object intilaizer but I would not do it for structs
what is annoying about it?
 
Xeo
so verbose and redundant. Especially that constructor.
 
10:42 PM
c#7 will solve all that
 
Xeo
good to know
 
will be internal struct Data(A:string, B:int) iirc
 
Xeo
Ah, that helps
 
and they you will get structural equality etc
+ object internalizer syntax for ctor args
but it may change, I'm not following it closely
@Xeo the ctor serves a purpose though, not exposing mutating members
while it is a bit verbose it is just ctorf + tab to write/generate
 
Xeo
@JohanLarsson Eh, they could be readonly and still be initialized through braces
 
10:49 PM
pretty sure they can't
 
Xeo
well, not currently in C#, anyways.
But there's nothing stopping it from being so, no?
(If there is, I'd say it's prolly a stupid reason)
 
agreed
 
@Zoidberg best not to
@ThePhD Life in a monastery
 
user1804599
@Xeo brace init is actually assign after calling ctor
 
user1804599
It's just a syntactic construct
 
Xeo
10:57 PM
So?
 
user1804599
Making it work on readonly fields would require more involved stuff
 
but the compiler could figure that out
 
user1804599
You'd need a way to specify that it's allowed
 
user1804599
Oh wait it's a struct.
 
user1804599
Well don't do readonly fields on structs. It's silly.
 
11:01 PM
@Zoidberg hehe
 
user1804599
sehe
 
whoso useth my name in vain?
 
user1804599
Imgur
 
@набиячлэвэлиь you can drop some of the T there
 
Anybody seen any good C++ talks?
 
11:05 PM
@Charlie geez your species is a billion-year old technology.
 
user1804599
> Stop signs removed after Utah city official gets traffic ticket
 
user1804599
Not even satire
 
@Mikhail Nobody. (Srsly, ask @StackedCrooked, he makes a full time job out of watching them it seems)
 
user4221197
hey guys
 
@Zoidberg Not even flatire
 
user4221197
11:06 PM
I am curious what the computer science and engineering community think of quantum computing, and if there are any video lectures online or texts attacking the problem from those camps
 
@JohanLarsson Anders still Skipping D# and E# I see
 
@kevinTahN. I'm in the optics community and I think its bullshit
 
@sehe that means something, dunno what
 
Mostly because quantum operations are destructive owning to no-cloning theorem among other things. Imaging if Google search could be run really fast, but afterwords Google's data would be completely deleted.
 
user4221197
@Mikhail hehe, I have been wondering about that for a while,
 
11:08 PM
@kevinTahN. I am curious why you think a random C++ chatroom is a representative sample.
 
user4221197
@puppy, C++ coders tend to be from all over the place and provide the right diversity for a sample set
 
uh huh
and ... you measured that diversity in this room?
and the sample set is large enough to be statistically significant?
 
@Xeo exception safety
 
user4221197
based on statistics yes
 
user4221197
lol
 
11:09 PM
I see
 
@JohanLarsson making C# resemble F# at a high pace
 
so you can say that it's statistically likely that there's a diversity in the room but you didn't actually check?
 
bonus points if you use the correct version of the variance (sample vs population)
 
@Puppy you're helping with your extreme samples
 
user4221197
@Mikhail there seems to be a bit on fault tolerant computation and topology where the problem seems to be a the level of reading out the info,
 
11:11 PM
@Puppy 2/7 not a very effective troll
 
not to mention that you're assuming that the respondees are C++ programmers, whatever that actually means.
 
user1804599
@kevinTahN. I research QC in university.
 
whereas in fact a substantial portion of the room hates C++ and has never used it professionally to boot, which pretty much fails any reasonable definition.
 
@kevinTahN. Schrödinger's ciruitry
 
@sehe oh, yeah
 
11:11 PM
@Puppy Or uses it professionally but doesn't know what its doing.
 
@Zoidberg Yeah. ISTR you observed a total lack of QC
 
Think they have stolen all the things they can soon, maybe they can steal the unions, hope so
 
user1804599
ISWYDT
 
user4221197
@Zoidberg what is the most promising approach in your opinion, and what is your general feeling of the state of affairs
 
@Mikhail Perhaps I have a faulty memory, but I have a funny feeling that if I were requested to name such people, you might be high on that list.
 
11:12 PM
@Zoidberg Likewise
 
partial masturbation and such things will perhaps be hard without currying
 
@kevinTahN. The best thing is to go to WP's disambiguation page for QC
 
@Puppy :-) (also my research is not in C++)
 
user1804599
@kevinTahN. I'm in a superposition of various feelings.
 
user1804599
Sometimes I'm happy, sometimes I'm sad. Although more often sad.
 
user1804599
11:14 PM
> Een lach en een traan, edoch vooral tranen.
 
The trick is to herald the happy photons
 
user4221197
lolz
 
0
Q: Better way to give provide path of libraries while compiling in C++

letsBeePoliteI pretty new to C++. I was wondering, as what is considered generally a neat way to provide paths for various files/libraries while compiling or executing c++ codes. For ex: I have Boost libraries installed in some location on my system. Lets call it X In order to execute anything I have to type...

Uhoh. Someone hasn't been taught about the Silver Bullet. It solves that.
And that someone will inevitably be building a Better Build System™
 
gotta say this guy seems to be a complete crock of shit
 
No you don't
 
user1804599
11:17 PM
@sehe Bullets? Is that why the US always solves all the problems?
 
Interestingly, SE chat search failed to locate that keyword
@Zoidberg Faster than speed
 
user1804599
geenstijl.nl/mt/archieven/2016/04/… tooltip of the little article image
 
sigh. So stylist
 
user1804599
KeinStihl
 
user1804599
No chainsaw
 
11:19 PM
Surely they make more things
 
> Making your way in the world today takes everything you've got!
 
fingernails?
 
@Zoidberg do you know pony?
 
empty chocolate bar wrappers?
 
user1804599
@JohanLarsson no
 
11:23 PM
appendix?
 
all I'm saying is I can name a lot of things I have that I don't really see how they progress my way in the world.
I'm really amazed how many flags that has accumulated.
 
you need fingernails if you get chocolate on your keyboard
 
expired condoms?
that is a really depressing thing to possess.
how about 99 pictures and a bitch features prominently in all of them?
 
rödstick
 
11:31 PM
"Conquest" by White Stripes is one of the most disappointing songs ever.
 
are you sad tonight puppy?
 
nah
 
@Puppy That one is cute :3
 
 
 
11:34 PM
@JohanLarsson Just a smidge.
 
tomorrow will be a great day
 
what is your basis for that assertion?
 
just a feeling
 
Daisy is a bit of a sundog
 
@JohanLarsson You seem to often trust your feelings :p
 
11:37 PM
:)
I was looking at a summer house that will be on sale soon.
Looks like the price is going to be 2-3x my estimate
 
 
would have been a nice place for the dogs, just open the car doors on friday night and give them a shout on sunday night when going back home
 
Xeo
asdasfasjkgfl;as fuck.
Anybody got a nice lib for working with excel files in C#?
 
11:52 PM
no
 
wow, 8 flags?
 
what was flagged?
@Xeo have not used this but I remember someone mentioning it but don't remember if they said it was good or bad
 
Xeo
Yeah, I tried that.
13 mins ago, by Xeo
asdasfasjkgfl;as fuck.
That's where that stems from
 
@JohanLarsson It seems very nice
 
Xeo
11:59 PM
requires Access DB engine stuff or something to be installed (i.e. Office)
Yeah, the API looked really neat
but I want no dependencies on this little tool
 
what are you doing?
 
Xeo
just a little tool for personal use
 

« first day (2023 days earlier)      last day (2927 days later) »