https://kotlinlang.org logo
Join the conversationJoin Slack
Channels
100daysofcode
100daysofkotlin
100daysofkotlin-2021
advent-of-code
aem
ai
alexa
algeria
algolialibraries
amsterdam
android
android-architecture
android-databinding
android-studio
androidgithubprojects
androidthings
androidx
androidx-xprocessing
anime
anko
announcements
apollo-kotlin
appintro
arabic
argentina
arkenv
arksemdevteam
armenia
arrow
arrow-contributors
arrow-meta
ass
atlanta
atm17
atrium
austin
australia
austria
awesome-kotlin
ballast
bangladesh
barcelona
bayarea
bazel
beepiz-libraries
belgium
berlin
big-data
books
boston
brazil
brikk
budapest
build
build-tools
bulgaria
bydgoszcz
cambodia
canada
carrat
carrat-dev
carrat-feed
chicago
chile
china
chucker
cincinnati-user-group
cli
clikt
cloudfoundry
cn
cobalt
code-coverage
codeforces
codemash-precompiler
codereview
codingame
codingconventions
coimbatore
collaborations
colombia
colorado
communities
competitive-programming
competitivecoding
compiler
compose
compose-android
compose-desktop
compose-hiring
compose-ios
compose-mp
compose-ui-showcase
compose-wear
compose-web
connect-audit-events
corda
cork
coroutines
couchbase
coursera
croatia
cryptography
cscenter-course-2016
cucumber-bdd
cyprus
czech
dagger
data2viz
databinding
datascience
dckotlin
debugging
decompose
decouple
denmark
deprecated
detekt
detekt-hint
dev-core
dfw
docs-revamped
dokka
domain-driven-design
doodle
dsl
dublin
dutch
eap
eclipse
ecuador
edinburgh
education
effective-kotlin
effectivekotlin
emacs
embedded-kotlin
estatik
event21-community-content
events
exposed
failgood
fb-internal-demo
feed
firebase
flow
fluid-libraries
forkhandles
forum
fosdem
fp-in-kotlin
framework-elide
freenode
french
fritz2
fuchsia
functional
funktionale
gamedev
ge-kotlin
general-advice
georgia
geospatial
german-lang
getting-started
github-workflows-kt
glance
godot-kotlin
google-io
gradle
graphic
graphkool
graphql
graphql-kotlin
graviton-browser
greece
grpc
gsoc
gui
hackathons
hacktoberfest
hamburg
hamkrest
helios
helsinki
hexagon
hibernate
hikari-cp
hire-me
hiring
hongkong
hoplite
http4k
hungary
hyderabad
image-processing
india
indonesia
inkremental
intellij
intellij-plugins
intellij-tricks
internships
introduce-yourself
io
ios
iran
israel
istanbulcoders
italian
jackson-kotlin
jadx
japanese
jasync-sql
java-to-kotlin-refactoring
javadevelopers
javafx
javalin
javascript
jdbi
jhipster-kotlin
jobsworldwide
jpa
jshdq
juul-libraries
jvm-ir-backend-feedback
jxadapter
k2-early-adopters
kaal
kafka
kakao
kalasim
kapt
karachi
karg
karlsruhe
kash_shell
kaskade
kbuild
kdbc
kgen-doc-tools
kgraphql
kinta
klaxon
klock
kloudformation
kmdc
kmm-español
kmongo
knbt
knote
koalaql
koans
kobalt
kobweb
kodein
kodex
kohesive
koin
koin-dev
komapper
kondor-json
kong
kontent
kontributors
korau
korean
korge
korim
korio
korlibs
korte
kotest
kotest-contributors
kotless
kotlick
kotlin-asia
kotlin-beam
kotlin-by-example
kotlin-csv
kotlin-data-storage
kotlin-foundation
kotlin-fuel
kotlin-in-action
kotlin-inject
kotlin-latam
kotlin-logging
kotlin-multiplatform-contest
kotlin-mumbai
kotlin-native
kotlin-pakistan
kotlin-plugin
kotlin-pune
kotlin-roadmap
kotlin-samples
kotlin-sap
kotlin-serbia
kotlin-spark
kotlin-szeged
kotlin-website
kotlinacademy
kotlinbot
kotlinconf
kotlindl
kotlinforbeginners
kotlingforbeginners
kotlinlondon
kotlinmad
kotlinprogrammers
kotlinsu
kotlintest
kotlintest-devs
kotlintlv
kotlinultimatechallenge
kotlinx-datetime
kotlinx-files
kotlinx-html
kotrix
kotson
kovenant
kprompt
kraph
krawler
kroto-plus
ksp
ktcc
ktfmt
ktlint
ktor
ktp
kubed
kug-leads
kug-torino
kvision
kweb
lambdaworld_cadiz
lanark
language-evolution
language-proposals
latvia
leakcanary
leedskotlinusergroup
lets-have-fun
libgdx
libkgd
library-development
linkeddata
lithuania
london
losangeles
lottie
love
lychee
macedonia
machinelearningbawas
madrid
malaysia
mathematics
meetkotlin
memes
meta
metro-detroit
mexico
miami
micronaut
minnesota
minutest
mirror
mockk
moko
moldova
monsterpuzzle
montreal
moonbean
morocco
motionlayout
mpapt
mu
multiplatform
mumbai
munich
mvikotlin
mvrx
myndocs-oauth2-server
naming
navigation-architecture-component
nepal
new-mexico
new-zealand
newname
nigeria
nodejs
norway
npm-publish
nyc
oceania
ohio-kotlin-users
oldenburg
oolong
opensource
orbit-mvi
osgi
otpisani
package-search
pakistan
panamá
pattern-matching
pbandk
pdx
peru
philippines
phoenix
pinoy
pocketgitclient
polish
popkorn
portugal
practical-functional-programming
proguard
prozis-android-backup
pyhsikal
python
python-contributors
quasar
random
re
react
reaktive
realm
realworldkotlin
reductor
reduks
redux
redux-kotlin
refactoring-to-kotlin
reflect
refreshversions
reports
result
rethink
revolver
rhein-main
rocksdb
romania
room
rpi-pico
rsocket
russian
russian_feed
russian-kotlinasfirst
rx
rxjava
san-diego
science
scotland
scrcast
scrimage
script
scripting
seattle
serialization
server
sg-user-group
singapore
skia-wasm-interop-temp
skrape-it
slovak
snake
sofl-user-group
southafrica
spacemacs
spain
spanish
speaking
spek
spin
splitties
spotify-mobius
spring
spring-security
squarelibraries
stackoverflow
stacks
stayhungrystayfoolish
stdlib
stlouis
strife-discord-lib
strikt
students
stuttgart
sudan
swagger-gradle-codegen
swarm
sweden
swing
swiss-user-group
switzerland
talking-kotlin
tallinn
tampa
teamcity
tegal
tempe
tensorflow
terminal
test
testing
testtestest
texas
tgbotapi
thailand
tornadofx
touchlab-tools
training
tricity-kotlin-user-group
trójmiasto
truth
tunisia
turkey
turkiye
twitter-feed
uae
udacityindia
uk
ukrainian
uniflow
unkonf
uruguay
utah
uuid
vancouver
vankotlin
vertx
videos
vienna
vietnam
vim
vkug
vuejs
web-mpp
webassembly
webrtc
wimix_sentry
wwdc
zircon
Powered by Linen
mathematics
  • р

    Ролан

    05/07/2021, 8:15 AM
    https://github.com/londogard/londogard-nlp-toolkit that the one, @Hampus Londögård, it is great. I haven't dived too deep into it, but could it be possible to make it compatible with tokenisation required in BERT?
    h
    • 2
    • 14
  • a

    altavir

    05/09/2021, 8:04 AM
    This week on Friday (14.05.2021, 15:30, Moscow time) we will have presentation by Andrey Kislitsyn, Aleksandra Novikova, Roland Grinis (@Ролан) on they work with tensor API and implementation in KMath during spring internship. Title: Multiplatform library for tensors Abstract: Within the KMath library, we present a multiplatfom implementation of some of the basic functionality for tensors, as one would find in PyTorch's ATen library for example. In the talk, we shall discuss the algorithms we used, including broadcasting routines and numerical power methods for SVD. We will also touch upon applications to machine learning, with examples for OLS, PCA and NEURAL NETWORKS. Calendar link Multiplatform library for tensors Friday, May 14 · 15:30 – 16:30 Google Meet joining info Video call link: https://meet.google.com/vvn-dzkz-umb Or dial: ‪(US) +1 346-702-3560‬ PIN: ‪487 432 197‬#
    👍 2
    р
    • 2
    • 3
  • i

    Iaroslav Postovalov

    05/09/2021, 10:57 AM
    @breandan I've sent a PR to Kotlingrad https://github.com/breandan/kotlingrad/pull/22
    b
    • 2
    • 6
  • z

    Zhelenskiy

    05/10/2021, 3:38 PM
    Such code doesn't fail, but BigInt breaks the convention by
    if (other is BigInt) compareTo(other) == 0 else error("Can't compare KBigInteger to a different type")
    • 1
    • 2
  • z

    Zhelenskiy

    05/10/2021, 4:43 PM
    Multiplication of BigInt and Int.MIN_VALUE doesn't work fine:
    public operator fun times(other: Int): BigInt = if (other > 0)
            this * kotlin.math.abs(other).toUInt()
        else
            -this * kotlin.math.abs(other).toUInt()
    • 1
    • 2
  • z

    Zhelenskiy

    05/11/2021, 9:45 PM
    Incorrect parsing to BigInt of "" and "0x". Both are expected to return null, but first fails with an exception and second returns 0.
    • 1
    • 2
  • z

    Zhelenskiy

    05/12/2021, 8:51 AM
    @altavir Let the discussion about the core change be here. I suggested inventing fast power method for Rings.
    a
    • 2
    • 35
  • р

    Ролан

    05/14/2021, 1:35 PM
    Jupyter notebooks by Andrei Kislitsin demonstrating examples of using tensors with kmath from the talk are available here: https://github.com/AndreiKingsley/kmath-tensors-example-jupyters
    👏 3
    • 1
    • 1
  • z

    Zhelenskiy

    05/15/2021, 11:17 PM
    What do you think about the following math-related kotlin lib: https://plus.qconferences.com/plus2021/presentation/differentiable-programming-kotlin?
    :kotlin-intensifies: 4
    a
    • 2
    • 15
  • a

    altavir

    05/22/2021, 3:51 PM
    Having visualization capabilities is a game-changer for developing mathematic software. This example shows the difference between cubic spline interpolation and original function (KMath, fully multiplatform as always).
    👍 3
    👍🏿 1
    s
    • 2
    • 3
  • s

    Spationaute

    05/27/2021, 6:34 PM
    A nice feature would be a nice way to build defined matrices. Like in python ([[1,2,3],[4,5,6],[7,8,9]]) or better like matlab by omitting the comma and using line returns. There is nice syntax for HTML and SVG... I don't understand why we wouldn't have something nice and clean also...
    z
    a
    р
    • 4
    • 56
  • s

    Spationaute

    05/27/2021, 6:35 PM
    (Something like Mat { Vec {1,2,3}; Vec {4,5,6}; Vec {7,8,9}} could be close enough)
    a
    • 2
    • 1
  • a

    altavir

    05/28/2021, 7:49 AM
    @Zhelenskiy concerning equality, it is not an obvious thing. First, equality should be symmetrical, it means you can't override it without thinking thirst. Also, there is a problem with performace. For example, if you take larget matrices, the content equality could be greatly time-consuming. So overriding equals could lead to improper use. For now I decided not to use equals for comparison for structures. One of the reason is that we in some cases use inline classes that lack identity.
    👍 1
    e
    z
    • 3
    • 7
  • g

    George Pandian

    06/26/2021, 7:02 PM
    Hi team, Glad I found this channel. Very basic question though I'd be happy if someone could help please. What is/are number/numbers? To visualise it , I am finding it difficult and the current symbols does not provide the meaning. Also if number are symbols, then symbols come from maths (arch, line etc....) Which is the superset or holds the number.
    :not-kotlin: 2
    a
    b
    • 3
    • 5
  • h

    Hampus Londögård

    07/17/2021, 2:53 PM
    Does
    multik
    support sparse arrays?
    a
    р
    i
    • 4
    • 18
  • b

    breandan

    07/24/2021, 11:04 PM
    https://github.com/binkley/kotlin-rational
    a
    • 2
    • 9
  • h

    Hampus Londögård

    07/26/2021, 1:41 PM
    Looking a little at Kmath, how am I supposed to use the
    LinearSpace
    like
    EjmlLinearSpaceFSCC
    . More exactly the extension-functions like
    Matrix<Float>.toEjml()
    I've tried to use the
    with (EjmlLinearSpaceFSCC) { code... }
    syntax but it doesn't work. Not sure how else I'd get those to work?
    a
    • 2
    • 10
  • a

    altavir

    08/16/2021, 7:37 PM
    The latest PR brings to
    KMath
    finalized optimization and interpolation API as well as unique optimization technique called quasi-optimal weights method (https://arxiv.org/abs/physics/0604127). https://github.com/mipt-npm/kmath/pull/404. This feature finalizes the feature set for 0.3.0.
    :kotlin-intensifies: 8
    🤠 2
    р
    p
    • 3
    • 5
  • a

    Andrew

    09/16/2021, 12:35 AM
    I was benchmarking some of my own kotlin code vs BigInteger to test performance. In doing so I eventually copied the BigInteger.java source to my own project so I could edit some things. Without any changes that was running about 2-3x slower at least for multiplication (same speed as my kotlin algorithms). Is there any explanation on why there is a speed difference using the library directly vs source code I imported from it?
    a
    z
    • 3
    • 28
  • p

    Pavel Gorgulov

    10/11/2021, 6:46 PM
    message has been deleted
    👍 3
    🎉 3
    a
    • 2
    • 11
  • a

    altavir

    10/12/2021, 5:17 PM
    @Pavel Gorgulov this seems to be wrong if I remember correctly:
    p
    • 2
    • 1
  • a

    altavir

    10/17/2021, 2:35 PM
    @Pavel Gorgulov I am making a KMath adapter for Mutik (so one can use Multik internals with KMath API). There are some questions.
    p
    • 2
    • 9
  • a

    altavir

    10/17/2021, 6:08 PM
    Finally made Multik wrapper work. Performance for linear add operations is of the same order for KMath-specialized buffer, Viktor and Multik (about 10-20% difference which is not relevant). It is much faster for @Ролан's tensor in-place operations (like 300%). I guess that memory allocation is the most expensive thing for simple operations. In KMath it is possible to do memory buffer pooling inside fixed size algebra context. I wonder if it makes sense to do.
    🎉 4
    i
    р
    • 3
    • 6
  • e

    ESchouten

    10/22/2021, 4:43 PM
    Interesting library containing features including geometry functions like clothoid, fresnel etc https://github.com/tum-gis/rtron
    a
    • 2
    • 1
  • a

    altavir

    10/22/2021, 5:52 PM
    I have an idea (and not only as IDE). There are a lot of scientific and mathematic libraries in Kotlin so it would be nice to have a semi-regular seminar on those libraries, where authors present what they are doing. We can arrange the virtual meetings under the JetBrains research. Please write to me if you want to present something. cc @roman.belov
    👀 1
    :kotlin-intensifies: 1
    👍 1
    z
    • 2
    • 9
  • j

    John O'Reilly

    10/22/2021, 6:29 PM
    I was looking for example to try out some of new features in Multik e.g. https://blog.jetbrains.com/kotlin/2021/10/multik-0-1-is-out/#Solving-linear-systems ....
    a
    • 2
    • 7
  • z

    zain

    10/26/2021, 10:11 AM
    How do we round only if the number is 10.0 Ex 10.0 = 10 10.3 = 10.3 10.7 = 10. 7 Is there any easier way
    a
    i
    i
    • 4
    • 12
  • z

    zain

    10/28/2021, 10:14 AM
    How to round double input to two decimal places? Given the output is Decimal something like
    toFixed(2)
    in JS
    i
    a
    i
    • 4
    • 5
  • a

    altavir

    11/09/2021, 10:54 AM
    Some interesting task for those who wants to implement some low-level maths: https://twitter.com/noraltavir/status/1457991689897975812?s=20
    • 1
    • 1
  • a

    altavir

    11/10/2021, 5:56 PM
    I've just finished the first draft of tensorflow integration for KMath (using graph lazy computation of course). https://github.com/mipt-npm/kmath/tree/feature/tensorflow. Comments are welcome (especially from @zaleslaw). I plan to add more operations as extensions, direct operation builder (use tensorflow graph directly with some improvements from a special scope in algebra). Compilation of MST to graph (expressions and preliminary optimizations).
    🔝 2
    z
    • 2
    • 4
Powered by Linen
Title
a

altavir

11/10/2021, 5:56 PM
I've just finished the first draft of tensorflow integration for KMath (using graph lazy computation of course). https://github.com/mipt-npm/kmath/tree/feature/tensorflow. Comments are welcome (especially from @zaleslaw). I plan to add more operations as extensions, direct operation builder (use tensorflow graph directly with some improvements from a special scope in algebra). Compilation of MST to graph (expressions and preliminary optimizations).
🔝 2
z

zaleslaw

11/10/2021, 6:31 PM
Hi, great news, what is the goal of this integration, where can I find some examples?
a

altavir

11/10/2021, 8:10 PM
The goal is to provide low-level tensor and StructureND API implementation over TF. And to allow people create TF lazy graph without the usual boilerplate. Right now I have only one test that shows it is actually working, but we can implement some examples by @Ролан's team since they rely only on tenor API. Several operations are still not implemented, but I will fix that.
z

zaleslaw

11/12/2021, 12:10 PM
So, the idea is pretty clear, I will wait for full implementation or more tests/examples, to understand all the benefits
a

altavir

11/12/2021, 12:28 PM
The primary benefit is that you can do computations with "slow" core and then switch to "fast" tensorflow. As for tensorflow itself, we use lazy graph API even for intermediate computations, so in theory it should be very fast. Need to test all that though.
View count: 7