SafeChat now Online! :D (shared acc - POC)

okay … what comes now might be a strange proposal … BUT

i couldn’t resist and used @anon71598723 s ruby library to create a safenet-chat (please don’t beat me - i know it is not a very beautiful piece of code … but it seems to me it works xD …

INSTRUCTIONS:

log into your launcher with:
PIN: 1234
Keyword: 123asd
Password: 123asd

go to “your” private folder and download the crappysafechat.rb
(check
if the md5sum is 3a36e3a210647566af65d3219384ec20 with second version xD if you want to be
sure you don’t get a virus but don’t want to see my horrible code)

and run “ruby crappysafechat.rb”
[important - you have to be logged in the fake-user i created above]

SEE YOU IN OUR BELOVED SAFENET

ps: what i did to get it running:
gem install ruby-safenet
gem install rbnacl-libsodium
gem install timeout

EDIT:
okay - everything seems to be alright again Oo something strange happened 1 min ago oO

18 Likes

Good to see an interactive app for the safe network. How does this work internally? Does it use the safe messaging system (mpid messaging)?

1 Like

xD uhm - i’m no programmer - just a crazy guy … so it works as simple as possible … xD

there is a “crappychat”-folder and every message is a file being created - i sort the files by date output their names as “messages”
that’s the reason everybody has to be logged in into the same account to be able to start chatting Oo

3 Likes

mmmm

/usr/local/share/gems/gems/ruby-safenet-0.0.5/lib/safenet.rb:86:in initialize': Permission denied @ rb_sysopen - /usr/local/share/gems/gems/ruby-safenet-0.0.5/lib/conf.json (Errno::EACCES) from /usr/local/share/gems/gems/ruby-safenet-0.0.5/lib/safenet.rb:86:in open’
from /usr/local/share/gems/gems/ruby-safenet-0.0.5/lib/safenet.rb:86:in auth' from /usr/local/share/gems/gems/ruby-safenet-0.0.5/lib/safenet.rb:467:in get_valid_token’
from /usr/local/share/gems/gems/ruby-safenet-0.0.5/lib/safenet.rb:170:in get_directory' from crappysafechat.rb:16:in

1 Like

you might have to cd → /usr/local/share/ and sudo chown -R nice gems

this worked for me

If you establish one or more nodes as a chat group, you don’t need to share the same account. The clients can just look up if/what the other group members have posted, e.g. cycle through the list of accounts domains which are registered and check for the posts against a defined path, e.g.

chat.traktion.safenet/conversation_hash/message.yml

You could extend it beyond personal conversations and have various registered lists (known, friends, blocked) and use these to decide whether you want to see posts from others. These lists could also be shared, to allow others to follow you (endorsement/moderation) patterns.

To enter a group, you would have to convince an existing group member to add you to their known list, which could propagate to others.

I am sure there would be better ways to do the above and ideally you would want to use built in managing for subscription/announcements of posts, etc. This was something I was pondering though.

3 Likes

oh i’m sure there are way better ways to do this … but i’m sorry to tell you i don’t plan to enhance this chat any further (everybody who wants to should feel invited to do so - i’d love to see a better chat inside safe! :smiley: ) … i shouldn’t even have programmed this piece of code … -.-" … no time for the next weeks … it was just too tempting to have a really simple chat and maybe get the idea out there what is possible on safenet …
[i didn’t write a singled peace of code in ruby all my live → 5 hours before Now ]

2 Likes

No worries! I known what you mean about not having time! Just thought I would share something I was chewing over the last few days for a simple, distributed, app where you can share/collate data.

1 Like

yes maybe helps others =)

I don’t think one should chown anything inside /usr/local - this is root’s garden.

Instead install the gems as a regular user, and launch crappychat under that same user.

but, this being said,

IT WORKS :fireworks:

who comes party with us inside the FIRST SAFE CHAT EVER ?

1 Like

yeah - as i said :smiley: … i’m no programmer - and i’m not an experienced linux user either :smiley: … ok next time i’ll install it not as root! :smiley:

10 Likes

and now keep in mind it was just a crazy person who did this …

…i’d have no clue where to start if i’d try to create a dapp for ethereum Oo …
So Easy … 5 hours! from nothing (not even knowledge about the programming language) to a crappy chat xD

8 Likes

EPIC MOMENT folks,

we just had the first chat over Safenet ever :slight_smile:

Thank you riddim for this ! I suppose some mod should have you a medal a badge or something for this

15 Likes

I don’t think we can award badges - that’s done by the discourse software, but I have added SafeChat to the SAFE APIs library post started by @anon71598723

2 Likes

:smiley: the badge should go to @anon71598723 or @wumpus anyway … :wink: i first tried to get somewhere with python and wumpus’ wrapper (but installing libsodium the right way was over my head :rolling_eyes: … embarrassing i know … but then i thought if i am too stupid for it i maybe should just try it differently … and since @Tim87 liked ruby i thought i’t test that )

2 Likes

This amazing Crapplication deserves its own crAppStore!! :stuck_out_tongue:

But seriously, Great job here, I’ll add it to the potential app site for publicity!

3 Likes

thx :smiley: - yes we could create a crappy-apps bundle when there are more crapplications out there xD

1 Like

Decentralised Crapplications, mind you.

Have you heard of Sh*tCoin? Might be a relevant currency here!

Ok OK enough jokes :stuck_out_tongue: :stuck_out_tongue:

1 Like

Thats so fucking awesome dude well done mate!

2 Likes