»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.perl6.org/ | UTF-8 is our friend! Set by sorear on 4 February 2011. |
|||
00:00
raiph joined
00:01
PZt left,
snearch left,
drbean joined
00:07
icwiener joined
00:12
drbean left
|
|||
ggoebel | \o | 00:13 | |
Happy New Year's | |||
00:16
packetknife joined
00:17
drbean joined
|
|||
ggoebel | sorear: regarding niecza and publicity... never underestimate the seemingly little things. A simple yet clever visually appealing logo. A pithy quotable value statement, website, etc. | 00:22 | |
00:22
icwiener left
|
|||
ggoebel | a simple memorable searchable name | 00:23 | |
00:23
icwiener joined
|
|||
ggoebel | my greatest fear for niecza is you getting hit by a bus or losing interest | 00:23 | |
tadzik | I don't see how niecza is not simple or memorable :) | ||
but again, I'm Polish and I have no problem with Brzęczyszczykiewicz either :) | |||
ggoebel | that might be it... I always hear Nietsche when I type it... and usually flip the vowels and consonants | 00:24 | |
tadzik | it's almost like Nietsche, but the 'e' is audible, like the 'e' in Perl | 00:27 | |
cognominal | nom: my %h; say "Brzęczyszczykiewicz".split('').map: { %h{$_}++ }; say %h | 00:49 | |
p6eval | nom a7fd89: OUTPUT«0 0 0 0 0 1 0 0 2 1 3 1 0 0 0 0 1 2 4("B" => 1, "r" => 1, "z" => 5, "ę" => 1, "c" => 3, "y" => 2, "s" => 1, "k" => 1, "i" => 2, "e" => 1, "w" => 1).hash» | ||
cognominal | nom: my %h; "Brzęczyszczykiewicz".split('').map: { %h{$_}++ }; say %h | ||
p6eval | nom a7fd89: OUTPUT«().hash» | ||
cognominal | seems that some active code is optimized out :( | ||
or I need sleep | 00:50 | ||
Timbus peers in | |||
Timbus slaps cognominal's hand for doing that | |||
cognominal | ?? | 00:51 | |
Timbus | nom: my %h; %h{$_}++ for "Brzęczyszczykiewicz".split(''); say %h | ||
p6eval | nom a7fd89: OUTPUT«("B" => 1, "r" => 1, "z" => 5, "ę" => 1, "c" => 3, "y" => 2, "s" => 1, "k" => 1, "i" => 2, "e" => 1, "w" => 1).hash» | ||
cognominal | I want to use map for the mere side effects. | 00:52 | |
at least to get a warming. | 00:53 | ||
Timbus | maybe a /for method on lists is not as crazy as i thought | ||
.for | |||
tadzik | split('') => comb | 00:54 | |
00:56
PZt joined
|
|||
cognominal | "Civilization advances by extending the number of important operations which we can perform without thinking of them". But programmers, when using a new language, advance by rethinking how to write important operations instead of using muscle memory. | 00:56 | |
sorear | some people think that all list generating functions should be eager when the result is ignored | 00:57 | |
I do not like this at all | |||
raiph | sorear: what are your reasons for wanting niecza publicity? | 00:58 | |
cognominal | what would be the equivalent code in haskell? | 00:59 | |
sorear | maybe use mapM_ | 01:00 | |
raiph: a lot of people outside the echo chamber think perl6 means parrot | |||
cognominal | I want Perl6 on V8 :) | 01:01 | |
sorear | ehehehe... I doubt that will work well | ||
raiph | sorear: outside the echo chamber they think perl6 is a blue norwegian ;) | 01:02 | |
sorear | Perl6 can't be efficiently simulated on foreign VMs | ||
cognominal | sorear: but that would mean Perl 6 on chrome (polychrome?) and world domination | 01:04 | |
ggoebel | sorear: if the motivation behind niecza is "make it fast"... in layman's terms what are the hurdles which need to be overcome in the short, mid, and long terms? | 01:05 | |
dalek | ast: cb88c13 | (Solomon Foster)++ | S02-types/anon_block.t: Fudge for niecza. |
01:10 | |
Timbus | how much effort would it take to lift nqp from parrot and put it in llvm | 01:11 | |
dalek | ecza: 260335a | (Solomon Foster)++ | t/spectest.data: Turn on S02-types/anon_block.t. |
||
Timbus | gc and utility libraries aside | ||
i mean just getting it to compile itself into llvm for now | 01:12 | ||
you can always plug in a hans boehm i guess.. | 01:13 | ||
cognominal | Timbus: indeed I think .map as a degenerated form of the .grep.map idiom I use a lot. I use them both for side effecta. The former being your .for method. | 01:14 | |
Timbus | im not even a functional programmer, but side effects like that dont sit right for me | ||
01:16
drbean left
|
|||
cognominal | bad habits are hard to die | 01:16 | |
that's the perl 4 programmer in me\ | 01:17 | ||
Timbus | fortunately i missed that stage | ||
colomon | ah, perl 4! | 01:20 | |
01:22
drbean joined
|
|||
colomon | niecza: say Order::Increase | 01:23 | |
p6eval | niecza v13-43-gd7bbde0: OUTPUT«Unhandled exception: Unable to resolve method postcircumfix:<( )> in class Any at /tmp/0WFpfPLDi4 line 1 (mainline @ 2)  at /home/p6eval/niecza/lib/CORE.setting line 2613 (ANON @ 3)  at /home/p6eval/niecza/lib/CORE.setting line 2614 (module-CORE @ 61… | ||
cognominal | my first immortalized perl post date from 1991 groups.google.com/forum/?hl=fr#!se...7fT_e8iOIJ | 01:24 | |
*dates | |||
colomon | woah, I didn't learn perl until late 1994 | ||
cognominal | I note I did not know all the magic switches to gobble stdin. | 01:26 | |
colomon | I still don't. ;) | 01:27 | |
01:28
raiph left
|
|||
tadzik | you mean the -plne stuff? | 01:29 | |
cognominal | I have lost the mails dating from the time where I was [email@hidden.address] [email@hidden.address] was quite a mouthful. | ||
tadzik: yup | 01:30 | ||
tadzik | heh, I ususally put them there at random until it starts to work | ||
01:35
bluescreen10 left
|
|||
[Coke] | cognominal: you at Oracle now? | 01:39 | |
cognominal | nope, I have quitted Sun a long time ago... | 01:43 | |
geekosaur wonders when mono-sgen will be fixed in macports (long delay then bus error; mono itself works) | 01:47 | ||
01:51
cspencer left
01:53
cspencer joined
|
|||
dalek | ast: 9ee6b08 | (Solomon Foster)++ | S12-class/attributes.t: Fudge for niecza. Please note that IMO the last set of tests is at best misguided... |
01:56 | |
ecza: cc39754 | (Solomon Foster)++ | t/spectest.data: Turn on S12-class/attributes.t. |
01:57 | ||
sorear | Timbus: look at the "6model" repo... nqp already has ports to luajit, java, and c# | 02:03 | |
Timbus | yeah but th- wait luajit | 02:04 | |
02:04
Chillance left
|
|||
Timbus | .. yeah but they're not quite as low level as llvm | 02:04 | |
sorear is younger than Perl itself | |||
02:05
Chillance joined
|
|||
Timbus | also do these ports compile and run rakudo? | 02:05 | |
tadzik | I've not heard of any attempts | 02:06 | |
[Coke] | t/spec/S16-filehandles/filetest.t has failures in niecza. | 02:07 | |
I just added that file to spectest.data on 12/24 | 02:08 | ||
colomon | [Coke]: works locally for me. | ||
sorear | Timbus: no. | ||
Timbus | wouldn't have thought so | 02:09 | |
colomon | [Coke]: do you have the very latest niecza? | 02:11 | |
TimToady | perl6: say +(1 .. '10') | 02:24 | |
p6eval | niecza v13-43-gd7bbde0: OUTPUT«0» | ||
..pugs b927740, rakudo a7fd89: OUTPUT«10» | |||
geekosaur | *blink* | 02:27 | |
Timbus | i.. okay | 02:29 | |
colomon | TimToady: was there ever an official ruling on what to do with that case? | 02:30 | |
TimToady | S04:3414 covers that | 02:32 | |
(in the context of numeric arg on the left) | |||
colomon | S03:3414, you mean | 02:33 | |
TimToady | er, yeah, sorry | ||
colomon | no worries, TimToady++ | 02:34 | |
Is the effect intended to be, if the left-hand-side is Numeric and the right-hand-side is not, you cast the right-hand-side to Numeric? | 02:35 | ||
TimToady | yes | ||
colomon | so 0 .. '1.5' is 0 .. 1.5 and not 0 .. 1 | ||
TimToady | it should be like prefix:<+> | 02:36 | |
colomon | I ask because the text says "the right argument is coerced to the type of the left argument" | ||
TimToady | hmm | ||
that's probably a specbug | 02:37 | ||
colomon | so should it be something like: | 02:38 | |
1) both numeric, take as is | |||
2) first numeric, prefix:<+> the second | |||
3) cast the right argument to the type of the left argument | |||
(that's a sequence of whens, not a list of instructions. :) | 02:39 | ||
dalek | ecs: 8fcd8d6 | larry++ | S03-operators.pod: spec 0 .. '1.5' better, colomon++ |
02:40 | |
colomon | TimToady++ | 02:41 | |
TimToady | 3 is not correct, it's "cast narrower to wider" | ||
cover by "as above" in the spec | |||
colomon | gotcha | 02:42 | |
colomon is now hacking niecza | 02:43 | ||
er, colomon is now helping his wife unload an ungodly quantity of groceries | 02:49 | ||
02:50
tokuhirom joined
02:51
cspencer left
02:57
icwiener_ joined
|
|||
colomon | ..... not that I need a definition today, but how do you define "wider"? | 02:59 | |
03:01
icwiener left
|
|||
colomon | for instance, assume you've got a Rat and a Num. Which is wider? | 03:02 | |
niecza> say +(1 .. '10') | |||
10 | |||
sorear | num is "wider" | 03:04 | |
03:04
drbean left
|
|||
sorear | (1/2) + 1.5e0 ~~ Num | 03:04 | |
colomon | ........... ! | 03:05 | |
\ | |||
guess that makes a sort of sense | |||
afk moment' | |||
back | 03:08 | ||
03:10
drbean joined
03:13
am0c left
03:14
lutok left
|
|||
dalek | ecza: ab2db52 | sorear++ | lib/ (2 files): Implement prefix:<sleep> |
03:24 | |
Timbus | i.imgur.com/SlD8L.png | 03:36 | |
:I thanks visual studio | |||
03:37
Patterner left
03:38
c-lesh joined
|
|||
c-lesh | hello | 03:38 | |
03:38
Psyche^ joined,
Psyche^ is now known as Patterner
|
|||
colomon | c-lesh: o/ | 03:38 | |
c-lesh | I was wondering if there is a way to compile Java into Parrot bytecode. | ||
Timbus | yes: by hand | 03:39 | |
:D | |||
c-lesh | No, I mean is there a translator for Parrot? | ||
Timbus | none I am aware of, | 03:40 | |
c-lesh | Is it true that Parrot can translate some of its bytecode into native code? If so then would Perl 6 be good for writing games? | 03:41 | |
Timbus | you'd be better off using niecza imo | 03:42 | |
c-lesh | niecza compiles into native code? or Parrot bytecode? | ||
Timbus | to clr code | 03:43 | |
it's for mono/.net | |||
which has a jit | |||
c-lesh | ah, so clr does translate some of its code to native | ||
or all of it? | 03:44 | ||
Timbus | most of it | ||
c-lesh | wow! | ||
Timbus | but the other advantage is you can use .net libraries | ||
c-lesh | that's nice | ||
Timbus | whereas rakudo needs a bit of work in that area | 03:45 | |
c-lesh | my understanding is that Parrot does not yet compile its bytecode to native, right? | ||
Timbus | correct, it used to have a jit | ||
but it was removed | |||
c-lesh | why? | ||
Timbus | maintenance nightmare | ||
c-lesh | oh, I see | 03:46 | |
I'm just wondering how one would translate bytecode to native, say in c | |||
Timbus | it makes more sense for parrot to target something else that jit's better (llvm was the idea for a while) | ||
well, you know what a jit is? | |||
c-lesh | yes | 03:47 | |
Timbus | well.. that's how :P | ||
c-lesh | I'm not sure how to translate bytecode to native at runtime | ||
there is an __emit__ macro in C? | |||
jits are written in C, right? | 03:48 | ||
Timbus | they can be written in anything, really | 03:49 | |
c-lesh | I'll have to look at some source code. | ||
Timbus | the difference between bytecode and native code is.. well, one is native bytecode | ||
c-lesh | I'm writing an interpreter myself. It compiles to bytecode but I would like to compile this to native. | ||
Timbus | oh i see | ||
well, let me warn you ahead of time that it's a lot of effort | 03:50 | ||
please consider an existing jit library. llvm, GNU lightning | |||
c-lesh | Thanks, I'll check that out! | 03:51 | |
Did Parrot use any of the jit libraries you mentioned or did it implement its own? | 03:53 | ||
Timbus | it was it's own | 03:54 | |
.. its | |||
c-lesh | So is there a chance that the Parrot community will use some of these libraries? | 03:55 | |
Timbus | eventually, yes i would hope so. | ||
it really depends on what happens to parrot. | 03:56 | ||
03:56
icwiener_ left
03:57
icwiener_ joined
|
|||
c-lesh | What is Larry Wall doing these days? Does he still work on Perl? | 03:57 | |
colomon | On Perl 6, sure. | 03:58 | |
c-lesh | That's cool! | ||
colomon | He was on here about 70 minutes ago | ||
c-lesh | Wow! Too bad I missed him! | ||
Ok, so I'm curious about the history of Perl. Does Perl 1.0 have a garbage collector? | 03:59 | ||
geekosaur | actually still here now, just being quiet and unobvious | ||
as is his wont | 04:00 | ||
geekosaur unfamiliar with perl < 3.0 but believes there's a reasonable history in the perl5 pods | 04:01 | ||
04:01
kaleem joined
04:03
hundskatt left
|
|||
Timbus | huh c-lesh www.gnu.org/software/dotgnu/libjit-...ibjit.html check out this here. I hadn't seen it before but the tutorials are a helpful start | 04:07 | |
blog.fallingsnow.net/2008/05/23/sim...with-llvm/ and this. took me a while to dig that one up :/ | 04:15 | ||
c-lesh | Thanks! | ||
sorear | c-lesh: "unmaintainable" was only half of the storyy | 04:17 | |
c-lesh | What was the other problem? | ||
sorear | c-lesh: it generated terrible code | ||
c-lesh | Not efficient and fast? | 04:18 | |
sorear | it's extremely easy to write a naive native code compiler | ||
04:18
kaleem left
|
|||
sorear | but naive native code is actually not much faster than bytecode | 04:18 | |
and is MUCH larger | |||
c-lesh | Really!!!? | ||
How can that be? | 04:19 | ||
sorear | trade a lot of ram for a small amount of speed... not much win | ||
c-lesh: performance of native code is ... complicated | |||
c-lesh: say you have one bytecode instruction, which gets turned into 10 machine instructions by your naive compiler | |||
c-lesh | So, for example, I write a game in, say, Python (I imagine this language is bytecode interpreted.) It would probably run fast. | 04:20 | |
sorear | a good C compiler could turn the switch-clause into 15 instructions, but because of better scheduling that runs faster | ||
Timbus | jits come into their own when they unbox and such. the actual loop construct of an interpreter isn't much overhead no | ||
c-lesh | I see. | 04:21 | |
So why are jits even used? | |||
sorear | c-lesh: there is no "fast", only "fast enough" | ||
c-lesh: because a jit starts to win once you have about 10 man-years into it | |||
Timbus | well jits do add speed | ||
compare javascript performance to 4 years ago | 04:22 | ||
sorear | c-lesh: you're oversimplifying, I feel | ||
c-lesh | So a game written in python that takes advantage of graphics hardware acceleration can be faster than a game written in C that does not take advantage of graphics hardware acceleration. | ||
Timbus | c-lesh, easily | ||
sorear | c-lesh: I want you to stop thinking about "this will be fast" | ||
c-lesh | I have seen a lot of javascript games! | ||
Wow! This really cleared things up! Thanks! | 04:23 | ||
sorear | c-lesh: unless you're trying to make the next DF, calculation speed is not normally a big issue for games | 04:24 | |
c-lesh | I understand branch prediction is good these days as an interpreter would have to compare its op codes. | ||
especially for 2D games like Mario | 04:25 | ||
sorear | even for 3D games | ||
c-lesh | These are the games I'm writing for my interpreter | ||
3D games? | |||
Are 3D games possible in python? | |||
sorear | do you understand Amdahl's Law? | 04:26 | |
c-lesh | not really | ||
sorear | if a program spends 90% of its time in module A and 10% of its time in module B, no amount of optimizing module B can ever give you more than a 10% speedup | ||
this is Amdahl's Law | |||
c-lesh | ah | 04:27 | |
sorear | I consider it common sense, but that's probably just because I've used it for so long | ||
c-lesh | I'm new to the world of virtual machines, so to speak. | ||
Actually, I'm writing one to make games. | |||
sorear | so if you're writing a "typical" 3D game, 90% of the work is being done by the GPU, inside OpenGL | ||
so optimizing your code won't help much | 04:28 | ||
you can only make it faster by reducing the number of glXYZ calls | |||
c-lesh | So taking advantage of hardware acceleration is key - not code optimization. | ||
sorear | (why are you writing a VM?) | ||
c-lesh | I'm writing it for fun and because I want to learn about them. | 04:29 | |
sorear | c-lesh: yes, but I have to stress that every case is different | ||
when you have a good understanding of what's expensive and what's cheap, you'll naturally write faster code | |||
experience matters, a lot | |||
c-lesh | My VM takes advantage of hardware acceleration and I have gotten my first game to run quite fast on my netbook. | 04:30 | |
I have been writing code since 1998. | |||
C++, Java, C, Perl, Python, Java, etc. | |||
sorear | I'm sure you can access OpenGL from Python | ||
c-lesh | Sure. | ||
Timbus | panda3d and pygame come to mind | 04:31 | |
c-lesh | I have used pygame before. | ||
04:31
icwiener_ left
|
|||
sorear | probably longer than me. | 04:32 | |
c-lesh | Python uses what kind of garbage collection? stop-the-world, etc. | ||
sorear | python uses "fake" kind of garbage collection | ||
04:32
icwiener_ joined
|
|||
c-lesh | I started using python on 2008 but didn't like the indentation stuff. | 04:32 | |
fake? | |||
sorear | reference counting | ||
fastish, but wastes memory and leaks like a sieve if you mess up cycle handling | 04:33 | ||
c-lesh | So that means that memory is only marked as available? | ||
sorear | perl 5 does the same thing | ||
c-lesh | Parrot? | ||
sorear | Parrot has a real GC | ||
Timbus | parrot uses a generational gc | ||
c-lesh | does this run whenever, like for example in a game loop? | 04:34 | |
Timbus | yep | ||
c-lesh | is there a System.gc() like in Java? | ||
Timbus | couldn't answer that since I havent used parrot in awhile, but probably | 04:35 | |
sorear | I would like to gently dissuade you from basing anything mission-critical on Parrot | ||
c-lesh | My VM has no garbage collection and the programmer accesses the memory directly like in assembly. | ||
kshannon | Yes. | ||
c-lesh | sorry | ||
sorear | e.g. last time I tried this, a simple sub call is 2 µs on Parrot and <50ns on Mono | ||
s/mission/performance/ | |||
Timbus | mono is pretty boss. | ||
still mad android didnt use it | 04:36 | ||
c-lesh | It's like of like a cross between assembly and C. I think it's cool. | ||
sorear | what do you think of c--? | ||
c-lesh | I write stuff for Android. | ||
c--? | |||
Timbus | www.cminusminus.org/ | 04:37 | |
sorear | it's like a cross between assembly and C. I think it's cool. | ||
although it's lost a lot of mindshare to LLVM IR | 04:38 | ||
Timbus | i just liked the name | ||
c-lesh | c-- looks cool but my VM is not assembly like. It has no registers and uses DMA (direct memory access). It encodes all expressions and structures in bytes and executes these. | 04:39 | |
sorear | I do not think DMA means what you think it means | ||
c-lesh | what does it mean then? | ||
sorear | DMA refers to a situation where hardware *other than the CPU* can access memory | 04:40 | |
like say you have a network card that writes packets directly into RAM | |||
geekosaur | dma means devices can access memory directly insted of having the cpu poll and copy data | ||
c-lesh | I see. Like what the SNES does. | ||
Does that mean that one does not have to transfer from memory to register to memory again? | 04:41 | ||
Timbus | in a roundabout way. yes? | ||
sorear | yes, but you'd be stupid not to | 04:42 | |
c-lesh | why? | ||
sorear | because transfer from memory to register to memory again is a million times faster than using DMA | ||
c-lesh | ? | ||
sorear | and I might not be exagerating, it's at least tens of thousands of times faster | ||
04:42
kaleem joined
|
|||
c-lesh | but the snes uses it because according to the manual it is faster to block data transfers | 04:43 | |
sorear | that was 20 years ago | ||
Timbus | but my pc.. it is not a snes | ||
that would be awesome | |||
c-lesh | so dma is outdated | 04:44 | |
sorear | *MEGA HEAD DESK* | ||
c-lesh | i have looked at snes assembly code and architecture | ||
sorear | I give up. geekosaur, you're up | ||
geekosaur not sure he can do any better | |||
c-lesh | these people hack Super Mario World all the time: www.smwcentral.net | ||
04:45
kaleem left
|
|||
geekosaur | it depends on the system and bus design, plus even relatively slow DMA can be a net win if the system has enough other stuff to do while the DMA is occurring | 04:46 | |
c-lesh | So in a typical VM why are registers even used for register based VMs. For an addition why not just use arbitrary memory locations? 1 instruction with 3 params is better than 2 instructions, right? | ||
I guess snes used this sinces its hardware was memory mapped instead of port mapped. | 04:47 | ||
geekosaur | instruction decoding takes longer, memory fetch cycles may slow things down | ||
in modern system, performance isn't so much a function of individual design choices as the performance of the entire system on the intended load | 04:48 | ||
c-lesh | i see | ||
geekosaur | and individually "slower" designs may net a faster overall system if they are used appropriately | 04:49 | |
Timbus | the closer you get to the wire, the less sense it makes too. -_- | ||
c-lesh | interesting | ||
Timbus | simple jz loops often outperform repne even though it is a "single" instruction. why? pppfft | 04:50 | |
idk | |||
c-lesh | pppft? | ||
Timbus | thats my answer | ||
geekosaur | I think that's just onomatopoeia | 04:51 | |
c-lesh | i'm not familiar with the instruction repne | ||
Timbus | repeat until not equal(?) its been so long | ||
geekosaur | it's complex. early on, certainly, jz loops often outperformed rep loops; now its more dpeendent on what you're doing | ||
c-lesh | I'm learning quite a bit. Thanks! | 04:52 | |
geekosaur | x86 architecture has a number of "repeat" opcodes that act like automatic loops | ||
c-lesh | This would be the CISC architecture. | ||
RISC is better. | |||
geekosaur | but, as they're designed to be general, they can be higher overhead than a well thought out explicit loop | ||
c-lesh | So VM try to mirror the RISC architecture. | 04:53 | |
sorear | "RISC is better" ... this statement is so so very wrong | ||
c-lesh | ? | ||
sorear | it's complicated, like everything else | 04:54 | |
geekosaur | and, for example, a rep loop was almost always slower than the corresponding explicit loop on 8086/8088 and 80186; they got better in 80286 and again in 80386 | ||
c-lesh | interesting | ||
geekosaur | indeed. RISC is better if you code carefully to the strengths of the architecture, and hilariously bad if you code naively | ||
sorear | RISC *was* better when it first came out. but the supposed advantages of RISC don't stand up to processor evolution | ||
geekosaur | also required more complex code generators | 04:55 | |
sorear | the original MIPS design was extremely efficient, but it exposed a lot of the internal structure of the original MIPS processor in the ISA | ||
geekosaur | but CISC architectures evolved faster than code generators did, for the most part | ||
sorear | once you start making small changes to the chip, like adding a pipeline stage, the code generation has to completely change | ||
geekosaur | yep | 04:56 | |
sorear | a modern processor needs a recoding unit to isolate the user from changes in the processor | ||
c-lesh | that's were cisc comes in, right? | ||
sorear | right | 04:57 | |
geekosaur | there is less of a difference in that case, but the real problem is the red queen's race between RISC architecture changes and code generators | ||
c-lesh | so modern processors like dual cores uses cisc | ||
Timbus looks at dual core phone | |||
i.. hmm.. | |||
c-lesh | VMs also tend to emulate cisc, right? | ||
sorear | c-lesh: VMs do whatever they want | 04:58 | |
CPU design is fundamentally different from fast VM design | |||
geekosaur | and having to make sure you pick the right code generator for your current arch, or having to pick a general one that runs ok everywhere instead of very well natively and horribly if you copy the binary to an ostensibly similar system with a different cpu stepping | ||
c-lesh | true, my VM doesn't even have registers or simple instructions | ||
sorear | because transistors are *always on* while in a VM, *one instruction* is run at a time | ||
c-lesh | some instruction is my VM can be up to 30 bytes! | 04:59 | |
sorear | think about this: your processor has, say, 10^8 transistors clocked 10^9 times per second. Think about how many logical operations happen per second, and how much useful computation occurs. | ||
c-lesh | they include expressions as their parameters | ||
sorear | CPUs do a *lot* of redundant computation in order to minimize *logical depth* | 05:00 | |
c-lesh | i see | ||
sorear | also, dual core systems have been around since forever. "Modern cpus like dual cores" is ... not really meaningful | ||
c-lesh | since when? | ||
sorear | I don't know. I have a copy of the Motorola 68020 system programmer's manual in my room and it talks about concurrent processing using CAS | 05:01 | |
c-lesh | P4 was not dual core | ||
05:02
cooper left
|
|||
sorear | so at least 1984 | 05:02 | |
but I'm sure this goes back much further, perhaps to the 60s | |||
c-lesh | 1984? That long? I though they came out in the early 2000s. | ||
geekosaur | if you only care about particular x86 implementations, sure | 05:03 | |
05:03
cooper joined
|
|||
geekosaur | dual cores on the same chunk of silicon is recent | 05:03 | |
sorear | it wasn't that long ago when a single core had to be split across many chunks of silicon | 05:04 | |
c-lesh | i see there were coprocessors before | ||
sorear | especially back in the 50s and 60s when cores used discrete logic | ||
c-lesh | cpu, gpu, spu | ||
geekosaur | although even there it was more the "commonly available and easy for implementors to inegrate" that was the enhancement | ||
sorear | geekosaur: were there any single-die multi-{ARMv1,6502,8080} systems back in the day? | 05:05 | |
geekosaur | I don't think so | ||
sorear | geekosaur: for embedded systems wanting the ultimate fault isolation | ||
geekosaur | single-die could be done as a tour de force, but not in any kind of quantity, IIRC | 05:06 | |
but there were multiple CPU mainframes in the 60s and multiple CPU microcomputers in the 70s | 05:07 | ||
including hybrid logic machines such as the OSI C8D and the Commodore SuperPET | 05:08 | ||
c-lesh | not familar with those | ||
geekosaur | (6502/6800/8080 in the latter, IIRC) | ||
sorear | I kind of want to see what the maximum clock speed of a 35nm 6502 would be, and how many of them / combined TFLOPs you can get onto a P4-sized chip | 05:09 | |
(ignoring the issue that small local memories are a huge pain for programming) | 05:10 | ||
c-lesh | 64K | ||
that sucks | |||
sorear | I'm talking more like 4K | ||
*small* | |||
geekosaur | what sucked even more about the 6500 series was that the stack was hardcoded to page 2 | ||
c-lesh | 4K - I wrote pong in 256 bytes :) | ||
geekosaur | that is, 256 bytes at $0200 | 05:11 | |
c-lesh | there are clones of pong written in 256 bytes | ||
256 bytes was for the OS? | |||
$0200 | |||
so 64K - 256 was for the program or programs | 05:12 | ||
sorear | c-lesh: $0200 is how we used to write 0x0200 | ||
means that the stack occupies locations 512 to 767 | |||
c-lesh | I know but that was the starting address of where the program has to be loaded in 64K architectures. | 05:13 | |
sorear | also, 64k *addresses* does not mean 64k *bytes of memory* | ||
c-lesh | there was an architecture that had only 64K of memory and 16 bit addressing without segmentation | 05:14 | |
i think that was the 8080 | |||
sorear | segmentation was *rare*, c-lesh | ||
geekosaur | on 6500 your programs usually loded above $0300 or $0400; page 0 was used for indexing (!) and page 2 for stack, page 1 could hold a bootstrap but rarely an entire OS | ||
sorear | *most* of the 16-bit systems didn't have anything even remotely like the 8086's segment registers | 05:15 | |
c-lesh | how big was a page | ||
sorear | page means 256 bytes | ||
on the 6502/8080/6800 and related systems | |||
c-lesh | where was the os loaded to | ||
geekosaur | depended on the OS. CP/M on 8080 and successors loaded the program at $0100 and kept the OS in high memory, letting the program overwrite much of the OS while running and then reloading that part from disk when the program exited | 05:16 | |
c-lesh | virtual memory | 05:17 | |
so not much of the os had to be loaded | |||
not even the shell, right? | |||
sorear | Virtual memory for microcomputers did not exist at this point in time. | ||
geekosaur | doing virtual memory well required CPU support that didn't exit back then. this is more like explicitl overlays where a program or the OS had to explicitly load stuff into the overlay area and swap it around explicitly if needed | 05:18 | |
c-lesh | but overwriting the os is dangerous | ||
sorear | CPU support for virtual memory on personal computers didn't really exist until the 286 | ||
geekosaur | indeed. but, well, that was what was available at the time | ||
sorear | well after this period | ||
05:19
tokuhirom left
|
|||
c-lesh | how could the os be overwritten and maintain the stability of the system? | 05:21 | |
sorear | these weren't multiprogrammed systems. | ||
c-lesh | so if the os was overwritten and the program exited what happened, was the shell still there? | 05:22 | |
sorear | The program crashes, the user reboots the system | 05:23 | |
Timbus | did.. did they reboot it with a crank handle | 05:24 | |
:v | |||
geekosaur | the shell was one of the things CP/M explicitly allowed to be overwritten during program execution; proper program exit allowed the OS to reload the shell | ||
but if the program crashed, well, no memory protection or etc., so you got to hit the reset button or flip the power switch | |||
sorear | I imagine the reloader only took a few dozen instructions | ||
geekosaur | it was just the way things worked | ||
sorear | It was a very different culture than we see today in the Land of UNIX Clones | 05:25 | |
(imo NT counts as a UNIX clone, even if it's really an OS/2 clone) | |||
geekosaur | weird hybrid of OS/2 and VMS and Unix, really | 05:26 | |
but with a horrid lot of backward compatibility stuff, some of which microsoft is *still* trying to get rid of | 05:27 | ||
sorear | Timbus: Usually the way things worked back then was that you had a normally-open push button switch that connected the \RESET line on the CPU to ground | ||
If you were lucky you had another switch that did that for \NMI | |||
Timbus | geekosaur, and Wine is *still* trying to add | ||
heh | 05:28 | ||
sorear | (the closest thing to a "real" 70s-80s micro I've used was a 68040 Macintosh running System 7.1.) | ||
c-lesh | the program would call a sub to reload the shell | ||
right? | 05:29 | ||
sorear | the Macintosh was a 32-bit system with 24 address lines; the bulk of the OS was stored in ROM, and the NMI vector pointed to a debugger | ||
c-lesh | ROM as in BIOS | 05:30 | |
sorear | ROM as in read-only memory | ||
BIOS is a term specific to PC clones | |||
c-lesh | but doesn't the BIOS chip have some interrupts that allow files to be opened, etc. you know, os specific tasks | 05:31 | |
sorear | no, no, no, no | ||
the BIOS chip in a PC is just memory | |||
it stores 32-128 kilobytes of data | |||
c-lesh | no programs? | 05:32 | |
sorear | the address decode logic on the motherboard causes some addresses to be routed to the chip | ||
in particular, the PC starts executing instructions at $FFFF0 | |||
(there are some real horrors with initial CS setting that I'm not going into here) | |||
so usually the BIOS memory range includes, at least, $F0000 to $FFFFF | 05:33 | ||
c-lesh | memory mapped, right? | ||
sorear | the BIOS doesn't know what files are | ||
it does include a disk driver | |||
c-lesh | that's true, just sectors | ||
disk driver to read sectors? | |||
sorear | the bios loads sector (512byte) 0 of the floppy disk at address $7A00 (?), checks the last 2 bytes for the magic signature $55AA, and if so jumps to address $7A00 | 05:34 | |
might be $7C00 or $7E00 | |||
been a while since I wrote a boot sector | |||
c-lesh | you wrote a boot sector, for what? | 05:35 | |
sorear | the BIOS also contains subroutines that the OS can use to access hardware | ||
I wasted a few months of my life writing a toy OS... please don't judge | |||
c-lesh | so the bios contains basic hardware drivers | ||
sorear | yes | ||
c-lesh | that sounds like fun | ||
how did you debug the boot sector? | |||
sorear | I used a PC emulator | 05:36 | |
c-lesh | that's cool | 05:37 | |
sorear | the BIOS *chip* does not interact with interrupts in any way | ||
c-lesh | i see | ||
sorear | when the x86 chip sees an instruction like $CD $13, it acts as though it had received an interrupt 13h from the bus | 05:38 | |
so it loads a long address from $0004C and calls it after saving the old CS:IP and flags | |||
it's called an interrupt but it's really more like a subroutine call | |||
c-lesh | i see | 05:39 | |
that's interesting | |||
sorear | anyway the standard PC BIOS sets up interrupts 10h to 1Fh to different services | ||
c-lesh | so the instruction initiates the interrupt | ||
sorear | "interrupt" 10h is a disk driver, interrupt 13h controls the display | ||
the idea was that you would write an OS, and the OS would use the BIOS-provided services so that IBM could change the PC hardware | 05:41 | ||
sort of like how CISC makes it possible for processors to evolve | |||
many problems can be solved by adding a layer of indirection | |||
c-lesh | interesting | ||
sorear | ... it didn't quite work, modern OSes generally don't use the BIOS for a variety of reasons | ||
geekosaur | non-reentrant, non-interruptible, often quite slow compared to direct access, often uses scratchpad memory that interferes with OS memory | 05:43 | |
c-lesh | i see | ||
geekosaur | although, I would say the BIOS is in many ways back; ACPI in particular | ||
sorear | also, writing code to work around bugs in 10 PC clone BIOSes is just as hard as writing code to work with 10 diffierent pieces of PC clone hardware | 05:44 | |
geekosaur | another issue is, with disk drivers the generic BIOS entry point doesn't generally allow for intelligent scheduling of reads/writes which can be done by an OS's disk driver | ||
yep | |||
c-lesh | so the bios is not really used | 05:46 | |
sorear | another issue is that the BIOS uses 8086 instructions | ||
this was especially a problem for the 286, because once a 286 has been switched to native mode, the only way to reenter 8086 compatibility mode is to reboot (!) | |||
the 386 and later processors can switch back and forth freely, but it's still a performance and complexity cost | 05:47 | ||
"new" subsystems like ACPI and VBE often provide an alternate entry point that uses 386 instructions | 05:48 | ||
c-lesh | real mode | 05:53 | |
sorear | rakudo: say "foo".IO ~~ :s | 06:03 | |
p6eval | rakudo a7fd89: OUTPUT«Bool::False» | ||
sorear | rakudo: say "README".IO ~~ :s | ||
p6eval | rakudo a7fd89: OUTPUT«Bool::False» | ||
sorear | rakudo: say "/".IO ~~ :s | ||
p6eval | rakudo a7fd89: OUTPUT«Bool::True» | ||
sorear | rakudo: say "/".IO.s | ||
p6eval | rakudo a7fd89: OUTPUT«Bool::True» | ||
sorear | rakudo: say "NQP_VERSION".IO.s | 06:04 | |
p6eval | rakudo a7fd89: OUTPUT«Bool::False» | ||
sorear | rakudo: say "/etc/debian_version".IO.s | ||
p6eval | rakudo a7fd89: OUTPUT«Bool::True» | ||
sorear | rakudo: say "/etc/debian_version".IO.^methods(:local) | ||
p6eval | rakudo a7fd89: OUTPUT«open close eof get getc lines read seek tell write opened print say slurp d e f l r s t w x z copy chmod ins chomp path» | ||
c-lesh | cool | 06:09 | |
sorear | yes, I mean real mode | 06:10 | |
it seemed like the unneccessary obfuscation though, so I didn't say it | 06:11 | ||
c-lesh: disclaimer: I'm 21 years old. Everything I say about computer architectures in the 70s, don't assume I have first-hand knowledge | 06:12 | ||
06:13
tokuhirom joined
06:15
fridim_ left
|
|||
c-lesh | well, i'm going to sleep thanks for all the knowledge | 06:22 | |
06:23
c-lesh left
06:31
icwiener_ left
06:32
icwiener_ joined
06:43
icwiener_ left
06:52
icwiener_ joined
06:57
lateau_ joined
06:58
wtw joined
06:59
fridim_ joined
07:09
packetknife left
07:13
hundskatt joined
07:28
sayu joined
07:33
xjiujiu joined
07:36
kaleem joined
07:39
baest joined
07:41
fridim_ left
|
|||
frettled | Good moaning! | 07:46 | |
sorear | hi | ||
07:52
Mowah joined
08:04
xjiujiu left
08:08
tokuhirom left
|
|||
Woodi | hi ppls today :) | 08:14 | |
just backlogged :) | |||
sorear, geekosaur: pls, PLS, write blogs ! | 08:15 | ||
colomon: me think part of fractal work goes to performance testing and this was marketed. and would be nice to spread knowledge about more application-way using of Perl6 GUI | 08:21 | ||
sorear | Woodi: about what? | 08:24 | |
I have no idea which of the things I've done are worth blogging about. | |||
Woodi | sorear, geekosaur you can easily blog about 'technology', just find problem or 'possible improvement' you want to comment, add historical view, add comparision of existing implementations... | 08:25 | |
sorear: me think, for the start, would be nice some jurnalist ask some questions to you :) | |||
08:26
mj41 joined
|
|||
Timbus | it was an alright read | 08:27 | |
gotta admit | |||
Woodi | sorear: I have question for example: how stable or rock solid (in room temperature) are basic niecza/Perl6 features/functionalities. eg. are 'if', 'say', misc loop production ready ? | 08:28 | |
so scripting with that could be done | 08:29 | ||
what other features are stable ? | |||
how fast is niecza on linux with mono ? | |||
Timbus | about thiiiis fast *gestures with arms* | 08:30 | |
Woodi | sorear: how fast would be web server or web backend using niecza ? | ||
which databases you can access today ? | |||
sorear: pls write some library or app (crud) ppls can copy | 08:31 | ||
sorear | Woodi: you're not going to be able to break if/say/misc loops. Those are super-super-solid | 08:32 | |
niecza on linux with mono - varies a bit, comparable to Perl 5 but a bit slower | |||
08:33
x3nU left
|
|||
sorear | web server - no clue | 08:34 | |
Woodi | do niecza GUI include business grid/table ? | ||
Timbus | a what | ||
Woodi | relational table/data from db presenting widget :) | 08:36 | |
how stable is GUI ? small, stable Excel can be coded ? | 08:37 | ||
how stable text manipulation, regexes, grammars are ? | 08:38 | ||
08:39
x3nU joined
|
|||
moritz | I'll be traveling most of the day, hope to be online in ~6h again | 08:39 | |
ciao | |||
Woodi | sorear: problem with niecza is that it use worse then alien technology :) but one or two small but usefull apps will make it will be used | ||
08:39
x3nU is now known as Guest13145
|
|||
Woodi tee | 08:43 | ||
08:46
risou_awy is now known as risou
08:47
Mowah left
|
|||
Woodi | anyway, ppl, do not forget moust of us have winter now so low on sunlight which make better feeling. bears can at least sleep over that season :) | 08:57 | |
but hot cup of tee make me usually better :) | 08:58 | ||
09:03
sayu left
|
|||
sorear | the drink is spelled "tea" | 09:07 | |
Woodi | sorear: just found on Rosettacode that Niecza was 'using Perl5' initially. and in Niecza announcement that it is 'project focusing on optimization research'. is that goal done or to what point ? why architecture and how changed ? | ||
sorear smiles for the first time today | |||
Woodi | damn | ||
sorear | Woodi: I'm always asking how niecza can be made faster. | 09:08 | |
And use less memory | |||
Woodi | I realy need to re learn basics... | ||
sorear: but what other Perl6 implementations can learn from niecza ? | 09:09 | ||
sorear | how to implement features | ||
having two implementations helps to keep the spec on top | 09:10 | ||
but if you don't mind I'd like to sleep now | |||
Woodi | sorear: no problem, I can still put questions, etc here and hope it helps somehow someday :) | 09:11 | |
sorear -> sleep | |||
09:14
Mowah joined
09:26
kranius joined
|
|||
masak | morning, #perl6! | 09:26 | |
Woodi | hallo | 09:34 | |
masak: how you think, niecza could use niecza.perl6.org for now ? | 09:36 | ||
09:37
sftp left,
molaf joined
|
|||
Woodi | I could submit it to freshmeat.net/freecode too | 09:38 | |
masak | er. | 09:48 | |
09:48
ruoso left
|
|||
masak | Woodi: (1) how do you mean, "use niecza.perl6.org"? (2) what is it you think you could submit to freshmeat, and why? | 09:48 | |
stand down, soldier. | 09:49 | ||
don't make decisions that are really up to sorear. | |||
Woodi | ad 1. just thinked about simple web page for now. | 09:50 | |
ad 2. you must see it yourself :) it portal with announcements of opensource project, works seence '90 | 09:51 | ||
masak | I know what freshmeat is. | ||
Woodi | url was freashmeat.net and stil works | ||
masak | my question was more, why do you think you should submit something Niecza-related to freshmeat? | ||
09:52
icwiener_ left
|
|||
Woodi | why you use Reddit ? :) another place :) | 09:52 | |
09:52
icwiener_ joined
09:54
kaleem left
|
|||
masak | I know you're eager to publish sorear, but I really think it's better if he starts the process himself. | 09:54 | |
otherwise we'll have one or more unmaintained pages claiming to contain up-to-date information on Niecza. | |||
Woodi | Ithink sorear would like community will do simple and boring task for him... | 09:55 | |
masak | yeah, don't. | 09:56 | |
Woodi | k, I will ask sorear first | ||
later | 09:59 | ||
10:05
molaf left,
arlinius left
10:07
kaleem joined
10:17
arlinius joined
10:24
sayu joined
|
|||
kshannon | good * #perl6 | 11:07 | |
11:08
Mowah left
|
|||
tadzik | hello #perl6 | 11:24 | |
11:25
ruoso joined,
lateau_ left
11:27
kaleem left
|
|||
tadzik | why is sleep() a sub:prefix rather than just a sub? | 11:28 | |
Juerd | I'll guess: precedence | 11:30 | |
sleep 5, say "hi" | |||
Like Perl 5's ($)-prototyped subs | 11:31 | ||
</guess> | |||
11:34
sftp joined
11:50
LlamaRider joined
11:54
Trashlord left
11:58
kaleem joined
12:01
sayu_ joined
12:02
sayu left,
Trashlord joined
|
|||
masak | Juerd: yeah. | 12:09 | |
Juerd: also, &time. | 12:10 | ||
I don't remember how we did with &rand. | |||
masak checks the symbols in STD | |||
S03 gives 'sleep abs sin temp let' as examples. | 12:12 | ||
tadzik | hrm | ||
masak | ah; | ||
There is no unary C<rand> prefix in Perl 6, though there is a C<.rand> | |||
method call and an argumentless C<rand> term. | |||
perl6: say rand 5 | |||
p6eval | niecza v13-46-gab2db52: OUTPUT«===SORRY!===Unsupported use of rand(N); in Perl 6 please use N.rand or (1..N).pick at /tmp/UdmCAm4STk line 1:------> say rand⏏ 5Parse failed» | ||
..pugs b927740: OUTPUT«3.425864913733676» | |||
..rakudo a7fd89: OUTPUT«===SORRY!===Unsupported use of rand(N); in Perl 6 please use N.rand or (1..N).pick at line 1, near " 5"» | |||
masak | \o/ | ||
12:14
kaleem left
|
|||
Timbus | nom: say 5.rand | 12:24 | |
p6eval | nom a7fd89: OUTPUT«4.18286033244387» | ||
Timbus | so... 'why' | ||
masak | maybe because there's the realization that unary-prefix subs are exceptions to the general rule of listop subs, and we want to cut down on them as much as possible? | 12:26 | |
12:27
snearch joined
|
|||
masak | without, for some reason, going all the way down to 0. :P | 12:27 | |
maybe going all the way down to 0 would count as having an ideological axe to grind... | |||
Timbus | rand is a listop? | 12:28 | |
12:28
snearch left
|
|||
Timbus | i think something flew over my head there | 12:29 | |
it is far too hot for thinking | |||
12:30
kaleem joined
|
|||
LlamaRider | aren't listops just shorthand for using associative operators? | 12:31 | |
masak | Timbus: &rand as a sub is deprecated in Perl 6. use the method instead. | 12:34 | |
LlamaRider: I did not understand that question. | |||
masak wants to reject rt.perl.org/rt3/Ticket/Display.html?id=107292 | |||
also, rt.perl.org/rt3/Ticket/Display.html?id=107330 is a valid ticket but belongs in github.com/perl6/nqp/issues | 12:35 | ||
dalek | ast: af353d6 | (Solomon Foster)++ | S0 (3 files): Refudge a bit to account for new, harder fails in Niecza. |
||
12:36
tokuhirom joined
|
|||
LlamaRider | masak: scratch that question, i was thinking only of infix ops that end up as list ops | 12:38 | |
masak | ah, yes. | 12:42 | |
well, even something like 'say' is a listop, long as you don't use parens. | 12:43 | ||
nom: enum LionelRichie <me naturally together you>; sub it(*@a) { @a }; say you; say me; say it together, naturally | 12:46 | ||
p6eval | nom a7fd89: OUTPUT«LionelRichie::youLionelRichie::metogether naturally» | ||
12:48
icwiener_ left
|
|||
Timbus | <masak> Timbus: &rand as a sub is deprecated in Perl 6. use the method instead. | 12:50 | |
:I copout | |||
12:52
icwiener_ joined
|
|||
dalek | ecza: 3171346 | (Solomon Foster)++ | lib/CORE.setting: Do numeric casting as needed in Range constructor. |
12:53 | |
geekosaur thinks sleep is special-cased because you know it's never going to do anything sensible with a list, and 5.sleep is just weird | 12:55 | ||
masak | Timbus: that was in response to your question "rand is a listop?", which doesn't make much sense since the sub's deprecated. | ||
12:58
icwiener_ left
|
|||
masak | I guess it wasn't a listop before it got deprecated... | 12:59 | |
pugs: say rand 4, 5 | |||
p6eval | pugs b927740: OUTPUT«3.76167444512248045» | ||
masak | pugs: say rand 4, ":::", 5 | 13:00 | |
p6eval | pugs b927740: OUTPUT«1.895408839918673:::5» | ||
masak | right. | ||
13:00
snearch joined
|
|||
masak | geekosaur: I think it would be more consistent to have sleep parse as a listop, but to complain (at parse time) whenever more than one argument was passed to it. as it is 'say 2, sleep 3, 4, 5' is hard to read and understand. | 13:02 | |
13:02
icwiener_ joined
|
|||
masak | though I guess it's no more tricky than scalar assignment :) | 13:08 | |
it all depends on what expectations one has. | 13:09 | ||
13:20
snearch left
13:38
spine joined
13:40
kaleem left
|
|||
dalek | ast: 35ebf63 | (Solomon Foster)++ | S03-operators/range.t: Add tests for string and array RHS of numeric ranges. |
13:42 | |
13:48
Mowah joined
13:58
daxim joined
14:31
whiteknight joined,
whiteknight is now known as Guest25455
14:39
owlEyes joined
14:40
bao joined
14:41
orafu left
14:43
orafu joined
14:46
PerlJam joined
|
|||
PerlJam | greetings! | 14:46 | |
masak | earthlings! | ||
spine | hi there, is there some way in rakudo to keep the list generated by the cross operator from flattening? | 14:49 | |
S03 says to uses lol context, but that doesn't seem to be implemented. | |||
rakudo: say .perl for (1,2)X,(3,4) | 14:50 | ||
p6eval | rakudo a7fd89: OUTPUT«13142324» | ||
bao | ? | 14:51 | |
masak | spine: correct -- I don't think it's implemented. | 14:52 | |
bao: ¿ | |||
14:53
snearch joined
|
|||
spine | masak: so I'd be best off by implementing a version of <infix:X> myself, which makes items from the lists? | 14:53 | |
masak | bao: 你来自中国吗? | ||
spine: not sure what you'd be best off doing :) if you know the size of the items, you can simply iterate that size. | 14:54 | ||
nom: for 1..10 X 'a'..'j' -> $a, $b { say "$a$b" } | 14:55 | ||
p6eval | nom a7fd89: OUTPUT«1a1b1c1d1e1f1g1h1i1j2a2b2c2d2e2f2g2h2i2j3a3b3c3d3e3f3g3h3i3j4a4b4c4d4e4f4g4h4i4j5a5b5c5d5e5f5g5h5i5j6a6b6c6d6e6f6g6h6i6j7a7b7c7d7e7f7g7h7i7j8a8b8c8d8e8f8g8h8i8j9a9bxE2 | ||
spine | masak: OK, thanks. I'll see if that is enough. trying to write down a nice solution to the tree problem from your coding contest ;) | 14:58 | |
masak | nice! | 14:59 | |
cognominal | "Foundations of Language : Brain, Meaning, Grammar, Evolution" www.amazon.fr/dp/B001ODEPQ2 | 15:02 | |
may be of interest to people here | |||
better link : www.amazon.com/dp/B001ODEPQ2 | 15:03 | ||
15:04
bao left
15:10
kaare_ joined
15:13
wtw left
15:14
kaare_ left
15:15
kaare_ joined
15:16
kaare_ left,
kaare_ joined
15:18
simcop2387 left
15:20
simcop2387 joined
15:23
sayu_ left
15:24
sayu joined
15:30
teeter joined
|
|||
fsergot | nom: for 1..10 X 'a'..'j' -> $a { say $a } | 15:30 | |
p6eval | nom a7fd89: OUTPUT«1a1b1c1d1e1f1g1h1i1j2a2b2c2d2e2f2g2h2i2j3a3b3c3d3e3f3g3h3i3j4a4b4c4d4e4f4g4h4i4j5a5b5c5d5e5f5g5h5i5j6a | ||
15:30
teeter left
|
|||
fsergot | nom: my @a := 1..10 X 'a'..'j'; say @a.WHAT; | 15:30 | |
p6eval | nom a7fd89: OUTPUT«List()» | 15:31 | |
fsergot | nom: my @a := 1..10 X 'a'..'j'; say @a.perl; | ||
p6eval | nom a7fd89: OUTPUT«((ListIter.new(),), (ListIter.new(),), (ListIter.new(),), (ListIter.new(),), (ListIter.new(),), (ListIter.new(),), (ListIter.new(),), (ListIter.new(),), (ListIter.new(),), (ListIter.new(),), (ListIter.new(),), (ListIter.new(),), (ListIter.new(),), (ListIter.new(),), (… | ||
fsergot | nom: my @a := 1..10 X 'a'..'j'; say @a; | ||
p6eval | nom a7fd89: OUTPUT«1 a 1 b 1 c 1 d 1 e 1 f 1 g 1 h 1 i 1 j 2 a 2 b 2 c 2 d 2 e 2 f 2 g 2 h 2 i 2 j 3 a 3 b 3 c 3 d 3 e 3 f 3 g 3 h 3 i 3 j 4 a 4 b 4 c 4 d 4 e 4 f 4 g 4 h 4 i 4 j 5 a 5 b 5 c 5 d 5 e 5 f 5 g 5 h 5 i 5 j 6 a 6 b 6 c 6 d 6 e 6 f 6 g 6 h 6 i 6 j 7 a 7 b 7 c 7 d 7 e 7 f 7 g … | ||
fsergot | nom: my @a = 1..10 X 'a'..'j'; say @a; | 15:33 | |
p6eval | nom a7fd89: OUTPUT«1 a 1 b 1 c 1 d 1 e 1 f 1 g 1 h 1 i 1 j 2 a 2 b 2 c 2 d 2 e 2 f 2 g 2 h 2 i 2 j 3 a 3 b 3 c 3 d 3 e 3 f 3 g 3 h 3 i 3 j 4 a 4 b 4 c 4 d 4 e 4 f 4 g 4 h 4 i 4 j 5 a 5 b 5 c 5 d 5 e 5 f 5 g 5 h 5 i 5 j 6 a 6 b 6 c 6 d 6 e 6 f 6 g 6 h 6 i 6 j 7 a 7 b 7 c 7 d 7 e 7 f 7 g … | ||
fsergot | Whats differences between := and =? | 15:34 | |
masak | I'd just like to say I like fluent interfaces, and I think they could be used more than they are today: martinfowler.com/bliki/FluentInterface.html | ||
fsergot: := binds a value to a variable, = assigns a value to the container associated with a variable. | |||
15:35
Mowah left
|
|||
masak | fsergot: after the binding, you have variable->value. after the assignment, you have variable->container->value. | 15:35 | |
15:35
baest left,
havinglargeballs joined
|
|||
fsergot | nom: my @a = 1..3 X 'a'..'c'; say @a.perl; | 15:35 | |
p6eval | nom a7fd89: OUTPUT«Array.new(1, "a", 1, "b", 1, "c", 2, "a", 2, "b", 2, "c", 3, "a", 3, "b", 3, "c")» | ||
masak | fsergot: the container allows you to do more assignments later. | ||
fsergot | nom: my $a := 'a'; $a = 'b'; | 15:36 | |
p6eval | nom a7fd89: OUTPUT«Cannot assign to a non-container in block <anon> at /tmp/7UHz7Z9JDf:1 in <anon> at /tmp/7UHz7Z9JDf:1» | ||
fsergot | masak++ clear, thanks. | ||
:) | |||
the deeper in perl i am, the more interesting p6 is :) | 15:38 | ||
masak | best explanation I've given so far :) | 15:39 | |
fsergot: you might find strangelyconsistent.org/blog/plain-...ky-binding interesting, too. | |||
fsergot | masak: where, in life examples, i can use := ? :) | ||
masak: thanks :) | |||
masak | hm, that's slightly badly formatted. sorry about that. | ||
fsergot: that's too general a question. | 15:40 | ||
15:40
Mowah joined
|
|||
masak | fsergot: but often binding involves less "copying" than assignment. I've seen people use if for performance reasons. | 15:40 | |
dalek | ast: f6f7478 | (Solomon Foster)++ | S03-sequence/nonnumeric.t: Fudge for niecza. |
15:41 | |
fsergot | thanks :) | 15:42 | |
dalek | ecza: 1f4230f | (Solomon Foster)++ | t/spectest.data: Turn on S03-sequence/nonnumeric.t. |
15:43 | |
masak | fsergot: for example strangelyconsistent.org/p6cc2010/p5-moritz/ uses binding for this reason. | 15:45 | |
binds the array rather than clone it and copy all of the strings in it. | 15:46 | ||
spine | fsergot; I've come to some problems with = when using lazy lists, e.g. my @a = map {$_}, 1..Inf; leads to an infinite loop, whereas my @a := map {$_}, 1..Inf; retains it's lazyness. | 15:48 | |
masak | oh yes. that's a good reason, too. | ||
array assignments are eager -- array bindings are lazy. | 15:49 | ||
it's even possible to bind a lazy list to an array constant :) | |||
TimToady | niecza: constant @primes = 2, 3, { ($_ + 2, $_ + 4 ... *).first: -> $n { $n %% none @primes ... * > sqrt($n); } } ... *; say @primes[^20]; | 15:50 | |
p6eval | niecza v13-47-g3171346: OUTPUT«2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71» | ||
masak | \o/ | ||
colomon | niecza: constant @song := $*IN.lines; say @song[1] | ||
p6eval | niecza v13-47-g3171346: OUTPUT«===SORRY!===Malformed constant at /tmp/2QeX4cP_Fd line 1:------> constant @song ⏏:= $*IN.lines; say @song[1]Parse failed» | ||
colomon | niecza: constant @song = $*IN.lines; say @song[1] | ||
p6eval | niecza v13-47-g3171346: OUTPUT«Unhandled exception: Unable to resolve method lines in class Any at /tmp/h2aTGpinkC line 1 (@song init @ 2)  at <unknown> line 0 (ExitRunloop @ 0)  at /home/p6eval/niecza/src/NieczaBackendDotnet.pm6 line 0 (downcall @ 0)  at /home/p6eval/niecza/src… | ||
TimToady | the pseudo assignment works more like a binding here | ||
masak | but surely binding should be syntactially allowed, too? | 15:51 | |
[Coke] starts skipping through backscroll. | |||
TimToady | niecza: constant @song = lines($*IN); say @song[1] | ||
p6eval | niecza v13-47-g3171346: OUTPUT«Unhandled exception: Unable to resolve method lines in class Any at <unknown> line 0 (ExitRunloop @ 0)  at /tmp/IRlIdmlY4Y line 1 (@song init @ 2)  at <unknown> line 0 (ExitRunloop @ 0)  at /home/p6eval/niecza/src/NieczaBackendDotnet.pm6 line 0 (do… | ||
TimToady | oh, should've expected that | 15:52 | |
colomon | niecza: constant @song = $*IN.slurp; say @song[1] | ||
p6eval | niecza v13-47-g3171346: OUTPUT«Unhandled exception: Unable to resolve method slurp in class Any at /tmp/R6diXdVUi1 line 1 (@song init @ 2)  at <unknown> line 0 (ExitRunloop @ 0)  at /home/p6eval/niecza/src/NieczaBackendDotnet.pm6 line 0 (downcall @ 0)  at /home/p6eval/niecza/src… | ||
colomon | niecza: constant @song = lines(); say @song[1] | 15:53 | |
p6eval | niecza v13-47-g3171346: OUTPUT«Unhandled exception: Unable to resolve method lines in class Any at <unknown> line 0 (ExitRunloop @ 0)  at /tmp/qR9nBecSu4 line 1 (@song init @ 2)  at <unknown> line 0 (ExitRunloop @ 0)  at /home/p6eval/niecza/src/NieczaBackendDotnet.pm6 line 0 (do… | ||
TimToady | the problem is $*IN is not there at compile time | ||
colomon | ah | ||
15:53
havinglargeballs left
|
|||
colomon | TimToady++ | 15:53 | |
15:54
daxim left
|
|||
masak | d'oh! | 15:54 | |
[Coke] | masak: re: RT#107292 - is Perl6::Compiler in the specs anywhere? | 15:55 | |
masak | nope. | ||
it's a Rakudo thing. | 15:56 | ||
15:56
bluescreen10 joined
|
|||
masak | I don't think the expectation that it'll be loadable at the user level is justified. | 15:56 | |
15:57
LlamaRider left
|
|||
PerlJam | Why not? Seems like it falls under making "hard things possible" | 15:58 | |
[Coke] | PerlJam: because it's not in the spec, and is therefor one more thing we'd have to support if we refactored. | 15:59 | |
15:59
snearch left,
snearch joined
|
|||
masak | nqp is a different language than Perl 6, so even if the user find the file, he'd have to load it through with some :lang<nqp> modifier. | 16:00 | |
s/find/found/ | |||
jnthn | afternoon, #perl6 | 16:01 | |
phenny | jnthn: 21 Dec 20:01Z <moritz> tell jnthn at your convenience, please take a look at S12-attributes/mutators.t. It seems to die in $!varies +=2 with "No applicable candidates found to dispatch to for 'Numeric'", which I find quite weird, since $!varies is typed Int | ||
jnthn: 22 Dec 12:18Z <moritz> ask jnthn if he wants to get some commits in before the release | |||
jnthn: 27 Dec 02:12Z <sorear> tell jnthn irclog.perlgeek.de/perl6/2011-12-27#i_4883396 I'd like a second opinion | |||
PerlJam | [Coke]: I agree that those things are true, but that doesn't seem like a sufficient argument for not making it part of the spec. | ||
[Coke] | +1 from me on rejecting it, anyway. | ||
PerlJam: then you're forcing every implementation to use our (currently internal) API. | 16:02 | ||
jnthn | Just dropping by to say I'm still alive. ;-) | ||
[Coke] | jnthn: \o/ | ||
jnthn | Will be back home in a few days, and then back to my normal level of hacktivity. :) | ||
PerlJam | [Coke]: no, I'm saying make the API public. (at least I'm entertaining the idea a little more than the rest of you :) | ||
masak | jnthn! \o/ | 16:03 | |
[Coke] | so, don't make it spec, but make it supported? Still -1 from me. ;) | 16:04 | |
16:05
owlEyes left
|
|||
jnthn | Loading NQP code will need a :lang<nqp>. | 16:05 | |
PerlJam | I'm perfectly happy rejecting that ticket for the reasons cited, I just think the idea has some merit that should be considered. | 16:07 | |
jnthn | The Perl 6 grammar almost certainly should be accessible from Perl 6 space, with an appropriate use statement. The exact interface to doing so is something we probably want to try and standardize over implementations. | 16:08 | |
Though not a priority at the moment, for me anyway. | |||
16:09
phenny joined
|
|||
jnthn | huh, how come Pretence got changed to Pretense in a7fd89ea? :) | 16:12 | |
masak | goodness knows! | ||
masak pretends to be innocent | |||
jnthn | www.thefreedictionary.com/pretence is correct, y'know :P | ||
oh, pretense is the American spelling. | |||
masak | aye. | 16:13 | |
the commit comment says as much! | |||
jnthn | But my MOP is proudly British! :P | ||
PerlJam | jnthn: so ... do you "kick to the curb" or "kick to the kerb"? | 16:14 | |
(or would you were you so inclined to do such a thing ) | |||
:) | |||
jnthn | Well, it's spelt kerb of course :P | 16:15 | |
But "kick to the kerb" sounds a bit of a gangsta thing to be doing to me :P | |||
jnthn hasn't actually heard that expression before :) | |||
PerlJam | it's probably american in origin, so it should be "kick to the curb" :) | 16:16 | |
masak | jnthn: it is? I can see no other instances of British spelling in the MOP. that's why I thought "Pretence" was an honest mistake. | ||
jnthn | masak: I was mostly kidding about. | ||
masak: Well, it's not so much mistake as "jnthn simply doesn't think about these things" | 16:17 | ||
PerlJam was just surprised at the "americanization" of the MOP ;) | |||
ruoso | happy new year... (for all of those in the gregorian or julian calendars :) ) | ||
masak | PerlJam: it wasn't so much "americanization" as... a silly commit. | ||
PerlJam: now they have to credit me in the January release. mwhahaha! | |||
PerlJam | heh! | ||
jnthn | masak: Bah, you were meant to do that by getting us macros. :P | 16:18 | |
masak | ok, I'll do some of that too, then. | ||
jnthn | yay :) | ||
jnthn well get back to his NCI work | |||
*will | |||
Friday or weekend at the latest. | |||
Doing family/friend/visiting stuff for last few days here :) | 16:19 | ||
masak | jnthn: make sure you relax really well, and come back with batteries charged to the brim! | 16:20 | |
ruoso | jnthn: hey... I am getting some weird behaviors and segfaults with my junction-using sudoku solver | ||
colomon | jnthn, \o/ | 16:21 | |
PerlJam wished his xmas would have been of the battery-charging kind rather than the bettery-draining kind | |||
s/wished/wishes/ | |||
jnthn | ruoso: OK. An RT ticket with code and, if you can get it, a backtrace would be helpful. | ||
ruoso: I'll look at it once I'm back do things...probably the weekend. | |||
16:23
bbkr joined
|
|||
ruoso submitted | 16:27 | ||
jnthn | Thanks! | 16:29 | |
Looking forward to getting back to Perl 6 stuff in a few days time :) | |||
And with much more energy than I had by the end of December :) | |||
Tuit supply is looking reasonable for Jan/Feb too :) | |||
masak | sounds wonderful. | 16:30 | |
jnthn: looking forward to you getting back! | |||
jnthn | :) | ||
16:32
kaleem joined
|
|||
PerlJam | btw, anyone seen pmichaud? | 16:33 | |
Guest13145 | hi | ||
16:33
Guest13145 is now known as x3nU
|
|||
masak | hi, Guest25455^W x3nU | 16:33 | |
[Coke] | PerlJam: if anyone had actually seen him, I'd expect it to be you! ;) | 16:34 | |
x3nU | jnthn: someone told me to ask you | ||
i can't compile rakudo with msvc 2010 | |||
pastebin.com/vnJy7JjP | |||
there's no error message | |||
jnthn | 32 or 64? | ||
x3nU | 32 | ||
just "nqp.exe has stopped working" or something | |||
jnthn | Hm | ||
x3nU | like that | ||
PerlJam | [Coke]: I was actually thinking something similar when I asked the question :) | 16:35 | |
[Coke] | I have a 32-bit windows system; I can try on mine. | ||
jnthn | How are you building? | ||
I wonder if it's the "need to copy libparrot.dll in some cases" issue | |||
x3nU | perl Configure.pl --prefix=C:/Rakudo --gen-parrot --gen-nqp | ||
it fails on configure | |||
jnthn | Try (in the NQP directory) copy ..\install\bin\libparrot.dll . | ||
Then give it another go. | 16:36 | ||
x3nU | ok, i will check it :) | ||
masak | jnthn++ | ||
jnthn | We have an RT for this issue (if this is the issue) | 16:37 | |
Just didn't get to it yet. | |||
OK, back to relaxation mode here :) | 16:40 | ||
Probably back about on Thursday evening, once I get home :) | |||
o/ | |||
masak | \o | 16:41 | |
x3nU | bye :) | ||
16:42
kaleem left
|
|||
tadzik | oh, I've just missed jnthn | 16:42 | |
16:44
tokuhirom3 joined,
tokuhirom left
16:49
sayu left
|
|||
masak | tadzik: yes, but he promised to be back later in the week :) | 16:50 | |
x3nU | jnthn's solution worked :D | 17:03 | |
17:03
fsergot left
|
|||
x3nU | jnthn++ | 17:03 | |
tadzik | yeah, I can see :) | ||
17:09
lateau_ joined
17:10
estrabd left
17:18
MayDaniel joined
17:24
fsergot joined
|
|||
colomon | std mavens: I'm looking at sort.t, and it defines a new multi for sub cmp (???) and then tests that sort uses it. There's at least two major errors with that idea, right? | 17:33 | |
17:34
c-lesh joined
|
|||
c-lesh | hello again | 17:34 | |
colomon | \o | ||
c-lesh | i was wondering if anyone has looked at the source for Parrot | 17:35 | |
colomon | I avoid it like the plague. ;) | 17:36 | |
c-lesh | is it hard to read | ||
is it object oriented | |||
i was just wondering which module interprets the bytecode | 17:37 | ||
colomon | c-lesh: there's probably someone around here who can answer that. but there's an entire #parrot channel full of experts out there. | 17:38 | |
colomon doesn't recall whether it's on freenode or the perl IRC network. | |||
tadzik | perl | 17:39 | |
c-lesh | does parrot development take place there | 17:40 | |
colomon | I believe so. | ||
c-lesh | cool | 17:41 | |
colomon | as far as I know, it's the equivalent of this channel, but centered on parrot | ||
x3nU | irc.perl.org #parrot | ||
ruoso | jnthn: is rakudo autothreading using Tasks in the parrot level? | ||
c-lesh | cool, i'll check it out! | 17:42 | |
I've been doing some research so that I can finish writing my VM. | |||
17:43
drbean left
|
|||
colomon | ruoso: almost certainly not yet | 17:43 | |
c-lesh | Whoa! A camel made out of code on irc.perl.org! What is it supposed to do? | ||
x3nU | just logo, when i said "irc.perl.org" i meant irc network to which you should connect | 17:44 | |
ach, you're using webirc | |||
wait | |||
i will give you proper link | |||
c-lesh | CTCP? | ||
x3nU | c-lesh: wbe02.mibbit.com/?settings=1c154d53...nnect=true | 17:45 | |
here you can reach parrot folks | |||
c-lesh: that CTCP something meant that i was checking what irc client you were using | |||
you are* | |||
17:46
lateau_ left
|
|||
c-lesh | Thanks! | 17:46 | |
17:47
mj41 left
|
|||
c-lesh | they all seem to be out to lunch | 17:47 | |
colomon | it is virtual new year's day... | 17:48 | |
ruoso | colomon: it is interesting that the errors I'm getting are somewhat consistent with threading... | ||
c-lesh | haha :O | ||
colomon is watching the rose bowl parade, and looking forward to football | |||
ruoso: in what way? | 17:49 | ||
17:50
drbean joined
17:51
thou joined
|
|||
x3nU | c-lesh: on IRC it is normal to wait for reply for pretty long time | 17:51 | |
just ask questions and wait... | |||
c-lesh | did that | ||
i guess many are at work | |||
i work from home, though | |||
ruoso | colomon: in the way that it fails in different points at different runs, and that sometimes it even succeeds | ||
but it may be just memory corruption | |||
colomon | yes, memory corruption / GC issues are definitely a current rakudo problem. :( | 17:52 | |
c-lesh | personally i detest garbage collection | ||
why not implement something similar to C++ memory management and then have an "memory leaks" cleaned up at the end | 17:53 | ||
colomon | C++ memory management isn't very practical with a lot of the idioms we'd like to use in p6 | 17:54 | |
tadzik | 1) no one wants C++-like memory management 2) there'll be a hell load of those "memory leaks" | ||
c-lesh | instead of having a stack one could just make sure each subroutine has its own memory | ||
colomon | but I have to admit I'm frequently distressed at the side effects of NOT having C++-like memory management | ||
c-lesh | but the interpreter could check for those at the end of its execution and alert the programmer | ||
this was the programmer could fix his/her mistakes | 17:55 | ||
a garbage collector running in a time critical loop is not cool | |||
17:56
Mowah left
|
|||
ruoso | altough it definitely consistently segfaults in the same point | 17:59 | |
#0 0xf6901c4c in mp_cmp_d () from /home/ruoso/devel/rakudo/install/lib/parrot/3.11.0-devel/dynext/nqp_bigint_ops.so | |||
c-lesh | .so is an assembly file? | ||
ruoso | my bet is rakudo is not built with debug by default | 18:00 | |
18:00
Mowah joined
|
|||
colomon | .so is a library file | 18:00 | |
thou | $ nom if.pl | 18:01 | |
> take the white beer and the big yellow cheese from the kitchen and put it under the couch | |||
(["take", ("beer" => ("white",).list.item, "cheese" => ("big", "yellow").list.item), {"prep" => "from", "noun" => ("kitchen" => ().list.item,)}], ["put", ("it" => ().list.item,), {"prep" => "under", "noun" => ("couch" => ().list.item,)}]) | |||
colomon | object file library | ||
tadzik | thou: wow, what's that? | ||
colomon | thou++ | 18:02 | |
c-lesh | raduko is running on parrot? | ||
thou | gist.github.com/1536817 | ||
tadzik: it's a hack :) | |||
colomon | thou: what will you do when "it" has two apparent antecedents? ;) | ||
thou | i thought it'd be fun to rewrite masak++ 's crypt.pl | ||
tadzik | c-lesh: yes | ||
thou | so this works OK, i could write some Noun class or whatever to make it usable | 18:03 | |
18:04
MayDaniel left
18:06
zby_home joined,
achromic left
|
|||
thou | i was thinking about having a 2-pass method: first pass would map each word to a list of possible uses (e.g., "fire the rocket" -> (('fire' => ('transitive verb', 'singular noun')), ('the' => 'definite article'), ('rocket' => ('intransitive verb', 'singular noun'))), and then a 2nd pass to create a tree out of that. | 18:07 | |
but i don't know how to use a grammar for that. can i use the grammar on a stream of objects instead of characters? | 18:09 | ||
i kind of think not | |||
18:09
tokuhirom joined
|
|||
colomon | sort tests are making me see red | 18:18 | |
ruoso | thou: as long as you can implement your stream of objects in terms of the Str API | 18:26 | |
thou | hmmm | 18:27 | |
18:27
risou is now known as risou_awy
|
|||
masak | thou: ooh, rewrite crypt.pl? | 18:30 | |
in what? | |||
thou | masak, in perl6 | ||
just in a different way | |||
ruoso | thou: on the parsing natural languages topic... you do know that besides some very limited cases, this is a dead end, right? | ||
masak | thou: honestly, I've been thinking of rewriting it as well -- I was stupid not to develop it with TDD. | 18:31 | |
thou | ruoso -- yeah, but i'm thinking of slightly more friendly than most Interactive Fiction | ||
ruoso | i.e.: "fruit flies like bananas" | ||
thou | sue | ||
sure | |||
time flies like an arrow | |||
masak | see strangelyconsistent.org/blog/what-i...e-blogging | ||
18:31
snearch left,
snearch joined
|
|||
benabik | thou: There's an IF system for the Z-machine (info com) called Inform that has a pretty darn good parser. | 18:31 | |
ruoso | current trend on natural language processing is neural networks and lots and lots of data | 18:32 | |
thou | benabik: yeah, i have used TADS and some others, a little bit, that are really good | ||
ruoso | all formally-described-grammar initiative fail too soon on real world usage | ||
fsergot | masak++ | ||
thou | anyways, this was mainly just a thing to learn more about perl6 grammars | ||
ruoso | In that case, yes... it's lots of fun... I did that myself for portuguese once :) | 18:33 | |
thou | and to have fun with a small but non-trivial project :-) | ||
benabik | thou: Inform was put together by someone who did a thesis in natural language processing and his documentation is fairly clear... | 18:34 | |
thou | really, if i were wanting to make real IF, i should just use one of the existing systems. but i want to play with p6 | ||
:-) | 18:35 | ||
benabik | Well, he had a good chapter on how he did the parsing... | ||
thou | cool | ||
benabik | inform7.com/learn/papers/ | ||
thou | thanks! | ||
benabik | Although none of those are the ones I was thinking of, I think. Pity. | ||
Ah! This is what I was thinking of: www.inform-fiction.org/manual/html/s34.html | 18:37 | ||
18:37
awoodland joined
18:38
awoodland left
|
|||
colomon | niecza: say (1.1,2,NaN,-3.05,0.1,Inf,42,-1e-07,-Inf).sort.perl | 18:47 | |
p6eval | niecza v13-47-g3171346: OUTPUT«(Inf, -61/20, -Inf, -1E-07, 1/10, 2, 11/10, NaN, 42).list» | ||
colomon | :\ | 18:48 | |
niecza: say (1.1,2,NaN,-3.05,0.1,Inf,42,-1e-07,-Inf).sort({ $^a <=> $^b }).perl | |||
p6eval | niecza v13-47-g3171346: OUTPUT«(-Inf, -61/20, -1E-07, 1/10, 11/10, 2, 42, NaN, Inf).list» | ||
thou | benabik: the inform7 stuff is really interesting :-) | 18:49 | |
colomon | niecza: say (1.1,2,-3.05,0.1,Inf,42,-1e-07,-Inf).sort.perl | 18:50 | |
p6eval | niecza v13-47-g3171346: OUTPUT«(-61/20, Inf, -Inf, -1E-07, 1/10, 2, 11/10, 42).list» | ||
masak | colomon: I can see why you're not entirely pleased, yes. | 18:51 | |
colomon | masak: with niecza or with the tests? | ||
masak | the test looks OK to me. | 18:52 | |
colomon is cheesed off at both at the moment | |||
You can't sort NaN | |||
masak | ;) | ||
no, you can't. | |||
colomon | yet there it is in sort.t | 18:53 | |
and defining a sub cmp should have never have an effect on the behavior of sort | 18:54 | ||
benabik | thou: I was less than impressed with it because it's trying to do natural language programming, which I find somewhat irritating. :-D | 18:56 | |
masak | colomon: not unless &cmp called dynamically, which it isn't. | ||
thou | yeah, i guess if it makes sense anywhere, it's in a language for writing IF | 18:57 | |
masak | or SHRDLU. | 18:59 | |
19:14
tokuhirom left,
cognominal left
19:16
cognominal joined
|
|||
colomon | masak: what do you mean by dynamically? | 19:17 | |
(sorry to drop out there, I've got a three-year-old tackling me atm.) | |||
masak | :) | 19:18 | |
colomon | now he's back to playing with legos | 19:19 | |
masak | colomon: just like you can declare dynamically scoped variables, so you can define dynamically scoped subs. | 19:20 | |
which can then be overridden, and sort would find the overriding variant. | 19:21 | ||
except &cmp isn't dynamical that way. | |||
colomon | ah, okay. | 19:22 | |
more importantly, &cmp has nothing whatsoever to do with sort | |||
masak | right :) | 19:23 | |
19:23
arlinius left
|
|||
colomon | huh. next sort question: why should sort(@a) work? | 19:33 | |
kshannon | Ah, rakudo is depending on find_method dying with an appropriate error message rather than return NULL for quite a few things, but that's not the correct interface for VTABLE_find_method which should return NULL instead. There are quite a few places in the rakudo source which use VTABLE_find_method instead of STABLE(obj)->find_method; I'm currently patching VTABLE_find_method to catch exceptions and return NULL to play nice with non-6model parrot stuff (in | ||
19:34
c-lesh left
|
|||
kshannon | Jeez, I didn't realize the line had got that long :( | 19:34 | |
colomon | according to S32 containers, sort's first argument should be an ordering | ||
oversight in S32? | |||
kshannon | colomon: or the slurpy block. | 19:35 | |
whoops, that's the method... | 19:36 | ||
colomon | nom is doing | 19:40 | |
multi sub sort(*@values) { | |||
@values.at_pos(0).^does(Callable) | |||
?? do { my $cmp := @values.shift; @values.sort($cmp) } | |||
!! @values.sort; | |||
guess I can make niecza do that too, and maybe TimToady can fix the spec. (Or tell us to stop it!) | 19:42 | ||
flussence | .oO( wouldn't it make more sense to use 2 multis instead of a ternary op there? ) |
19:44 | |
19:45
Vlavv` joined
19:47
drbean left
19:49
Vlavv left
|
|||
colomon | niecza's sort really leaves a lot to be desired | 19:52 | |
since it doesn't appear to actually sort. :( | 19:53 | ||
19:53
drbean joined
|
|||
masak | yeah, that's usually a minimal requirement. | 19:54 | |
you could consider it part of the "contract" of the &sort routine. | 19:55 | ||
colomon | this is really frustrating -- sort doesn't work right, and the tests in sort.t are insane | ||
is ~(42,).sort: { 0 }, "42" | |||
{ 0 } | |||
? | |||
masak | 0 is a valid output from a comparator routine. | ||
19:55
Moukeddar joined
|
|||
sorear | good * #perl6 | 19:55 | |
masak | it means, essentially, "objects $^a and $^b are equivalent" | 19:56 | |
colomon | masak: it's valid output, but no current compiler can handle a 0-arg comparator | ||
tadzik | good star sorear | ||
colomon | masak: and with good reason: wtf does a 0-arg comparator mean? | ||
masak | good asterisk, sorear | ||
colomon | good multiplying, sorear | ||
masak | colomon: aye, that seems slightly insane. | ||
tadzik | now we see how #perl6 users pronounce '*' | 19:57 | |
masak | "here's the obj..." -- "ZERO!" | ||
geekosaur reminded of haskell-cafe thread where someone sked about pathological comparators and he suggested _ _ -> GT | |||
colomon | masak, geekosaur: the really crazy thing here is that the comparator has nothing to do with the point of the test, according to the comments. | 19:58 | |
geekosaur | (amd all good p6ers should know that * is prononced Whatever...) | ||
colomon | geekosaur++ | ||
perl6: say (42,).WHAT | |||
19:58
mj41 joined
|
|||
p6eval | rakudo a7fd89, niecza v13-47-g3171346: OUTPUT«Parcel()» | 19:58 | |
..pugs b927740: OUTPUT«Array» | |||
colomon | nom: say Parcel ~~ Positional | 19:59 | |
p6eval | nom a7fd89: OUTPUT«Bool::True» | ||
colomon | I think Henry is trying to figure out how to piledriver me. | 20:00 | |
now he's lying on me, trying to make me hold a lego, and chanting "Rock Island" from The Music Man | 20:02 | ||
PerlJam | btw, is there a way to "unpack" a parameter and name it? sub foo ([$head, *@tail]) {} will give me the parts, but how do I refer to the aggregate? sub foo (@blah($head, *@tail)) {} is suggested by the tree node example | 20:03 | |
er, perhaps @blah[$head, *$tail] | 20:04 | ||
masak | both should work, I think. | ||
dalek | ast: 801c909 | (Solomon Foster)++ | S32-list/sort.t: Trying to make less pathological, plus light fudging for niecza. |
||
20:10
Moukeddar left
20:11
drbean left
|
|||
dalek | ecza: e224a62 | (Solomon Foster)++ | lib/CORE.setting: Make sub sort recognize a callable first argument. |
20:14 | |
20:17
wolfman2000 joined,
drbean joined
|
|||
masak | wolfman2000! \o/ | 20:17 | |
wolfman2000 | Afternoon | ||
masak | evenin' | ||
colomon | sorear: if you grab my latest patches, you can try sort.t and see where it is giving incorrect answers. :( | 20:18 | |
masak | 27 people are now signed up for p6cc. | 20:21 | |
wolfman2000 | p6cc? Alright, what am I behind on this time? | 20:22 | |
tadzik | :) | ||
masak | wolfman2000: strangelyconsistent.org/blog/the-20...ng-contest | ||
tadzik | . o O ( 28 people are now signed up for p6cc ) | ||
masak | :P | ||
as heard on twitter, "solve great problems, win great books". | 20:23 | ||
felher | 28, wow. :) | 20:24 | |
masak | well, 27 outside of tadzik's thought bubble :) | 20:25 | |
wolfman2000 | I'll pass. Sad to say, but I don't know how to solve all of these. | ||
tadzik | I don't know either | ||
felher | Oh, ah, okay, just 27, thats _much_ less impressive ;P | ||
thou | anyone know a blog, etc. interpretation of perlcabal.org/syn/S12.html#Construc...ialization : when to use new, CREATE, BUILD, how they fit together.... | ||
20:25
alvis joined
|
|||
tadzik | what fun is it to solve things you know how to solve? :) | 20:25 | |
masak | moritz and I didn't choose problems that we knew immediately how to solve :) | 20:26 | |
tadzik | that's something to put in the new perldoc perloo | ||
wolfman2000 | fair enough | ||
Still...first thing I need to do is re-get perl 6 on here if I am to even consider it | |||
20:28
molaf joined
|
|||
masak | do that regardless. :) | 20:28 | |
20:29
PacoAir left
|
|||
colomon just got charged $266 for a hammer made out of legos. | 20:29 | ||
x3nU | sounds fun | ||
masak .oO( and every problem looks like a little LEGO nail... ) | 20:30 | ||
20:30
snearch left
|
|||
tadzik | my first thought was: colomon has built a lego hammer which is illegal, and he got a ticket for that | 20:30 | |
I've built a Lego Pirate Ship, I guess they're already after me | |||
good that we didn't build Lego Pirate Bay too | 20:31 | ||
colomon | my little guy appears to be a shrewd businessman. but not much of a hammer-maker, yet. | ||
20:32
packetknife joined
|
|||
thou | e.g., i'm thinking of something like: class Car is Word does Scenery { has $.word = 'car'; ... }; if Word.^find("car") -> $word { say "I recognize $word"; } # Do I implement Word.BUILD to add 'car' to a hash of known words, so I can implement Word.^find()? | 20:34 | |
masak | tadzik: LEGO Pirate Bay, enabling users to share material using LEGO-bittorrent :) | ||
dang, that pun only works in Swedish... :) | 20:35 | ||
phenny: sv en "bit"? | |||
phenny | masak: "piece" (en to en, translate.google.com) | ||
thou | hmmm, now that i spent the time to write that question, i'm thinking i might just want my Thing $car does Scenery .= new(:word('car')); | 20:36 | |
tadzik | hehe | ||
20:38
pothos left
20:39
pothos_ joined,
y3llow_ joined,
y3llow left
20:41
y3llow_ left,
drbean left,
y3llow joined
20:42
pothos_ left,
pothos joined
|
|||
thou | still, i'm not sure even in class Thing where to implement storing the word; do I write Thing method new(|$args) { callsame; # Now get :$word out of $args and stuff it into %vocabulary } ? | 20:43 | |
i have a feeling i should look at some example code :-) | |||
20:43
y3llow left
20:44
y3llow joined,
pothos left
20:45
pothos joined
|
|||
thou | i see masak avoided this question with something like: grass => Grass.new(:name<grass>), | 20:46 | |
20:46
PacoAir joined,
sudokode left
20:48
drbean joined
20:52
proller joined
|
|||
masak | thou: could also be solved using MOP and reflection, but I didn't want to do pull in that kind of heavy machinery. | 20:52 | |
thou | i think what i want is simple. i'm going to write a quick example of it in P5. if i can remember how to do that. :-) | 20:53 | |
masak | :) | 20:56 | |
colomon | niecza: (2, 45, 6, 1, 3).sort.say | 21:00 | |
p6eval | niecza v13-47-g3171346: OUTPUT«1 2 3 6 45» | ||
colomon | niecza: (2, 45, 6, 1, 3).sort(-> $a, $b { $b <=> $a }).say | ||
p6eval | niecza v13-47-g3171346: OUTPUT«45 6 3 2 1» | ||
21:02
drbean left
|
|||
colomon | niecza: { say $^b; say $^a; }("hello", "world") | 21:04 | |
p6eval | niecza v13-47-g3171346: OUTPUT«worldhello» | ||
masak | niecza: { &^c(&^a, &^b) }("hello", "world", &say) | 21:05 | |
p6eval | niecza v13-47-g3171346: OUTPUT«helloworld» | ||
masak | \o/ | ||
tadzik | nice | ||
21:07
spine left
21:09
drbean joined
21:18
alvis left
|
|||
sorear | good * #perl6 ... for real this time | 21:20 | |
masak | no-one expects the sorear inquisition! | 21:21 | |
sorear | masak: I think sleep as a prefix is a horrid fossil | ||
masak | sorear: yeah; I don't really see what the fuss is about there. | ||
tadzik | it just suprised me, reading the commit | 21:22 | |
sorear | TimToady: should $*IN exist at compile time? | 21:23 | |
jnthn!!! | |||
colomon | niecza: (1.1,2,-3.05,0.1,Inf,42,-1e-07,-Inf).sort.say | 21:24 | |
p6eval | niecza v13-49-ge224a62: OUTPUT«-3.05 Inf -Inf -1E-07 0.1 2 1.1 42» | ||
masak | sorear: jnthn's gone again... but he'll be back soon. | 21:25 | |
colomon | niecza: (1.1,2,-3.05,0.1,Inf,42,-1e-07,-Inf).sort.say | ||
p6eval | niecza v13-49-ge224a62: OUTPUT«-3.05 Inf -Inf -1E-07 0.1 2 1.1 42» | ||
sorear | colomon: last time I looked at sorting in niecza, the main issue that came up was that niecza doesn't use a "stable sort" | 21:27 | |
colomon | sorear: look again at those numbers. that's not a sort at all | 21:28 | |
sorear | What. | 21:31 | |
niecza: say ('a'..'z').pick(*) | 21:32 | ||
p6eval | niecza v13-49-ge224a62: OUTPUT«a v c g n s e f o z d h k l b r t q i y w m p x u j» | ||
sorear | niecza: say ('a'..'z').pick(*).sort | ||
p6eval | niecza v13-49-ge224a62: OUTPUT«a b c d e f g h i j k l m n o p q r s t u v w x y z» | ||
colomon | -3.05 Inf -Inf -1E-07 is not sensible, either with numeric or string sort | ||
sorear | I wonder why Str sorting seems to work | 21:34 | |
colomon | it seems like half the sorts work | ||
errrr, 2/3rds by the sort.t count | 21:35 | ||
sorear | niecza: say -3.05 cmp Inf | ||
p6eval | niecza v13-49-ge224a62: OUTPUT«-Inf» | ||
sorear | niecza: say -3.05 cmp -Inf | ||
p6eval | niecza v13-49-ge224a62: OUTPUT«Inf» | ||
sorear | niecza: say (-3.05) cmp Inf | ||
p6eval | niecza v13-49-ge224a62: OUTPUT«-Inf» | ||
colomon | that's one thing I was wondering about: is your sort routine okay with values other than -1, 0, and 1 internally? | ||
niecza: say (1..100).pick(5).sort | 21:36 | ||
p6eval | niecza v13-49-ge224a62: OUTPUT«4 24 52 73 98» | ||
colomon | niecza: say (1..100).pick(5).sort({ $^b <=> $^a }) | 21:38 | |
p6eval | niecza v13-49-ge224a62: OUTPUT«99 59 52 48 35» | ||
colomon | niecza: say (1..100).pick(5).sort({ $^b cmp $^a }) | ||
p6eval | niecza v13-49-ge224a62: OUTPUT«86 62 21 20 13» | ||
colomon | that's working fine. | ||
sorear | looks like it's using (int) internally | ||
so if <cmp> returns 0.2, that gets counted as 0 | |||
colomon | that would explain a lot | ||
sorear | also, C# thinks that (int) double.PositiveInfinity == int.MinValue | 21:40 | |
21:40
kaare_ left
|
|||
colomon | that's a bad combination, indeed. | 21:40 | |
I just checked the spec, and Comparator says "negative/zero/positive", not -1 0 1, so infix:<cmp> seems okay | 21:41 | ||
btw, as I read it, zero-argument "comparators" are not allowed. | 21:43 | ||
the given types listed for Ordering are Comparator (arity 2), KeyExtractor (arity 1), OrderingPair (one of each of the two prior, as a Pair), a Signature, or a Whatever | 21:46 | ||
sorear | niecza: for 0, 0.5, 0.5, :x, 0, :x -> $x, $y { say $x cmp $y } # look, non-transitive | 21:47 | |
p6eval | niecza v13-49-ge224a62: OUTPUT«-0.5Unhandled exception: Attempted to access slot key of type object for Pair at <unknown> line 0 (ExitRunloop @ 0)  at /home/p6eval/niecza/lib/CORE.setting line 1381 (Pair.Str @ 3)  at <unknown> line 0 (ExitRunloop @ 0)  at /home/p6eval/niecza/li… | ||
dalek | ecza: e6a9ddc | sorear++ | lib/Kernel.cs: Fix sorting of numbers differing by non-integral amounts |
21:54 | |
ecza: d921607 | sorear++ | lib/CORE.setting: Tweak cmp to be transitive with mixed number/non-number data |
|||
colomon | sorear++ | 21:57 | |
kshannon | BLOODY SEGFAULTS!! AAARRGGHH!!!!!! | 22:00 | |
colomon | niecza: say { $^a cmp $^b } ~~ Callable | 22:01 | |
p6eval | niecza v13-49-ge224a62: OUTPUT«Bool::True» | ||
22:02
snearch joined
|
|||
colomon | niecza: say { $^b <=> $^a }(1, 10) | 22:02 | |
p6eval | niecza v13-49-ge224a62: OUTPUT«1» | ||
colomon | niecza: say { $^a <=> $^b }(1, 10) | ||
masak hugs kshannon | |||
p6eval | niecza v13-49-ge224a62: OUTPUT«-1» | ||
masak | kshannon: if they're reproducible, please report them. | 22:03 | |
kshannon | It's to do with my exceptions catching patch for VTABLE_find_method for nqp github.com/perl6/nqp/pull/25 | 22:06 | |
and I think I just found the reason. I need to somehow peel the runloops back to where they were on entry... | 22:07 | ||
masak | kshannon++ | 22:09 | |
'night, #perl6 | |||
22:09
snearch left
22:10
sayu joined
|
|||
tadzik | g'night masak | 22:11 | |
22:12
icwiener_ left
|
|||
wolfman2000 | Hmm...any reason that it looks like the last Rakudo release was around July of last year? I guess I was expecting something more...recent. | 22:13 | |
sorear | sounds like you might be looking at Rakudo Star | ||
wolfman2000 | I am. | ||
sorear | Rakudo releases are monthly | ||
Star was something totally different | 22:14 | ||
wolfman2000 | Which do you recommend? | ||
22:15
munchor|afk joined,
munchor|afk left
|
|||
sorear | dunno, I've never used star | 22:16 | |
tadzik | wolfman2000: at the moment I'll recommend the monthly release | 22:18 | |
the new Star will probably happen sometime this month | |||
wolfman2000 | anyone want to try to recommend I just go straight to source? | ||
colomon | going straight to the source works quite well, IMO | 22:19 | |
wolfman2000 | at least I'm used to working with source | 22:20 | |
22:23
proller left
22:24
pothos left,
ruoso left,
tokuhirom3 left,
fhelmberger left,
athomason left,
TimToady left,
ranguard left
22:25
pothos joined,
tokuhirom3 joined,
ruoso joined,
fhelmberger joined,
athomason joined,
TimToady joined,
ranguard joined,
pothos left,
molaf left
|
|||
kshannon | WooHoo! free_runloop_jump_point FTW! | 22:25 | |
22:25
pothos joined
22:29
orafu left
22:30
orafu joined,
drbean left
22:35
drbean joined
22:36
packetknife left
|
|||
wolfman2000 | t/01-sanity/99-test-basic.t ........ Dubious, test returned 1 (wstat 256, 0x100) <-- felt I should report it | 22:36 | |
kshannon | What happens if you run that test by itself? | 22:40 | |
wolfman2000 | kshannon: I forgot how to run individual tests by themselves. | 22:41 | |
kshannon | make t/01-sanity/99-test-basic.t | ||
22:41
ruoso left
|
|||
wolfman2000 | pastie.org/3115020 | 22:42 | |
22:42
orafu left
|
|||
kshannon | Ooops, that's from tadzik-- 5b58e03 Cleanup Test.pm | 22:45 | |
wolfman2000 | I have plenty to relearn now | ||
22:47
ruoso joined,
sayu left
|
|||
kshannon | Fixed. github.com/rakudo/rakudo/pull/51 | 22:52 | |
wolfman2000 | Do I just git pull and then remake? Or do I have to configure again? | 22:53 | |
kshannon | Well I don't have access to the rakudo repository yet, so you'll have to "git pull git://github.com/KrisShannon/rakudo.git add-back-reasonless-skip" | 22:55 | |
tadzik | oh, gosh | ||
merging that now | |||
done | 22:56 | ||
wolfman2000 | Perhaps some of this should be explained on the how-to-get-rakudo page | ||
dalek | kudo/nom: 076bca2 | (Kris Shannon)++ | lib/Test.pm: Add back argumentless skip to lib/Test.pm t/01-sanity/99-test-basic.t breaks without it |
||
kudo/nom: ea03112 | tadzik++ | lib/Test.pm: Merge pull request #51 from KrisShannon/add-back-reasonless-skip Add back argumentless skip to lib/Test.pm |
|||
wolfman2000 | either way, glad I could help | ||
kshannon | Heh. OK, now you can just git pull. | ||
no remake needed as it just touches lib/Test.pm | 22:57 | ||
tadzik | which gets compiled to lib/Test.pir | ||
at the end of 'make', so that should be fast | 22:58 | ||
kshannon | make test will automatically rebuild the lib/Test.pir for you. | ||
wolfman2000 | all tests successful | 23:01 | |
kshannon | \o/ | 23:02 | |
wolfman2000 | I'll relearn parts of the language proper after some evening activities | ||
dalek | p: 390af1f | (Kris Shannon)++ | src/pmc/sixmodelobject.pmc: Catch exceptions in VTABLE find_method The sixmodel VTABLE find_method calls the find_method in the containers STABLE which will throw instead of returning NULL if it can't find the method. Anything which is calling the VTABLE find_method is not going to be expecting an exception so catch any exception and return NULL. |
23:13 | |
p: b9c26af | (Kris Shannon)++ | src/pmc/sixmodelobject.pmc: May also need to peel runloops after catching an exception |
|||
23:14
PacoAir_ joined,
PacoAir left,
PacoAir_ is now known as PacoAir
|
|||
japhb finally catches up with backlogging | 23:14 | ||
kshannon | That probably should have read "Anything **outside of 6model** which is calling the VTABLE find_method is not going to be expecting an exception so catch any exception and return NULL" | ||
sorear | o/ japhb | 23:15 | |
kshannon | The 6model stuff in nqp and the rakudo nom code all seem to expect VTABLE_find_method to possibly throw. | 23:16 | |
The rakudo nom Failure type depends on it for how it works :( | |||
23:17
PacoAir left
|
|||
japhb | sorear, apropos to the discussions re: VM performance, do you feel that you have already found most of the big (> 100%) performance boosts available for any Perl 6-on-mono implementation, or are there still significant areas that you have not researched/implemented? If you've got all the really big ones, what about medium-level (>10%) boosts? Is that still an area ripe with targets? | 23:18 | |
sorear | japhb: there are definitely specific cases left where there is considerable room for improvement. | 23:19 | |
japhb | sorear, Ah, fair enough. | 23:20 | |
23:20
zby_home left
23:25
molaf joined
|
|||
colomon | ack. I'm an idiot | 23:28 | |
23:34
mj41 left
23:38
Mowah left
23:40
Trashlord left
23:47
orafu joined
23:57
cognominal left
|
|||
thou | here's an example of using Moose BUILD() to take action during object creation; how to do this in rakudo nom? | 23:58 | |
gist.github.com/1552694 | |||
benabik | submethod BUILD, IIRC | ||
23:59
cognominal joined
|
|||
thou | i guess i'm not sure how to access the args, and it seems the object isn't created yet when submethod BUILD is called? | 23:59 | |
gist.github.com/1552700 |