#ot1-perplexing-regexing
1 messages ยท Page 364 of 1
lets see what happens
[14:55] bisk: my thinking is that there's a problem syslinux and fat32
iiiii ammm the champion of the woooorlllld
cannot launch up anything past the logo screen
o
bisk you suck!!!!
well, thats idiotic
Speaking of Windows, why is Bluetooth so horrible on it?
shitty drivers
true
bluetooth is horrible everywhere
All I want is some kind of command that tells me connected/disconnected/etc and things that have been paired in a simplistic way
i just wanna debug this stupid ARM toolchain and its supid flash software
Whereas Windows obfuscates that stuff away
why is zis so hard
welcome to the dumbification of information
You'd think ha, it can't be that hard! Scott has no clue what he's talking about!
and even more relevant
But I've looked, for over a year ๐ฆ
why has it not been documented publicly, how can it be in the interested of a company to limit their developers to windows
As a wise man once said
fuck bitches
"Developers, developers, developers, developers"
i mean
tbh scott
why would you not document how to communicate with the fucking debugger
whyyyyyyyyyyyyyyyyyyyyyyy
reeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
at least i'm pretty sure the developers count in that presentation was 36
Okay, I was way off. 14. https://www.youtube.com/watch?v=Vhh_GeBPOhs
Uno de los peces gordos de Microsoft, en lo que parece una presentaciรณn de esta compaรฑรญa, no para de hablar de los "developers".
hm
actually the stlink is also not properly documented
where do poeple get info from on how to communicate with these debuggers......
i wish i was excited about anything as much as ballmer is excited about windows
hmm... what should i marinade these chicken drumsticks in
im trying to install puppy linux and i am not sure which one i need to download
xenial 32bit
k'
@gentle moss hot sauce
tbh i was thinking cumin, smoked paprika, soy sauce, hot chilli powder, garlic, lime juice and sriracha
or something like that
maybe cayenne pepper as well
i usually wing it
what the hell are chicken drumsticks
ah
they're called drumsticks because before drumsticks were invented people used to use those
i like them with ketchup or bbq sauce
wings i'll agree with for finger food
thighs less so
however i got like 25 drumsticks for ยฃ6
which is pretty good if you ask me
Yeah, thighs are bad finger food, but better if they're going into something
I see no place for drumsticks
except possibly for fried chicken
pup seems to load up fine
puppy is a nice lightweight linux for a shit device like that
might be worth going with it
uh
me: *starts up the Eee
the laptop: *high pitched EEEEEEE
some x-shit decided to not work properly
aight
i gotta go sleep
jeesus
i was installing linux for about 10 hours
goodnight people
i started at 12 at noon, now its 22, evening
also the "d" key is kinda broken on my EEE
ok goodnite
+1 for that one on the right
I got that a week or so ago, pretty nice
I know it's popular in America
oh no
it happened again
saw knife, saw reddish brownish stuff. For a second I assumed you cut your fingers off and just casually posted it on Discord
โซ whoops i did it again โซ
That poor baby
haha
out the park there owez
:D
tbh i don't cut myself that much when knife handling
when i do i always superglue it
I know this is not how you should normally do it - but couly sb please look over my code in #help-orange ? I literally have 0 idea why it does not work, even after restarting kernels. And it keeps me from continuing working.
Sorry for stealing your time
I can't even see your question there. If you repost it in that or another help channel, someone will come along and help @covert latch you don't really need/want to advertise it in too many channels. If it fits in one of the topical channels, you can ask there
I know, that why I didnt want to post it in another help channel
if you don't get traction after a few hours, try again
reposted it in #help-chestnut now
also charlie, if i did cut my finger off i am 100% doing triage on myself and posting it somewhere
lol
takes like 30 minutes for an ambulance to get here anyhow
gotta kill the time somehow
I assume it depends on what finger
If you cut your right index finger off
thats gotta be a bastard to post
have y'all ever played with beyblades?
yup
just be careful what you use that wrist action for
now they make shitty ones that blow up
haha
i wanted to download genymotion
but it wants account
i tried creating account but asks company :d
but i don't have one
its overcooked
No, just barbecued
it's seasoned
the seasoning crisped up with the skin
crunchy on the outside
soft on the inside
like armadillos
ah - the perfect food analogy - armadillos
armadillos don't taste as good though
it's overcooked, i'm pretty sure eating char is not healthy at all
Researchers found that high consumption of well-done, fried, or barbecued meats was associated with increased risks of colorectal (19โ21), pancreatic (21โ23), and prostate (24, 25) cancer. However, other studies have found no association with risks of colorectal (26) or prostate (27) cancer.
https://www.cancer.gov/about-cancer/causes-prevention/risk/diet/cooked-meats-fact-sheet
hm less conclusive than what i though
though pancreatic is left out of the second list, so i guess there is no study concluding in no link for this nasty one
anyway, you do you, it's probably a lesser concern to anyone who smokes and drinks
I don't do either, and tbh I don't eat much bbq'd food either because cleaning it is a fucking nightmare
but I do enjoy it
@frosty berry so not conclusive at all
bruh if like
you just ran a mile
every time you ate some cured or bbc meats
all the minute supposed health effects would go away
everyone that can should run
after 12 hours of sleep i am back with the things about my linux install
xenialpup couldnt install because the system wouldn't launch
lemme send the console log...
here it is
need some help
meanwhile ill try another distro
total time passed since the linux install idea: 22 hours
bodhi linux does not work either because of the cpu and kernel conflicts
found the 32 bit one
23 hours
32 bit: i have only the console interface
cmon, tiny core was the only successful distro
the bodhi crashed when i tried to save a text file in terminal
fish.
what?
fish
ok
have you tried just getting better hardware
I've repurposed my old machines as various servers and shit
doesn't have to be super new
performance for consumer hardware has sort of plateau'd over the last 5ish years
and a lot of parts will work just fine second or third hand
yeah, the thing with your machine @gleaming hare is that it was low-end even 12 years ago when it was new
ik right
lol that russian keyboard layout for a sec
yeah lul
also a question?
how do people copy-paste into terminal
whenever i do that, terminal gives me ^V
shift+insert
It depends on the terminal
ah
in some you can paste by right clicking
selecting text copies it to the X clipboard, and you can paste it using middle mouse button
if using a mouse is your thing
(or shift-insert)
yeah the context menu works
I mean some terminals just paste automatically on rmb
windows cmd is one of them
vsphere supports rmb paste too on vms 
i will instaall linux on my 3rd good laptop
rmb should work on Linux too
which is why I use it - keep forgetting os specific shortcuts
on windows cmd and powershell, you select text and press enter to copy it, and right click to paste
an odd combination but it works
Shift+insert does work on windows these days too
windows8.1
I'm not gonna ask.
At least its not 8.0
I just found a library that have arch as his main target, f*** yeah!
The lemon effect
god this ansible shit is pissing me off
how can i improve myself
@gusty oar depends on what you are talking about
You just need to download the latest update
what you need to know
trying to be better than you were the day before is probably a good start
but you also shouldn't beat yourself up too much either
self improvement is something that takes effort and dedication to achieve
assuming a constant rate of learning something every day
no matter if you take it slow and learn bit by bit
you will finish one day
same for me
they're equivalent
not if you've got a massive pile of dishes to wash up and you instead go and fuck about with code
do the dishes yo, else you'll get fruit flies
yea i meant Computer science general ๐
who doesn't wash their dishes right after eating anyway
i rinse them right after eating, so they're easier to wash up
then build a little stack
I wash them up right after eating
Hey man, dish washing isn't so bad
i actually knew a guy at uni who just got paper plates
yeah it's easier to just cronch on them
so he could eat a meal and throw them away
Cronch
Yeah that sucks
i want a robot that makes dinner,washes dishes and clean the house
yeah
are there any
and here's why it's smart
Also it's wasteful
uni students NEVER FUCKING WASH UP
I did
so you could never be sure if there were plates
eating on paper plates / plastic makes me feel dirt poor
So did my flatmate
lucky
it doesn't have the same feel as metal and ceramic
And then every few months we had a cleaning blitz on the whole flat together
i remember waking up hungover after a party and wanting scrambled eggs
but all the shit was dirty
so was like "fuck this" and cleaned it all
i'm not a monster.
alcohol? cringe broo
Good way to ruin a pan
^
not if you eat it with chopsticks
with
oh yeah, it was soooo cringe. such a cringe party. we all had fun while drinking. it sucked.
Yes
teflon pans are delicate little flowers
i've ruined a teflon pan with a sponge that was a bit too rough before
Same
@gentle moss i say cringe because my mom's boyfriend is dying of cirrhosis and i hate the guy
Tefal can die in a fire
from severe alcohol addiction
I have steel pans with a non stick pattern that is metal implement safe
And a stone metal blend non stick pan
so yeah enjoy the hearing loss from the music and gaining weight
It needs seasoning but it's so good
well that sucks, that's a reason to not drink yourself but a bad reason to judge others.
project what
plus i got hearing damage from my professional sound work, rather than parties :P
i'm too young to drink
i drink way too often
i like to drink, but i don't shit on people who don't
Needs more fisheye
bisk has wonderful teeth though
Right now you just look like eggman
That's great @sand goblet
yeah, they're the perfect shade of cream
you look like someone who plays dnd
thanks, i used to.
Grab your Big Bad Bosses album and merch here below at The Completionist website. Limited vinyl albums are first come first serve! - https://thecompletionist.com
Big Bad Bosses Egg Man Music Video, ft. Jake Kaufman, Jirard, Alex Faciane, Satchell Drakes, and Nate Sharp! Grab ...
adults that play it usually played it as a kid
it's definitely not as big as videogames

lots of adults discover it and are like
"fuck yeah, roleplaying is actually fun"
just need a good dm and to get over prejudice
That's the hard part, DMing
good dm's are hard to find
yoo i saw this raspberry pi dnd screen
my dm was a legend
so i was a thief and my sister played a mage
so as a really good artist he'd actually draw out the traps / etc
Oh nice
or the runes / glyphs of magic stuff
i once got a nail shot into my leg because i disarmed a trap wrong while robbing a house
then had to jump out a 3rd floor window
and broke both my legs
bad rolls man, bad rolls
oh that's cool
i used to build sets for my warhammer collection
wth is a warhammer
wot
little figurines you make / paint to create armies
then you can fight armies against each other using rule books
oh cute
there are a few different types but i had an undead army
headed by vampires
i think it was about a 35-40k point army
which is pretty big
point?
could cover half a pool table
yeah, each unit is worth points
painting them was pretty relaxing
Wargaming seems dope - except for the bit where expensive and the fact theres so many weirdos who do it
the cost is insane
i used to find ways around that though
since i had an undead army i could have skeletons missing an arm, or a hand poking out the ground with a tombstone etc
so i could get more units out of one box
I do not know how to feel about the new avatar
It's like those happy buddha statues
It's definitely eggman
Yeah I guess I see it now
No it's fine
I just need an adjustment period
Consider that for almost 2 years I've only ever seen you with the golf ball
i think i prefer this
Is that a loading icon?
It isnโt centereeedd
Arg, youโre the worst haha
one person doesn't think that
I like it
all seeing eyes
i can't even remember the conversation / joke that made me make the no image golden golfball
or what it was before then
this is much worse than either of the previous two IMO
always a critic
I wasn't a critic of either of the previous two
sometimes a critic
found a random spring on the floor
this is probably a bad omen
hi
i hope i could know js good enough to fix this pile of IFIFIFIFIFIFIFIf
good one @primal spruce
Thats a pretty easy fix @gleaming hare
.. ะะตะผะต ัััะฐะฝะธัะฐ.. sure
What's that translate to?
meme page
Use a switch, anyway
You don't even want a switch there - just a for loop or something similar
No?
tell that over to @SergeyMC9730#7402
Heck, just use the value of "a" directly
the files are all meme1 meme2 and so on
You literally need nothing
Use the value of "a" to construct the file name
Strangely enough, you donโt have the same m, e, c, t, a, h than other languages
oh yeah
the point is - you don't need to know any JS to fix that really
in python that would be something like f"filepath and shit...\\memes\\meme{a}.mp4"
you can literally turn the entire block into js var player = new Playerjs({id:"player", file:"memes/meme"+a+".mp4"}); console.log("1");
Without knowing any JS, Iโd say you could do
var player = new Playerjs({id:"player", file:"memes/meme" + a + ".mp4"});```
JS does have string interpolation
they do more than just interpolation iirc
Not much more
About as much as f-strings, right?
Ah okay
There's tagged template literals.
I mean that was a template literal there
ok i forwarded him the info and his reaction was o
But it wasn't tagged.
Tagged literals just have their arguments passed to a function first
It's really just syntactical sugar
I'm not sure why it exists tbh, it's far less convenient than just writing a builder function
trading has been halted in the US due to a sharp downward trend
a mechanism put in place after the 2010 flash crash
which was wrongfully blamed on waddell and reed
hmmmmmmmm ๐ค
Do anyone here know some cool JSON apis to use ?
You can do fun stuff with openweatherapi or whatever its called
dub horn api when
mfw our website has this dlibs folder which contains 2 js files with about 1mil characters and it still weights less than the css folder
447615 + 253004 = 700619
chars
Do you know if participants can join in teams?
@wind karma
replying here so we don't block their conversation.
What do you mean? You can request teammates but they might not be honoured
but I think they said they probably will be
assuming you mean for this server
Ohh
Yea I mean for this server
I want to get a team together haha, I really loving teaming up and doing shit
:/
Well I meant teaming up so that we can join other code jams as well
@thorn snow Ive got a better one:)
Well, there's nothing stopping you looking for people to do that - but the server has no mechanism for that
one of the discord feedback articles has this pic...
and that is the link it goes to...
holy fuck shit ass
they're remaking Mrs Doubtfire
with Kevin Hart
nvm, that's old news. the miss confused me with the musical adaptation that's coming out
does the rpi have sata connectors?
It seems to be missing a fanmount
^^
Pff, relability
Are the new raspi's powerful enough to host a plex server?
Yeah
I wouldn't say so
Rpi 3's where fine on 3 1080p
They'll host it fine but the actual live conversions..
I'm only ever going to use 1 hard drive bay for expandability y'know
@vestal briar so we will need an expansion bay (you can put it on the top) for a discrete gpu. and since you do that, you might as well just bring the sides down with some tempered glass panels
sell for $15 on amazon and we good
๐
๐ค
also when building cases, don't forget rgb
hides his solidblack case
IT HAS THE MOTHERBOARD LIGHTS
Printing with fan holes will be a pain
Hardline tubing?
No, That looks like it could generate serious heath
You can get some pretty decent passive coolers I think.
That's just a big unused block of 2.5" hdds
But idk how much heat the ssds will generate
I mean
The 5mm thick plastic should be enough for very mild use?
Bearing in mind the max that this will have is 3
did you use sw for this? @vestal briar
It's Owez's design with Savant's mspaint
I'm using fusion360
Air holes and art
And 3d printable
Though it's more of a torture test at this point haha
Hey @vestal briar!
It looks like you tried to attach file type(s) that we do not allow (.stl). We currently allow the following file types: .3gp, .3g2, .avi, .bmp, .gif, .h264, .jpg, .jpeg, .m4v, .mkv, .mov, .mp4, .mpeg, .mpg, .png, .tiff, .wmv, .svg, .psd, .ai, .aep, .xcf, .mp3, .wav, .ogg, .md.
Feel free to ask in #community-meta if you think this is a mistake.
If anyone wants stl for this, i'll pm them
.ogg
question , how many amps does it take too paralyze some one ?
why do you need to know this
anything about 10mA for muscle paralysis.. >30 mA for respiratory..
how do you include links in markdown for headings that occur with spaces
for example: Set Theory Clauses
that was an abrupt change in subjects
How do you hide the body
put it in a graveyard
oh right junkyard is different than graveyard. i was wondering why would you put a body in the dump
too much magic the gathering lately ๐ฎ
Will a drone work if the motors are rectangular instead of perfectly square?
I got it 5cm more apart one way that the other but in the other axis they are the same
I passed my first Comp Sci test!!! Thanks to this server ๐
congratulations!
So you know how pipenv has a stigma of being slow..
It is so god-damn slow the devs knew about it and put a timeout in it
:p
Oh but no, the timeout is too buggy and the timeout gave an exception
Time to switch to a better program

I honestly haven't found a better solution though
It might be better to try to solve this problem if possible
I wonder how annoying it'd be to do with gradle
haha
"Oh cool, you made a Discord bot in Python?"
"Yep, but if you wanna use it, you'll need Java"
What are you actually trying to install?
I've had precisely no luck whatsoever with poetry
pip uninstall poetry?
the heck did you install it with?
Using some fucking curl
link me
I know
Now it's using python 2 and i'm very close to using words that are not allowed but describe this
you need to do
wget https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py && python get-poetry.py --uninstall
I thought that was some experimental thing
if you're on linux you could probably have gotten it from the package manager
Not a thing I don't think
Nope, it isn't
although pipenv actually works, so maybe poetry won't be there
This is what must have pushed younger me to make my own clone
ELA uses poetry though, I think, and he's got it working clearly
and this project uses it https://github.com/python-discord/flake8-annotations/
Didn't work in the end because of the backwards-compatibility-hell of pypi
Dependency management is hard
I've written a package manager before
It was for plugins for an old chatbot I worked on, Ultros
but even that was a little tricky
I'm working on a system package manager now
Like full basic package manager made in rust
As much as possible is made by me, even if it's not high quality :p
It's definitely an interesting project
I was kind of thinking about working on a universal build tool
but then I realised, well, gradle exists
and I do really like most of gradle, so
I mean, isn't any build system universal
I mean, yes, but gradle makes it easy
You can use something like make with minor difficulties
I mean, yes, but then I have to write a makefile, yknow?
๐ค
as opposed to something like gradle which comes with plugins for most languages
you just dump it in the folder, gradle init and go
it does use groovy (or kotlin) for its buildscripts though, so you need to know groovy (or kotlin) beforehand, at least to a point
although I picked up groovy from just using gradle myself
So it's like a complicated make with lots of plugins
I mean, to a point
it has a lot of useful features, like incremental builds and portable build caches
only processing things that need to be processed
which isn't always the same as "this file changed, compile it again"
Most things have that nowadays
well, yes, but there's more than compilation in a lot of projects these days
with java for example, you also have packaging to do
you might have annotation processors to be run before/after/during compilation
although those have been solved by maven/ant as well
well, java has a lot of features that people don't really think about
have you heard of lombok?
or graal, maybe?
Hm
lombok is basically like python's dataclasses
you put annotations on your classes and it will generate getters, setters, .equals(), etc for you
Oh
you have to be able to run a third party annotation processor as part of the compilation stages for that to work
graal on the other hand allows you to basically build a custom jvm that's optimised for your project
Shouldn't that be built into the LS
LS?
I mean I guess your IDE could do it for you
The part that connects to build system as a unified api
but that doesn't give you clean source
How you write 1 connector and it works on 10 different editors sort of thing
well, I guess
but the point is less that lombok provides this feature and more that you can extend the compilation process using an annotation processor
which is something that's been defined by java specs for years now
years and years
certainly longer than language servers have been around
annotations that remain in actual java code aren't very flexible tbh, so being able to process them at compile time is super useful
they're basically just metadata otherwise
Is this more of just javas weird side
I mean, annotations are super common and very useful
it's just a feature most people don't think of when you talk about java
Like it is an "if ain't broke don't fix" it sort of thing
everyone uses them but most people haven't written one
Well I guess, yeah, that's kind of java's thing
back compat
I mean some people are still using ant
which came about in.. 2000?
as a replacement for people just using make for java
Would be funny if java done a python 3
I mean it's not like they don't break things
it's just they don't break expected things
..Oh
Why don't they just fix it all gradually and annoyingly
I'm not sure
Oracle Java isn't something people actually use these days tbh
everyone's using openjdk because oracle's licensing is ass now
Yeah
which, to be clear, openjdk is still maintained by oracle
it's just a real oss distribution
I'd have like too have seen some cool spinoff of java
Yeah but not just a compiler backend
What, like, let's do a mariadb?
Basically heavily modified java that irons out the wrinkles but could still be ported fairly easily
that would be interesting
But I think java has a lot of issues that are best served with a jvm language
Yeah, that would be the best solution
reason being, java's pull is its ubiquity
I mean I guarantee you have something near you at all times that runs java
But it would be easier to just have java-like syntax when porting
I don't think I actually do
whether that's a car's computer system, a set top box under your tv, or the sim card in your phone, or maybe your blu-ray player
blu-ray movies have a fair bit of java in them
Woo for weird contracts
I'm still amused that sim cards are just little java computers
that's really java's strength though
Why did they get that in the first place anyway?
write once, run anywhere. really.
Like for blu-ray
I'm not sure
They wouldn't have have a long standing relationship with oracle
BD-J, or Blu-ray Disc Java, is a specification supporting Java ME (specifically the Personal Basis Profile of the Connected Device Configuration or CDC) Xlets for advanced content on Blu-ray Disc and the Packaged Media profile of Globally Executable MHP (GEM).
BD-J allows bonu...
This is when you can tell it wasn't meant for this haha
I mean, sort of
Sun did originally design java to be suitable for porting for discrete devices and use-cases
the plan was basically an extreme version of "write once, run anywhere", and it worked
and it really is just fucking everywhere.
That's what an ABI is for though
I mean yeah, but how old is java?
1995?
yeah
not quite as old as python, but pretty old
This is around 2006 times
Oh, sure
But if you look at the projected goals for java
it was designed to be ubiquitous, right
Oh, 2008
in achieving that goal, it meant that most programmers had to know a little java to get by for a while
BD-J probably made sense from that perspective
everyone already knows java, right? well let's just use that
that's not true in the hobbyist world, but in the enterprise world..
Or they could have hired some embedded devs to do the embedded programming
I doubt a bluray development division was packed with java devs
actually I suspect that the people writing BD-Js probably weren't programmers at all to start with
embedded programming might have been a bit above their level
Hey timmy you are a java coder now
well, you know how businesses like to cut costs
also, don't forget, BD-J is just java ME
Was it actually cutting costs though at oracles prices
Nope
I remember from iphone 5
Java Mobile Edition
if you take the ancient sony ericsson walkman phone for example
this motherfucker
this thing could probably do most of what people use a phone for today
For bluerays not so much
well, yes
but the point I'm making is that Java ME was already an established tech with a lot of devs
They would have had c devs on hand in development already though?
With licensing and hiring/(minimal) training costs it would have evened out to just using one of their own guys or just hiring a firm
The development team
If you're working with a lot of embedded in a fairly large team, one or two of them would have known embedded programming
I mean, sure, but the people that came up with BD-J weren't going to be the ones using it
Hm?
well, blu-ray was just another high capacity disc format
you can store 80GiB on this shiny blue CD
it would have been the minds at the movie industry that came up with this standard
but the actual companies producing movies would be the ones writing BD-J into their releases
Could have also been done with an abi
I guess? Java would have been simpler though
Hm, wouldn't the BD-J just be an abi also
in a sense, I suppose so
Was it just a timerush thing?
Make shoddy short-term solutions to release fancy stuff in time
And Sony's PlayStation 3 has been the de facto leader in compliance and support of BD-J. So everyone else went along with it
Make shoddy short-term solutions to release fancy stuff in time
agileโข
well, sony was in charge of the blu-ray project
after all, they unveiled the first prototypes back in 2000
@undone berry The amount they talk about the agile methodology in our school..
oh hey
Sony Ericsson W810
no
bad clipboard
thank you
this is a "keynote" from 2005's javaone conference
I had some lecturer at my uni banging on about his 10 years of industry experience as an agile expert go on to talk about how you wouldn't use Java for long term projects because its dynamically typed - and that you'd use an oop language instead
I can't use the word I'd want to use to describe him here
turns out his 10yrs experience was installing POS systems in Carphone Warehouse
Lol
My cs teacher keeps talking about how c# is oop and python is more "procedual"
Ah, the old "Javascript is Java, it's in the name!"
thats not really that wrong
it looks like they picked java because DVB-GEM already defined a java environment for this kind of work
90% of python is an object
Yes, but you're not forced to write OOP code
TBH i don't REALLY see a difference between Python modules and C# static classes
just because it is an object doesn't mean the code you're writing is OOP
They phrased it like python didn't have oop
StaticClass.StaticMethod() vs module_name.function()
I mean modules aren't classes though
there's no this/self
a module can't refer to itself like that
There is no instances of static classes either
(given how python works, that doesn't make sense anyway)
well yes, but it's a second level of encapsulation
and you still have stuff like inheritance
Basically
My teacher thinks python doesn't have classes
Nah, you can't
Static classes are almost glorified namespaces that are initialised in background and can't be used via interface
Huh, okay
well, to be fair, python doesn't have static classes
they probably solve similar problems
but classes do belong to modules (usually, not always)
I like that you can use types as a variable
well, yknow, everything is an object, first-class
Like animaltype = Dog; fido = animaltype()
@vestal briar anyway, there are a lot of interesting jvm languages
scala and clojure, kotlin, jython..
I guess rhino (javascript) counts, although that's more an interpreter written in java
whereas the others actually compile to jvm bytecode
groovy is another one, obviously, not sure how I forgot that
and yeah they basically exist to improve upon java
you won't need lombok if you're working with kotlin or groovy for example
I like that the different JVM languages actually have niches where they are used
clojure is basically java with lisp paradigms/syntax
so the lisp people like it
it's an interesting language, I'm not sure I like it though
Where closure is actually used, btw?
Maybe some day i'll try to learn Scala, if i start working with Spark
Spark is great in Java and Kotlin too
I've heard that Kotlin is JS-like language that runs on JVM
Who would make that, considering even JS devs do not like JS?
What's the biggest improvement compared to Java?
I mean there are just so many improvements, I'm not sure I could pick just one
Basically it's one of the new class of fancy languages like rust and ew go and nim that have a ton of compile targets and are dev friendly
Maybe the much smarter compiler, or the explicit null-safety
this is what kotlin looks like
Smooth
I see a mash of java, python and a bit of js
I'm used to question marks automatically routing errors in rust
I'm looking at weird squiggles. Are they &&?
at the ends of the lines? yeah
Null-safety, yeah
so, there are a bunch of operators in kotlin that include ?, and those are null-safe operators
or rather they operate based on nullness
so if jsonData is null, then jsonData?.keys will return null - it'll only move on to jsonData.keys if jsonData isn't null
we also have the elvis operator
(rubbish name)
statement ?: statement
TBH i like explicit Python Optional[Type] more
if the left side is null, the right side is executed
oh, we have that too
you can explicitly type things if you like
Ah, yeah. What's the typing in Kotlin?
(and you do have to in some cases)
well, firstly we have var and val - var is mutable, val isn't
if you wanted to type a variable as a string which may be null, you'd do eg
var str: String?
the ? means it could contain null
I wonder if Python would introduce immutable fields later.
Perhaps, perhaps
oh, but I forgot one of my favourite things somehow
I have also crashed idea, so one minute
๐ Your favorite feature seems to be dangerous
Yep, i miss it
...go on
sec, I'm trying to find a good example
haha
so when comes in a few forms
at its most basic, it's just a nicer if-elif chain
it can also be used like a switch
it's worth noting that the last statement of a branch (the only statement if it's not a Unit defined by {}) will be returned
in this case, type is just a string
if we didn't know what it was, our branch could be is String or is Integer
it's basically a way more powerful switch
it can also do closures, like in java
they're like context managers in python
fun Request.getBody() =
when (val response = executeRequest()) {
is Success -> response.body
is HttpError -> throw HttpException(response.status)
}
something like that
(from the kotlin docs)
Cool! Makes me want this features ๐
the is checking combines with kotlin's smart casting as well
by smart casting, what I mean to say is, java is dumb
Object x = ...;
if (x instanceof String) {
x.toInt();
}
that won't work.
you have to explicitly cast x
if(fruit is Apple)
{
MakeApplePieFrom(fruit as Apple);
}
kotlin removes that requirement, it's smart enough to understand that you did an instanceof check and so you want to use it as that type
val x: Any = ...
if (x is String) {
x.toInt()
}
it also does other things like forcing you to have an else block when you use when to generate a return value
C# also added A LOT of pattern-matching goodness in 8.0, but i haven't got time to really enjoy it
and, yeah, explicit casting is fruit as Apple, as you said
anyway I could go all night
it's a huge bag of nice small improvements really
And probably even bigger bag of legacy garbage thrown away, right?
Well, I would say so, to a point
It does run on the JVM
..by default, anyway
it also compiles to javascript and native code
Have you had experience with non jvm kotlin? Any issues with it?
Gimme native Jython on android ๐ฆ
I have tried to use it for javascript
and it is quite nice
however
when writing kotlin code for JS, the compiler still enforces the strict typing
if you're making use of an external js library - which does work - you either have to have a kotlin external class to represent the types in that library, or you have to tell the compiler to throw out type safety
there is a converter that can convert typescript stubs to kotlin external classes
but it's still alpha and quite slow
it does work though, and at least you don't have to keep running it, just run it once and you have your stubs
I think it was probably slow in my case because I had it running against some npm libs
I didn't really need stubs that deep
BTW, is there a way to transpile Python to JS? Is it a good idea?
Damn ๐ฆ
you basically have two approaches when it comes to that
you either write javascript with python syntax
or you reimplement a python interpreter in javascript
both of those approaches exist
the former is probably smarter to use at the moment because the latter requires bundling a 60+MiB runtime on your page
there's also rustpython, which compiles to wasm, but that's not really that useful in the browser yet
(because you can't manipulate the dom without a hacky JS shim)
Damn, JS is really unescapable
I really like the concept of "learn language once, use it everywhere", but Python is not like that.
At least it goes well with both Linux and Win
Well, the W3C is working on adding DOM support to WASM
Python is viable on mobile too with Kivy BTW
Half the people say "it's viable", half say "you can do that, but shouldn't".
Probably should try for myself and decide
Nah, Kivy is actually really quite good