« first day (1746 days earlier)      last day (1746 days later) » 

7:26 AM
@hellow Is OP just looking for a BufReader ?
 
@DenysSéguret not sure, you may suggest it (or one of the hundred dups laying around ^^)
 
I'm not sure I get his intent
just like with the "lifetime" question... the MRE is too much minimal
 
 
2 hours later…
9:50 AM
@FrenchBoiethios :O
how dare you
 
@hellow Dare to?
 
answer a question which is obviously a dup ^^
 
Well, the answer is outdated in the dup.
 
I know, but unfortunately, I think that most of people will only read the first one and use unsafe :/
 
9:54 AM
@FrenchBoiethios well, that's the difference between a good programmer and a bad one ;)
 
What should I do?
Ok, I deleted it, but I'm pretty sure that the other question will harm some users
 
@FrenchBoiethios you could edit it and say, that as of Rust 1.xx there are other soultions, please look down
or something... dunno
aaand of course upvoting the best solution x)
 
Yes. The better would be the OP to mark the better as the answer
 
"Last seen 23 mins ago"
so he is active, try to ping him
 
Done :P
 
10:03 AM
lunch! (imagine turk meme here)
 
Hum... I was OK with frenchbioethios answer's which was better than forcing to read a mess of a QA
You have too much of a dupe phobia IMO
 
10:20 AM
@DenysSéguret That's why I asked to the OP to mark the "correctest" answer as accepted
 
I've seen your comment (and I have upvoted the right answer)
 
off-topic: sometimes, I have to mess-up with some CSS, and I just discovered flex. It can do basically everything. Don't overlook it.
 
The Flex model has been our savior since a few years. You should do everything with the flex model (and cry when your sales guy come back from the client with a contract precising that you must support IE)
Note that there's now the grid model, which is supposed to be better. I don't personally like it
 
Ok, I'm not the only one, then.
I saw that, but it's too complex for my usage
I want to create a personal site (just as yours) and I want it to be responsive.
 
My "personal site" is just a minimal page
I don't remember if it uses flex
 
10:26 AM
I didn't speak about your CSS but about my intent
I'm astonished. The CSS is so weird today
 
Use flex everywhere, that's so simpler
 
@media screen and (max-width: 50em) {
  *[role="banner"] h1 {
    /* ... */
  }
}
Isn't that crazy? ^
 
don't use stars as selectors, please
@FrenchBoiethios It's just very not efficient
 
Lol, if we get into the details, we shouldn't polute that chan
 
Most other chans are polluted (or rather flooded) with game and super nerd discussions... I prefer one which is more related to our job (no programmer can ignore the web)
 
10:30 AM
Well, this answer don't agree with you: stackoverflow.com/a/1714258/4498831
Apparently, the browser looks from right to left
 
It's not just the star, it's [role="banner"]: this means all nodes must be inspected. If you use just the star there's no question, but the star rarely comes alone
.role is very fast. *[node="banner"] is very very slow
(of course it doesn't matter for a static page with a few hundreds elements)
 
I'll use header[role="banner"] h1. Thanks for the tip
 
no, you'll use .banner h1
 
period! x)
 
@DenysSéguret That doesn't work, dot is to select a class, not a role
 
10:36 AM
yes. Give a class to your element, don't use an attribute
CSS engines are optimized for ids and classes
 
@DenysSéguret Huh, I don't like redundancy
 
There's no redundancy. Remove your attributes
 
They are useful :O
 
10:51 AM
@LukasKalbertodt I think actually that ! should implement ALL traits.
@Stargateur Turns out that a function CAN exist with an arg of type !. It just can't be called: play.rust-lang.org/…
I think my original idea will work if ! implements all traits (or just the Into).
 
11:04 AM
@PeterHall funny and strange and logic
 
11:16 AM
@PeterHall yeah but that still don't make sense to me to do that
 
11:26 AM
I will backtrack on ! implementing all traits. It obviously doesn't make sense when there are methods that do not mention Self. It only works for traits where every method takes self/&self/&mut self as an argument.
 
12:27 PM
@E_net4 Do you know that GATs are needed for async fns in traits?
That's very positive, given the hype around async/.await
 
And that would allow impl Trait in return position in traits.
 
12:44 PM
I'm always sad I can't use impl everywhere
 
Make some PR to Chalk to speed up the process
 
I just wanted to share the empowering last two days with you guys. Wednesday we had an awesome meetup about Rust in the evening, here in London, with the record amount of 186 (!) attendees. The talks were mostly very interesting, particularly the realisation, that if you look at the world wide Rust community and the new and fancy tools they are building -- you could feel the same empowering vibe as you could've a decade or so ago with the GNU projects.
And yesterday, we had our first Hack'n'Learn embedded Rust workshop held by the folks of the Ferrous Systems, with 30 attendees.
 
1:00 PM
Nice
 
@FrenchBoiethios Is that true? Intriguing.
Reading this real quick ...
 
@E_net4 Isn't that exciting?
 
@FrenchBoiethios GATs
 
1:17 PM
@Shepmaster is it possible to find serial number from cupid crate ?
 
1:35 PM
The CPUID instruction (identified by a CPUID opcode) is a processor supplementary instruction (its name derived from CPU IDentification) for the x86 architecture allowing software to discover details of the processor. It was introduced by Intel in 1993 when it introduced the Pentium and SL-enhanced 486 processors.A program can use the CPUID to determine processor type and whether features such as MMX/SSE are implemented. == History == Prior to the general availability of the CPUID instruction, programmers would write esoteric machine code which exploited minor differences in CPU behavior in order...
no, for obvious security problem
 
o_o
 
2:13 PM
The last question => why? -_-
 
"I've been learning Rust recently, coming from a C++ background and I prefer the syntax of calling functions rather than methods."
does he understand what C++ is ?
 
The different assertions have nothing to do with each other
 
Pretty sure C++ requires member functions to be called with the x.foo() syntax anyway.
So has the OP been just creating functions with a known receiver, yet not made into member functions?
 
@E_net4 no you can do a lot of thing with method address
 
@Stargateur Hmm, method addresses. That's one whole other beast. :(
 
2:20 PM
@E_net4 until they accept the UFCS :P
 
@PeterVaro Ah, just like what all cool and un-cool languages have.
 
@E_net4 /OFF oh hey, nice avatar change! /ON
 
I wouldn't say that the question itself is bad, but the reasons the OP give are so stupid -_-
 
@PeterVaro Probably temporary though. ;)
 
are you camera shy too?
 
2:23 PM
@PeterVaro this was one of its ancient avatar
 
@FrenchBoiethios Pretty much. It's yet another attempt to use idioms from other languages into a new one.
 
really? oh well..
 
@PeterVaro I used to be extremely camera shy. I don't say I am that much these days.
 
I'm sure he will manage a mcve one day
so close !
DID IT
 
@E_net4 I prefer representing myself with drawings I create of myself. The last iteration is this ASCII thing you can see here.
I'm still not comfortable being on the wrong side of the camera
 
2:25 PM
@PeterVaro Yep, that's creative and gives you the power of selective obfuscation. :)
 
Why is there no Iterator::zip_map?
 
@FrenchBoiethios what benefice ?
 
@FrenchBoiethios Is that a map after a zip? Or two maps before a zip?
 
O.
 
2:40 PM
zip_with would be a better name, right
 
Indeed.
 
that indeed nothing to do with map
 
That's conceptually a zip followed by a map, hence my first naming...
 
3:03 PM
@Stargateur Itertools doesn't have that method.
 
I'm confuse now
 
Why?
Whatever, I'd prefer: a.zip_with(b, |a, b| a + b) over a.zip(b).map(|(a, b)| a + b)
 
second is way more generic
 
And?
fold is more generic than sum, but you like to use sum anyway
 
yes but your code is not shorter
 
3:28 PM
Your code looks fine and such a bug in std.net would be strange. Browsers, though, have a limited number of network threads. Are you sure the limit you observed wasn't the browser's one ? A browser doesn't seem to be the best solution to benchmark server parallelism. — Denys Séguret 1 min ago
There's no real MRE if the code to test isn't existing
 
I wonder why people upvote the question
and I prefer my comment than yours much more shorter :p
 
Yes but I gave a very probable explanation of how he messed up
 
yeah the test method is broken
on an other note as the are probably one of the most experimented here @DenysSéguret what do you think in short of microservice ? I try to understand what it is, get quite dissapointed about people who just discover to split thing :p but anyway I agree with the general philosophie but I wonder if this doesn't add a lot of overhead (too much ?) and I wonder if this doesn't slow down a little the dev in the early stage.
 
3:46 PM
Splitting a applications into micro-services, focusing on the exchange and protocols, all this make a project more manageable and often easier to extend and refactor. But there's no magic. Of course it's heavier, often slower, and when badly managed can be a futile exercise in administration. Some technologies often linked to micro-services are very useful though even if you don't go til the "micro" level.
 
yeah micro is a big exaggeration if I understand well
 
Some people think they should aim for micro
I've seen projects where all the energy was spent on things which wouldn't exist with some macro modules or with a monolyth
Like in some companies there are whole teams dedicated to normalization of API and they watch the gate and prevent anything new to happen
 
I think the best is a balance between the need to split up a big api and the need to not split too much, this is what I do most of the time when dev my personal architecture but I do/think for a friend he ask to take a look at microservice to make my design
 
well actually in practice there are other advantages: you could use whatever technology/language you like in each of the services -- they just have to agree on the protocol/interface they use for communication and that's that
also on modern scalable architecture this internal communication overhead is almost negligable
 
@PeterVaro yes, this is where good protocols are a big gain
 
3:51 PM
@PeterVaro this advantage make me really happy because I would like we use some rust but I don't want crash the society because we try rust so have one service build in rust like authentification could be a perfect R&D
 
@PeterVaro hu... depends. People often forget and don't realize the gigantic amount of work they dedicate to the communication bus just to make systems work
 
@DenysSéguret This is what I worry about
 
It's always a question of balance
And of course... there are buzzwords for old things, and new interesting technologies
 
specially the sync between the same service, I see you can scale it "easily" I don't agree at all about easily, imagine the same request is made in the same time but the system give to two duplicate service, how do you handle the sync.
 
Be careful when the technologies come to free you but in reality add more constraints, like about everything generating code or introducing a tool chain
@Stargateur You're quite fuzzy here.
Are you talking of having two workers dedicated to a work queue ?
 
3:56 PM
well, the problem of sync would be the same with monolitic, if you just duplicate the application you need to be sure the operation are sync. But as people claim microservice as easily scalable I expect they have a special way but... no. So far I didn't found any magic way.
 
If so there are solutions. I use the capabilities of redis to implement reliable work stealing for example (github.com/Canop/resc)
 
for exemple how do you sync the two duplicate service here ?
 
@Stargateur that's most of the startups in London do -- which I'm aware of and using Rust
 
You must realize that there are dozens of types of problems in sync. Like id generation, work stealing, etc. But you have often no choice if you want to scale
 
first they start with a not so important service and implement it in Rust
 
3:58 PM
I'm replacing the distributed scheduling of the application I make for metallurgy company with most essentially my redis/rust thing
 
@DenysSéguret that is true, it really does depend on the scale and the amount of work
 
@PeterVaro thank you that will be use to convince my friend :p
@DenysSéguret yes ofc, so my question how ? :p there are tons of potentiel problem by just saying "duplicate service see this is scalable !".
In final I will just end up doing thing like I always do. Think and find an appropriate solution, instead of just following a design pattern. I getting really disapionted, every time I try to be "mainstream" and look for pattern I never understand how people do to follow them.
 
Yes there are problems... but microservice doesn't imply scaling, sync or duplication. Those are different problems. You can have microservices with just one instance of a worker
 
yeah that just about splitting a big API into smaller API so ?
 
normalizing the exchanges too (Rest, graphql, more trendy things, etc.).
 
4:04 PM
it goes without saying
 
But of course that's not a revolution, more like the set of technologies which people use when they speak of microservices are more modern and better...
 
thanks for your help
and BTW, if anybody want to know I based my opinion on martinfowler.com/articles/… and dzone.com/articles/microservices-in-practice-1
 
4:16 PM
@Stargateur your answer might be better than mine. Except it's not an answer but a comment. Maybe make it a real answer ?
I'm probably dense (and cooked) but I don't think the linked QA really well applies, here.
 
@DenysSéguret well, no, I found your answer clever too, I didn't even look to fix it as you did, I directly focus all generic :p. But don't you think the duplicate is correct ? well maybe not, but the answer in the duplicate show how to use into_iter in a generic.
well let's go to make an answer too
I didn't find better duplicate anyway
 
I'd still use my answer, because it's simple enough for me. But yours is objectively better. +1 :)
 
4:45 PM
@DenysSéguret haha I still you the accepted points xd
 
damn :)
I think my answer is useful because it explains the problem OP had. But I maintain yours is better
 
well your code could use into_iter() and the original code will compile :p
no need mut :p
but yeah the problem is about &S
 
ProgrammerHumor isn't a sane place. It's the worst of reddit, where BS and attitude commands everything...
 
5:00 PM
I randomly see it ^^
I can't believe people think arc is expensive
they just don't know what there are talking about
 
 
1 hour later…
6:19 PM
so? it's a bug!
pff I give up
 
 
2 hours later…
7:58 PM
I'm trying to store a io::Error in an enums assosiated value but the compiler yells because io::Error doesn't implement Clone. So why is this exactly what the documentation for From does? doc.rust-lang.org/std/convert/trait.From.html If you run this, it compiles and runs aswell. I'm confused
 
 
1 hour later…
9:09 PM
@PeterHall Default is a classical example of a trait that should not be implemented by !. So mh. As already said, ! can implement traits if they only contain methods that take a Self value as argument (potentially via reference). Because then we know the method will never be called. But once the trait has associated types or consts or methods not getting Self as argument, we cannot implement the trait for !.
 
 
2 hours later…
10:48 PM
that was a stupid question, nvm
:D
 

« first day (1746 days earlier)      last day (1746 days later) »