« first day (3143 days earlier)      last day (2022 days later) » 

00:00
Houston, Tranquillity Base here. The Eagle has landed. -- Neil Armstrong (source)
 
4 hours later…
03:38
dreams of electric sheep
 
2 hours later…
06:07
Good Morning
Good morning.
@OakBot how are you kid???
@Simmant Type /help to see all my commands.
06:38
Hi All, very good monring
I have a question related enum.. can we define enum something like that ..
enum Test{
STUDENT1(new Student("Test", 1)), STUDENT2(new Student("Test2", 2));
}
07:33
@mobizen Yes, you can. enums can have constructors too :)
Yup, you can by the blessings of constructors :)
08:07
/fatcat
/cat
08:23
@mobizen
public enum Test
{
	Student1(new Student("Test1", 1)),
	Student2(new Student("Test2", 2)),;

	private final Student student;

	Test(Student student)
	{
		this.student = student;
	}

	public Student getStudent()
	{
		return student;
	}
}
like that
(keep in mind, enums should be effectively immutable, so the student class should also be immutable)
("should" is still very important)
Zoe
Zoe
08:52
ooh, that's pretty cool
Have any of you people ever been using your computer in the middle of the night, see something out of the corner of your eye, and find an ant crawling up the wall?
hey all, been some time
@JennaSloan ok, you need to sleep
but before you do, maybe you can help me out with something
I'm browsing for a new laptop, and this came up: alza.sk/EN/…
I've had this for about 2yrs: alza.sk/EN/dell-vostro-5568-gray-d5447774.htm
reason I'm changing is that I've abused the casing by dropping the bag plenty of times, and I'm pretty lucky things never broke too badly
@towc but my computer is not near a window or door, and the floor in that room is carpet, so how'd the ant get on the wall?
I can't tell if there's anything worse with the first link compared to the one I currently have
@JennaSloan ok, I'll fix your mistery first
there's an ant colony in your lungs
sometimes some get lost and go out through your orifices
and end up on walls
I hope that answers your question
No, I don't think so.
This ant was eye-level
Zoe
Zoe
09:00
@JennaSloan Crept in while a door/window was open?
maybe was on some clothes and you carried them near your laptop?
Zoe
Zoe
Unless you have a sealed house with a decontamination entrance, there's several ways for it to get in
@Zoe Maybe, but I suspect it came in on someone's clothes.
Zoe
Zoe
There you go
Problem solved
so, the first laptop doesn't have a fingerprint reader, but I didn't use that anyway
but apparently it has a card reader?
never heard of that on a laptop
might be useful
09:04
I have a HP laptop
It has both a fingerprint reader and a card reader
then I don't like metal colors, I prefer matted
but at least it's not pink/red/blue
Zoe
Zoe
Pink/red ftw
I was gifted a red laptop once
Would you prefer a more manly shade, like purple?
the specs were fantastic, but gosh I hated the color
it was shiny red too
@JennaSloan perl or bust
nah, I'm a fan of things that don't catch the eye
so black/grey, but not shiny
09:07
How bout a Mac?
part of my job is doing linux stuff
(and I like linux stuff)
So use a virtual machine
really?
you're a java dev, ofc you'd say that
I can get a virtual machine for nearly every operating system family.
I'm the kind of person that uses vim because they find the delay of almost anything else really annoying
Zoe
Zoe
09:12
Yes, and you can also get a better OS. Problem solved without virtualization
@towc Vim <3
^^ ^
I see it's grown on you :D
ok, after more googling it sounds like a really nice machine
but the color
@Zoe You can't really have 3 operating systems running at the same time on the same computer though.
@JennaSloan I only need 1
oh wait
@towc For now maybe...
Zoe
Zoe
@JennaSloan No, but you can have one low-memory use one to be able to run three different ones at the same time
09:13
can you have 2 at the same time?
Zoe
Zoe
@towc You can only have one without virtualization
Emphasis on running - not installed
that's what I thought
which is why I was confused by 3
Zoe
Zoe
@towc Yeah ^^ Started with gVim to improve the experience on Windows, throw in language server integration, and it's quite honestly the best editor I have ever used. Extremely light-weight for all the features - literally 10-30 times less than VS Code (300 MB at boot, usually gets up to 600-900 at runtime)
yay
oh, that's a lot more than what I get, I think
it's probably the language server on a huge codebase, right?
Zoe
Zoe
No, it's on a growing code base with the same dependencies and an increasing amount of code
09:16
ok, interesting
what language?
Zoe
Zoe
C++
It's possible to use virtual machines to emulate Windows, MacOS, and Linux, in separate windows at the same time.
oh
Zoe
Zoe
if you're interested, it's autozimu/LanguageClient-neovim, in combination with maralla/completor.vim
It also replaces ALE, but I haven't bothered removing the dependency yet
wait, so you're using neovim?
and I love ale :/
Zoe
Zoe
09:18
@towc Vim 8 supports a lot of the neovim plugins
As long as you have python 3 and timers, you can run a lot of the neovim stuff
@towc ALE fails to find my files
My dependency system is... well, messy to say the least
your mom fails to find your files
also, huh, never happened to me
Zoe
Zoe
@towc That's called password protection, not a problem ;P
I see
Zoe
Zoe
@towc I need clangd integration
Those config files are much better to deal with
what are you working on anyway?
Zoe
Zoe
09:21
This is what I mean by messy (blame Boost)
@Zoe What's it do?
Zoe
Zoe
@JennaSloan Right now it just gets comments. It's supposed to do everything the SE API supports though
@towc besides, I couldn't find out how to properly configure ALE with clangd/jedi
ok, fair
ale/jedi works well for me
but never tried an advanced c++ setup
Zoe
Zoe
Yeah. The dependencies are the part that breaks it, along with project structure
Zoe
Zoe
09:27
Locally, it's even more messy with a test app as an excluded folder (because it's not meant for anything but local testing)
@JennaSloan Meh, I don't really like that one. It's also a PITA to integrate into a different project using SCons
¯\_(ツ)_/¯
Zoe
Zoe
The docs are also terrible, and I can't stand snake_case.
I've grown to love it
I accidentally start using it in my js sometimes
one of the reasons is precisely how easy they are to manipulate with vim
snake_case is also used in PHP
but I'm getting more interested in whatever.this.is
Zoe
Zoe
09:31
Does ale support renaming?
apparently in R dots are just characters you can use in variable names
Zoe
Zoe
@towc So you can make names in morse code? xD
(while getting a property is done with x$y or x['y'] or x[['y']])
@Zoe well, dashes aren't allowed
oh, but underscores are
Zoe
Zoe
No, but you can replace-... exactly :D
yes, I guess you can XD
I don't think identifiers can starts with a dot though
Zoe
Zoe
09:33
That's discrimination against dotfiles!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!1111111111oneoneone
...___...
and.I.find.this to be more_readable_than_this (and more typeable)
Zoe
Zoe
iFindThisToBeALotBetter
andIFindThisMuchMoreReadableThanEverythingElse
although it kind of wrangles your brain because I'm so used to . being a property extractor
I hope you're both kidding
09:34
`also, this is nice but unsupported by most languages`
@Wietlol does anything support it?
Zoe
Zoe
yes, Kotlin
I think F# was the first I heard of
really?
kotlin does so too, ye
09:34
and I guess the sql derivatives
I think it shouldnt be used except for maybe unit tests or something
Zoe
Zoe
val `some illegal name` = "yes";
println(`some illegal name`);
because in unit tests, names are so weird
that's pretty neat
Zoe
Zoe
Also, Kotlin is one of the few languages you can print shit in:
09:35
ifYourNamesAreAsLongAsThisGetsThenYouAreDoingSomethingWrongInTheFirstPlace
Zoe
Zoe
val `💩` = "💩";
print(`💩`) // prints 💩
hah, in js that's a valid identifier. Checkmate
but JS is shit
/shrug
Zoe
Zoe
var 💩 = "";
SyntaxError: illegal character
¯\_(ツ)_/¯
09:37
wait a sec
Zoe
Zoe
flips chess board Checkmate bruh
apparently not all emoji
var ಠ_ಠ = 5; is valid
(yes, I know that's not an emoji)
Zoe
Zoe
well 💩!
>> function imWatchingYou( ಠ_ಠ) {
>>     console.log(ಠ_ಠ );
>> }
undefined
>> imWatchingYou( "ಠ_ಠ")
ಠ_ಠ
"ಠ" is named "KANNADA LETTER TTHA"
apparently plenty of languages allow emojis: what.thedailywtf.com/topic/25242/…
Zoe
Zoe
09:42
typealias ಠ_ಠ = Any
fun imWatchingYou(ಠ_ಠ: ಠ_ಠ) {
    print( ಠ_ಠ)
}
fun main(args: Array<String>) {
    val `some illegal name` = "YEEEEEEEEEEEEEEEEEEEEEEESSSSS";
    println(`some illegal name`);
    val `💩` = "💩";
    println(`💩`)
    var ಠ_ಠ = "ಠ_ಠ"
    imWatchingYou(ಠ_ಠ)
}
Valid Kotlin ^
Prints:
YEEEEEEEEEEEEEEEEEEEEEEESSSSS
💩
ಠ_ಠ
Also has more ಠ_ಠ than JS ;)
hope you're happy
Zoe
Zoe
@towc I am, yes! :D
well, hope it lasts
Zoe
Zoe
You didn't answer my question earlier though: does ale support renaming?
oh, I don't think so
it's just a linter/fixer
Zoe
Zoe
09:45
Oh ^^"
I use other plugins/mappings to rename
Zoe
Zoe
Which ones?
I put this in my vimrc as default:
nnoremap <leader>tn :%s/\<<c-r><c-w>\>//g<left><left>
nnoremap <leader>tN :%s/\<<c-r><c-w>\>//g<left><left>
which work pretty well, within a file, in most languages
Zoe
Zoe
oh
then I have language-specific overrides
for js, I have
  au FileType javascript,jsx nnoremap <buffer> <Leader>tn :TernRename<cr>
Zoe
Zoe
09:47
languageclient-neovim uses clangd/any other language server to rename.
similarly for typescript
  au FileType typescript map <buffer> <Leader>tn <Esc>:TsuRenameSymbol<Enter>
for jedi:
let g:jedi#rename_command           = "<leader>tn"
and apparently that's it
Zoe
Zoe
oh, you have a plugin for jedi?
well, jedi is a plugin, isn't it?
oh, and I use autopep8 with ale, for python
Zoe
Zoe
@towc technically it's a python package
And it's a language server
oh
Zoe
Zoe
09:57
Btw, you should try Plug
is it considerably different in any way?
anyway, out for shopping
I probably won't be back for a while because I like to think that I'm not a nerd
take care
Zoe
Zoe
@towc No set rtp or filetype plugin indent on necessary, and local packages can be referenced without file://. Additionally, it offers events
@towc You can still be a nerd without returning fast ;)
10:13
rob has new avatar?
Zoe
Zoe
@towc That file is pretty damn impressive O.o
@Wietlol yep
Zoe
Zoe
10:56
Oh, and thanks for the inspiration to clean up my .vimrc towc :D
user11564744
If I have a 8-bit binary number, then how will I write -128 in 2's complement
1000 0000
(iirc)
because it is 0111 1111 + 1
-1 would be 1111 1111
Zoe
Zoe
In 8 bit?
user11564744
@Wietlol But -128 is negation of 128, and I cannot write 128 using 8 bits, as highest order bit represent sign
Two's complement is a mathematical operation on binary numbers, and is an example of a radix complement. It is used in computing as a method of signed number representation. The two's complement of an N-bit number is defined as its complement with respect to 2N. For instance, for the three-bit number 010, the two's complement is 110, because 010 + 110 = 1000. The two's complement is calculated by inverting the digits and adding one. Two's complement is the most common method of representing signed integers on computers, and more generally, fixed point binary values. In this scheme, if the binary...
Zoe
Zoe
11:01
yeah, it's 10000000
In computing, signed number representations are required to encode negative numbers in binary number systems. In mathematics, negative numbers in any base are represented by prefixing them with a minus ("−") sign. However, in computer hardware, numbers are represented only as sequences of bits, without extra symbols. The four best-known methods of extending the binary numeral system to represent signed numbers are: sign-and-magnitude, ones' complement, two's complement, and offset binary. Some of the alternative methods use implicit instead of explicit signs, such as negative binary, using the...
@LoopBack but you dont need -0
2's complement binary numbers are from 0 to 2^x -1 (and negatives from -1 to -1*2^x) (where x is the number of bits -1)
so 0 to 127
and the negative numbers from -1 to -128
Zoe
Zoe
^
user11564744
@Wietlol I have learned that, if I have to find -ve of a binary number then first thing I need to do is find 1's complement and then add 1 to the resulting number. So how did you find that -128 is 1000 0000
using that approach, you would have 0111 1111 as 127
then add 1
i guess
how I know that -128 is 1000 0000 is because that is what I do
I program and I know things
not many but he knows things.
user11564744
11:09
Yes I m learning too
much
@geisterfurz007
knowledge is a unit
Zoe
Zoe
Nice weather we're having.
11:10
do you have weather?
Zoe
Zoe
No, it just rains ice cubes to compensate for global warming. /s
user11564744
Have you guys heard of Oracle Certification Program
once or twice
user11564744
@Wietlol what would you expect it I bitwise right shift -128. (-128>>2)
user11564744
It's 8-bit
11:21
1000 0000 >>2 = 0010 0000
so 63?
user11564744
-32??
Zoe
Zoe
It can't be negative
user11564744
@Wietlol you have done wrong calculations.
Zoe
Zoe
the sign bit is 0
user11564744
11:23
Whenever you bitwise right shift, the new blank spaces at the left are filled with the same number as previous contents of the top bit.
user11564744
So it would be 1000 0000>>1110 0000
depends
user11564744
Depends on what??
you have 2 different kinds of right shift
one with and one without the signum bit
user11564744
Are you talking about signed and unsigned shift?
11:26
prolly
Zoe
Zoe
yeah
Arithmetic shift adds 1's
So 1000 0000 >> 2 = 1110 0000, not 0010 0000
>>> should produce 0010 000
user11564744
@Zoe if you do 1000 0000>>>2 in java, you'd get an error
user11564744
Stating:- possible lossy conversion from into to byte
user11564744
And -128>>>2 was done for 8 bits
Zoe
Zoe
oh, I see. -128 there is probably interpreted as an int and not a char
Try ((char) -128) >>> 2
11:36
((byte) -128) >>> 2 ?
user11564744
char, why?? I don't understand.
((char) -128) >>> 2
this will result in something else
because it starts as 1000 0000 1000 0000
user11564744
Still the same error, whether char or byte
Zoe
Zoe
@LoopBack char is 8 bit
char is 16-bit
Zoe
Zoe
11:37
What?
Why?
user11564744
char for java uses unicode
user11564744
So 16 bits
A char in Java is a UTF-16 code unit. It's not necessarily a complete Unicode character, but it's effectively an unsigned 16-bit integer.
Zoe
Zoe
14
A: Is there an actual 8-bit integer data type in C++

dlmeeteiYes, you are right. int8_t and uint8_t are typedef to char on platforms where 1 byte is 8 bits. On platforms where it is not, appropriate definition will be given. Following answer is based on assumption that char is 8 bits char holds 1 byte, which may be signed or unsigned based on implementat...

10
Q: Char size 8 bit or 16 bit?

user3198603http://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html, char size is 16 bit i.e 2 byte. somehow i recalled its 8 bit i.e 1 byte. To clear my doubt, i created a text file with single character "a" and saved it. Then i inspected the size of file , its 1 byte i.e 8 bit. I am confuse...

Zoe
Zoe
11:38
oof
Oh well
Didn't think they'd change a relatively basic type, but mkay
it has been so since forever
user11564744
2 mins ago, by Loop Back
Still the same error, whether char or byte
Zoe
Zoe
@Wietlol yeah, but I haven't bothered checking sizes
byte b = (byte) (((byte) -128) >>> 2)
try that
user11564744
Yeah did work, but the answer is -32
user11564744
11:45
Why not 32
iDunno
it should be -32 or 63
but definitely not 32
Zoe
Zoe
^
user11564744
Why 1000 0000>>>0010 0000
0010 0000 = 63
wait
no it aint :)
user11564744
It's 32
11:48
i think Java cannot do bitshifts on bytes tho
Zoe
Zoe
So the conclusion is 1010 0000
It's 32 because it's still a signed char. It probably retains the sign bit for some reason
nvm, I'm a nerd
Zoe
Zoe
:D
user11564744
Thank you, guys for helping, see you around. :)
Zoe
Zoe
6.5.7/5 [...] If E1 has a signed type and a negative value, the resulting value is implementation- defined.
Basically, the result depends on the implementation
11:56
@Zoe you're looking directly into my soul
@Zoe 1110 0000
no?
i see what happens here
Zoe
Zoe
@Wietlol Wouldn't that be - (32 + 64) = -96?
The smartest dinosaur was probably the Troodon ("tooth that wounds"). It had a brain the size of a mammal or bird today. It also had grasping hands and stereoscopic vision. (source)
keep in mind, negative numbers go the other way around
1000 0000 = -128
1000 0001 = -127
1110 0000 = -32
-32 for a 32 bit int is
1111 1111 1111 1111 1111 1111 1110 0000
Zoe
Zoe
oh
yeah, you're right
12:01
-128 >> 2 or -128 >>> 2 result in
1111 1111 1111 1111 1111 1111 1110 0000 or
0011 1111 1111 1111 1111 1111 1110 0000 respectively
Zoe
Zoe
1010 0000 is -96
1111 1111 1111 1111 1111 1111 1110 0000 or
0011 1111 1111 1111 1111 1111 1110 0000 to byte results in
1110 0000 or
1110 0000 respectively
which is both -32
java didnt do right shift on the byte, but on the integer
Zoe
Zoe
But that's only if you have an int to start with
Also, the same thing happens on a signed char (8 bit) in C++
that is byte b = (byte) (((byte) -128) >>> 2)
 
2 hours later…
14:07
oh my, that laptop doesn't have an ethernet port
I now need to consider whether ethernet is important to me
I do work with linuxy and networky things, but maybe I can hook up an old laptop if it comes down to that?
oh, but ethernet to usb-c is a thing
 
1 hour later…
15:15
You can get USB-to-Ethernet adapters.
I just bought a VGA adapter that plugs into a USB port. o_O
 
5 hours later…
19:57
I hope there's linux things that can recognize that (without much overhead)
20:42
@towc Dunno how linux does that but my USB sound card for example worked right out of the box.
*on windows. I meant "I don't know how linux handles stuff like this but windows works somehow".
Zoe
Zoe
21:10
@towc do you use something like tagbar? If you don't, you might be interested in it :) Especially for Vim files - it also outlines which shortcuts are defined, so you can easily see what you've mapped yourself to avoid overlap cough which I may or may not have had at one point cough cough

« first day (3143 days earlier)      last day (2022 days later) »