« first day (1060 days earlier)      last day (715 days later) » 

00:45
Some know more than others though
y-axis is amount of knowledge. First bar is Jon Skeet, second bar is most knowledgeable non-Jon-Skeet human, third bar is you, third bar is most ignorant human
See how you know about as much as the most knowledgeable human (who isn't Jon Skeet)? :P
(and before a pedant calls me out for the lack of units, Jon Skeet's knowledge is infinite, so his bar is infinite whatever units and all the other bars are basically 0)
Well I guess you did prove your point by saying that there's two second bars :p
Edited just in time :P
Dang it I thought I'd managed to edit lock that :p
Wait, now it says the third bar twice
00:51
Heh heh idiot :p
:(
No one is allowed to insult me except me
@user my point was more that some people with more experience with things obviously know more about said things than someone who doesn't have experience with those things
Like I don't really know that much about how scala links files and how it manages to find resources in the resources file. Hell, I don't even know if my js fix works. But I know that you have more of a chance of knowing because you have more experience
@lyxal Well duh, that's what having experience means
00:52
@user you're not feeds, idiot :p
@lyxal lmao I've never made a cross-platform Scala project before, I have no idea how this works
I just saw that the native Dictionary was in a sussy place and moved it to the right place
@user ඞඞඞඞඞඞඞඞඞඞඞඞඞඞඞඞඞඞඞඞඞඞඞඞඞඞඞඞඞඞඞඞඞඞඞඞඞඞඞඞඞඞඞඞඞඞඞඞඞඞඞඞඞඞඞඞඞඞඞඞඞඞඞ
Fork you
@user that's more than I knew
I'm pretty sure you know that source files go in <platform>/src/main/scala, but if you really want to continue pretending you don't know anything, I can go along with that :P
Anyway, got an essay to submit by midnight that I've barely started on and the 4 coffees I drank aren't helping me focus so I'm going to sign out o/
00:56
o/
@user you're talking to the man who tried using golang instead of scala because it had a simpler project directory structure
And the same man who put Directory Guide (for people who aren't the best at mentally parsing nested folders): in the readme
@user and no, I didn't know it needed to go in that folder. Otherwise I wouldn't have put it in the wrong spot :p
@user the problem is that they are recursive
if you map one to another, the new one depends on the old one
so you do need a gc
Not necessarily
You can completely clone the list
01:32
and how would that help? thats eager eval, or you have to add cleanup code to the lazylist
01:49
True
@Seggan Ah, I didn't think about laziness
@user does that mean it embeds scalatest for every project?
I think those are the resources for ScalaTest docs?
but it does that for every project?
I have no idea
Gonna have to do some digging later
01:55
@emanresuA We have more Makefile problems...
It won't build on my Linux VM
uname -m?
Quick question: is F the same as set difference?
or is that <-> (imagine that's the unicode character)
F seems to be it
@emanresuA x86_64
It's working for you, right?
¯\_(ツ)_/¯
yes
gtg now
02:01
@user So then why does Þ∞‹ Þ∞ F 10Ẏ return #[0|1|2|3|4|5|6|7|8|9#]? It should just be #[0#]
because #[0|1|2|3|4|...#] - #[1|2|3|4|5|...#] = #[0#], right?
Yeahhh
Except these are infinite lists
is that a bug or is my set math wrong?
So maybe it just doesn't bother searching?
looks like it
0 100 r 1 100 r F gives #[0#] as expected
Perhaps we should have a way to say that a lazylist is monotonic?
So it knows to stop searching at some point?
02:03
it should work with non-monotonic lists
It can't work if rhs is a non-monotonic infinite lazylist
It could but it'd just hang on something not in lhs
03:03
but how can you tell a list will stay monotonic after transformation?
You can't, but you do know that some transformations will preserve monotonicity (is that a thing?)
e.g. adding a single integer to a list
Too hard to keep track of, though :(
^ thats my point
 
1 hour later…
04:33
shouldn't be that hard to keep track of
04:56
There's a way, but it's O(n^2)
Wait nvm that doesn't work
05:19
:(
I got an O(1) way to do it, except the constant is infinity :P
@emanresuA I'm switching GMP over to a dynamic library so we don't have to do all this stupid cross-copmiling stuff, got it working on Linux which is a relief, but getting to work on Mac is going to be very painful
05:46
Okay (also argh)
@emanresuA no no that's Jyxal (the non js edition) you're thinking of
That's written in java
True story: the parameter for the main method used to be called arghs, because writing the main method caused programmers to emit several "argh"s. Over time, the "h" was dropped, making it "args." Nowadays, people think that it's a shortening of "arguments," a very plausible but ultimately wrong explanation
06:40
@emanresuA still writes String[] argh in Java
in The Sand Trap, 2 days ago, by emanresu A
I'm doing a java course too and argh (specifically public static void main(string[] argh))
I know
:p
That's why I mentioned it :p
Has he told you about our teacher? He gave me like 50/100 or something for doing "more than he asked for"
I've submitted ReverseString.java to three separate assignments.
06:46
@tybocopperkettle Did you inadvertently break stuff while trying to do more than he asked for, or was your teacher just being a jerk?
My CS teachers in high school didn't really care much about my work as long as it worked
@user Being a jerk
I've managed to submit a ridiculously over-engineered project to do some basic string manipulation stuff (think packages nested 4 levels deep, two dozen different classes) without the teacher batting an eye
@tybocopperkettle rip
@user Lol nice
07:04
hype
 
2 hours later…
08:58
Duckduckgo's new vyxal chat simulator
 
1 hour later…
10:18
oh huh
as predicted, my javascript dictionary thing is completely broken
hard to say I'm surprised
feels like it's only natural
[error] 7 |@JSExportTopLevel("Dictionary")
[error]   |^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[error]   |You may only export public and protected objects
:thonk:
[error] vyxal.Dictionary$dictionary$ needs to be imported from module 'dictionary.js' but module support is disabled
I think I need some weezer to deal with this
oh boy build file errors
those sure are fun
best part is the build errors are due to an issue with the build settings provided by scala.js
scalaJSLinkerConfig ~= { _.withModuleKind(ModuleKind.CommonJSModule) }
                         ^
[error] Type error in expression
oh
turns out I placed the settings in the wrong place
man that's not clear
I had placed it before:
  .nativeSettings(
    // Scala Native-specific settings
    nativeConfig ~= {
      _.withEmbedResources(true)
    },
  )
not realising .nativeSettings was method chaining from a larger chain of methods
ah dang
  @JSImport("dictionary.js", "dictionary")
node no like that
at least not in the browser
10:57
'use strict';
import * as $i_dictionary$002ejs from "dictionary.js";
thanks scala.js
thanks for causing a syntax error
Uncaught SyntaxError: import declarations may only appear at top level of a module
why am I even making the dictionary objects anyway?
I forgor what the reason was
oh yeah right the dictionary not working in js
just... fetch() it from the repo
do the easy thing
you seem to not understand the problem
the problem isn't that it can't find the resource
it knows right where it is
it's when you create a new Context() object
and it tries to read from a non-existent text file in the scala
things are broken on a more fundamental level than just "can't find the file"
wow
good luck with that! :p
!!/status
@Ginger I am doing somebody's spaghet.
SPAGHET
11:11
export const dictionary
> Uncaught SyntaxError: export declarations may only appear at top level of a module
It's right there at the top of the file
how much more do you want??
> Uncaught SyntaxError: import declarations may only appear at top level of a module
import * as $i_dictionary$002ejs from "dictionary.js";
'use strict';
var $linkingInfo = Object.freeze({
  "esVersion": 6,
  "assumingES6": true,
  "productionMode": false,
  "linkerVersion": "1.13.0",
  "fileLevelThis": this
it's also right there at the top ???
export const dictionary = {short:"vyxal|fizz|buzz|hello|Hello|world
IT'S THE ONLY THING IN THE ENTIRE FILE
Uncaught SyntaxError: export declarations may only appear at top level of a module
THERE IS ONLY ONE EXPORT IN THE ENTIRE FRICKING FILE
(no, it's not because the dictionary isn't closed - the dictionary is several hundred kb. It is not fitting in a single chat message)
11:31
oh
it was because vyxal.js and main.js weren't being included as modules in the pages code
12:15
TIL scipy has a convolve function
it even uses fft :/
@lyxal lmao
12:43
So here's where I'm at
The dictionary.js file is imported by the scala
this is done by:
  @js.native
  @JSImport("./dictionary.js", "dictionary")
and so because it's imported, anything that touches the generated js needs to be a module
so now there's three js files:
- main.js
- vyxal.js
- vyxalHelper.js
vyxal.js imports vyxalHelper.js and sets window.Vyxal to the imported thing
and main.js can access that just fine
The problem is that the web worker that runs the code doesn't like any of this
12:57
hmm
Can you let the dictionary be a text file?
javascript no text file reading
good lord what is this sorcery
Lyxal created branch dictionary-object in Vyxal/Vyxal
that's an attempt with just having the dictionary as a big juicy file
problem is that it takes a really long time to compile
And what about the webworker being able to access the dictionary via github?
13:03
that's not the problem
the problem is that once you create a blank context, it tries to read the dictionaries, but fails
because it hasn't had the Globals object that has the dictionaries already set
oh, cool
 
5 hours later…
18:09
dependabot[bot] created branch dependabot/pip/msgpack-1.0.5 in Vyxal/VyxalBot2
dependabot[bot] opened pull request #38 (Bump msgpack from 1.0.4 to 1.0.5) in Vyxal/VyxalBot2
dependabot[bot] opened pull request #39 (Bump platformdirs from 3.1.0 to 3.1.1) in Vyxal/VyxalBot2
dependabot[bot] created branch dependabot/pip/platformdirs-3.1.1 in Vyxal/VyxalBot2
18:54
Wow, Scala and JS really do not like to play with each other
I'm sorry you had to go through that lyxal
What's up with the other dictionaries-object branch?
19:15
GingerIndustries approved #38 (Bump msgpack from 1.0.4 to 1.0.5)
GingerIndustries merged pull request #38 (Bump msgpack from 1.0.4 to 1.0.5) in Vyxal/VyxalBot2
GingerIndustries deleted branch dependabot/pip/msgpack-1.0.5 in Vyxal/VyxalBot2
20:15
GingerIndustries approved #39 (Bump platformdirs from 3.1.0 to 3.1.1)
GingerIndustries merged pull request #39 (Bump platformdirs from 3.1.0 to 3.1.1) in Vyxal/VyxalBot2
dependabot[bot] deleted branch dependabot/pip/platformdirs-3.1.1 in Vyxal/VyxalBot2
@VyxalBot How did it achieve this.
magic
20:39
v2 feature
@user unlike kotlin and js
@VyxalBot ooh yall using msgpack gg
21:34
@user one is just the words placed in a really large file, the other is a weird system of js and imports and other cursed shit
The big file takes several minutes to compile, and the js complains about import errors
Respectively of course
why dont you make it a fetachable resource
as in do the scala equivalent of fetch("/dictionaryLong.txt").then(d => ...)
if scala multiplatform is as good as kotlin, it should be easy to make platform specific code
But the js won't be able to read text files though, right?
> fetch("/dictionaryLong.txt").then(d => ...)
Because if you try to get a resource file, it'll just error like it currently does without any changes wouldn't it?
its a fetch
@lyxal no
why would it
this is a separate file stored on the web server
this aint any fancy js file that you need to import
its just a text file, stored like ur index.html or style.css
21:49
I got access to Github Blocks
whats that
Mar 7 at 21:56, by lyxal
https://github.com/githubnext/blocks/
@Seggan I don't know if scala js lets you do that nicely
why dont you use a lib
or just write some inline js code
I don't think there's such thing as inline js code
21:57
> fetch("/dictionaryLong.txt").then(d => ...)
What's wrong with that?
Where will I write that.
My code
Nvm i guess you guys are talking something esle?
Scala js itself is already a sort of library
Anything you want turned into JavaScript needs to compile as scala first
And then it creates a transpiled version of that scala
@lyxal ... thats stupid
itd be really easy
koltin has the js function for inline js code
@lyxal Why not?
21:59
You ever tried to read a local file with JavaScript?
import scala.scalajs.js
js.eval("...")
@lyxal You need the CORS headers set
Well if you can figure out something that works, place it in a pr
Github pages automatically sets CORS headers
It should already work
That's adding another package
Why not just use js.eval or something
22:01
^
was just suggesting
3 mins ago, by lyxal
Well if you can figure out something that works, place it in a pr
time to be a vyxal 3 contributor
import scala.scalajs.js
import js.DynamicImplicits._
import js.Dynamic.{global => g}

g.fetch(...)
i dont feel like doing scala + setup of scala
use a github codespace
I don't understand your problem though because we already have the dictionary.js working
Actually scalajs-dom is already there so we're fine
Tell me what the point of this vyxal.js and vyxalHelper.js is for? Why not have one file?
WHY IS WORKER.JS BEING IMPORTED AS A MODULE
WHY IS VYXAL.JS NOT EVEN ON GIT
22:17
@naffetS because one imports the other and sets it as a window property
main.js can't be a module because it relies on globally included stuff for code mirror and popper
So it needs to access the exported modules in vyxal.js through the window
@naffetS I thought it was
Did I forget to push it last night?
Huh, looks like I did
One second
setting tons of stuff in window isn't a good practice, and why would you even want it in window?
in The Nineteenth Byte, 10 hours ago, by mousetail
Can you add a third module script that exports the members as window attributes, that then can be loaded by the non-module script?
in The Nineteenth Byte, 11 hours ago, by lyxal
<script src="./vyxal.js" type="module"></script>
<script src="./main.js"></script>
<!-- I want to be able to call the stuff in vyxal.js in main.js without having to make it a module -->
why not just do import { Vyxal } from "./vyxal.js" or something?
In which file?
why do you not want to make main.js a module? modules are the future
22:22
@naffetS because the moment you do that, it loses the ability to talk to code mirror and popper
5 mins ago, by lyxal
main.js can't be a module because it relies on globally included stuff for code mirror and popper
Well dang looks like I've lost the source code for vyxal.js
Oh found it
How the hell did it get stashed on main
So what? don't globally include them, include them in the module
@naffetS Okay it's on git now
I don't see a reason to keep around the current interpreter anyway though, you can easily test PRs with mine
@naffetS but then they need to be imported don't they? And then which properties do you import and even then the web worker script was fricking up the imports
@naffetS this is a problem even with yours
You should remove this btw <script defer src="./worker.js" type="module"></script>
What is a problem? I can fix it up, we don't need two interpreters
22:28
Creating a new context without any previous dictionary knowledge
Yeah they need to be imported, so what? imoprt them
We already do that with dictionary.js and with setShortDict and setLongDict
Inclued the dictionaries somewhere else outside of the context
And how do you pass those around then?
actually why not just do this:
def eval(s: String)(using ctx: Context): VAny =
val tempContext = Context(globals = ctx.globals)
22:32
Because I want eval to work without needing to take context
So it can be called in other places that don't have context
And even then, that's just a bandaid fix. That pushes the problem down the line until the next time there needs to be a contextless function which calls functions which do require context
And sure you can pass context around, but what if I want to call something like multiply in number helpers in a function where passing in context is overkill
23:00
@lyxal Ah ok
I see y'all have a lot of discussion here but I'm going to pretend I didn't see this so I can focus on my exam tomorrow lmao
@naffetS How do we allow that locally?
Do we need to change add something to the HTML?
@user 👍
23:29
Why not just have Dictionary.scala hardcoded?
@user We can't unless you just set up a server with CORS headers set up
23:41
@naffetS because it takes several minutes to compile. And that's a problem for first time compiles on people's systems, for running workflows which don't retain previous compiles and for any time the dictionary decides it needs recompiling
@naffetS Also, apparently a single file is too big for compilation
[error] Generated bytecode for method 'vyxal.Dictionary$.shortDict' is too large. Size: 79932 bytes. Limit is 64KB
And that was after almost 13 minutes of compiling
Bruh
Okay but anyway, we already have JS working so I don't see a reason to mess all this
Just mess with Scala
@naffetS it's the js not working that's the issue
It isn't building the pages
So the thought was "okay import the dictionary.js file"
But turns out that causes a yikes with things not being modules
Hence the js mess

« first day (1060 days earlier)      last day (715 days later) »