« first day (2242 days earlier)      last day (1230 days later) » 

2:41 AM
@Jason having little context in these specifics, I’ll point out that big O notation ignores the constants. In some cases those matter.
 
 
3 hours later…
5:17 AM
uhoh thread 'main' has overflowed its stack
 
 
4 hours later…
9:31 AM
@Shepmaster Who's that E_ENET$ character?
 
9:48 AM
@Shepmaster Yes, I'm still somewhat scratching my head over it. The suggestion I submitted with the help of @Stargateur was a Vec backed by a HashMap for constant lookup and push, but the user also wanted arbitrary insertion by index in logarithmic time. A Vec's insert wouldn't be able to do so as far as I'm aware as it'd be constant time having to shift elements around?
The user posted a link to a data structure that basically is a self-balancing tree with relative indices. It's also backed by a hashmap for looking up the element associated with a given index, which I think it then uses to traverse the tree and find the associated element's value.
So the Vec we suggested is replaced by a custom tree implementation to speed up search, if I understood what the user meant.
 
user13415013
10:24 AM
Hi guys, I've a dumb question
 
user13415013
I've a rust code and i am going to convert to any other like python or c++.
What should i consider?
 
@nerd Is my understanding correct in that you are going to convert code from Rust to Python or C++?
 
user13415013
yes, this code github.com/dgraham/identicon as my project :)
 
user13415013
I've found he have used couple of libraries
image::ColorType,
openssl::crypto::hash::Hasher
image::png::PngEncoder

and looking if python have built into , but afraid they have not.
 
@nerd What do you want to achieve by rewriting it? :-)
 
user13415013
10:31 AM
:-} because to extend knowedge how it works
Also to show some employers as project :D so.
 
@nerd Ah, it's someone else's project and you want to convert this to a language you are familiar with, i.e. C++ or Python?
 
user13415013
I am quite familiat to python but not rust.
 
user13415013
That code is identicon generation of current official github algorithm.
 
At a quick glance it seems it generates an MD5 hash based on input (perhaps a username?) and it uses the bytes from that hash to create a unique identicon.
I'm not that familiar with C++ or Python, but my guess would be that this might be the easiest to do with Python given its dependency management and ecosystem.
 
user13415013
Thank you :} I am searching for those rust imports and looking alternatives in python.
 
user13415013
10:43 AM
bye guys, I should ask to python groups about these . Thank you
 
Ok! Good luck :-)
@nerd, I'd start with taking input (stdin) and generating a hash based on that.
 
11:26 AM
-1
Q: List with O(log n) indexOf operation

MaxI'm looking for a data structure that can store a list of elements, while also enabling sub-O(n) lookup of the index given an element and element given an index, as well as insertion at an index. Elements are dense (integers 0..n) and unique, but unsorted. For example, in Rust this data structure...

 
@Stargateur Why did it need your last edit? XP
 
Spicy.
Editing is a form of communication. Let's hope it does not escalate.
 
11:54 AM
@PeterVaro personnal attack
I was tired of this shit
 
not even mention that people upvote a answer that doesn't answer the question tagged Rust, include personal attack, include no proof
 
@Stargateur I actually wonder why some of those comments were removed while yours were.
I mean, they are also not very friendly, and with your own comments gone, they were out of context.
 
12:13 PM
@Stargateur I was aware of the question, I meant I don’t know the specific runtime characteristics of the types being discussed.
 
@Stargateur Putting the topic with its negativity aside, I think the algorithm is quite interesting!
 
@E_net4thecurator I remove my own comment
As I said, I out of the question
 
@Stargateur You can NLN-flag the other comments in most of those cases.
 
@E_net4thecurator I have so much better thing to do of my time
 
It's just a few seconds to flag a comment.
 
12:42 PM
More GAT activity.
 
1:13 PM
@E_net4thecurator ?
 
1:40 PM
afternoon
 
Good afternoon :-)
 
 
2 hours later…
4:09 PM
@E_net4thecurator mfw smh
 
@Shepmaster tfitestm
 
 
2 hours later…
6:27 PM
1
Q: How do I `connect` an UDP socket and let the OS choose the port and address

kmkaplanI want to send an UDP query to a server and receive it's response. In C it is: call socket then connect then write then read. The operating system takes care of choosing a suitable local IP address and port to use. I'm trying to do the same in Rust. But I can not find a way to get a UdpSocket wit...

people who doesn't know socket and upvote that
grrrrr
 

« first day (2242 days earlier)      last day (1230 days later) »