»ö« 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.
diakopter (polling of the watch list upon changes) 00:02
flussence AIUI the whole point of blocking event loops is to *avoid* polling... but this is out of my depth so I'm giving up. 00:12
diakopter I doubt you're out of your depth 00:15
flussence maybe not, but there's no point trying to figure out a nice, usable, efficient API when the part of the language it depends on hasn't even been specced :) 00:18
diakopter well, to implement sorear's idea (transfer ownership of built-in data structures among threads), it would need some kind of language support 00:22
(that specifies how to "pass" an object from one thread to another) 00:24
diakopter (and it would still need the thread id marker I was mentioning for my solution, or something effectively the same) 00:25
lue wonders how to tell STD to not worry about nqp:: and pir:: stuff... 00:26
diakopter to use sorear's idea, it would have to be specified what happened when one thread tried to access an object that has been "passed" to another thread, and how to detect it. 00:29
sorear ownership transfer works fine in .net without language support 00:37
diakopter url? or keywords to google? 00:38
sorear docs.oracle.com/javase/specs/jls/se...jls-17.4.5 00:43
the corresponding .net specs have similar language, but it's not as easy to link to
buried in a PDF
diakopter what do you want to point out from 17.4.5? 00:46
sorear the concept of the happens-before ordering
diakopter what made you think I'm not quite familiar with this?
(and how does it relate to what I thought we were talking about) 00:47
sorear happens-before is what makes ownership transfer work 00:50
diakopter what ownership transfer? 00:51
I still have no idea what you're talking about in JVM or CLR contexts 00:52
where is there the notion of thread ownership?
(I sure don't see any) 00:56
colomon sorear++ # porting Native call 01:08
moritz FROGGS_++ # rakudo release 02:49
japhb brain++ # Nominally continuing to operate ;-) 03:10
diakopter moritz++ awake at 3 a.m. 03:31
moritz not by choice
gist.github.com/4109216 # qast-sink-1 spectest, when I remove the &eager calls from 'for' codegen 03:34
not disastrous, but not good either :-) 03:35
oh 03:37
it dies when the last statement in a file is a module declaration :(
moritz r: my $x = module A { }; nqp::say(nqp::can(A, 'sink')) 03:39
p6eval rakudo 50be5d: OUTPUT«No such method 'sink' for invocant of type 'Any'␤ in any find_method at src/gen/Metamodel.pm:149␤ in block at /tmp/87txM0NOgQ:1␤␤»
dalek kudo/qast-sink-1: a060144 | moritz++ | src/main.nqp:
sink last statement in main program
03:42
kudo/qast-sink-1: 55daa71 | moritz++ | src/main.nqp:
sink END phasers
kudo/qast-sink-1: 8557cf4 | moritz++ | src/Perl6/Actions.pm:
also sink bare blocks
kudo/qast-sink-1: 9a6e1c5 | moritz++ | src/ (3 files):
[WIP] remove explicit &eager calls from "for"

causes lots of fallout
roguechedder exit 03:48
lue does anyone know if rakudo's actions are currently broken? 03:49
moritz lue: what do you mean? 03:50
lue: rakudo/nom passes its spectests, so they can't be broken too badly
lue I'm trying to use actions and I'm still getting a match object in return. But if rakudo's working, it's most likely a bug on my part. /me investigates some more. 03:51
moritz "in return"?
lue: a match always returns a Match object; make() only sets its .ast 03:52
lue *facepalm*
lue notes to re-read Day 21 of the advent calendar more closely next time. 03:53
moritz r: nqp::can(module { }, 'something') 08:33
p6eval rakudo 50be5d: OUTPUT«No such method 'something' for invocant of type 'Any'␤ in any find_method at src/gen/Metamodel.pm:149␤ in block at /tmp/yWVp9fwVp9:1␤␤»
moritz phenny: tell jnthn currently nqp::can(module { }, 'something') dies; that blocks my current sink efforts; any idea how to fix that? 08:35
phenny moritz: I'll pass that on when jnthn is around.
dalek kudo/qast-sink-1: 86687dd | moritz++ | src/Perl6/Actions.pm:
sink ops related to flow control

this busts compilation of Test.pm, because nqp::can(module {}, "anything") dies; but that needs fixing anyway
09:02
pmurias sorear: re Moose, it loads slowly but isn't a substantial cost at runtime 10:06
GlitchMr pmurias: Imagine what would happen if awk or sed would use Moose. 10:08
huf we'd need an awkd and a sedd to load Moose once
and awk and sed would be thin clients connecting to their daemon 10:09
diakopter deftly imagines a VM that can load a P6 object system in 3ms 10:09
sorear pmurias: I never said anything otherwise. 10:10
GlitchMr sedd 10:12
lol
Woodi good day today :) 10:14
very interesting things today on # :) inode foe varibles, daemons for text processing services :) 10:15
err
inotify :) 10:16
let me allow something...
huf you'd love my idea about using filesystems backwards then... keep the contents in the filename and the filename in the contents
Woodi what you say if every varible have companion thread (maybe not created for basic types)... so varibles would be actors and messages would be send and asynchronously *appear* in actor ? 10:19
assuming we will have plenty of additional cores :)
sorear once you get past 10 cores or so threads stop being a viable way to abstract them 10:20
so any plan which requires >10 threads is DOA
Woodi sorear: "work" still need be done somehow, always, by something
when I was reading my first theoretical book about OO they use "message sending" phraze there... but we still have "message calling". and Smalltalk was inspired by Actor model 10:22
just theoretizing... 10:23
sorear Woodi: I feel like #perl6 people are unaware that perl 6 needs to run on single-core and dual-core machines too
2-4 core machines are not going away soon, and I hate it when y'all try to pessimize perl 6 for them, 10:24
.
Woodi sorear: you are right. but do not think we # is so much into removing basic C types from v6... 10:25
Woodi probably will start to use paper and pen before saying anything more 10:26
sorear sorry. I'm just having a bad day, not your fault 10:28
Woodi I am fine :) diakopter had some sad moments 10:31
diakopter not sad.. 10:32
Woodi sorear: you just have some *reality* orientation, probably do not like to waste time on poems and visions :)
diakopter yeah, those *bleep* implementors and their reality orientation 10:33
sorear diakopter: let AO = access some object SM = send message RM = receive message
diakopter: thread 1: AO AO AO SM
diakopter: thread 2: RM AO AO AO
since a message send is a synchronizing operation and happens-before the message receive, the object accesses are (by transitivity) also totally ordered 10:34
the ownership transfer is implicit but it's properly handled
diakopter I get what you're saying, but how is this anywhere in the JVM or CLR 10:35
sorear it's a logical consequence of rules 1, 3, and 4 in the definition of hb(x,y) 10:36
diakopter wtfh are you talking about? I see your reference to hb(x,y), but how does it have anything to do with thread ownership 10:38
diakopter probably this is a better question. 10:39
"ownership transfer works fine in .net without language support
"
what did you mean by "ownership transfer"
sorear thread 1 creates an object, fills it with data, and sticks it in a message 10:40
thread 2 receives the message and then pulls the data out of the object
ownership of the object is an emergent property, not stored in the object itself 10:41
the important thing is that both thread 1 and thread 2 can use full speed accesses
diakopter you just keep repeating yourself in different ways without answering my question 10:42
diakopter what did you mean by "ownership transfer" 10:43
sorear I give up 10:44
Woodi diakopter: I think rights to write to varible. to not allowing coruption in shared memory systems ? 10:45
or avoiding locking
diakopter sorear: oh wait, we were thinking of different things; I see what you mean now. Your idea doesn't work at all for the scenarios I was discussing, it's no better than a lock, if only one thread can access it at once; it doesn't scale at all. 10:46
diakopter I thought you were describing something that wasn't an emergent property that was an internal thing JVM and CLR did (without needing language support) 10:47
Woodi diakopter: accessing to one varible must be oane at a time. whole list is other case
diakopter Woodi: why must access to one variable be only one at a time? and what do you mean by "variable" as opposed to a data structure? 10:49
Woodi varible is memory piece, hmm, basic cell type of list and list is build from such simple data structures... 10:50
Woodi diakopter: one at a time means atomic access of data structure 10:52
diakopter o)o) 10:55
sorear sleep& 10:56
Woodi huf: how you imagine this backward filesystem ? :) if content is in file name then actual content can be empty... but how you "find" files ? - if you know filename then you already have needed data so not point in using files :) 11:38
on similiar topic: qmail queue of received mails (but not dispatched yet to personal mailboxes) use inode names as filenames for mails in that queue... 11:40
tadzik good morning 13:08
pmurias jnthn: how does backtracking into a subrule work? 14:01
tipdbmp phenny: .wik Perl 6 16:10
tipdbmp Is phenny written in Perl 5, or C? 16:11
moritz python, I thikn
tipdbmp Oh, okay.
Moukeddar good evening #perl6 16:42
Moukeddar i need some help 16:45
tadzik hello Moukeddar 16:46
Moukeddar hi tadzik, i need some help on how to store timetable information
basically we have three schedules, one for the teacher, one for the group of students, one for the room 16:47
Moukeddar and it's driving me crazy 16:49
pmurias you want to store the schedules from perl6? 16:51
Moukeddar no, it's a generic question, i'm asking if there is a proper way to store schedule data, like start time, end time, subject, class, teacher, room 16:52
pmurias there is no generic way to store things 16:53
Moukeddar right, but this situation is a bit more complex 16:54
i have to store it in a way to permet me to retrieve the proper timetable for each teacher/room/group 16:56
pmurias how big are the schedules? 16:59
pmurias Moukeddar: what technology are you using? 16:59
Moukeddar 6 days, and there are 10 hours a day, i have to specify for each hour, the teacher, the room,the goup and the subject, and in a way to permet to retrieve a schedule for a specific teacher or room or group 17:01
i'm using C#
FROGGS_ well, I'd make a (sql) database, fields are: id, date, hour, teacher, room, group, subject 17:03
then you just select the row by querying for date and teacher for example 17:04
Moukeddar ok ok , i got it all clear now, i was using the wrong approach, i was storring a copy of the timetable as a 2D array inside the object of each teacher/toom/group 17:11
felher I thought /src/Perl6/Actions.pm (in Rakudo) is full-featured Perl6 code. Am I mistaken? I'm asking because it seems i can not write "say 'blar';" but have to write "say('blar');". 17:37
moritz felher: it's NQP code, not full Perl 6 code
felher moritz: ah, that explains a few things :) 17:38
moritz: thanks :)
moritz felher: you're welcome
dalek ecs: 201ec75 | moritz++ | S14-roles-and-parametric-types.pod:
[S14] traits are called in sink context
17:41
pmurias Moukeddar: you could still iterate over the whole array and find what you want 17:52
Moukeddar pmurias, that's my i'm using a different approach now
moritz r: role A { }; nqp::say nqp::can(A, 'foo') 18:01
p6eval rakudo 50be5d: OUTPUT«1␤»
felher I'm curious: where are subs like nqp::chars defined? 18:06
moritz those aren't subs, they are ops
in nqp, src/QAST/Operations.nqp
felher moritz: and thanks again :)
moritz some of those map streight to PIR ops (nqp::chars -> pir::length__Is or so) 18:07
*straight
moritz others have more involved mappings 18:07
FROGGS_ moritz: what do you think about that: gist.github.com/4140897 18:48
Sarajevo hello 18:49
i have few questions, I never really programmed in perl so should I start learing perl5 or I should go with perl6? 18:50
dalek p/gh67-threads: a93cc27 | rurban++ | src/pmc/nqplexpad.pmc:
[GH #67] Use rurban/gh870-pmc_class nqp_group.h information

pmc2c from rurban/gh870-pmc_class exports the dynpmc types, which we use to check for NQPLexInfo in NQPLexPad, to discriminate for Proxy. Proxy info is read-only.
This does not work yet
18:54
tipdbmp I think Perl 5's documentation is a lot better than that of Perl 6's, it also runs faster for now. 18:55
au Sarajevo: learn both - each makes learning the other one easier :)
phenny au: 09 Nov 18:47Z <[Coke]> ask au if she can fix Pugs on feather.
FROGGS_ Sarajevo: Perl 5 and 6 are too different, so it wouldnt be the best advice to start with Perl 5 to hack Perl 6 laster
later
au: thats too confusing for a beginner I think 18:56
tipdbmp Perl 5 is kinda like a subset of Perl 6, so I wouldn't say that they are too different. 18:57
au for a beginner to programming, certainly.
moritz FROGGS_: erm, what
FROGGS_: that looks like it totally breaks nqp when used without rakudo
FROGGS_ I didnt know that this could be the case
moritz nqp uses qregex to compile itself 18:58
FROGGS_ k, I have another approach (that I did before what I just posted), that might fit better than 18:59
moritz self.throw_unreconigzed_metachar(~$/[0]); 19:00
method throw_unrecognized_metahcar($char) { nqp::die("Unrecognized regex metacharacter $char (must be quoted to match literally)" } 19:01
and then in rakudo, override throw_unreconigzed_metachar
FROGGS_ right, thats what I meant 19:05
whats better: self.panic or nqp::die? self.panic is used there for obsolete things 19:07
moritz then self.panic 19:08
FROGGS_ k
dalek p/gh67-threads: f07c9aa | rurban++ | src/pmc/nqplexpad.pmc:
[parrot #870] rename pmc_class_ to dynpmc_class_
19:18
FROGGS_ moritz: last try: gist.github.com/4140897 19:55
dalek rl6-roast-data: 136a368 | coke++ | / (3 files):
today (automated commit)
20:28
rl6-roast-data: 7c01c17 | coke++ | / (4 files):
today (automated commit)
rl6-roast-data: acfdcd0 | coke++ | / (3 files):
today (automated commit)
rl6-roast-data: b03fc20 | coke++ | / (3 files):
today (automated commit)
pmurias is there a rexep debugger for nqp? 20:55
[Coke] I think only for rakudo. 20:57
(but you could probably debug your npq regex using rakudo tof igure out what was going on.)
pmurias I'm debugging bugs in my nqp-js regexp implementation, and I thought it might be usefull to hook that to a regexp debugger at some point 20:59
tadzik in nqp I used only the <?DEBUG(1> thingy 21:06
and putting { say("stuff") } everywhere
[Coke] sorear: FYI, 15 niecza failures in latest roast run. 21:22
sorear good * #perl6 21:28
[Coke]: I'm surprised roast runs at all 21:33
[Coke] seems pretty stable over the past month (new tests need to be fudged is the main issue.) 21:41
TimToady can't run niecza at all right now 21:42
flussence TimToady: are you getting a segfault, by any chance? 21:46
[Coke] is pretty sure his latest changes to roast-data are fetching a completely fresh niecza daily. 21:47
pmurias sorear: hi 21:48
[Coke] yah, seems fine on feather. 21:50
pmurias sorear: re charging for features you use I agree with that fully, but what I would like to see avoided is bending the design around how things are currently implemented 21:53
pmurias wonders what is the fastest way to implement d in javascript 21:58
diakopter pmurias: I thought I saw an implement of the Unicode database in Javascript somewhere
*ation 21:59
TimToady gist.github.com/4141574 22:02
flussence hm, I think I've seriously borked something on mine :/ 22:03
gist.github.com/4141577 22:04
(this is after trying a clean checkout too)
TimToady decommuting &
pmurias diakopter: I'm thinking of using \d in a javascript regexp
sorear it's not expected to work right now :/ 22:05
should later today
pmurias sorear: what are the current niecza refactors aiming for? 22:32
sorear pmurias: same thing as the last ones, but this one might just succeed 23:09
pmurias sorear: and the last ones? 23:15
sorear: you mean unbootstrap? 23:16
sorear yes 23:17
dalek p/throw_unrecognized_metachar: bc22f6b | (Tobias Leich)++ | src/QRegex/P6Regex/Grammar.nqp:
throwing warning from method to support typed exceptions
23:33
pmurias sorear: how is backtracking done in niecza rules? 23:37
sorear pmurias: each rule maintains a stack of choice points in the RxFrame structure 23:44
FROGGS_ phenny: ask moritz if he can please look at github.com/perl6/nqp/commits/throw...d_metachar and github.com/rakudo/rakudo/pull/90 23:55
phenny FROGGS_: I'll pass that on when moritz is around.
FROGGS_ thanks & gnight 23:56