« first day (1903 days earlier)      last day (2946 days later) » 

5:01 AM
Hm, how problematic is conditioning on the rank of a matrix if the matrix can be full of floats?
 
@Mego Well, when you have something like parallelizedSieveOfSundaram...
@AlexA. Conditioning?
 
Anonymous
@AlexA. Those words don't mean anything to me, so very
 
@El'endiaStarman if rank(M) == x
 
Anonymous
@El'endiaStarman primes_up_to?
 
@Mego That's still relatively long, and doesn't really say all that much. Say I also had a regular sieveOfSundaram, and maybe a SieveOfEratosthenes too...
 
Anonymous
5:03 AM
Probably very problematic, since FP inaccuracies can ruin Gaussian elimination
 
Anonymous
@El'endiaStarman Why are you solving the same problem 3 times?
 
@Mego The parallelized and not versions are useful in different situations.
Also, uh, imports?
 
Anonymous
Use more namespaces
 
Orrr I can just tab-complete. :P
 
Anonymous
primes.sieves.parallel.Sundaram
 
5:05 AM
GAH
 
Anonymous
Or probably parallel.primes.sieves.Sundaram
 
Anonymous
> Namespaces are one honking great idea -- let's do more of those!
 
Bah, I'll just copy-paste the function when I need to. :P
 
Anonymous
That's not very Zen
 
I don't have time to fiddle with putting it into its own file and having to remember where it is later, and then importing it, etc...
 
Anonymous
5:08 AM
Spend time now, save time and headaches later
 
It's a self-contained function. Copy-pasting works just fine.
 
Hey who recomended that I should install chocolatey?
Nope it was @cat
 
Anonymous
I've been reading The Angry GM's Megadungeon series, and it's been wonderful and enlightening so far
 
well anyways
thanks cat.
@AlexA. lol I checked the transcript
I've got a little problem though.
I don't know, how to install the damn thing.
 
I think I accidentally flagged my own message for moderator attention. :|
4
 
5:12 AM
i mean wtf is a nupkg
@AlexA. LOL
how does that work? Aren't you a mod...?
do you get your own flag..
 
Mods can flag things
 
Yeah but don't you see the flags or whatever and get a warning?
 
I think I canceled it. I'm not actually sure what just happened.
 
oh okay xD
 
¯\_(ツ)_/¯
 
5:14 AM
hmm.. should I extract it with 7zip? Looks like there is stuff in it
no installer in here though. Just compiled code.
 
To install chocolate, insert in mouth and chew
 
@HelkaHomba It eventually gets automatically... uninstalled
 
well
both of your statements were correct
 
XD
 
Anonymous
nupkg is a package manager
 
5:15 AM
unfortunately neither were what I wanted to hear.
2
@Mego okay. So how do I install it?
 
Anonymous
Well, it's a file format for NuGet, which is a package manager
 
okay
I'm looking at the wiki
says I need powershell.
I'ma look for that really quick
 
Anonymous
You have powershell if you have at least Windows 8.1
 
ok got it
 
Anonymous
Open cmd.exe as admin, and do @powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin
 
5:17 AM
@Mego yeah I know. I got win10 btw because my win7 comp died.
ok
ty mego :D
 
Anonymous
Np
 
Anonymous
I'm gonna try it out too, looks neat
 
Who dirtified this? >:U
 
shit
 
5:19 AM
hmm... I don't know if it worked or not
Never gave me a confirmation that it sucesfullly installed
gave me lots of fun little yellow warnings though :D
hurray =/
okay I think its working.
hmm
this makes it wayyyy to easy to install software
lol
 
Anonymous
I wish Cygwin's package manager didn't suck so much. That's one of my few complaints about Cygwin.
 
6:00 AM
> It is not hard to see that here the null space of D is spanned by the indicators of connected components C1 ... Cr of the graph G.
> It is not hard to see
ಠ_ಠ
That's almost as bad as "the proof is left as an exercise to the reader."
 
Anonymous
Those aren't words
 
Don't you have a math degree? :P
But yeah I barely understand that sentence. And the paper.
 
Anonymous
I have a CS degree with a minor in math
 
Anonymous
My minor was a lot of calculus and numerical methods
 
Oh that's right, I remember that now.
Did you learn numerical methods for linear algebra?
 
Anonymous
6:11 AM
Some, yeah
 
I could have taken numerical analysis as an elective but I took something else instead, I forget what, but in hindsight I would have loved to learn that stuff.
 
Anonymous
I had to take 5 math courses for the minor. Two were dictated by the major (Calculus I aka differential calculus, and Calculus II aka integral calculus and sequences/series). For the remaining three, I chose Calculus III (3-and-higher-dimensional calculus), Differential Equations, and Numerical Methods.
 
Anonymous
It's funny because there were 6 people in Numerical Methods: 3 compsci majors and 3 math majors
 
A course in linear algebra wasn't required? o_O
Well maybe not for a minor I guess
 
Anonymous
No, but when my Diff Eq professor realized that linear algebra wasn't a pre-req for the class (lots of people in there were taking the courses concurrently), we got a very brief crash course in linear algebra
 
6:14 AM
Ah, yeah
 
Anonymous
He then went and had a chat with the department head, who was similarly surprised. Apparently the registrar's office had messed up and deleted the pre-req. It got fixed for the next semester.
 
Anonymous
I should probably take a course on linear algebra from Khan Academy or MIT OCW
 
Heh. In my university, differential equations and linear algebra were separate courses entirely but there was a course called linear analysis that combined the two. That was an awesome class.
@Mego I recommend Coursera. I've done a bunch of Coursera classes, they're nice.
 
Anonymous
We learned how to analyze some of the nastier diffeqs with linear algebra
 
Anonymous
I think I have an account on Coursera
 
Anonymous
6:17 AM
Yep, I do
 
Anonymous
I don't see any linear algebra courses on Coursera
 
:(
 
I occasionally like going through my alma mater's course catalog and wishing I had taken a bunch of other classes.
 
@AlexA. I have a math degree and I have no idea what this means. :P
 
6:19 AM
I'm glad I'm in good company then :D
 
Most of Math Overflow probably does, though
I mean, look at Math Overflow questions
 
Anonymous
@AlexA. Where are all the 200-level courses? :o
 
@MarsUltor It's for professional mathematicians
 
@AlexA. At least mostly
 
@Mego There... aren't any.
 
Anonymous
6:21 AM
What? Why?
 
¯\_(ツ)_/¯
 
@AlexA. It wasn't intended exclusively for them, but apparently it's less well-known than SO so it doesn't recieve very many really easy questions.
 
100-level is n00bs, like calculus, 300-level is hard, 400 is wish you were dead
500 is graduate, so already dead
or at least dead inside
 
Anonymous
Here's my alma mater's course catalog for s&m: sfasu.edu/documents/09-sciences-mathematics.pdf
 
> 100, 200, 300 and 400 level subjects refer to first, second, third and fourth year subjects respectively
Mego + alma mater = I think I've gotten Mego's age wrong
 
6:25 AM
@Mego Seems like so few classes in pure math
 
Anonymous
000-level is "why are you in college if you haven't learned this oh right football and basketball", 100-level is freshman/introductory subjects, 200-level is sophomore/intermediate, 300-level is junior/advanced, 400-level is senior/capstone, 500-level is graduate, 600-level is post-grad (doctorate)
 
@MarsUltor I think he's 21 or 22
 
Anonymous
I'm 21
 
Anonymous
Graduated last May
 
FRESH BLOOD
 
6:25 AM
You must've been one of the youngest in your grade.
I was one of the oldest, and I'm 23 + graduated last May. :P
 
I graduated at 21.
Oh god, I graduated 5 years ago this year.
 
I was 22 when I graduated.
 
Anonymous
SFA is a university that focuses much more on hard sciences (geology, forestry, compsci, engineering, nursing) than math and stats
 
Anonymous
And much more on basketball than academics >_>
 
Chat poll: how do you pronounce "000"?
I say it mentally as "oh hundred".
 
6:27 AM
zero zero zero
 
Anonymous
@El'endiaStarman I was one of the youngest of my high school graduating class, and I finished my 4-year degree in 3. So yeah, I'm pretty young :P
 
Anonymous
@El'endiaStarman ' '.join(['zero']*3) or "triple zero"
 
@Mego Wow, very nice. I could've done that if I had picked the right classes (I took 3 classes my last year.)
I guess the pronunciation of "000" depends on context.
If we're talking about 100 level courses...
 
@Mego The former is 7 bytes longer than just saying "zero zero zero."
 
Anonymous
I came in with 27 hours from AP in high school, and did 17/18-hour semesters every semester but my last
 
Anonymous
6:29 AM
@AlexA. code shuffleboard yo
 
Anonymous
Alternatively: ('zero '*3)[:-1]
 
@Mego I don't remember the exact numbers, but basically the same for me.
 
Anonymous
Even better: (' zero'*3)[1:]
 
@Mego How do you pronounce ' '.join(['zero']*3)?
 
Anonymous
@MarsUltor join a list containing the string 'zero' 3 times with spaces
 
6:32 AM
Hello
 
o/
 
@zyabin101 it's an alias for exit
 
7:10 AM
0
A: Sandbox for Proposed Challenges

Dr Green Eggs and Ham DJExpand a C-array code-golf In the C programming language, arrays are defined like this: int foo[] = {4, 8, 15, 16, 23, 42}; //Foo implicitly has a size of 6 The size of the array is inferred from the initializing elements, which in this case is 6. You can also write a C array this way...

 
0
Q: Let's make a rollercoaster!

BálintYou goal is to generate an ASCII rollercoaster lut of #-s. Input Your input is an integer higher than 8 (you'll see why), this is the amount of rails you have. Rules 1.: You need to place down every rail and you can't buy more (this may lead to impossible cases) 2.: Because we're working wi...

0
Q: Inbetween fractions

VisualBeanInbetween fractions The challenge: You will need to create code that takes 3 inputs; 2 integers and "a fraction representation type" - whichever type that suits your language for representing the fraction increments) ie. If you choose string the input would be "1/4" Input can be anywhere reaso...

 
It's not my alias
It's from an oh-my-zsh plugin
 
I just realized
Harry Potter is a really sad story :(
 
Anonymous
No shit, Dumbledore
 
@MarsUltor \(o_O)/
 
Everything is just in Harry's head, to cope with the abuse from the Dursley's
 
8:02 AM
I can't just go and delete-commit this file.
 
Anonymous
@orlp At first my reaction was "then why would Harry be such a loser in his own story?" Then I remembered 11 years of emotional abuse.
 
Because most devs have to use bash.
Even when they love zsh.
Even when they have zsh on their daily workflow.
 
yeah, I have it in my .bashrc as well
 
Hey Mego, do you have a fraction type in Seriously?
 
But I haven't used bash for ages
@Sherlock9 Don't think so
I don't think very many languages have a fraction type
 
8:10 AM
Python and Ruby do. And it would help with the recent "Inbetween fractions" challenge
 
@orlp Nothing prove or disprove this theory, but I prefer to think it is a fantastic world, not a fantasmagoric one
 
@Sherlock9 Not natively
 
@orlp The major things represented are Death and Love (more than Love, it's its connection to Death)
 
What languages are currently in progress? (apart from Pytek and Cheddar?)
 
@Katenkyo What are your definitions of these two terms, fantastic and fantasmagoric?
 
8:20 AM
@Sherlock9 Fantastic -> A world build around some settings that couldn't exit in the our world (magic, dragons, ESP); Fantasmagoric -> A non-real world (I mean, it doesn't even exist in the book/movie) generated by one's mind
(that's some non-official definition, but I've seen them used this way in multiple occasion)
Also, I think Fantasmagorie/Phantasmagorie containing the root fantasm supports this definition
 
Anonymous
@Sherlock9 Not unless you want to use eval to make it happen
 
Anonymous
@MarsUltor Seriously v2 (name TBD)
 
@Mego name should be Seriously?!
 
I believe that will invalidate my idea of trying to write a golfy Seriously fraction answer
 
Anonymous
@MarsUltor The interrobang is already the language's icon
 
8:24 AM
First version was Seriously, the second one can be Why
 
Anonymous
I'm kinda leaning toward Actually
 
Honestly? Gravely?
Really
Definitely ^
 
Why'd you remove Obviously, zyabin? We were starring it
 
then v3 could be Honestly
 
@MarsUltor Then v4 will be Obviously. Here goes my idea of a readable programming language.
 
Anonymous
8:26 AM
@Sherlock9 You still could write a Seriously answer with fractions, but 1) it wouldn't work on TIO, and 2) it would probably be the same length as the Python answer
 
@Sherlock9 ^^
 
Thanks anyway, Mego
 
Anonymous
The alternative is to use a list/2 ints to represent the fraction and do fraction arithmetic the hard way
 
@Mego name will be Obviously
Here, I put it back.
 
Thank you
 
Anonymous
8:28 AM
And now I'm off to sleep
 
Goodnight
 
@Mego o/
 
halp
How do I determine if a number is negative without comparison operators?
 
In which language?
 
Except comparison to 0
in Unipants' Golfing Language, 20 hours ago, by Mars Ultor
i
$cuu/_$/cu%-?cuuo_:     # divisible by 2?
_uuu?^^/_$/cu%-?cuuo_:: # start from 3, test each odd number, print if found.
# first '?' is supposed to be a 'l', but haven't done the stop condition yet
^ that works fine, but for the stop condition I need to tell if the square of the current number is greater than the original number
I've got if(0) working by 1 - (x/x)
Since 0/0 gives an error, which pushes 0
 
8:57 AM
That is some UGL-y golfing
 
My brain is so tired that i feel like walking around while saying meeeep meeeeep meeeep
 
@Katenkyo lol
 
@MarsUltor Apologies for the odd joke. I'll see what I can do after look at the docs
 
@Sherlock9 There's a help button in the link
That's pretty much all the documentation there is
 
Also, the official interpreter adds some changes:
 
9:00 AM
Yeah
 
# starts a comment for the rest of the line.
> THESE DOTFILES ARE IMPRESSING YOU
Saw this on Zach Holman's dotfiles commit history.
lol
 
 
1 hour later…
10:06 AM
1 year later...
 
1 millennium later...
 
10:29 AM
We're in 3017. Someone should say "1001 years ago..." because I don't want career chips.
 
5 billion years later...
Wait, wrong way, right?
 
Yup.
Wait
One person can only move the room through time once per day. We're still in 3017, and we have to engage another person.
 
@AandN @BrainLot @IGoBest help?
 
10:50 AM
@AlexA. ^
 
11:03 AM
Pseudocode:
if (a*a)/a == a
or
if (a*a)/a - a == 0
 
Pseudo-UGL:
 
Sorry for the multiple pings
Essentially
 
aa*a/a-
where a is the value.
 
And so the if statement can be with a at TOP can be $$$?*/-: with a fourth $ if you need to keep a for later
 
One thing: how to make a construct for iff top of stack is 0?
 
11:07 AM
@zyabin101 Easy
dupe, divide, subtract from 1
 
What happens when you divide by zero?
 
it pushes 0
that's why it works
 
Oh cool
You should put that in the docs
I put our results in the UGL room
 
@cat I'm easy enough to summon, as you can tell, lol.
Always up for chatting about Racket, yes. ☺
You can always email me at cky@cky.nz also.
 
11:29 AM
@ChrisJester-Young Slideshow?
Slideshow is a program in the Racket complex that allows you to program presentations.
 
@zyabin101 I haven't used it before but I'd be happy to learn.
 
@ChrisJester-Young Good! I'll ping you when I'm back home.
Until then, I can't teach you.
 
11:46 AM
is it possible to do automatic memory management without garbage collection?
aka, keep a hashmap of Object, Set<Pointer>, and when the object goes out of scope, remove the pointer from the set
 
That isn't garbage collection?
 
it would also have the hashmap
but it runs periodically
(if I understand correctly)
where I'm proposing something that happens immediately when the object goes out of scope
 
12:04 PM
@ChrisJester-Young I'm home.
Please wait, running Slideshow...
@ChrisJester-Young So, the Slideshow interpreter is the binary in the Racket folder called Slideshow.
???
 
@zyabin101 Cool.
@zyabin101 Is that actual question marks or just mojibake?
@NathanMerrill You can do something like this with C++ RAII.
So, in Java, there's a concept of a reference queue where you get notified of objects that are ready to be freed. I'm not sure if C++ weak pointers have a similar reference queue concept, but if so, it's easy to implement a container that monitors that queue and removes objects that are about to be freed.
And when I say C++ weak pointers, I'm specifically referring to std::weak_ptr.
 
12:21 PM
well, I read every answer on this question:
42
Q: Why Garbage Collection if smart pointers are there

GulshanThese days, so many languages are garbage collected. It is even available for C++ by third parties. But C++ has RAII and smart pointers. So what's the point of using garbage collection? Is it doing something extra? And in other languages like C#, if all the references are treated as smart pointe...

and it seems pretty clear that GC is the way to go
 
@ChrisJester-Young Actual question marks.
 
Don't get me wrong: I like GC. But you can very much do C++ resource management without GC.
 
right. I was actually reading how Rust does it
 
I mean, that's what the whole premise of RAII is.
 
which is quite smart
 
12:22 PM
Ah, I haven't studied up on Rust much.
I should, though.
 
So, when you run the Slideshow binary, you are presented with three options: Run Tutorial, Open File, Quit.
Quit is self-descriptive. What do you expect?
 
Oh, I mean I haven't gotten around to learning the Slideshow DSL.
I mean, most of the time I just use Google Docs to make presentations, lol.
 
Then, I present the "Hello, World!" show.
#lang slideshow

; Slide number 1
; 1 line
(slide (t "Hello, World!"))
Yup, 1 line.
 
Now I'll explain every part of the show.
 
12:23 PM
I should try to port my existing presentations to Slideshow just to get a hang of it.
I have a number of existing presentations, at speakerdeck.com/cky
 
@ChrisJester-Young Umm, that's a few. Good.
 
#lang slideshow is the preamble, that you see at the top of every Slideshow file.
 
Ever wondered what happens to a shopping cart when it crashes into a wall with 120km/h?
 
Just like the #lang racket preamble at the top of regular Racket files, but slideshow is another dialect.
 
12:25 PM
 
@flawr :)
; Slide number 1 and ; 1 line are comments, as you would expect.
The majik is in the (slide ...) struct.
(slide elements...) is a struct accepting any number of arguments generating a pict, the unit of imaging in Slideshow.
 
And I guess Slideshow just processes top-level slide structs? So no actual "command" procedure to run?
 
It arranges them in a slide, that is shown on the screen, as you would expect.
@ChrisJester-Young Yup.
 
That's a very neat DSL.
I really want to design a clean DSL myself, just to demonstrate the power of Racket. :-)
 
(t string) is a function generating a pict, showing the text passed on as an argument.
(t "Hello, World!") returns a pict showing "Hello, World!"
(slide (t "Hello, World!")) returns a slide showing "Hello, World!"
To reiterate, the show:
#lang slideshow

; Slide number 1
; 1 line
(slide (t "Hello, World!"))
Copy this source into a file with the extension .rkt, for example hello-world-show.rkt.
Then you have two ways to run it:
1. Run the Slideshow binary, click Open File and select hello-world-show.rkt or whatever name you chose for the file.
2. If you're luckily running Windows, you can just drop the file over the Slideshow binary.
You'll see the text Hello, World! in a full screen window.
It's letterboxed on wider screens, like mine.
The client area is 1024 x 768, it is zoomed to match the client's screen.
 
12:36 PM
what's a use case for needing to access a character in a string at a specific point?
like, String.charAt(4)?
 
There are borderlines which limit the effective usage of the client area.
@ChrisJester-Young ?
^^
 
12:53 PM
1
Q: Sort a CSV List

Michelfrancis BustillosThe Challenge It's quite simple really, sort a list of numbers. Details You must sort a CSV (comma separated values) list of numbers in ascending order, without using any built-in sorting functions/libraries/etc. Input/output can be done in an method. Standard loopholes are disallowed as a...

 
@zyabin101 Makes sense. :-)
@NathanMerrill When using libraries that don't provide an iterator interface over strings.
Like, both Java and JS are stupid in this regard.
I really just want to be able to do for (char c : str) { ... }
 
We can't possibly not have an older "sort these numbers" golf, right?
 
So, (tt string) produces a pict with a fixed-width font.
There is also an option, #:layout top, to align the slide to the screen top.
 
@zyabin101 You should make a slideshow that describes everything you've described above. :-D
 
@ChrisJester-Young Agreed, but there's always the clunkier for(char c : str.toCharArray()) :/
 
12:58 PM
The #:title option supplies a title shown at the top of the screen.
 
@ChrisJester-Young Right. But assuming you did have an iterator, is there really any usecase?
 
Wait
 
I ask specifically, because Rust doesn't offer O(1) character acccess
 
It doesn't describe everything described above.
 

« first day (1903 days earlier)      last day (2946 days later) »