« first day (4479 days earlier)      last day (662 days later) » 
00:00 - 17:0017:00 - 00:00

17:06
progress is being made
Wow that's fast
it doesn't do anything, but it sure does look pretty
It really does, what UI library are you using?
made by the same people that made Rich
So this will be a offline app that you need to download?
17:09
yus
should just be a pip install crosstalk
(although I hear the Textual devs are planning on PyOdide compatibility...)
You'd need to handle CORS somehow though
eh, that's a later thing
17:36
YOOOOOOO
authentication worked!
much pog
17:49
@Ginger wait remind me that TUI stands for
@Seggan Terminal UI
Hrm but that’s a GUI, no?
nope! it's all in the terminal
in The Sand Trap, Apr 20 at 20:48, by Ginger
wait, you thought about CORS before having issues with it???
@Ginger …
how
magic™
17:52
You always need to worry about CORS
@mousetail yew is a web framework tho
Depends how you do the UI I guess, if you want to host it online you could use a yew frontend
Also, one guy in the papermc discord uses discord through IRC, that could be an option
You gotta hurry up if you want to catch up to Ginger though whatever tech you choose to use
I haven’t started tho
i will within the hour tho
@mousetail also, I’ve never dealt with threads in rust, so it’s def gonna take longer
18:05
You don't need to deal with them directly tokio should handle them for you
Never dealt with tokio either
I haven’t done much in rust
Well this will be a good leaning excercise then, if you succeed you'll know a lot of rust
I know enough of the core language, it’s the libraries I don’t know
in fact, techecally I barely learned any rust at all, I just applied my knowledge of other langs to it
The ecosystem really brings the language together into something that can actually be used for real world problems
This applies to every language
You'll also need tungstenite to connect to the websocket
That’s one I haven’t heard of
18:20
It's a pun. Websockets are often abbreviated as WS and the chemical formula for tungstenite is WS2 so that's why they named that library that way. It's the only tokio compatible webocket library I'm aware of
18:38
progress has been made:
still needs some work tho
That's very impressive
For just 3 hours
it's 132 lines lol
a testament to the ease-of-use of the libraries I'm using
Less code is better
I'm not sure how to handle separating blocks of messages by user...
Not only did you get it working fast you golfed it too
18:41
lol
ugh, I'm supposed to be doing actual productive work rn :/
It's friday
No productivity allowed on fridays
if only
18:53
@mousetail the motto of our site
My motto in real life too
@mousetail wrong: no productivity allowed on saturdays
@mousetail i think for everyone lol
I'm in heaven when I see a PR with more deletions than additions
Instant approve, I don't even look
@Ginger mind if i dig through sechat? i have no idea how se auth works
sure, it's open-source so it's not like I can stop you :p
good luck tho
18:59
@Ginger i meant that as more in "i hope you dont mind me violating your license if i copy something by accident"
hmmmmmm
well, sechat doesn't currently have a license
I may or may not have forgor to add one lol
You should probably add a licence
that makes it all rights reserved then
@Seggan I hereby license sechat's auth code to you for your use in this project, with the stipulation that you have to credit me
I'll add an actual license later™
:thumbsup:
19:01
noice
now back to banging my head against rich
Your chat app should definatly support emojis with the :x: syntax
yes i am planning to do that lol
Awesome
augh
now i am debating whether to go full hardcore lightweight and use a tui or make an actual gui
19:04
:|
in the interest of time, ill be using a tui
oh my god
the app supports emojis and I didn't even have to do anything
get dunked on
lol
but if it supports that why doesn't it support Rules
whats that
19:16
Does it support markdown syntax?
@mousetail no, sadly
@Seggan part of rich
If you're going to be doing experimenting with bots or similar, please do it in the Sandbox
Kosova (Arnavutça: Kosovë, Sırpça: Косово) veya resmî adıyla Kosova Cumhuriyeti (Arnavutça: Republika e Kosovës, Sırpça: Република Косово / Republika Kosovo), Balkanlar'da bulunan ve dünyada sınırlı tanınırlığa sahip denize kıyısı olmayan bir ülke. Kuzeyde ve doğuda Sırbistan, güneyde Kuzey Makedonya ve Arnavutluk, batıda ise Karadağ ile komşudur. 1999'da Birleşmiş Milletler kontrolü altına alınan Kosova, 2008'de Sırbistan'dan tek taraflı olarak bağımsızlığını ilan etti. Mart 2020 itibarıyla 97 ülke tarafından tanınmaktadır. Kosova'nın bağımsızlığını tanımayan Sırbistan, bölgeyi kendisine bağlı...
Does oneboxing work?
Probably move this convo to sandbox yea
turns out you can add a email/passwd login as well as google auth at the same time
indeed
19:30
@Ginger satisfactory enough?
/*
 All code in this module derived from github.com/GingerIndustries/sechat has been explicitly
 allowed by the author to be used in this project: chat.stackexchange.com/transcript/message/63516626#63516626
 The credit for all such code is attributed to the author of the above repository.
 */
yus
HAHA FINALLY
20:07
@Ginger with regards to this:
      r = self.session.post(
        "https://{}/users/login-or-signup/validation/track".format(host),
        data = {
          "email": email,
          "password": password,
          "fkey": fkey,
          "isSignup": "false",
          "isLogin": "true",
          "isPassword": "false",
          "isAddLogin": "false",
          "hasCaptcha": "false",
          "ssrc": "head",
          "submitButton": "Log in"
        }
data is a json body, right?
I don't think so
I'm pretty sure that's supposed to be form-encoded data
ah wait yes
(also make sure you're looking at the v2 branch)
coulda told me earlier
 
1 hour later…
21:14
is there a challenge for "check if an item is included in an array"? i have a clever idea for doing it in a language
21:43
@Jacob Better to replace "an array" by "a sequential container".
'Cause some languages, Haskell for example, would have a hard time representing an array.
@mousetail Fun fact: Kosovo is the only unrecognized state that is recognized by South Korean goverernment.
im rather enjoying rust's ? operator
I wish I could use Rust's ? operator for arbitrary monads.
That would let me concat-map lists, compose functions, write on a monoid, and so many more.
22:01
i love how it can map errors for me
It doesn't "map" errors tho; it propagates errors.
@Seggan What does it actually do?
propagates errors upward, while returning the result if ok
so like how Java etc handle errors by default?
22:18
Dunno about Java, but I'd say it's like how Haskell handles errors.
Monads ftw
I don't know Haskell, I've only really used C-family languages and a little bit of assembly
I was a C++ simp and learning Haskell changed a major part of my life.
Hope everyone will be empowered like that.
I much prefer functional interfaces built in C-family languages like Swift's Sequence family of protocols
@Bbrk24 pretty much, but rusts errors are the returning kind
22:34
so it’s standard to use Result instead of throw? makes sense, I tend to prefer Result-like enums
@DannyuNDos i wasn't suggesting that i would post it, just asking if it existed
@Bbrk24 there is no throw in rust, only panic
make custom throw/catch macros using setjmp and longjmp
I have a more serious note about ObjC error handling but I don’t want to type it on my phone
23:05
@Seggan Tho ? is similar to throw in how you use it
It’s more like get or throw
23:26
So Objective-C had the concept of errors and exceptions. Errors are represented by NSError and its subclasses; exceptions are represented by NSException and its subclasses. Typical errors, such as the equivalent to C# InvalidArgumentException, are represented by a trailing out-param error:(NSError **)error. (If you want to be pedantic, the type should be out NSError *__autoreleasing _Nullable *_Nullable. But I digress.)
Unrecoverable conditions, such as calling a method that doesn't exist or receiving ^C from the user, are represented with exceptions. Exceptions can be thrown with the @throw compiler directive or the [-raise] method; the two are equivalent. NSExceptions can be caught with @try/@catch, but this is generally discouraged. The most common use case for @catch is something like this:
@try {
  doSomething();
}
@catch(NSException *anException) {
  NSException *myException = [[MyException alloc] initWithName:@"MyExceptionName"
                                                        reason:@"Exception thrown by doSomething"
                                                      userInfo:[NSDictionary dictionaryWithObject:anException
                                                                                           forKey:NSUnderlyingErrorKey]]];
  [myException raise];
}
Or so I've heard. I tend to avoid Objective-C when I get the choice
</textwall>
@RydwolfPrograms i need ur rust expertise
i have this code:
let room = Room::new(...);
self.rooms.insert(room_id, room);
return Ok(self.rooms.get(&room_id).unwrap());
the function returns a Result<&Room, SeError>
is there a way i can get (and return) a reference to room without having to pull it out of the HashMap again?
Does &room still work?
If not I'd guess probably not
@RydwolfPrograms nope
room is moved into the hashmap
Does the insert return anything?
There might be a way to insert it that returns a reference to the entry?
Not familiar with Rust, but in C++ it returns a reference to the key-value pair, yeah
23:37
@RydwolfPrograms Option<Room>
The C++ one returns a std::pair<const KeyType, ValueType>&, iirc
@Seggan That's what the insert returns?
If so you can just .as_ref().unwrap() that right
ah never knew about as_ref()
ty
ah wait nvm
cannot return value referencing temporary value
insert returns the previous value it looks like
and None if the key is new
which is logical but makes this more difficult
I suppose you could insert and then immediately get but there has to be a simpler way
yeah thats what im doing
23:45
C++ also has a number of almost-identical functions with slightly different semantics iirc, like insert vs emplace
0
A: "Hello, World!"

Olivier GrégoireJava, 47 bytes void main(){System.out.print("Hello, World!");} This uses JEP 445: Unnamed Classes and Instance Main Methods which is released in Java 21 as a preview. With the preview JDK, run like this: java --source 21 --enable-preview Main.java

@Seggan stupid question: if you retrieve &room before calling insert, does the insertion still invalidate it?
nope bc its borrowed
I was just thinking that if “move” typically means just handing off ownership of a pointer without actually moving data, a reference to the object — which is really just a pointer with extra steps — wouldn’t necessarily be invalidated.
00:00 - 17:0017:00 - 00:00

« first day (4479 days earlier)      last day (662 days later) »