Recent

Author Topic: IRC channel  (Read 2143 times)

KodeZwerg

  • Hero Member
  • *****
  • Posts: 531
  • Fifty shades of code.
    • Delphi & FreePascal
Re: IRC channel
« Reply #15 on: November 24, 2022, 01:36:45 pm »
Discord uses a lot of computer resources and I’ve had it max our my cpu before.
I just show you my current running Discord CPU usage. Its like 98% less than what you try to tell.
« Last Edit: Tomorrow at 31:76:97 by KodeZwerg »

Joanna

  • Full Member
  • ***
  • Posts: 142
Re: IRC channel
« Reply #16 on: November 24, 2022, 01:46:44 pm »
Hi KodeZwerg
I remember you in Irc back in 2019. It’s a shame you stopped coming.

There are ways to whitelist desirable people in irc and give them access to a channel. IRC gives the channel ops more control of channels than discord .

There is no shortage of trolls and spam bots in irc trying to herd us to other platforms where we can be monetized but there are ways to stop them.

I tried discord back when it first came out and hated it. It wouldn’t even let me control the appearance of the client. The client and web browser discord look equally horrible.  Discord wasn’t  designed to work on small monitors and doesn’t resize well.

I know you love discord but do you ever wonder why discord provides a free chat client without advertisements? How do they pay all the salaries of employees do you think? It’s a for profit company doing data mining on people who use it.

I’m not asking you do give up discord but you could also use irc too whenever you are around.
Come chat on IRC .. IRC.LIBERA.CHAT  Ports [6667 plaintext ] or [6697 secure] channels  #fpc #lazarus #pascal 
type /msg nickserv help register to get started

Joanna

  • Full Member
  • ***
  • Posts: 142
Re: IRC channel
« Reply #17 on: November 24, 2022, 01:49:44 pm »
I think it was some bug that made it max out my client. I was clicking around in the voice chats. I’m curious does discord demand a phone number now?
Come chat on IRC .. IRC.LIBERA.CHAT  Ports [6667 plaintext ] or [6697 secure] channels  #fpc #lazarus #pascal 
type /msg nickserv help register to get started

KodeZwerg

  • Hero Member
  • *****
  • Posts: 531
  • Fifty shades of code.
    • Delphi & FreePascal
Re: IRC channel
« Reply #18 on: November 24, 2022, 02:05:47 pm »
I think it was some bug that made it max out my client. I was clicking around in the voice chats. I’m curious does discord demand a phone number now?
Okay, I admit, when I click like crazy fast over all servers I am on, of course the CPU gets more heated up (25% would be max for updating stuff)
Running voice/video chat(s) will be than of course do some more additional payload your device.
When using client, a number is a must. Via Webbrowser you can also go anon online but most discord servers only accept registered users (your phone number) and very serious running servers wants you to do 2 step authentication (you need to transmit a code send to your email / phone or other 3rd party authentification app)
« Last Edit: Tomorrow at 31:76:97 by KodeZwerg »

KodeZwerg

  • Hero Member
  • *****
  • Posts: 531
  • Fifty shades of code.
    • Delphi & FreePascal
Re: IRC channel
« Reply #19 on: November 24, 2022, 02:58:27 pm »
Hi KodeZwerg
I remember you in Irc back in 2019. It’s a shame you stopped coming.
It was fun while I was there, agreed  :-*

Discord wasn’t  designed to work on small monitors and doesn’t resize well.
I actual can not really comment that since I use at my workstation a very large display and on my little mobile it scale wonderful.

I know you love discord but do you ever wonder why discord provides a free chat client without advertisements? How do they pay all the salaries of employees do you think? It’s a for profit company doing data mining on people who use it.

I’m not asking you do give up discord but you could also use irc too whenever you are around.
Love would be the wrong word, discord has more comfort to me.
No, I do not think about such, I just stupid use  %)
Also I do not think about what is happening with code that I share on this forum, I just enjoy using it  O:-)
I might pop up one day again on IRC, nobody knows what the future brings us  :P


I apology to everybody for that Discord vs IRC text and will stop now talking about   :-X
« Last Edit: Tomorrow at 31:76:97 by KodeZwerg »

Joanna

  • Full Member
  • ***
  • Posts: 142
Re: IRC channel
« Reply #20 on: November 24, 2022, 03:04:02 pm »
Quote
When using client, a number is a must. Via Webbrowser you can also go anon online but most discord servers only accept registered users (your phone number) and very serious running servers wants you to do 2 step authentication (you need to transmit a code send to your email / phone or other 3rd party authentification app)

That sounds horrible,  well it only reenforces my data mining theory. I want nothing to do with two factor authentication just to have a chat about pascal. People should not have to buy a cell phone and subscription just to be allowed to chat about pascal or anything else for that matter. When people have your cell phone number they can track everything you do potentially. That is completely unacceptable.  Can you even have a cell phone without government ID if not that is even worse. Government being the gate keeper of your being allowed onto social media is a slippery slope which leads nowhere good.
Come chat on IRC .. IRC.LIBERA.CHAT  Ports [6667 plaintext ] or [6697 secure] channels  #fpc #lazarus #pascal 
type /msg nickserv help register to get started

Joanna

  • Full Member
  • ***
  • Posts: 142
Re: IRC channel
« Reply #21 on: November 24, 2022, 03:09:27 pm »
I hope to see you again in irc. I remember when you suggested putting const on all my non changing parameters and it gave me a lot to do.
Come chat on IRC .. IRC.LIBERA.CHAT  Ports [6667 plaintext ] or [6697 secure] channels  #fpc #lazarus #pascal 
type /msg nickserv help register to get started

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 8449
  • Debugger - SynEdit - and more
    • wiki
Re: IRC channel
« Reply #22 on: November 24, 2022, 03:39:06 pm »
And going off topic again (sorry)...

I remember when you suggested putting const on all my non changing parameters and it gave me a lot to do.

Which btw, you don't blindly want to apply to managed types (ansistring, dyn array). They do save some time for those cases. But they can also lead to crashes, or unexpected results.

Code: Pascal  [Select][+][-]
  1. program Project1;
  2. {$mode objfpc}{$H+}
  3. uses SysUtils;
  4.  
  5. var s: Ansistring;
  6.  
  7. procedure Foo(const arg: Ansistring);
  8. begin
  9.   s := copy(inttostr(random(10)+10), 1, 1);
  10.   writeln(arg);
  11. end;
  12.  
  13. begin
  14.   s := copy(inttostr(random(10)+30), 1, 2);
  15.   writeln(s);
  16.   Foo(s);
  17.   readln;
  18. end.
  19.  

Depending on the settings you compile that with, it is highly likely that "writeln(arg);" does not print the same value as "writeln(s);" did (even so, you might expect it too).
In rare cases it may crash.

Note the "copy(inttostr..." that is needed so the compiler does not eval at compile time.

Joanna

  • Full Member
  • ***
  • Posts: 142
Re: IRC channel
« Reply #23 on: November 25, 2022, 01:23:45 am »
Hi Martin, I used the const for mostly simple things that were not supposed to change. I am not sure how the executable code is different with or without the const in parameter.

That was an interesting example. The const parameter probably keeps it from being changed inside of the procedure but of course since the const parameter references the variable that was changed it would have new value. This is probably why global variables should be avoided.
Come chat on IRC .. IRC.LIBERA.CHAT  Ports [6667 plaintext ] or [6697 secure] channels  #fpc #lazarus #pascal 
type /msg nickserv help register to get started

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 8449
  • Debugger - SynEdit - and more
    • wiki
Re: IRC channel
« Reply #24 on: November 25, 2022, 01:33:38 am »
See here: https://forum.lazarus.freepascal.org/index.php/topic,41857.msg291278.html#msg291278

A few other notes (those are compiler internals, that can change in future)
- const for integer may not do anything at all (other than giving you an error if you try to write to the param
- const allows large records to be passed as pointer to the callers data (since the data is not going to be changed / neither in the param, nor via a global var, nor otherwise)
  This saves copying the memory of the record
- const for strings (and dyn array / all managed ref counted types), allows to "not increase the ref count". That does save time. But it also means that other code doesn't know you have a copy of the string (and so if the string is modified, its memory can be reallocated and the param is invalid after that)


And your conclusion is (nearly) spot on
Quote
but of course since the const parameter references the variable that was changed it would have new value.
Since ansistrings are already pointers to the text, the param would be a copy of the pointer. So that copy in the param would not change. But the text to which is pointed was changed (it was moved elsewhere in mem).

Basically your ansistring was downgraded to pchar in the parameter.
« Last Edit: November 25, 2022, 01:37:02 am by Martin_fr »

Joanna

  • Full Member
  • ***
  • Posts: 142
Re: IRC channel
« Reply #25 on: November 25, 2022, 02:36:38 am »
The idea of using const to avoid copying the record seems good.
Although it seems slightly misleading being able to send a const record in which the fields inside the record can change?. I haven’t tried with records but object fields can change.
I’m curious if there is a way to prevent fields inside objects or records from changing in that situation..
Come chat on IRC .. IRC.LIBERA.CHAT  Ports [6667 plaintext ] or [6697 secure] channels  #fpc #lazarus #pascal 
type /msg nickserv help register to get started

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 8449
  • Debugger - SynEdit - and more
    • wiki
Re: IRC channel
« Reply #26 on: November 25, 2022, 05:24:54 am »
The idea of using const to avoid copying the record seems good.
Although it seems slightly misleading being able to send a const record in which the fields inside the record can change?. I haven’t tried with records but object fields can change.
I’m curious if there is a way to prevent fields inside objects or records from changing in that situation..

"object" => You mean instance of a "type TFoo = class" ? (Because there is "type TFoo = object" which is more record like).

Instances are accessed via a pointer. So const only stops you from assigning another instance.

Code: Pascal  [Select][+][-]
  1. type TFoo = class F1: integer; end;
  2. var a,b: TFoo;
  3. begin
  4.   a := TFoo.Create; // allocates mem for the instance, assigns a pointer to the mem to a
  5.   b := a; // assigns the pointer to b (a and b point to the same data)
  6.   b.F1 := 3; // also affects a.F1
  7.  

Code: Pascal  [Select][+][-]
  1. procedure bar(c: TFoo);
  2. begin
  3.   c.F1 := 11; // affects the callers instance too / only the pointer is passed in c - it points to the same memory
  4.   c := TFoo.create; // does not affect the caller // new memory, and pointer goes into c
  5. end;
  6.  
  7. procedure xyz(var c: TFoo);
  8. begin
  9.   c.F1 := 11; // affects the callers instance too // affects the data pointed to // does not affect the pointer in c
  10.   c := TFoo.create; // does ALSO affect the caller // because "c" is var. So modifying "c" also modifies the caller
  11. end;
  12.  
  13. procedure xyz(const c: TFoo);
  14. begin
  15.   c.F1 := 11; // affects the callers instance too // does not affect the pointer in c
  16.   c := TFoo.create; // ERROR: attempts to affect the pointer in "c"
  17. end;
  18.  
  19.  
  20. var a: TFoo;
  21. begin
  22.   bar(a);
  23.   xyz(a);
  24.  



trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1998
  • Former Delphi 1-7, 10.2 user
Re: IRC channel
« Reply #27 on: November 25, 2022, 07:43:59 am »
Quote
When using client, a number is a must. Via Webbrowser you can also go anon online but most discord servers only accept registered users (your phone number) and very serious running servers wants you to do 2 step authentication (you need to transmit a code send to your email / phone or other 3rd party authentification app)

That sounds horrible,  well it only reenforces my data mining theory. I want nothing to do with two factor authentication just to have a chat about pascal. People should not have to buy a cell phone and subscription just to be allowed to chat about pascal or anything else for that matter. When people have your cell phone number they can track everything you do potentially. That is completely unacceptable.  Can you even have a cell phone without government ID if not that is even worse. Government being the gate keeper of your being allowed onto social media is a slippery slope which leads nowhere good.

FWIW, I occasionally use Discord for an MMORPG and I've never provided anything other than a special purpose unique disposable email address with which to logon. Certainly no phone number or any other personally identifying information. ISTR they did check the email address could be verified by sending me a link which is fair enough.

Discord can data mine that all they want but they won't get anything from it :)
Lazarus 2.3, FPC 3.3.1 macOS 12.3.1 x86_64 Xcode 13.4
Lazarus 2.3, FPC 3.3.1 macOS 12.3.1 aarch64 Xcode 13.4

PierceNg

  • Full Member
  • ***
  • Posts: 223
Re: IRC channel
« Reply #28 on: November 25, 2022, 08:02:25 am »
FWIW, I occasionally use Discord for an MMORPG and I've never provided anything other than a special purpose unique disposable email address with which to logon. Certainly no phone number or any other personally identifying information. ISTR they did check the email address could be verified by sending me a link which is fair enough.

For at least a year if not longer, Discord did require mobile phone number to register. They wouldn't come right out to say that they want your phone number though. Instead, upon registering and verifying email, when trying to login, Discord kept telling "We've detected something out of the ordinary going on. To continue using Discord, we will need you to verify your account." And the single option presented is to verify by phone. They must've climbed down from this position since recently I could register using just email address.
« Last Edit: November 25, 2022, 08:05:37 am by PierceNg »

Joanna

  • Full Member
  • ***
  • Posts: 142
Re: IRC channel
« Reply #29 on: November 25, 2022, 02:46:58 pm »
Hi trev and pierceng
When governments and businesses start to tighten the noose they do it slowly. They kind of get people used to worse and worse demands gradually because people assume that things will stay as they are but things never stay as they are they always get worse.

Just because it’s currently possible to get by with a fake email doesn’t mean that someday you won’t need to have full government biometric ID and not be on a “naughty “ list to be able to use email.

I’ve seen how things transition from not much requiring government approval to just about everything requiring government approval. I’m not trying to vilify the government or big corporations , it’s people who thoughtlessly cooperate that are to blame.

Yes it’s true if enough people refuse to cooperate they would back down and get rid of restrictions but unfortunately people just keep cooperating when it’s really not in their best interest because “everyone else is doing it”

This I why I’m so desperate to save IRC. IRC is one if the few places left where people can get together and talk online with the channel owners being in control instead of a for profit corporation. It’s up to the irc channel  operator to decide what restrictions if any are on channel access. Sure it’s possible to demand people provide phone numbers and call them up everyday but it’s just as possible to create some secret obscure channel and meet there with no restrictions at all or have a public channel where strangers must be registered but friends are whitelisted and can always enter. You can have password protected channels that don’t require any registration also.
Come chat on IRC .. IRC.LIBERA.CHAT  Ports [6667 plaintext ] or [6697 secure] channels  #fpc #lazarus #pascal 
type /msg nickserv help register to get started

 

TinyPortal © 2005-2018