« first day (2590 days earlier)      last day (2239 days later) » 
00:00 - 18:0018:00 - 00:00

ngn
6:00 PM
@Lembik if I stick to my guess, 1[{i}] should be {1, 1+i, 1+i+i^2, ...}
@Lembik and 1[∅] is just {1}
 
6:40 PM
@ngn interesting.. not that I understand the algorithm yet :)
 
Question: By default ld, seems to reference start as the entry point. This start, if I alias _main to it, it results in the code running but it segfaults at the end. Is this because of the return?
 
Anonymous
6:59 PM
 
Anonymous
start actually does more than just calling _main
 
huh, ok I suppose I should do that
 
don't think there's any harm in linking in crt0
 
@quartata where would this be located though
$ ls /usr/lib | grep "crt0"
$
 
7:04 PM
it's in /usr/lib
you might have crt1 instead
depends on the OS
 
:| why is cross platforming so hard :(
 
I guess you're OS X right
just link either crt0 or crt1 they both do the same shit
one sec let me take a look at what Rust does
 
@quartata yeah but what if it's windows and there is no /usr/lib
 
pretty sure it's there somewhere on windows
 
Anonymous
@quartata Not quite - crt0 doesn't handle global constructors, which crt1 does
 
7:06 PM
> The C Run-time Library (CRT) is the part of the C++ Standard Library
> C Run-time Library
> C++ Standard Librar
why microsoft
 
@Mego right
but he doesn't need to worry about that
 
Anonymous
On Windows, you're either linking against MSVC which has its own stupid system, or using MinGW/Cygwin
 
^^ i have my own weird global startup code
 
Anonymous
And it should be /lib/crt0.o
 
macos apparently doesn't have that
 
Anonymous
7:08 PM
With more pieces inside /lib/gcc/whatever/version/crt*.o
 
Anonymous
You're going to make me boot up my work MacBook, aren't you :P
 
I'm on OSX
I have /usr/lib/crt1.o
 
@Mego mac doesn't have gcc installed by default though, it just symlinks it to clang
 
he's talking about MinGW
gonna have to say though
 
Anonymous
I actually don't have a crt1.o on my system o_O
 
7:21 PM
Please flag the last two main questions as spam :) Also I think that user needs to be suspended or destroyed
 
WHY ARE AVOCADOS SO EXPENSIVE
 
Is -7 when posted by NMP a record?
 
Does Stack exchange have an IP address ban?
 
IP ban is a bad idea because some people might be unable to log in from public computers after you IP ban them and spammers can just switch computers to evade IP bans. I'm not sure how they prevent users from coming back with new accounts though... Might just be an IP ban, I'm not sure.
 
I don't know what the best flag is for the current user. "Very low quality"?
 
7:33 PM
wdym
NAA it
not really spam so I did NAA+VTD
 
Right. And what is the correct flag for their questions (which are all gone now)?
 
Anonymous
@H.PWiz Yes, but it has to be implemented by the CMs
 
Anonymous
@H.PWiz Pick a flag. They all apply. Except for maybe spam, but it barely matters in this case.
 
Anonymous
@HyperNeutrino There are also easy ways to circumvent IP bans, like proxies/Tor
 
That's true as well
 
7:36 PM
@H.PWiz the user who posted has an id 1 greater than the user of the previous such answer
 
Anonymous
@HyperNeutrino Penguinja'd
 
@Cowsquack I'd be surprised if the events were not at least related
 
Now we can only count for him to give up.
 
7:38 PM
wait when a mod force-deletes something that's been high-priority flagged, Community still edits out the content even though it wasn't six-flagged?
<V><D><M><F><1><ENTER><M><D><ENTER>
 
Anonymous
@HyperNeutrino Yep - when mods mark red flags helpful, it's the same as if they received six red flags (or one mod red flag)
 
ohh okay. makes sense
 
CMC: given an array of strings (no string will have newlines), a multiline string separated by newlines, or some other equivalent input form, remove every line but the first and the last
you are guaranteed to have a string with at least 2 lines
 
ಠ_ಠ Adding to a text file, saving as UTF-8 in Notepad inserts a \ufeff byte at the start
 
Jelly, 3 bytes: Ḣ;Ṫ
Also 3 bytes: .ịṚ
 
7:42 PM
Pyt, 6 bytes: Đ0⦋1~⦋
 
remove every line but the first and the last
 
@Cowsquack which means take a list and return its first and last element, no?
 
yes
 
o nvm you were talking about the two deleted messages
my bad
Python 3, 21 bytes: lambda a:a[:1]+a[-1:]
 
could you provide a tio (for the jelly)?
 
7:44 PM
@Cowsquack Canvas, 3 bytes: JoK
 
Proton, 10 bytes: a=>a[0,-1]
 
how has progress on canvas been, dzaima?
 
Proton 2 in theory: #[0,-1]
 
@dzaima You're JoKing. 3 bytes?
 
Dammit. made a mistake. Pyt, 7 bytes: Đ0⦋⇹1~⦋
 
7:45 PM
@Cowsquack not much has been added lately, as I'm lazy. A lot of missing built-ins :/
 
@mudkip201 Please use backtick syntax highlighting with code. It makes it difficult to read otherwise
 
@Cowsquack Clean, 30 bytes: import StdEnv;?l=[hd l,last l]
 
@cairdcoinheringaahing jk has appeared in some SOGL answers too :p
 
@cairdcoinheringaahing I changed it to use backticks. Does it look that different?
 
@mudkip201 Yes, much. Thanks!
 
7:47 PM
05AB1E, 8 bytes: D0ès1(è)
 
@mudkip201 It isn't a strange blue on my screen anymore, so that's nice.
 
05AB1E, 4 bytes: ¬sθ)
 
@Cowsquack SOGL, 3 bytes: KoJ. Not JoK as SOGLs j and k were in an illogical order (j pops the last line but is before k in the alphabet)
 
sed, 7 bytes, $p;2,$d
 
VSL can now compile to webassembly!:
$ vsl build test.vsl -t wasm -o test.wast
<stdin>.LL -> .vsl-temp034365ad.o
.vsl-temp034365ad.o -> <output>
$ cat test.wast
(module
 (type $FUNCSIG$ii (func (param i32) (result i32)))
 (import "env" "puts" (func $puts (param i32) (result i32)))
 (table 0 anyfunc)
 (memory $0 1)
 (data (i32.const 16) "Hello, World!\00")
 (export "memory" (memory $0))
 (export "main" (func $main))
 (func $main (; 1 ;) (param $0 i32) (param $1 i32) (result i32)
  (drop
   (call $puts
    (i32.const 16)
   )
  )
  (i32.const 0)
only problem is I have no idea how to use webassembly
 
7:53 PM
sed -n, 5 bytes, 1p;$p
 
@Downgoat The (thing with (a lot of (brackets))) is VSL?
looks like lisp
 
@labela--gotoa that's webassembly IR
 
O_O
wasm looks like this?!
woah, this is serious
 
More specifically, the S-expression form
 
@labela--gotoa WASM is clearly a spy from Lisp.
 
7:58 PM
@Downgoat I never worked with VSL or WASM, so I don't really know, but as far as I can understand from MDN, this is the "readable" form of WASM, which can be converted to real WASM with some specific tool, after that it can be used
 
8:33 PM
Hello I have two basic questions about Jelly. The first is that do the ( and ) (not their smaller-sized equivalents which has a different byte code in the code page) mean anything special in Jelly? I have failed to find it as instructions or quicks or syntax characters in the document. The second one is what should a beginner do to debug the program? Are there any internal state dumps or things like that? Thank you very much in advance.
 
@WeijunZhou No, they do not mean anything special, and I don't know of any way to debug the program... try rubber duck debugging.
 
Thank you for your quick answer. I will try to learn from examples.
 
You're welcome
 
Congrats!
 
8:38 PM
Or you could lose rep :p
 
@WheatWizard I like how I accidentally invented a new term for that xD
 
Anyone here work with WASM?
WASM has a weird linear-memory model
and it seems like I can only allocate in 64-bit 'pages'?
Is it possible to reserve just X bytes?
 
9:03 PM
I found out why reduction works right-to-left in APL: alternating series
There was a message sequence (no pun intended) before about why it's done that way. Could that have been it?
 
0
Q: Help: Multi-line, Restricted Character Coding Challenge

Elliott WheelerI'm attempting to create a function over multiple lines. Parameters of the challenge: function returns 'Hello, world!', only 2 characters per line, below 40 lines. In the below attempt I am using constructor, but I can't get it under 42 lines. Is there a way to actually do this with constructor o...

 
eeyyyyy VSL wasm hello world worked :D
2
 
@Downgoat this is correct
remember that wasm like emscripten works off of typed arrays pretty much, so rather than having just normal byte addressable memory it usually has different views for the different sizes
although wait you said 64 bits?
I was pretty sure it was limited to 32 bits last time I worked with it
 
sorry meant 64kb pages
I guess now I have to rewrite libc in JavaScript...
 
Ohh this is from WebAssembly.Memory
that's on the JS side of things
 
9:14 PM
I am creating the memory object from within LLVM but for memory management VSL generates malloc() and free() calls. Right now any code using Automatic Memory Management (which generates these calls) errors since I haven't provided their implementations
mocking puts was easy enough but managing memory tables sounds hard :(
should work on all popular browsers (safari, FF, and chrome)
 
you need to use emscripten's libc
 
@quartata that is written in C though
I don't want to have to compile entire libc everytime you compile to wasm, or am I missing something
 
yeah, you compile it to wasm
you don't have to recompile it every time...
I think this is the latest:
 
@quartata ok well either I provide a giant compiled .wasm libc in VSL source or I compile it
 
wait there's another one
 
9:26 PM
yeah there's the one inside emscripten repo
 
9:58 PM
0
Q: Stereographic projection of polyhedra

PyRulezYou will create a program that generate the stereographic projection of polyhedra. In particular, to keep things simple, we'll only focus on chamfered dodecahedron. Given a natural number n as input, and also a natural number d your program will output an d pixels by d pixels image which is the...

 
10:48 PM
does anyone have any idea what could cause this to segfault:
(__TEXT,__text) section
_main:
0000000000001f80	pushq	%rax
0000000000001f81	leaq	0x2a(%rip), %rdi ## literal pool for: "Hello, World!"
0000000000001f88	callq	0x1f90 ## symbol stub for: _puts
0000000000001f8d	popq	%rax
0000000000001f8e	retq
I don't see how pushq and popq could cause segfault, the leaq doesn't read memory itself, the only thing I could think of is the callq but that's just a puts() call
 
11:00 PM
What about inside of puts() ?
If you give it a bogus argument.
 
ok so I inspected with lldb and it works 100% fine when run w/ LLDB
 
Anonymous
Missing a null terminator on "Hello, World!"?
 
Paste the whole (LLVM IR?) program?
 
; ModuleID = 'main'
source_filename = "main"

@0 = private unnamed_addr constant [14 x i8] c"Hello, World!\00"

define void @main() {
entry:
  %0 = call i32 @puts(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @0, i32 0, i32 0))
  call void @exit(i8 0)
  ret void
}

declare i32 @puts(i8*)
declare void @exit(i8)
Too lazy to make crt for vsl so right now doesn't get anything
 
Anonymous
11:04 PM
@Downgoat That's probably it - lldb will use its own crt0
 
Anonymous
Also shouldn't it be c"Hello, World!\0"? Why the extra 0?
 
I never had any problems with using the C stdlib, stuff just worked.
 
@Mego that would mean the rdi register should be at least 1 but that's not the cast it's zero
@Mego I think LLVM uses two hex digits for escapes always
 
I found a language I thought would make a good sumbission to the programming languages quiz, but it doesn't have an esoalngs or wikipedia article. So I'm just going to post it here in case anyone wants to have a go:
output1d100
 
Anonymous
@WheatWizard anydice?
 
11:06 PM
Yep :)
 
(lldb) memory read $rsp $rsp+1
0x7ffeefbff7e8: 01                                               .
huh looks like it is
wait I'm looking at wrong register
(lldb) register read $rdi
     rdi = 0x0000000000000000
yeah this shouldn't be zero for crt
and also the fact rdp =/= rsp
 
11:37 PM
Another "would be invalid" PLQ2 entry if anyone is interested
2
 
Does anyone know of a good resource for learning Prolog?
Everything I've found seems to go right into using prolog without explaining how declarative programming works. I like how Learn you a Haskell for Great Good spends a while explaining what functional programming is before teaching you how to apply all the tools Haskell has.
 
Functional programming is declarative too fwiw
the distinction is that prolog is a logical programming language
I learned prolog mostly by goofing around with it. But that's probably not too helpful
 
I tried that, but just couldn't really do anything with it.
 
@Pavel Have you done proofs using constraints?
 
11:53 PM
Don't think so
 
Is there a Prolog room?
 
Doesn't appear to be
 
Ok. I'd be willing to help you learn prolog I'm not really doing much now. But we would want to move to a new room.
 
ok figured out why it segfaults, macos wants 16-bit aligned stack and by default that doesn't happen so you need to zero out $rsp which sounds like a lot of work. It turns out crt1/crt0 does this. Does anyone know of a cross-platform way to locate these?
 
Now might not be the best time for that. I was hoping someone had a book reccommendation or something.
 
11:59 PM
That I do not have.
 
00:00 - 18:0018:00 - 00:00

« first day (2590 days earlier)      last day (2239 days later) »